pax_global_header00006660000000000000000000000064131311645410014511gustar00rootroot0000000000000052 comment=c9b82843611eb71d8e698eabeb3410cd31ebf7af cvc4-1.5/000077500000000000000000000000001313116454100122155ustar00rootroot00000000000000cvc4-1.5/AUTHORS000066400000000000000000000037061313116454100132730ustar00rootroot00000000000000The authors, designers, and main contributors to CVC4 are listed below. CVC4's copyright is held by these individuals and the affiliated institutions at the time of their contributions (note that some authors have had more than one affiliated institution). See the file COPYING for details on the copyright and licensing of CVC4. The core designers and authors of CVC4 are: Kshitij Bansal, New York University, Google Clark Barrett, New York University, Google, Stanford University Francois Bobot, The University of Iowa, Commissariat a l'Energie Atomique Martin Brain, University of Oxford Christopher Conway, New York University, Google Morgan Deters, New York University Liana Hadarean, New York University, Mentor Graphics Corporation Dejan Jovanovic, New York University, SRI International Guy Katz, New York University, Stanford University Tim King, New York University, Universite Joseph Fourier, Google Tianyi Liang, The University of Iowa Paul Meng, The University of Iowa Andres Noetzli, Stanford University Andrew Reynolds, The University of Iowa, EPFL Cesare Tinelli, The University of Iowa Other contributors to the CVC4 codebase are listed in the THANKS file. CVC4 is the fourth in the CVC series of tools (CVC, CVC Lite, CVC3) but does not directly incorporate code from any previous version. Information about authors of previous CVC tools is included with their distributions. CVC4 contains MiniSAT code by Niklas Een and Niklas Sorensson. The CVC4 parser incorporates some code from ANTLR3, by Jim Idle, Temporal Wave LLC. CVC4 contains the doxygen.m4 autoconf module by Oren Ben-Kiki. CVC4 contains the pkg.m4 autoconf module by Scott James Remnant. CVC4 contains the ax_tls.m4 autoconf module by Alan Woodland and Diego Elio Petteno`. CVC4 contains the boost.m4 autoconf module by Benoit Sigoure. CVC4 maintainer versions contain the script autogen.sh by Christopher Sean Morrison, and copyright U.S. Army Research Laboratory. cvc4-1.5/COPYING000066400000000000000000000365721313116454100132650ustar00rootroot00000000000000CVC4 is copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 by its authors and contributors (see the file AUTHORS) and their institutional affiliations. All rights reserved. The source code of CVC4 is open and available to students, researchers, software companies, and everyone else to study, to modify, and to redistribute original or modified versions; distribution is under the terms of the modified BSD license (reproduced below). Please note that CVC4 can be configured (however, by default it is not) to link against some GPLed libraries, and therefore the use of these builds may be restricted in non-GPL-compatible projects. See below for a discussion of CLN, GLPK, and Readline (the three GPLed optional library dependences for CVC4), and how to ensure you have a build that doesn't link against GPLed libraries. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNERS AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- CVC4 incorporates MiniSat code, excluded from the above copyright. See src/sat/minisat. Its copyright: MiniSat -- Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson Copyright (c) 2007-2010 Niklas Sorensson 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CVC4 incorporates the script "autogen.sh", excluded from the above copyright. See autogen.sh. Its copyright: Copyright (c) 2005-2009 United States Government as represented by the U.S. Army Research Laboratory. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. CVC4 incorporates the script "doxygen.am", excluded from the above copyright. See config/doxygen.am. Its copyright: Copyright (C) 2004 Oren Ben-Kiki This file is distributed under the same terms as the Automake macro files. CVC4 incorporates the m4 macro file "pkg.m4", excluded from the above copyright. See config/pkg.m4. Its copyright: Copyright (c) 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. CVC4 incorporates the m4 macro file "ax_tls.m4", excluded from the above copyright and downloaded from http://www.gnu.org/software/autoconf-archive/ax_tls.html. See config/ax_tls.m4. Its copyright: Copyright (c) 2008 Alan Woodland Copyright (c) 2010 Diego Elio Petteno` 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 3 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, the respective Autoconf Macro's copyright owner gives unlimited permission to copy, distribute and modify the configure scripts that are the output of Autoconf when processing the Macro. You need not follow the terms of the GNU General Public License when using or distributing such scripts, even though portions of the text of the Macro appear in them. The GNU General Public License (GPL) does govern all other use of the material that constitutes the Autoconf Macro. This special exception to the GPL applies to versions of the Autoconf Macro released by the Autoconf Archive. When you make and distribute a modified version of the Autoconf Macro, you may extend this special exception to the GPL to apply to your modified version as well. CVC4 incorporates the m4 macro file "boost.m4", excluded from the above copyright and downloaded from http://github.com/tsuna/boost.m4 . See config/boost.m4. Its copyright: Copyright (C) 2007 Benoit Sigoure 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 3 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 . Additional permission under section 7 of the GNU General Public License, version 3 ("GPLv3"): If you convey this file as part of a work that contains a configuration script generated by Autoconf, you may do so under terms of your choice. CVC4 incorporates some code from Boost (see src/util/channel.h). This is covered by the Boost Software License, version 1.0, available at http://www.boost.org/LICENSE_1_0.txt and reprinted below: 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. CVC4 incorporates code from ANTLR3, excluded from the above copyright. See http://www.antlr3.org/, and the files src/parser/bounded_token_buffer.h, src/parser/bounded_token_buffer.cpp, and src/parser/antlr_input_imports.cpp. Their copyright: [The "BSD licence"] Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC http://www.temporal-wave.com http://www.linkedin.com/in/jimidle All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. CVC4 can be optionally configured to link against CLN, the Class Library for Numbers, available here: http://www.ginac.de/CLN/ Please be advised that as this library is covered under the GPLv3, if you choose to use the combined work, "CVC4+CLN," by building CVC4 with CLN, then it is also covered under the GPLv3. If you want to make sure you build a version of CVC4 that uses no GPLed libraries, configure CVC4 with the "--bsd" option before building (which is the default). CVC4 can then be used in contexts where you want to license CVC4 under the (modified) BSD license. CVC4 can be optionally configured to link against GLPK, the GNU Linear Programming Kit, available here: http://www.gnu.org/software/glpk/ Please be advised that as this library is covered under the GPLv3, if you choose to use the combined work, "CVC4+GLPK," by building CVC4 with GLPK, then it is also covered under the GPLv3. If you want to make sure you build a version of CVC4 that uses no GPLed libraries, configure CVC4 with the "--bsd" option before building (which is the default). CVC4 can then be used in contexts where you want to license CVC4 under the (modified) BSD license. CVC4 can be optionally configured to link against GNU Readline for improved text-editing support in interactive mode. GNU Readline is available here: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html Please be advised that as this library is covered under the GPLv3, if you choose to use the combined work, "CVC4+Readline," by building CVC4 with Readline, then it is also covered under the GPLv3. If you want to make sure you build a version of CVC4 that uses no GPLed libraries, configure CVC4 with the "--bsd" option before building (which is the default). CVC4 can then be used in contexts where you want to license CVC4 under the (modified) BSD license. CVC4 sources incorporate those of the LFSC proof checker, which is covered by the following license: LFSC is copyright (C) 2012, 2013 The University of Iowa. All rights reserved. LFSC is open-source; distribution is under the terms of the modified BSD license. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cvc4-1.5/INSTALL000066400000000000000000000270671313116454100132620ustar00rootroot00000000000000CVC4 release version 1.5. *** Quick-start instructions *** Build dependences The following tools and libraries are required to build and run CVC4. Versions given are minimum versions; more recent versions should be compatible. GNU C and C++ (gcc and g++), reasonably recent versions GNU Make GNU Bash GMP v4.2 (GNU Multi-Precision arithmetic library) MacPorts [only if on a Mac; see below] libantlr3c v3.2 or v3.4 (ANTLR parser generator C support library) The Boost C++ base libraries The hardest to obtain and install is the libantlr3c requirement, so that one is explained next. On a Mac, you need to additionally install MacPorts (see http://www.macports.org/). Doing so is easy. Then, simply run the script contrib/mac-build, which installs a few ports from the MacPorts repository, then compiles and installs antlr3c using the get-antlr-3.4 script (as described next). The mac-build script should set you up with all requirements, and will tell you how to configure CVC4 when it completes successfully. If "make" is non-GNU on your system, make sure to invoke "gmake" (or whatever GNU Make is installed as). If your usual shell is not Bash, the configure script should auto-correct this. If it does not, you'll see strange shell syntax errors, and you may need to explicitly set SHELL or CONFIG_SHELL to the location of bash on your system. *** Installing libantlr3c: ANTLR parser generator C support library For libantlr3c, you can use the convenience script in contrib/get-antlr-3.4 --this will download, patch, and install libantlr3c. On a 32-bit machine, or if you have difficulty building libantlr3c (or difficulty getting CVC4 to link against it later), you may need to remove the --enable-64bit part in the script. (If you're curious, the manual instructions are at http://cvc4.cs.stanford.edu/wiki/Developer%27s_Guide#ANTLR3 .) *** Building CVC4 The hardest build dependence to satisfy is libantlr3c; that's why it is explained above. Problems in satisfying other build dependences are explained below. Once the build dependences are satisfied, you should be able to configure, make, make check, and make install without incident: ./configure [use --prefix to specify a prefix; default /usr/local] make make check [optional but a good idea!] To build from a repository checkout (rather than a distributed CVC4 tarball), there are additional dependences; see below. You can then "make install" to install in the prefix you gave to the configure script (/usr/local by default). ** You should run "make check" ** before installation to ensure that CVC4 has been built correctly. In particular, GCC version 4.5.1 seems to have a bug in the optimizer that results in incorrect behavior (and wrong results) in many builds. This is a known problem for Minisat, and since Minisat is at the core of CVC4, a problem for CVC4. "make check" easily detects this problem (by showing a number of FAILed test cases). It is ok if the unit tests aren't run as part of "make check", but all system tests and regression tests should pass without incident. To build API documentation, use "make doc". Documentation is produced under doc/ but is not installed by "make install". Examples and tutorials are not installed with "make install." You may want to "make install-examples". See below. For more information about the build system itself (probably not necessary for casual users), see the Appendix at the bottom of this file. *** Installing the Boost C++ base libraries A Boost package is available on most Linux distributions; check yours for a package named something like libboost-dev or boost-devel. There are a number of additional Boost packages in some distributions, but this "basic" one should be sufficient for building CVC4. Should you want to install Boost manually, or to learn more about the Boost project, please visit http://www.boost.org/. *** Optional requirements None of these is required, but can improve CVC4 as described below: Optional: SWIG 2.0.x (Simplified Wrapper and Interface Generator) Optional: CLN v1.3 or newer (Class Library for Numbers) Optional: glpk-cut-log (A fork of the GNU Linear Programming Kit) Optional: ABC library (for improved bitvector support) Optional: GNU Readline library (for an improved interactive experience) Optional: The Boost C++ threading library (libboost_thread) Optional: CxxTest unit testing framework SWIG is necessary to build the Java API (and of course a JDK is necessary, too). SWIG 1.x won't work; you'll need 2.0, and the more recent the better. On Mac, we've seen SWIG segfault when generating CVC4 language bindings; version 2.0.8 or higher is recommended to avoid this. See "Language bindings" below for build instructions. CLN is an alternative multiprecision arithmetic package that can offer better performance and memory footprint than GMP. CLN is covered by the GNU General Public License, version 3; so if you choose to use CVC4 with CLN support, you are licensing CVC4 under that same license. (Usually CVC4's license is more permissive than GPL is; see the file COPYING in the CVC4 source distribution for details.) Please visit http://www.ginac.de/CLN/ for more details about CLN. glpk-cut-log is a fork of GLPK (the GNU Linear Programming Kit). This can be used to speed up certain classes of problems for the arithmetic implementation in CVC4. (This is not recommended for most users.) The source code for glpk-cut-log is available at: https://github.com/timothy-king/glpk-cut-log/ The only option for installation of glpk-cut-log is downloading the library, compiling and installing it manually. CVC4 is no longer compatible with the main GLPK library. GLPK and glpk-cut-log are covered by the GNU General Public License, version 3; so if you choose to use CVC4 with GLPK support, you are licensing CVC4 under that same license. (Usually CVC4's license is more permissive; see above discussion.) Please visit http://www.gnu.org/software/glpk/ for more details about GLPK. ABC: A System for Sequential Synthesis and Verification is a library for synthesis and verification of logic circuits. This can be used to speed up the eager bit-vector solver by first encoding the bit-blasted formula into AIG format and then using ABC to simplify the AIG. To install abc run the contrib/get-abc script which will download and install a compatible version of ABC in the cvc4 directory. To configure CVC4 to use abc configure with --with-abc and --with-abc-dir=PATH, where PATH corresponds to the install path of ABC. To run CVC4 using ABC use the --bitblast-aig command line argument. Please visit http://www.eecs.berkeley.edu/~alanmi/abc/ for more details on ABC. The GNU Readline library is optionally used to provide command editing, tab completion, and history functionality at the CVC prompt (when running in interactive mode). Check your distribution for a package named "libreadline-dev" or "readline-devel" or similar. This library is covered by the GNU General Public License, version 3. Like the above-mentioned libraries, if you choose to use CVC4 with readline support, you are licensing CVC4 under that same license. (Please visit http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html for more details about readline.) The Boost C++ threading library (often packaged independently of the Boost base library) is needed to run CVC4 in "portfolio" (multithreaded) mode. Check your distribution for a package named "libboost-thread-dev" or similar. CxxTest is necessary to run CVC4's unit tests (included with the distribution). Running these is not really required for users of CVC4; "make check" will skip unit tests if CxxTest isn't available, and go on to run the extensive system- and regression-tests in the source tree. However, if you're interested, you can download CxxTest at http://cxxtest.com/ . *** Language bindings There are several options available for using CVC4 from the API. First, CVC4 offers a complete and flexible API for manipulating expressions, maintaining a stack of assertions, and checking satisfiability, and related things. The C++ libraries (libcvc4.so and libcvc4parser.so) and required headers are installed normally via a "make install". This API is also available from Java (via CVC4.jar and libcvc4jni.so) by configuring with --enable-language-bindings=java. You'll also need SWIG 2.0 installed (and you might need to help configure find it if you installed it in a nonstandard place with --with-swig-dir=/path/to/swig/installation). You may also need to give the configure script the path to your Java headers (in particular, jni.h). You might do so with (for example): ./configure --enable-language-bindings=java \ JAVA_CPPFLAGS=-I/usr/lib/jvm/java-6-openjdk-amd64/include There is also a "C++ compatibility API" (#include and link against libcvc4compat.so) that attempts to maintain source-level backwards-compatibility with the CVC3 C++ API. The compatibility library is built by default, and --enable-language-bindings=java enables the Java compatibility library (CVC4compat.jar and libcvc4compatjni.so). --enable-language-bindings=c enables the C compatibility library (#include and link against libcvc4bindings_c_compat.so), and if you want both C and Java bindings, use --enable-language-bindings=c,java. These compatibility language bindings do NOT require SWIG. The examples/ directory includes some basic examples (the "simple vc" and "simple vc compat" family of examples) of all these interfaces. In principle, since we use SWIG to generate the native Java API, we could support other languages as well. However, using CVC4 from other languages is not supported, nor expected to work, at this time. If you're interested in helping to develop, maintain, and test a language binding, please contact one of the project leaders. *** Building CVC4 from a repository checkout CVC4's main repository is kept on GitHub at: https://github.com/CVC4/CVC4 and there are numerous experimental forks housed on GitHub as well, by different developers, implementing various features. The following tools and libraries are additionally required to build CVC4 from from a repository checkout rather than from a prepared source tarball. Automake v1.11 or later Autoconf v2.61 or later Libtool v2.2 or later ANTLR3 v3.2 or v3.4 First, use "./autogen.sh" to create the configure script. Then proceed as normal for any distribution tarball. The parsers are pre-generated for the tarballs, but don't exist in the repository; hence the extra ANTLR3 requirement to generate the source code for the parsers, when building from the repository. *** Examples and tutorials are not built or installed Examples are not built by "make" or "make install". See examples/README for information on what to find in the examples/ directory, as well as information about building and installing them. *** Appendix: Build architecture The build system is generated by automake, libtool, and autoconf. It is somewhat nonstandard, though, which (for one thing) requires that GNU Make be used. If you ./configure in the top-level source directory, the objects will actually all appear in builds/${arch}/${build_id}. This is to allow multiple, separate builds in the same place (e.g., an assertions-enabled debugging build alongside a production build), without changing directories at the shell. The "current" build is maintained until you re-configure. You can also create your own build directory inside or outside of the source tree and configure from there. All objects will then be built in that directory, and you'll ultimately find the "cvc4" binary in src/main/, and the libraries under src/ and src/parser/. cvc4-1.5/Makefile000066400000000000000000000174651313116454100136720ustar00rootroot00000000000000# -*-makefile-*- # # This makefile is the _source_ directory's makefile, and is static, # not generated. Makefile.am is the automake makefile for the build # top-level (its corresponding Makefile.in is here, too, but the # corresponding Makefile is under builds/$arch/$buildid. # builddir = builds .PHONY: all install examples install-examples all install examples install-examples .DEFAULT: @if test -d $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ echo $(MAKE) $@; \ $(MAKE) $@ || exit 1; \ $(MAKE) show-config; \ else \ echo; \ echo 'Run configure first, or type "make" in a configured build directory.'; \ echo; \ fi distclean maintainerclean: @if test -d $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ echo $(MAKE) $@; \ $(MAKE) $@ || exit 1; \ fi test -z "$(builddir)" || rm -fr "$(builddir)" rm -f config.reconfig # synonyms for "check" .PHONY: test test: check .PHONY: doc doc-internals doc: doc-builds doc-internals: doc-internals-builds YEAR := $(shell date +%Y) .PHONY: submission submission-main submission-application submission-parallel submission: @if [ -d builds-smtcomp ]; then \ echo 'ERROR:' >&2; \ echo 'ERROR: remove the builds-smtcomp directory' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi @if test -d cvc4-smtcomp-$(YEAR) || test -e cvc4-smtcomp-$(YEAR).zip || \ test -d cvc4-smtcomp-main-$(YEAR) || test -e cvc4-smtcomp-main-$(YEAR).zip || \ test -d cvc4-smtcomp-application-$(YEAR) || test -e cvc4-smtcomp-application-$(YEAR).zip || \ test -d cvc4-smtcomp-parallel-$(YEAR) || test -e cvc4-smtcomp-parallel-$(YEAR).zip; then \ echo 'ERROR:' >&2; \ echo 'ERROR: Please remove cvc4-smtcomp*-$(YEAR) and corresponding zipfiles.' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi $(MAKE) submission-main $(MAKE) submission-application $(MAKE) submission-parallel mkdir -p cvc4-smtcomp-$(YEAR)/bin cp -p cvc4-smtcomp-main-$(YEAR)/bin/cvc4 cvc4-smtcomp-$(YEAR)/bin/cvc4-main cp -p cvc4-smtcomp-main-$(YEAR)/bin/starexec_run_default cvc4-smtcomp-$(YEAR)/bin/starexec_run_default cp -p cvc4-smtcomp-application-$(YEAR)/bin/cvc4 cvc4-smtcomp-$(YEAR)/bin/cvc4-application cp -p cvc4-smtcomp-application-$(YEAR)/bin/starexec_run_default cvc4-smtcomp-$(YEAR)/bin/starexec_run_application cp -p cvc4-smtcomp-parallel-$(YEAR)/bin/pcvc4 cvc4-smtcomp-$(YEAR)/bin/pcvc4 #cp -p cvc4-smtcomp-parallel-$(YEAR)/bin/starexec_run_default cvc4-smtcomp-$(YEAR)/bin/starexec_run_parallel cat cvc4-smtcomp-main-$(YEAR)/starexec_description.txt \ cvc4-smtcomp-application-$(YEAR)/starexec_description.txt \ cvc4-smtcomp-parallel-$(YEAR)/starexec_description.txt \ > cvc4-smtcomp-$(YEAR)/starexec_description.txt perl -pi -e 's,/cvc4\b,/cvc4-main,g' cvc4-smtcomp-$(YEAR)/bin/starexec_run_default perl -pi -e 's,/cvc4\b,/cvc4-application,g' cvc4-smtcomp-$(YEAR)/bin/starexec_run_application cd cvc4-smtcomp-$(YEAR) && zip -r ../cvc4-smtcomp-$(YEAR).zip * submission-main: @if [ -d builds-smtcomp/main ]; then \ echo 'ERROR:' >&2; \ echo 'ERROR: Please remove the builds-smtcomp/main directory' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi @if [ -e contrib/run-script-smtcomp$(YEAR) ]; then :; else \ echo 'ERROR:' >&2; \ echo 'ERROR: Expected contrib/run-script-smtcomp$(YEAR) to exist!' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi @if test -d cvc4-smtcomp-main-$(YEAR) || test -e cvc4-smtcomp-main-$(YEAR).zip; then \ echo 'ERROR:' >&2; \ echo 'ERROR: Please remove cvc4-smtcomp-main-$(YEAR) and cvc4-smtcomp-main-$(YEAR).zip first.' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi ./autogen.sh mkdir -p builds-smtcomp/main ( cd builds-smtcomp/main; \ ../../configure competition --disable-thread-support --disable-shared --enable-static-binary --with-cln --with-glpk --with-abc --without-readline --enable-gpl; \ $(MAKE) V=1; \ strip src/main/cvc4; \ $(MAKE) check ) # main track mkdir -p cvc4-smtcomp-main-$(YEAR)/bin cp -p builds-smtcomp/main/src/main/cvc4 cvc4-smtcomp-main-$(YEAR)/bin/cvc4 cp contrib/run-script-smtcomp$(YEAR) cvc4-smtcomp-main-$(YEAR)/bin/starexec_run_default chmod 755 cvc4-smtcomp-main-$(YEAR)/bin/starexec_run_default echo "CVC4 for SMT_COMP main track `builds-smtcomp/main/src/main/cvc4 --version | head -1 | sed 's,.*version ,,;s,-,_,g;s,[^a-zA-Z0-9. _],,g'`" > cvc4-smtcomp-main-$(YEAR)/starexec_description.txt cd cvc4-smtcomp-main-$(YEAR) && zip -r ../cvc4-smtcomp-main-$(YEAR).zip * submission-application: # application track is a separate build because it has different preprocessor #defines @if [ -d builds-smtcomp/application ]; then \ echo 'ERROR:' >&2; \ echo 'ERROR: Please remove the builds-smtcomp/application directory' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi @if test -d cvc4-smtcomp-application-$(YEAR) || test -e cvc4-smtcomp-application-$(YEAR).zip; then \ echo 'ERROR:' >&2; \ echo 'ERROR: Please remove cvc4-smtcomp-application-$(YEAR) and cvc4-smtcomp-application-$(YEAR).zip first.' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi @if [ -e contrib/run-script-smtcomp$(YEAR)-application ]; then :; else \ echo 'ERROR:' >&2; \ echo 'ERROR: Expected contrib/run-script-smtcomp$(YEAR)-application to exist!' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi ./autogen.sh mkdir -p builds-smtcomp/application ( cd builds-smtcomp/application; \ ../../configure competition --disable-thread-support --disable-shared --enable-static-binary --with-cln --without-glpk --with-abc --without-readline --enable-gpl CXXFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK CFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK; \ $(MAKE) V=1; \ strip src/main/cvc4; \ $(MAKE) check ) # package the application track zipfile mkdir -p cvc4-smtcomp-application-$(YEAR)/bin cp -p builds-smtcomp/application/src/main/cvc4 cvc4-smtcomp-application-$(YEAR)/bin/cvc4 cp contrib/run-script-smtcomp$(YEAR)-application cvc4-smtcomp-application-$(YEAR)/bin/starexec_run_default chmod 755 cvc4-smtcomp-application-$(YEAR)/bin/starexec_run_default echo "CVC4 for SMT_COMP application track `builds-smtcomp/application/src/main/cvc4 --version | head -1 | sed 's,.*version ,,;s,-,_,g;s,[^a-zA-Z0-9. _],,g'`" > cvc4-smtcomp-application-$(YEAR)/starexec_description.txt cd cvc4-smtcomp-application-$(YEAR) && zip -r ../cvc4-smtcomp-application-$(YEAR).zip * submission-parallel: # parallel track can't be built with -cln, so it's a separate build @if [ -d builds-smtcomp/parallel ]; then \ echo 'ERROR:' >&2; \ echo 'ERROR: Please remove the builds-smtcomp/parallel directory' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi @if test -d cvc4-smtcomp-parallel-$(YEAR) || test -e cvc4-smtcomp-parallel-$(YEAR).zip; then \ echo 'ERROR:' >&2; \ echo 'ERROR: Please remove cvc4-smtcomp-parallel-$(YEAR) and cvc4-smtcomp-parallel-$(YEAR).zip first.' >&2; \ echo 'ERROR:' >&2; \ exit 1; \ fi ./autogen.sh mkdir -p builds-smtcomp/parallel ( cd builds-smtcomp/parallel; \ ../../configure competition --disable-shared --enable-static-binary --with-gmp --with-portfolio --with-glpk --with-abc --without-readline --enable-gpl; \ $(MAKE) V=1; \ strip src/main/pcvc4; \ $(MAKE) check BINARY=pcvc4 CVC4_REGRESSION_ARGS=--fallback-sequential || true ) # package the parallel track zipfile mkdir -p cvc4-smtcomp-parallel-$(YEAR)/bin cp -p builds-smtcomp/parallel/src/main/pcvc4 cvc4-smtcomp-parallel-$(YEAR)/bin/pcvc4 ( echo '#!/bin/sh'; \ echo 'exec ./pcvc4 --threads 2 -L smt2 --no-checking --no-interactive --no-wait-to-join "$@"' ) > cvc4-smtcomp-parallel-$(YEAR)/bin/starexec_run_default chmod 755 cvc4-smtcomp-parallel-$(YEAR)/bin/starexec_run_default echo "CVC4 for SMT_COMP parallel track `builds-smtcomp/parallel/src/main/pcvc4 --version | head -1 | sed 's,.*version ,,;s,-,_,g;s,[^a-zA-Z0-9. _],,g'`" > cvc4-smtcomp-parallel-$(YEAR)/starexec_description.txt cd cvc4-smtcomp-parallel-$(YEAR) && zip -r ../cvc4-smtcomp-parallel-$(YEAR).zip * cvc4-1.5/Makefile.am000066400000000000000000000134061313116454100142550ustar00rootroot00000000000000include $(top_srcdir)/config/doxygen.am AM_CXXFLAGS = -Wall -Wno-unknown-pragmas AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I config SUBDIRS_BASE = src test contrib if CVC4_PROOF SUBDIRS = proofs/signatures proofs/lfsc_checker $(SUBDIRS_BASE) else SUBDIRS = $(SUBDIRS_BASE) endif DIST_SUBDIRS = proofs/signatures proofs/lfsc_checker $(SUBDIRS_BASE) examples .PHONY: examples examples: all (cd examples && $(MAKE) $(AM_MAKEFLAGS)) .PHONY: install-examples install-examples: (cd examples && $(MAKE) $(AM_MAKEFLAGS) install-data) .PHONY: units systemtests regress regress0 regress1 regress2 regress3 regress4 systemtests regress regress0 regress1 regress2 regress3 regress4: all +(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1 # We descend into "src" with the "check" target here to ensure that # the test prerequisites are all built. units: (cd src && $(MAKE) $(AM_MAKEFLAGS) check) +(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1 LCOV = lcov GENHTML = genhtml LCOV_EXCLUDES = \ "$(CXXTEST)/*" \ "/usr/include/*" \ "$(abs_top_builddir)/test/*" .PHONY: show-config show-config: @echo @echo '===============================================================================' @echo 'This CVC4 build was configured with:' @echo ' configure $(cvc4_config_cmdline)' @echo '===============================================================================' @echo .PHONY: lcov lcov-all lcov18 if COVERAGE_ENABLED # lcov 1.7 has some bugs that we have to work around (can't do # baseline measurement, merge between different test-names doesn't # work...) lcov: all $(LCOV) -z -d . (cd src && $(MAKE) $(AM_MAKEFLAGS) check) +(cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check) $(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info $(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES) mkdir -p "@top_srcdir@/html" $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage.info @echo "De-mangling C++ symbols..." @find "@top_srcdir@/html" -name '*.func.html' | \ xargs perl -pi -e 's#()(.*)()#$$_=`c++filt "$$2"`;chomp;print "$$1$$_$$3\n";#e' lcov-all: all $(LCOV) -z -d . (cd src && $(MAKE) $(AM_MAKEFLAGS) check) +(cd test && $(MAKE) $(AM_MAKEFLAGS) check) $(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info $(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES) mkdir -p "@top_srcdir@/html" $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage.info @echo "De-mangling C++ symbols..." @find "@top_srcdir@/html" -name '*.func.html' | \ xargs perl -pi -e 's#()(.*)()#$$_=`c++filt "$$2"`;chomp;print "$$1$$_$$3\n";#e' # when we get a working lcov, we can do better stats for # modules/test-types; unfortunately lcov 1.8 directory paths # are broken(?) or at least different than 1.7 lcov18: all +@for testtype in public black white; do \ echo; echo "=== Collecting coverage data from $$testtype unit tests ==="; \ echo $(LCOV) -z -d .; \ $(LCOV) -z -d . || exit 1; \ echo "(cd src && $(MAKE) $(AM_MAKEFLAGS) check) || exit 1"; \ (cd src && $(MAKE) $(AM_MAKEFLAGS) check) || exit 1; \ echo "(cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check TEST_SUFFIX=_$$testtype) || exit 1"; \ (cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check TEST_SUFFIX=_$$testtype) || exit 1; \ echo $(LCOV) -c -d . -t $$testtype -o cvc4-coverage-$$testtype-full.info || exit 1; \ $(LCOV) -c -d . -t $$testtype -o cvc4-coverage-$$testtype-full.info || exit 1; \ echo $(LCOV) -o cvc4-coverage-$$testtype.info -r cvc4-coverage-$$testtype-full.info $(LCOV_EXCLUDES); \ $(LCOV) -o cvc4-coverage-$$testtype.info -r cvc4-coverage-$$testtype-full.info $(LCOV_EXCLUDES) || exit 1; \ echo; \ done mkdir -p "@top_srcdir@/html" $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage-public.info cvc4-coverage-black.info cvc4-coverage-white.info @echo "De-mangling C++ symbols..." @find "@top_srcdir@/html" -name '*.func.html' | \ xargs perl -ni -e 's,()(.*)(.*),$$_=`c++filt "$$2"`;chomp;print "$$1$$_$$3\n";,e || print' else lcov lcov-all lcov18: @echo @echo "Coverage is not enabled in this build." >&2 @echo "Please run configure with --enable-coverage." >&2 @echo @false endif # abs_srcdir is required here to get this Makefile instead of the # Makefile in the builddir (since $(srcdir) is stripped off of # EXTRA_DIST files) EXTRA_DIST = \ Makefile.builds.in \ Makefile.subdir \ library_versions \ RELEASE-NOTES \ config/build-type \ config/mkbuilddir \ config/doxygen.cfg \ doc/find_public_interface.sh \ doc/cvc4.1_template.in \ doc/cvc4.5.in \ doc/libcvc4.3_template.in \ doc/SmtEngine.3cvc_template.in \ doc/options.3cvc_template.in \ doc/libcvc4parser.3.in \ doc/libcvc4compat.3.in man_MANS = \ doc/cvc4.1 \ doc/pcvc4.1 \ doc/cvc4.5 \ doc/libcvc4.3 \ doc/SmtEngine.3cvc \ doc/options.3cvc \ doc/libcvc4parser.3 \ doc/libcvc4compat.3 doc/pcvc4.1: doc/cvc4.1 rm -f doc/pcvc4.1 cp -p "$<" "$@" # Can't put the first several in EXTRA_DIST because those are processed # *before* recursive "make dist", and these files are generated in a # subdirectory invocation of "make dist". # # The Makefile also can't go in EXTRA_DIST, because then automake thinks # it's the one in the builddir and we want the one from the srcdir. dist-hook: doc/cvc4.1 doc/libcvc4.3 doc/SmtEngine.3cvc doc/options.3cvc cp -p $^ "$(distdir)/doc" cp -p "$(srcdir)/Makefile" "$(distdir)/Makefile" distclean-local: test -z "$(DX_DOCDIR)" || rm -fr "$(DX_DOCDIR)" # these have .in versions DISTCLEANFILES = \ doc/cvc4.1 \ doc/cvc4.1_template \ doc/pcvc4.1 \ doc/cvc4.5 \ doc/libcvc4.3 \ doc/libcvc4.3_template \ doc/libcvc4compat.3 \ doc/libcvc4parser.3 \ doc/SmtEngine.3cvc \ doc/SmtEngine.3cvc_template \ doc/options.3cvc \ doc/options.3cvc_template cvc4-1.5/Makefile.builds.in000066400000000000000000000110331313116454100155410ustar00rootroot00000000000000# -*- makefile -*- # # This Makefile produces the Makefile in the top-level builds/ # directory for standard-path builds (e.g., those configured from the # source tree). It has some autoconf cruft in it, documented below. # # Its main purposes are to: # 1. build the current build profile # 2. set up builds/$(CURRENT_BUILD)/{bin,lib} symlinks # 3. set up builds/bin and builds/lib symlinks # Include the "current" build profile. include current # Set up $(MAKE) @SET_MAKE@ # Set up some basic autoconf make vars srcdir = @srcdir@ builddir = @builddir@ install_sh = @install_sh@ mkinstalldirs = $(install_sh) -d exec_prefix = @exec_prefix@ prefix = @prefix@ bindir = @bindir@ libdir = @libdir@ abs_builddir = @abs_builddir@ distdir = @PACKAGE@-@VERSION@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ EXEEXT = @EXEEXT@ SHELL = @SHELL@ LIBTOOL = $(CURRENT_BUILD)/libtool # Are we building the libcvc4compat library ? CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ # @ AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ am__v_at_1 = # mkinstalldirs (never prefix with @; not a top-level instruction) AM_V_mkdir_noat = $(am__v_mkdir_noat_$(V)) am__v_mkdir_noat_ = $(am__v_mkdir_noat_$(AM_DEFAULT_VERBOSITY)) am__v_mkdir_noat_0 = $(SHELL) -c 'echo " MKDIR $$@"; $(mkinstalldirs) "$$@"' bash am__v_mkdir_noat_1 = $(mkinstalldirs) # mkinstalldirs (can prefix with @) AM_V_mkdir = $(am__v_mkdir_$(V)) am__v_mkdir_ = $(am__v_mkdir_$(AM_DEFAULT_VERBOSITY)) am__v_mkdir_0 = @$(am__v_mkdir_noat_0) am__v_mkdir_1 = $(am__v_mkdir_noat_1) # all the binaries that might need to be installed # (it's not a fatal error for one/some don't exist in a given build # configuration) CVC4_BINARIES = cvc4$(EXEEXT) pcvc4$(EXEEXT) .PHONY: _default_build_ all examples _default_build_: all all: # build the current build profile $(AM_V_at)(cd $(CURRENT_BUILD) && $(MAKE) $@) # set up builds/$(CURRENT_BUILD)/{bin,lib} $(AM_V_mkdir) $(CURRENT_BUILD)/bin $(AM_V_mkdir) $(CURRENT_BUILD)/lib # symlink libcvc4, libcvc4parser $(AM_V_at)cd $(CURRENT_BUILD)/lib && \ ln -sf ../src/libcvc4.* \ ../src/parser/libcvc4parser.* \ . -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \ test -d ../src/.libs && \ ln -sf ../src/.libs/libcvc4.* \ . -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \ test -d ../src/parser/.libs && \ ln -sf ../src/parser/.libs/libcvc4parser.* \ . ifeq ($(CVC4_BUILD_LIBCOMPAT),yes) # symlink libcvc4compat $(AM_V_at)cd $(CURRENT_BUILD)/lib && \ ln -sf ../src/compat/libcvc4compat.* \ . -$(AM_V_at)cd $(CURRENT_BUILD)/lib && \ test -d ../src/compat/.libs && \ ln -sf ../src/compat/.libs/libcvc4compat.* \ . endif # symlink the binaries $(AM_V_at)cd $(CURRENT_BUILD)/bin && \ for binary in $(CVC4_BINARIES); do \ if test -x ../src/main/$$binary; then \ ln -sf ../src/main/$$binary \ . ; \ else \ rm -f "$$binary"; \ fi; \ done # set up builds/doc and builds/examples $(AM_V_at)rm -f bin; ln -sf $(CURRENT_BUILD)/bin bin $(AM_V_at)rm -f lib; ln -sf $(CURRENT_BUILD)/lib lib $(AM_V_at)rm -f doc; ln -sf $(CURRENT_BUILD)/doc doc $(AM_V_at)rm -f examples; ln -sf $(CURRENT_BUILD)/examples examples # The descent into "src" with target "check" is to build check # prerequisites (e.g. CHECK_PROGRAMS, CHECK_LTLIBRARIES, ...). check test units: all (cd $(CURRENT_BUILD)/src && $(MAKE) check) +(cd $(CURRENT_BUILD)/test && $(MAKE) $@) systemtests regress: all +(cd $(CURRENT_BUILD)/test && $(MAKE) $@) units%: all (cd $(CURRENT_BUILD)/src && $(MAKE) check) +(cd $(CURRENT_BUILD)/test && $(MAKE) units TEST_PREFIX=$(subst units:,,$@)) regress%: all +(cd $(CURRENT_BUILD)/test && $(MAKE) $@) dist: (cd $(CURRENT_BUILD) && $(MAKE) $@) $(install_sh) \ $(CURRENT_BUILD)/$(distdir).tar.gz \ "`pwd`" TAGS tags: +(cd $(CURRENT_BUILD) && $(MAKE) $@) ln -sf $(CURRENT_BUILD)/TAGS . .PHONY: TAGS tags .PHONY: doc-builds doc-prereq doc-builds: doc-prereq +(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc CVC4_DOXYGEN_INPUT="`builddir="$(builddir)" srcdir="$(srcdir)" "$(srcdir)/doc/find_public_interface.sh"`") doc-internals-builds: doc-prereq +(cd $(CURRENT_BUILD) && $(MAKE) doxygen-doc CVC4_DOXYGEN_INPUT="$(srcdir)/src src") doc-prereq: +(cd $(CURRENT_BUILD) && for dir in `find . -name Makefile | xargs grep -l BUILT_SOURCES`; do (cd `dirname "$$dir"`; (cat Makefile; echo 'doc-prereq: $$(BUILT_SOURCES)') | $(MAKE) -f- doc-prereq); done) # Any other target than the default doesn't do the extra stuff above. # Split out "examples" target, recent Makes don't want them combined. examples: +(cd $(CURRENT_BUILD) && $(MAKE) $@) %: +(cd $(CURRENT_BUILD) && $(MAKE) $@) cvc4-1.5/Makefile.in000066400000000000000000001440031313116454100142640ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ # Renamed doxygen.am from aminclude.am for inclusion in CVC4 # Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Automake macro files. # Generate automatic documentation using Doxygen. Goals and variables values # are controlled by the various DX_COND_??? conditionals set by autoconf. # # The provided goals are: # doxygen-doc: Generate all doxygen documentation. # doxygen-run: Run doxygen, which will generate some of the documentation # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post # processing required for the rest of it (PS, PDF, and some MAN). # doxygen-man: Rename some doxygen generated man pages. # doxygen-ps: Generate doxygen PostScript documentation. # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake goals. If # doxygen is used to generate man pages, you can achieve this integration by # setting man3_MANS to the list of man pages generated and then adding the # dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # This is usually added to MOSTLYCLEANFILES. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = cvc4autoconfig.h CONFIG_CLEAN_FILES = Makefile.builds doc/cvc4.1_template.tmp \ doc/cvc4.5.tmp doc/libcvc4.3_template.tmp \ doc/SmtEngine.3cvc_template.tmp doc/options.3cvc_template.tmp \ doc/libcvc4parser.3.tmp doc/libcvc4compat.3.tmp CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \ "$(DESTDIR)$(man5dir)" man3dir = $(mandir)/man3 man5dir = $(mandir)/man5 NROFF = nroff MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)cvc4autoconfig.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__DIST_COMMON = $(srcdir)/Makefile.builds.in $(srcdir)/Makefile.in \ $(srcdir)/cvc4autoconfig.h.in $(top_srcdir)/config/compile \ $(top_srcdir)/config/config.guess \ $(top_srcdir)/config/config.sub \ $(top_srcdir)/config/doxygen.am \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ $(top_srcdir)/config/missing \ $(top_srcdir)/doc/SmtEngine.3cvc_template.in \ $(top_srcdir)/doc/cvc4.1_template.in \ $(top_srcdir)/doc/cvc4.5.in \ $(top_srcdir)/doc/libcvc4.3_template.in \ $(top_srcdir)/doc/libcvc4compat.3.in \ $(top_srcdir)/doc/libcvc4parser.3.in \ $(top_srcdir)/doc/options.3cvc_template.in AUTHORS COPYING \ INSTALL NEWS README THANKS config/compile config/config.guess \ config/config.sub config/install-sh config/ltmain.sh \ config/missing 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 am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ @DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html @DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm @DX_COND_chi_TRUE@@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi @DX_COND_doc_TRUE@@DX_COND_man_TRUE@DX_CLEAN_MAN = @DX_DOCDIR@/man @DX_COND_doc_TRUE@@DX_COND_rtf_TRUE@DX_CLEAN_RTF = @DX_DOCDIR@/rtf @DX_COND_doc_TRUE@@DX_COND_xml_TRUE@DX_CLEAN_XML = @DX_DOCDIR@/xml @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_PS_GOAL = doxygen-ps @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_PDF_GOAL = doxygen-pdf @DX_COND_doc_TRUE@@DX_COND_latex_TRUE@DX_CLEAN_LATEX = @DX_DOCDIR@/latex @DX_COND_doc_TRUE@DX_CLEANFILES = \ @DX_COND_doc_TRUE@ @DX_DOCDIR@/@PACKAGE@.tag \ @DX_COND_doc_TRUE@ -r \ @DX_COND_doc_TRUE@ $(DX_CLEAN_HTML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHM) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHI) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_MAN) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_RTF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_XML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PS) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PDF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_LATEX) AM_CXXFLAGS = -Wall -Wno-unknown-pragmas AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I config SUBDIRS_BASE = src test contrib @CVC4_PROOF_FALSE@SUBDIRS = $(SUBDIRS_BASE) @CVC4_PROOF_TRUE@SUBDIRS = proofs/signatures proofs/lfsc_checker $(SUBDIRS_BASE) DIST_SUBDIRS = proofs/signatures proofs/lfsc_checker $(SUBDIRS_BASE) examples LCOV = lcov GENHTML = genhtml LCOV_EXCLUDES = \ "$(CXXTEST)/*" \ "/usr/include/*" \ "$(abs_top_builddir)/test/*" # abs_srcdir is required here to get this Makefile instead of the # Makefile in the builddir (since $(srcdir) is stripped off of # EXTRA_DIST files) EXTRA_DIST = \ Makefile.builds.in \ Makefile.subdir \ library_versions \ RELEASE-NOTES \ config/build-type \ config/mkbuilddir \ config/doxygen.cfg \ doc/find_public_interface.sh \ doc/cvc4.1_template.in \ doc/cvc4.5.in \ doc/libcvc4.3_template.in \ doc/SmtEngine.3cvc_template.in \ doc/options.3cvc_template.in \ doc/libcvc4parser.3.in \ doc/libcvc4compat.3.in man_MANS = \ doc/cvc4.1 \ doc/pcvc4.1 \ doc/cvc4.5 \ doc/libcvc4.3 \ doc/SmtEngine.3cvc \ doc/options.3cvc \ doc/libcvc4parser.3 \ doc/libcvc4compat.3 # these have .in versions DISTCLEANFILES = \ doc/cvc4.1 \ doc/cvc4.1_template \ doc/pcvc4.1 \ doc/cvc4.5 \ doc/libcvc4.3 \ doc/libcvc4.3_template \ doc/libcvc4compat.3 \ doc/libcvc4parser.3 \ doc/SmtEngine.3cvc \ doc/SmtEngine.3cvc_template \ doc/options.3cvc \ doc/options.3cvc_template all: cvc4autoconfig.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/doxygen.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign 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_srcdir)/config/doxygen.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): cvc4autoconfig.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/cvc4autoconfig.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status cvc4autoconfig.h $(srcdir)/cvc4autoconfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f cvc4autoconfig.h stamp-h1 Makefile.builds: $(top_builddir)/config.status $(srcdir)/Makefile.builds.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/cvc4.1_template.tmp: $(top_builddir)/config.status $(top_srcdir)/doc/cvc4.1_template.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/cvc4.5.tmp: $(top_builddir)/config.status $(top_srcdir)/doc/cvc4.5.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/libcvc4.3_template.tmp: $(top_builddir)/config.status $(top_srcdir)/doc/libcvc4.3_template.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/SmtEngine.3cvc_template.tmp: $(top_builddir)/config.status $(top_srcdir)/doc/SmtEngine.3cvc_template.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/options.3cvc_template.tmp: $(top_builddir)/config.status $(top_srcdir)/doc/options.3cvc_template.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/libcvc4parser.3.tmp: $(top_builddir)/config.status $(top_srcdir)/doc/libcvc4parser.3.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/libcvc4compat.3.tmp: $(top_builddir)/config.status $(top_srcdir)/doc/libcvc4compat.3.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || 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 '/\.1[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,^[^1][0-9a-z]*$$,1,;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)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$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)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man3: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man3dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || 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 '/\.3[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,^[^3][0-9a-z]*$$,3,;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)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$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)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) install-man5: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man5dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man5dir)" || 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 '/\.5[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,^[^5][0-9a-z]*$$,5,;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)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$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)$(man5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ done; } uninstall-man5: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || 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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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.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 $(distdir)/_build/sub $(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/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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__post_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-recursive all-am: Makefile $(MANS) cvc4autoconfig.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-man3 install-man5 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-local distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-man3 install-man5 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-man \ uninstall-man1 uninstall-man3 uninstall-man5 .PRECIOUS: Makefile @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(MAKEINDEX_PATH) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_MAKEINDEX) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ mv refman.pdf ../@PACKAGE@.pdf @DX_COND_doc_TRUE@.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) @DX_COND_doc_TRUE@ rm -rf @DX_DOCDIR@ @DX_COND_doc_TRUE@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) .PHONY: examples examples: all (cd examples && $(MAKE) $(AM_MAKEFLAGS)) .PHONY: install-examples install-examples: (cd examples && $(MAKE) $(AM_MAKEFLAGS) install-data) .PHONY: units systemtests regress regress0 regress1 regress2 regress3 regress4 systemtests regress regress0 regress1 regress2 regress3 regress4: all +(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1 # We descend into "src" with the "check" target here to ensure that # the test prerequisites are all built. units: (cd src && $(MAKE) $(AM_MAKEFLAGS) check) +(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1 .PHONY: show-config show-config: @echo @echo '===============================================================================' @echo 'This CVC4 build was configured with:' @echo ' configure $(cvc4_config_cmdline)' @echo '===============================================================================' @echo .PHONY: lcov lcov-all lcov18 # lcov 1.7 has some bugs that we have to work around (can't do # baseline measurement, merge between different test-names doesn't # work...) @COVERAGE_ENABLED_TRUE@lcov: all @COVERAGE_ENABLED_TRUE@ $(LCOV) -z -d . @COVERAGE_ENABLED_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) check) @COVERAGE_ENABLED_TRUE@ +(cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check) @COVERAGE_ENABLED_TRUE@ $(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info @COVERAGE_ENABLED_TRUE@ $(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES) @COVERAGE_ENABLED_TRUE@ mkdir -p "@top_srcdir@/html" @COVERAGE_ENABLED_TRUE@ $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage.info @COVERAGE_ENABLED_TRUE@ @echo "De-mangling C++ symbols..." @COVERAGE_ENABLED_TRUE@ @find "@top_srcdir@/html" -name '*.func.html' | \ @COVERAGE_ENABLED_TRUE@ xargs perl -pi -e 's#()(.*)()#$$_=`c++filt "$$2"`;chomp;print "$$1$$_$$3\n";#e' @COVERAGE_ENABLED_TRUE@lcov-all: all @COVERAGE_ENABLED_TRUE@ $(LCOV) -z -d . @COVERAGE_ENABLED_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) check) @COVERAGE_ENABLED_TRUE@ +(cd test && $(MAKE) $(AM_MAKEFLAGS) check) @COVERAGE_ENABLED_TRUE@ $(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info @COVERAGE_ENABLED_TRUE@ $(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES) @COVERAGE_ENABLED_TRUE@ mkdir -p "@top_srcdir@/html" @COVERAGE_ENABLED_TRUE@ $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage.info @COVERAGE_ENABLED_TRUE@ @echo "De-mangling C++ symbols..." @COVERAGE_ENABLED_TRUE@ @find "@top_srcdir@/html" -name '*.func.html' | \ @COVERAGE_ENABLED_TRUE@ xargs perl -pi -e 's#()(.*)()#$$_=`c++filt "$$2"`;chomp;print "$$1$$_$$3\n";#e' # when we get a working lcov, we can do better stats for # modules/test-types; unfortunately lcov 1.8 directory paths # are broken(?) or at least different than 1.7 @COVERAGE_ENABLED_TRUE@lcov18: all @COVERAGE_ENABLED_TRUE@ +@for testtype in public black white; do \ @COVERAGE_ENABLED_TRUE@ echo; echo "=== Collecting coverage data from $$testtype unit tests ==="; \ @COVERAGE_ENABLED_TRUE@ echo $(LCOV) -z -d .; \ @COVERAGE_ENABLED_TRUE@ $(LCOV) -z -d . || exit 1; \ @COVERAGE_ENABLED_TRUE@ echo "(cd src && $(MAKE) $(AM_MAKEFLAGS) check) || exit 1"; \ @COVERAGE_ENABLED_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) check) || exit 1; \ @COVERAGE_ENABLED_TRUE@ echo "(cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check TEST_SUFFIX=_$$testtype) || exit 1"; \ @COVERAGE_ENABLED_TRUE@ (cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check TEST_SUFFIX=_$$testtype) || exit 1; \ @COVERAGE_ENABLED_TRUE@ echo $(LCOV) -c -d . -t $$testtype -o cvc4-coverage-$$testtype-full.info || exit 1; \ @COVERAGE_ENABLED_TRUE@ $(LCOV) -c -d . -t $$testtype -o cvc4-coverage-$$testtype-full.info || exit 1; \ @COVERAGE_ENABLED_TRUE@ echo $(LCOV) -o cvc4-coverage-$$testtype.info -r cvc4-coverage-$$testtype-full.info $(LCOV_EXCLUDES); \ @COVERAGE_ENABLED_TRUE@ $(LCOV) -o cvc4-coverage-$$testtype.info -r cvc4-coverage-$$testtype-full.info $(LCOV_EXCLUDES) || exit 1; \ @COVERAGE_ENABLED_TRUE@ echo; \ @COVERAGE_ENABLED_TRUE@ done @COVERAGE_ENABLED_TRUE@ mkdir -p "@top_srcdir@/html" @COVERAGE_ENABLED_TRUE@ $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage-public.info cvc4-coverage-black.info cvc4-coverage-white.info @COVERAGE_ENABLED_TRUE@ @echo "De-mangling C++ symbols..." @COVERAGE_ENABLED_TRUE@ @find "@top_srcdir@/html" -name '*.func.html' | \ @COVERAGE_ENABLED_TRUE@ xargs perl -ni -e 's,()(.*)(.*),$$_=`c++filt "$$2"`;chomp;print "$$1$$_$$3\n";,e || print' @COVERAGE_ENABLED_FALSE@lcov lcov-all lcov18: @COVERAGE_ENABLED_FALSE@ @echo @COVERAGE_ENABLED_FALSE@ @echo "Coverage is not enabled in this build." >&2 @COVERAGE_ENABLED_FALSE@ @echo "Please run configure with --enable-coverage." >&2 @COVERAGE_ENABLED_FALSE@ @echo @COVERAGE_ENABLED_FALSE@ @false doc/pcvc4.1: doc/cvc4.1 rm -f doc/pcvc4.1 cp -p "$<" "$@" # Can't put the first several in EXTRA_DIST because those are processed # *before* recursive "make dist", and these files are generated in a # subdirectory invocation of "make dist". # # The Makefile also can't go in EXTRA_DIST, because then automake thinks # it's the one in the builddir and we want the one from the srcdir. dist-hook: doc/cvc4.1 doc/libcvc4.3 doc/SmtEngine.3cvc doc/options.3cvc cp -p $^ "$(distdir)/doc" cp -p "$(srcdir)/Makefile" "$(distdir)/Makefile" distclean-local: test -z "$(DX_DOCDIR)" || rm -fr "$(DX_DOCDIR)" # 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: cvc4-1.5/Makefile.subdir000066400000000000000000000026371313116454100151540ustar00rootroot00000000000000# -*-makefile-*- # # This makefile is included from source directories in order to # trigger a build in the corresponding build directory. # # See src/Makefile for an example. # include $(topdir)/builds/current builddir = $(topdir)/builds/$(CURRENT_BUILD)/$(srcdir) unittestdir = $(topdir)/builds/$(CURRENT_BUILD)/test/unit unittestprefix = $(srcdir:src/%=%) .PHONY: all all .DEFAULT: @if test -e $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ echo $(MAKE) $@; \ $(MAKE) $@; \ else \ echo; \ echo 'Run configure first, or type "make" in a configured build directory.'; \ echo; \ fi .PHONY: check units ifeq ($(srcdir:test/%=test),test) # under the test/ directory, additional subtargets .PHONY: systemtests regress regress0 regress1 regress2 regress3 check units systemtests regress regress0 regress1 regress2 regress3: @if test -e $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ echo $(MAKE) $@; \ $(MAKE) $@; \ else \ echo; \ echo "** ERROR: could not find testing dir \`$(builddir)'"; \ echo; \ fi else check units: @if test -e $(unittestdir); then \ echo cd $(unittestdir); \ cd $(unittestdir); \ echo $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \ $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \ else \ echo; \ echo "** ERROR: could not find unit testing dir \`$(unittestdir)'"; \ echo; \ exit 1; \ fi endif # synonyms for "check" .PHONY: test test: check cvc4-1.5/NEWS000066400000000000000000000141041313116454100127140ustar00rootroot00000000000000This file contains a summary of important user-visible changes. Changes since 1.4 ================= * Improved heuristics for reasoning about non-linear arithmetic. * Native support for syntax-guided synthesis (sygus). * Support for many new heuristics for reasoning with quantifiers, including finite model finding. * Support for proofs for uninterpreted functions, arrays, bitvectors, and their combinations. * Performance improvements to existing theories. * A new theory of sets with cardinality and relations. * A new theory of strings. * Support for unsat cores. * Support for separation logic constraints. * Simplification mode "incremental" no longer supported. * Support for array constants in constraints. * Syntax for array models has changed in some language front-ends. * New input/output languages supported: "smt2.0" and "smtlib2.0" to force SMT-LIB v2.0; "smt2.5" and "smtlib2.5" to force SMT-LIB v2.5; "smt2.6" and "smtlib2.6" to force SMT-LIB v2.6; "smt", "smtlib", "smt2", and "smtlib2" all refer to the current standard version 2.6. If an :smt-lib-version is set in the input, that overrides the command line. * Abstract values in SMT-LIB models are now ascribed types (with "as"). * In SMT-LIB model output, real-sorted but integer-valued constants are now printed in accordance with the standard (e.g. "1.0"). Changes since 1.3 ================= * CVC4 now supports libc++ in addition to libstdc++ (this especially helps on Mac OS Mavericks). * The LFSC proof checker has been incorporated into CVC4 sources. * Theory of finite sets, handling the MLSS fragment (singleton, union, intersection, set subtraction, membership and subset). * By default, CVC4 builds in "production" mode (optimized, with fewer internal checks on). The common alternative is a "debug" build, which is much slower. By default, CVC4 builds with no GPL'ed dependences. However, this is not the best-performing version; for that, you should configure with "--enable-gpl --best", which links against GPL'ed libraries that improve usability and performance. For details on licensing and dependences, see the README file. * Small API adjustments to Datatypes to even out the API and make it function better in Java. * Timed statistics are now properly updated even on process abort. * Better automatic handling of output language setting when using CVC4 via API. Previously, the "automatic" language setting was sometimes (though not always) defaulting to the internal "AST" language; it should now (correctly) default to the same as the input language (if the input language is supported as an output language), or the "CVC4" native output language if no input language setting is applied. * The SmtEngine cannot be safely copied with the copy constructor. Previous versions inadvertently permitted clients to do this via the API. This has been corrected, copy and assignment of the SmtEngine is no longer permitted. Changes since 1.2 ================= New features: * SMT-LIB-compliant support for abs, to_real, to_int, is_int, which were previously missing * New bv2nat/int2bv operators for bitvector/integer inter-compatibility. * Support in linear logics for /, div, and mod by constants (with the --rewrite-divk command line option). * Parsing support for TPTP's TFF and TFA formats. * A new theory of strings: word (dis-)equations, length constraints, regular expressions. * Increased compliance to SMT-LIBv2, numerous bugs and usability issues resolved. * New :command-verbosity SMT option to silence success and error messages on a per-command basis, and API changes to Command infrastructure to support this. Behavioral changes: * It is no longer permitted to request model or proof generation if there's been an intervening push/pop. * User-defined symbols (define-funs) are no longer reported in the output of get-model commands. * Exit codes are now more standard for UNIX command-line tools. Exit code zero means no error---but the result could be sat, unsat, or unknown---and nonzero means error. API changes: * Expr::substitute() now capable of substituting operators (e.g., function symbols under an APPLY_UF) * Numerous improvements to the Java language bindings Changes since 1.1 ================= * Real arithmetic now has three simplex solvers for exact precision linear arithmetic: the classical dual solver and two new solvers based on techniques for minimizing the sum of infeasibilities. GLPK can now be used as a heuristic backup to the exact precision solvers. GLPK must be enabled at configure time. See --help for more information on enabling these solvers. * added support for "bit0" and "bit1" bitvector constants in SMT-LIB v1.2 * support for theory "alternates": new ability to prototype new decision procedures that are selectable at runtime * various bugfixes Changes since 1.0 ================= * bit-vector solver now has a specialized decision procedure for unsigned bit- vector inequalities * numerous important bug fixes, performance improvements, and usability improvements * support for multiline input in interactive mode * Win32-building support via mingw * SMT-LIB get-model output now is easier to machine-parse: contains (model...) * user patterns for quantifier instantiation are now supported in the SMT-LIBv1.2 parser * --finite-model-find was incomplete when using --incremental, now fixed * the E-matching procedure is slightly improved * Boolean terms are now supported in datatypes * tuple and record support have been added to the compatibility library * driver verbosity change: for printing all commands as they're executed, you now need verbosity level >= 3 (e.g., -vvv) instead of level 1 (-v). This allows tracing the solver's activities (with -v and -vv) without having too much output. * to make CVC4 quieter in abnormal (e.g., "warning" conditions), you can use -q. Previously, this would silence all output (including "sat" or "unsat") as well. Now, single -q silences messages and warnings, and double -qq silences all output (except on exception or signal). -- Morgan Deters Wed, 02 Jul 2014 14:45:05 -0400 cvc4-1.5/README000066400000000000000000000111561313116454100131010ustar00rootroot00000000000000This is CVC4 release version 1.5. For build and installation notes, please see the INSTALL file included with this distribution. The project leaders are Clark Barrett (Stanford University) and Cesare Tinelli (The University of Iowa). For a full list of authors, please refer to the AUTHORS file in the source distribution. CVC4 is a tool for determining the satisfiability of a first order formula modulo a first order theory (or a combination of such theories). It is the fourth in the Cooperating Validity Checker family of tools (CVC, CVC Lite, CVC3) but does not directly incorporate code from any previous version. CVC4 is intended to be an open and extensible SMT engine. It can be used as a stand-alone tool or as a library. It has been designed to increase the performance and reduce the memory overhead of its predecessors. It is written entirely in C++ and is released under an open-source software license (see the file COPYING in the source distribution). *** Getting started with CVC4 For help installing CVC4, see the INSTALL file that comes with this distribution. We recommend that you visit our CVC4 tutorials online at: http://cvc4.cs.stanford.edu/wiki/Tutorials for help getting started using CVC4. *** Contributing to the CVC4 project We are always happy to hear feedback from our users: * if you need help with using CVC4, please refer to http://cvc4.stanford.edu/#Technical_Support. * if you need to report a bug with CVC4, or make a feature request, please visit our bugtracker at http://cvc4.cs.stanford.edu/bugs/ or write to the cvc-bugs@cs.stanford.edu mailing list. We are very grateful for bug reports, as they help us improve CVC4, and patches are generally reviewed and accepted quickly. * if you are using CVC4 in your work, or incorporating it into software of your own, we'd like to invite you to leave a description and link to your project/software on our "Third Party Applications" page at http://cvc4.cs.stanford.edu/wiki/Public:Third_Party_Applications * if you are interested in contributing code (for example, a new decision procedure implementation) to the CVC4 project, please contact one of the project leaders. We'd be happy to point you to some internals documentation to help you out. Thank you for using CVC4! *** The History of CVC4 The Cooperating Validity Checker series has a long history. The Stanford Validity Checker (SVC) came first in 1996, incorporating theories and its own SAT solver. Its successor, the Cooperating Validity Checker (CVC), had a more optimized internal design, produced proofs, used the Chaff SAT solver, and featured a number of usability enhancements. Its name comes from the cooperative nature of decision procedures in Nelson-Oppen theory combination, which share amongst each other equalities between shared terms. CVC Lite, first made available in 2003, was a rewrite of CVC that attempted to make CVC more flexible (hence the "lite") while extending the feature set: CVC Lite supported quantifiers where its predecessors did not. CVC3 was a major overhaul of portions of CVC Lite: it added better decision procedure implementations, added support for using MiniSat in the core, and had generally better performance. CVC4 is the new version, the fifth generation of this validity checker line that is now celebrating twenty-one years of heritage. It represents a complete re-evaluation of the core architecture to be both performant and to serve as a cutting-edge research vehicle for the next several years. Rather than taking CVC3 and redesigning problem parts, we've taken a clean-room approach, starting from scratch. Before using any designs from CVC3, we have thoroughly scrutinized, vetted, and updated them. Many parts of CVC4 bear only a superficial resemblance, if any, to their correspondent in CVC3. However, CVC4 is fundamentally similar to CVC3 and many other modern SMT solvers: it is a DPLL(T) solver, with a SAT solver at its core and a delegation path to different decision procedure implementations, each in charge of solving formulas in some background theory. The re-evaluation and ground-up rewrite was necessitated, we felt, by the performance characteristics of CVC3. CVC3 has many useful features, but some core aspects of the design led to high memory use, and the use of heavyweight computation (where more nimble engineering approaches could suffice) makes CVC3 a much slower prover than other tools. As these designs are central to CVC3, a new version was preferable to a selective re-engineering, which would have ballooned in short order. *** For more information More information about CVC4 is available at: http://cvc4.cs.stanford.edu/ cvc4-1.5/RELEASE-NOTES000066400000000000000000000146631313116454100141200ustar00rootroot00000000000000Release Notes for CVC4 1.5, July 2017 ** Getting started If you run CVC4 without arguments, you will find yourself in an interactive CVC4 session, which expects commands in CVC4's native language (the so-called "presentation" language). To use SMT-LIB, use the "--lang smt" option on the command line. For stricter adherence to the standard, use "--smtlib-strict" (see below regarding SMT-LIB compliance). When a filename is given on the command line, the file's extension determines the language parser that's used (e.g., file.smt is SMT-LIB 1.2, file.smt2 is SMT-LIB 2.6, and file.cvc is the presentation language). To override this, you can use the --lang option. ** Type correctness The CVC family of systems relies on Type Correctness Conditions (TCCs) when mixing two types that have a compatible base type. TCCs, and the checking of such, are not supported by CVC4 1.5. This is an issue when mixing integers and reals. A function defined only on integers can be applied to REAL (as INT is a subtype of REAL), and CVC4 will not complain. It is up to the user to ensure that the REAL expression must be an integer. If the REAL expression is not an integer and is used where an INT is expected, CVC4 may produce strange results. For example: f : INT -> INT; ASSERT f(1/3) = 0; ASSERT f(2/3) = 1; CHECKSAT; % sat COUNTEREXAMPLE; % f : (INT) -> INT = LAMBDA(x1:INT) : 0; This kind of problem can be identified by checking TCCs. Though CVC4 does not (yet) support TCCs, CVC3 can be used to produce TCCs for this input (with the +dump-tcc option). The TCC can then be checked by CVC4 or another solver. (CVC3 can also check TCCs at the same time it creates them, with +tcc.) ** Changes in CVC's Presentation Language The native language of all solvers in the CVC family, referred to as the "presentation language," has undergone some revisions for CVC4. The most notable is that CVC4 does _not_ add counterexample assertions to the current assertion set after a SAT/INVALID result. For example: x, y : INT; ASSERT x = 1 OR x = 2; ASSERT y = 1 OR y = 2; ASSERT x /= y; CHECKSAT; % sat QUERY x = 1; % invalid QUERY x = 2; % invalid Here, CVC4 responds "invalid" to the second and third queries, because each has a counterexample (x=2 is a counterexample to the first, and x=1 is a counterexample to the second). However, CVC3 will respond with "valid" to one of these two, as the first query (the CHECKSAT) had the side-effect of locking CVC3 into one of the two cases; the later queries are effectively querying the counterexample that was found by the first. CVC4 removes this side-effect of the CHECKSAT and QUERY commands. CVC4 supports rational literals (of type REAL) in decimal; CVC3 did not support decimals. CVC4 does not have support for predicate subtypes, although these are planned for future releases. ** SMT-LIB compliance Every effort has been made to make CVC4 compliant with the SMT-LIB 2.6 standard (http://smtlib.org/). However, when parsing SMT-LIB input, certain default settings don't match what is stated in the official standard. To make CVC4 adhere more strictly to the standard, use the "--smtlib-strict" command-line option. Even with this setting, CVC4 is somewhat lenient; some non-conforming input may still be parsed and processed. For the latest news on SMT-LIB compliance, please check: http://cvc4.cs.stanford.edu/wiki/SMT-LIB_Compliance ** Getting statistics Statistics can be dumped on exit (both normal and abnormal exits) with the --stats command line option. ** Time and resource limits CVC4 can be made to self-timeout after a given number of milliseconds. Use the --tlimit command line option to limit the entire run of CVC4, or use --tlimit-per to limit each individual query separately. Occasionally, you may encounter a problem for which --tlimit does not work very well. If you suspect this might be the case, please report it as a bug. You can also use "-vv" (double verbosity) to see what CVC4 is doing. Time-limited runs are not deterministic; two consecutive runs with the same time limit might produce different results (i.e., one may time out and respond with "unknown", while the other completes and provides an answer). To ensure that results are reproducible, use --rlimit or --rlimit-per. These options take a "resource count" (presently, based on the number of SAT conflicts) that limits the search time. A word of caution, though: there is no guarantee that runs of different versions of CVC4 or of different builds of CVC4 (e.g., two CVC4 binaries with different features enabled, or for different architectures) will interpret the resource count in the same manner. CVC4 does not presently have a way to limit its memory use; you may opt to run it from a shell after using "ulimit" to limit the size of the heap. ** Proof support CVC4 1.5 has support for proofs when using uninterpreted functions, arrays, bitvectors, or their combinations, and proofs are enabled by default. (Run the configure script with --disable-proof to disable proofs). Proofs are exported in LFSC format. ** Nonlinear arithmetic CVC4 1.5 has a state-of-the-art linear arithmetic solver as well as some heuristic support for non-linear arithmetic. ** Portfolio solving If enabled at configure-time (./configure --with-portfolio), a second CVC4 binary will be produced ("pcvc4"). This binary has support for running multiple instances of CVC4 in different threads. Use --threads=N to specify the number of threads, and use --thread0="options for thread 0" --thread1="options for thread 1", etc., to specify a configuration for the threads. Lemmas are *not* shared between the threads by default; to adjust this, use the --filter-lemma-length=N option to share lemmas of N literals (or smaller). (Some lemmas are ineligible for sharing because they include literals that are "local" to one thread.) Currently, the portfolio **does not work** with the theory of inductive datatypes. This limitation will be addressed in a future release. ** Questions ?? CVC4 and its predecessors have an active user base. You might want to subscribe to the mailing list (http://cvc4.stanford.edu/#Technical_Support) and post a question there. ** Reporting bugs and making feature requests CVC4 is under active development. Should you find a bug in CVC4's documentation, behavior, API, or SMT-LIB compliance, or if you have a feature request, please let us know on our bugtracker at http://cvc4.cs.stanford.edu/bugs/ or send an email to cvc-bugs@cs.stanford.edu. cvc4-1.5/THANKS000066400000000000000000000024131313116454100131300ustar00rootroot00000000000000Thanks to: - Chad Brewbaker for fixing a memory leak in 2017. - Adam Buchbinder of Google for submitting patches in November 2013 to fix a number of issues with CVC3 (which were also applicable to CVC4's compatibility interface). - David Cok of GrammaTech, Inc., for suggesting numerous improvements in CVC4's SMT-LIBv2 compliance in 2013 and 2014. - Peter Collingbourne (formerly of the Multicore Programming Group at Imperial College London, headed by Alastair Donaldson) for developing and submitting a number of patches in September 2012 related to SMT-LIBv2 compliance. - Finn Haedicke of University of Bremen, Germany for fixing namespace specifiers in CVC4's version of minisat in 2015. - Thomas Hunger for some important patches to CVC4's SWIG interfaces in March 2014. - Makai Mann of Stanford University for updating the build scripts to support computing coverage in 2017. - Cristian Mattarei of Stanford University for fixing an issue with parsing floating point numbers in 2017. - Jordy Ruiz of University of Toulouse for fixing throw specifiers on the theory output channels in 2015. - Fabian Wolff in 2016 for fixing several spelling mistakes. - Clement Pit-Claudel of MIT for improving the signal handling support for Windows builds in 2017. cvc4-1.5/aclocal.m4000066400000000000000000001500471313116454100140640ustar00rootroot00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 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'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' 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.15], [], [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.15])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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$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-2014 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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 10 /bin/sh. echo '/* dummy */' > 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], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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"` # 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'`; 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-2014 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != 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-2014 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 is modern enough. # If it is, 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != 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 AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version is >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_ERROR([Python interpreter is too old])]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': can_use_sysconfig = 0 except ImportError: pass" dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_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}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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([config/abc.m4]) m4_include([config/antlr.m4]) m4_include([config/ax_prog_doxygen.m4]) m4_include([config/ax_tls.m4]) m4_include([config/bindings.m4]) m4_include([config/boost.m4]) m4_include([config/cryptominisat.m4]) m4_include([config/cvc4.m4]) m4_include([config/gcc_version.m4]) m4_include([config/glpk.m4]) m4_include([config/is_sorted.m4]) m4_include([config/libtool.m4]) m4_include([config/ltoptions.m4]) m4_include([config/ltsugar.m4]) m4_include([config/ltversion.m4]) m4_include([config/lt~obsolete.m4]) m4_include([config/pkg.m4]) m4_include([config/readline.m4]) cvc4-1.5/config/000077500000000000000000000000001313116454100134625ustar00rootroot00000000000000cvc4-1.5/config/abc.m4000066400000000000000000000105531313116454100144550ustar00rootroot00000000000000# CVC4_CHECK_FOR_ABC # ------------------ # Look for abc and link it in, but only if user requested. AC_DEFUN([CVC4_CHECK_FOR_ABC], [ AC_MSG_CHECKING([whether user requested abc support]) LIBABC= have_libabc=0 ABC_LIBS= ABC_LDFLAGS= if test "$with_abc" = no; then AC_MSG_RESULT([no, abc disabled by user]) elif test -n "$with_abc"; then AC_MSG_RESULT([yes, abc requested by user]) # Get the location of all the ABC stuff AC_ARG_VAR(ABC_HOME, [path to top level of abc source tree]) AC_ARG_WITH( [abc-dir], AS_HELP_STRING( [--with-abc-dir=PATH], [path to top level of abc source tree] ), [ABC_HOME="$withval"], [ if test -z "$ABC_HOME"; then AC_MSG_FAILURE([must give --with-abc-dir=PATH or define environment variable ABC_HOME!]) fi ] ) if ! test -d "$ABC_HOME" || ! test -x "$ABC_HOME/arch_flags"; then AC_MSG_FAILURE([either $ABC_HOME is not an abc source tree or it's not yet built]) fi AC_MSG_CHECKING([for arch_flags to use with libabc]) libabc_arch_flags="$("$ABC_HOME/arch_flags")" AC_MSG_RESULT([$libabc_arch_flags]) CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-I$ABC_HOME/src $libabc_arch_flags" ABC_LDFLAGS="-L$ABC_HOME" dnl Try a bunch of combinations until something works :-/ cvc4_save_LDFLAGS="$LDFLAGS" ABC_LIBS= CPPFLAGS="$CPPFLAGS -I$ABC_HOME/src $libabc_arch_flags" LDFLAGS="$LDFLAGS $ABC_LDFLAGS" AC_CHECK_HEADER([base/abc/abc.h], [], [AC_MSG_FAILURE([cannot find abc.h, the ABC header!])]) AC_MSG_CHECKING([how to link abc]) CVC4_TRY_ABC_WITH([]) CVC4_TRY_ABC_WITH([-lm]) CVC4_TRY_ABC_WITH([-lm -lrt]) CVC4_TRY_ABC_WITH([-lm -lrt -ldl]) CVC4_TRY_ABC_WITH([-lm -lrt -lreadline -ldl]) CVC4_TRY_ABC_WITH([-lm -lpthread]) CVC4_TRY_ABC_WITH([-lm -lpthread -lrt]) CVC4_TRY_ABC_WITH([-lm -lpthread -lrt -ldl]) CVC4_TRY_ABC_WITH([-lm -lpthread -lrt -lreadline -ldl]) dnl CVC4_TRY_ABC_WITH([-lm -rdynamic -lreadline -lpthread -lrt -ldl]) if test -z "$ABC_LIBS"; then AC_MSG_FAILURE([cannot link against libabc!]) else AC_MSG_RESULT([$ABC_LIBS]) # make sure it works in static builds, too if test "$enable_static_binary" = yes; then ABC_LIBS= AC_MSG_CHECKING([whether statically-linked abc is functional]) CVC4_TRY_STATIC_ABC_WITH([]) CVC4_TRY_STATIC_ABC_WITH([-lm]) CVC4_TRY_STATIC_ABC_WITH([-lm -lrt]) CVC4_TRY_STATIC_ABC_WITH([-lm -lrt -ldl]) CVC4_TRY_STATIC_ABC_WITH([-lm -lrt -lreadline -ldl]) CVC4_TRY_STATIC_ABC_WITH([-lm -lpthread]) CVC4_TRY_STATIC_ABC_WITH([-lm -lpthread -lrt]) CVC4_TRY_STATIC_ABC_WITH([-lm -lpthread -lrt -ldl]) CVC4_TRY_STATIC_ABC_WITH([-lm -lpthread -lrt -lreadline -ldl]) if test -n "$ABC_LIBS"; then AC_MSG_RESULT([yes, it works]) with_abc=yes else AC_MSG_RESULT([no]) AC_MSG_FAILURE([abc installation appears incompatible with static-binary]) fi else with_abc=yes fi fi if test "$with_abc" = yes; then have_libabc=1 else with_abc=no have_libreadline=0 ABC_LIBS= fi LDFLAGS="$cvc4_save_LDFLAGS" else AC_MSG_RESULT([no, user didn't request abc]) with_abc=no fi ])# CVC4_CHECK_FOR_ABC # CVC4_TRY_ABC_WITH(LIBS) # ----------------------- # Try AC_CHECK_LIB(abc) with the given linking libraries AC_DEFUN([CVC4_TRY_ABC_WITH], [ if test -z "$ABC_LIBS"; then AC_LANG_PUSH([C++]) cvc4_save_LIBS="$LIBS" LIBS="-labc $1" AC_LINK_IFELSE([AC_LANG_PROGRAM([extern "C" { void Abc_Start(); }], [Abc_Start()])], [ABC_LIBS="-labc $1"], []) LIBS="$cvc4_save_LIBS" AC_LANG_POP([C++]) fi ])# CVC4_TRY_ABC_WITH # CVC4_TRY_STATIC_ABC_WITH(LIBS) # ------------------------------ # Try AC_CHECK_LIB(abc) with the given linking libraries AC_DEFUN([CVC4_TRY_STATIC_ABC_WITH], [ if test -z "$ABC_LIBS"; then AC_LANG_PUSH([C++]) cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static $1" AC_LINK_IFELSE([AC_LANG_PROGRAM([extern "C" { void Abc_Start(); }], [Abc_Start()])], [ABC_LIBS="-labc-static $1"], [ LIBS="-labc $1" AC_LINK_IFELSE([AC_LANG_PROGRAM([extern "C" { void Abc_Start(); }], [Abc_Start()])], [ABC_LIBS="-labc $1"]) ]) LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" AC_LANG_POP([C++]) fi ])# CVC4_TRY_STATIC_ABC_WITH cvc4-1.5/config/antlr.m4000066400000000000000000000103641313116454100150500ustar00rootroot00000000000000## # Check for ANTLR's antlr3 script. # Will set ANTLR to the location of the script. ## AC_DEFUN([AC_PROG_ANTLR], [ AC_ARG_VAR([ANTLR],[location of the antlr3 script]) # Check the existence of the runantlr script if test "x$ANTLR" = "x"; then AC_PATH_PROG(ANTLR, [antlr3]) else AC_MSG_CHECKING([antlr3 script ($ANTLR)]) if test ! -e "$ANTLR"; then AC_MSG_RESULT([not found]) unset ANTLR elif test ! -x "$ANTLR"; then AC_MSG_RESULT([not executable]) unset ANTLR else AC_MSG_RESULT([OK]) fi fi if test "x$ANTLR" = "x"; then AC_MSG_WARN( [No usable antlr3 script found. Make sure that the parser code has been generated already. To obtain ANTLR see .] ) ANTLR_VERSION= else ANTLR_VERSION="`$ANTLR -version 2>&1 | sed 's,.*Version *\([[0-9.]]*\).*,\1,'`" case "$ANTLR_VERSION" in 3.2|3.2.*) ANTLR_VERSION=3.2 ;; 3.4|3.4.*) ANTLR_VERSION=3.4 ;; *) AC_MSG_WARN([unknown version of antlr: $ANTLR_VERSION]);; esac fi ]) ## # Check the existence of the ANTLR3 C runtime library and headers # Will set ANTLR_INCLUDES and ANTLR_LIBS to the location of the ANTLR # headers and library respectively ## AC_DEFUN([AC_LIB_ANTLR],[ AC_ARG_VAR(ANTLR_HOME, [path to libantlr3c installation]) # Get the location of the ANTLR3 C includes and libraries AC_ARG_WITH( [antlr-dir], AS_HELP_STRING( [--with-antlr-dir=PATH], [path to ANTLR C headers and libraries] ), ANTLR_PREFIXES="$withval", ANTLR_PREFIXES="$ANTLR_HOME /usr/local /usr /opt/local /opt" ) AC_MSG_CHECKING(for ANTLR3 C runtime library) # Use C and remember the variables we are changing AC_LANG_PUSH(C) OLD_CPPFLAGS="$CPPFLAGS" OLD_LIBS="$LIBS" # Try all the includes/libs set in ANTLR_PREFIXES for antlr_prefix in $ANTLR_PREFIXES do CPPFLAGS="$OLD_CPPFLAGS -I$antlr_prefix/include" LIBS="$OLD_LIBS -L$antlr_prefix/lib -lantlr3c" AC_LINK_IFELSE([AC_LANG_SOURCE( [ #include int main() { pANTLR3_TOKEN_FACTORY factory = antlr3TokenFactoryNew((pANTLR3_INPUT_STREAM) NULL); return 0; } ])], [ AC_MSG_RESULT(found in $antlr_prefix) ANTLR_INCLUDES="-I$antlr_prefix/include" ANTLR_LDFLAGS="-L$antlr_prefix/lib -lantlr3c" break ], [ AC_MSG_RESULT(no) AC_MSG_ERROR([ANTLR3 C runtime not found, see ]) ] ) done AC_MSG_CHECKING([for presence of older antlr3AsciiFileStreamNew()]) AC_LINK_IFELSE([AC_LANG_SOURCE( [ #include int main() { pANTLR3_UINT8 fName = (pANTLR3_UINT8)"foo"; pANTLR3_INPUT_STREAM input = antlr3AsciiFileStreamNew(fName); return 0; } ])], [ AC_MSG_RESULT([found it (must be antlr3 3.2 or similar)]) if test -n "$ANTLR_VERSION" -a "$ANTLR_VERSION" != 3.2; then AC_MSG_WARN([your antlr parser generator is version $ANTLR_VERSION, which doesn't match the library!]) fi CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_ANTLR3_OLD_INPUT_STREAM" ], [ AC_MSG_RESULT(failed) AC_MSG_CHECKING([for presence of newer antlr3FileStreamNew()]) AC_LINK_IFELSE([AC_LANG_SOURCE( [ #include int main() { pANTLR3_UINT8 fName = (pANTLR3_UINT8)"foo"; pANTLR3_INPUT_STREAM input = antlr3FileStreamNew(fName, ANTLR3_ENC_8BIT); return 0; } ])], [ AC_MSG_RESULT([found it (must be antlr3 3.4 or similar)]) if test -n "$ANTLR_VERSION" -a "$ANTLR_VERSION" != 3.4; then AC_MSG_WARN([your antlr parser generator is version $ANTLR_VERSION, which doesn't match the library!]) fi ], [ AC_MSG_ERROR([cannot figure out how to create an antlr3 input stream, bailing..]) ] ) ] ) # Return the old compile variables and pop the language. LIBS="$OLD_LIBS" CPPFLAGS="$OLD_CPPFLAGS" AC_LANG_POP() # Define the ANTLR include/libs variables AC_SUBST(ANTLR_INCLUDES) AC_SUBST(ANTLR_LDFLAGS) ]) cvc4-1.5/config/ax_prog_doxygen.m4000066400000000000000000000272601313116454100171270ustar00rootroot00000000000000# This file is part of Autoconf. -*- Autoconf -*- # Renamed doxygen.m4 from acinclude.m4 for inclusion in CVC4 # Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Autoconf macro files. ########## CHANGELOG ################## # 2009-01-14 Martin Mann # * DX_ARG_ABLE : new variable 'DX_FLAG_DX_CURRENT_FEATURE' # * DX_CLEAR_DEPEND : use of explicit variable 'DX_FLAG_DX_CURRENT_FEATURE' # in AC_SUBST instead of 'DX_FLAG[]DX_CURRENT_FEATURE' which is rejected by # newer autotools # Generate automatic documentation using Doxygen. Works in concert with the # aminclude.m4 file and a compatible doxygen configuration file. Defines the # following public macros: # # DX_???_FEATURE(ON|OFF) - control the default setting fo a Doxygen feature. # Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics, # 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI' # for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF', # 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment # variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide' # paper size. # # By default, HTML, PDF and PS documentation is generated as this seems to be # the most popular and portable combination. MAN pages created by Doxygen are # usually problematic, though by picking an appropriate subset and doing some # massaging they might be better than nothing. CHM and RTF are specific for MS # (note that you can't generate both HTML and CHM at the same time). The XML is # rather useless unless you apply specialized post-processing to it. # # The macro mainly controls the default state of the feature. The use can # override the default by specifying --enable or --disable. The macros ensure # that contradictory flags are not given (e.g., --enable-doxygen-html and # --enable-doxygen-chm, --enable-doxygen-anything with --disable-doxygen, etc.) # Finally, each feature will be automatically disabled (with a warning) if the # required programs are missing. # # Once all the feature defaults have been specified, call DX_INIT_DOXYGEN with # the following parameters: a one-word name for the project for use as a # filename base etc., an optional configuration file name (the default is # 'Doxyfile', the same as Doxygen's default), and an optional output directory # name (the default is 'doxygen-doc'). ## ----------## ## Defaults. ## ## ----------## DX_ENV="" AC_DEFUN([DX_FEATURE_doc], ON) AC_DEFUN([DX_FEATURE_dot], ON) AC_DEFUN([DX_FEATURE_man], OFF) AC_DEFUN([DX_FEATURE_html], ON) AC_DEFUN([DX_FEATURE_chm], OFF) AC_DEFUN([DX_FEATURE_chi], OFF) AC_DEFUN([DX_FEATURE_rtf], OFF) AC_DEFUN([DX_FEATURE_xml], OFF) AC_DEFUN([DX_FEATURE_pdf], ON) AC_DEFUN([DX_FEATURE_ps], ON) ## --------------- ## ## Private macros. ## ## --------------- ## # DX_ENV_APPEND(VARIABLE, VALUE) # ------------------------------ # Append VARIABLE="VALUE" to DX_ENV for invoking doxygen. AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])]) # DX_DIRNAME_EXPR # --------------- # Expand into a shell expression prints the directory part of a path. AC_DEFUN([DX_DIRNAME_EXPR], [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) # DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) # ------------------------------------- # Expands according to the M4 (static) status of the feature. AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) # DX_REQUIRE_PROG(VARIABLE, PROGRAM) # ---------------------------------- # Require the specified program to be found for the DX_CURRENT_FEATURE to work. AC_DEFUN([DX_REQUIRE_PROG], [ AC_PATH_TOOL([$1], [$2]) if test "$DX_FLAG_DX_CURRENT_FEATURE$$1" = 1; then AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) AC_SUBST([DX_FLAG_DX_CURRENT_FEATURE], 0) fi ]) # DX_TEST_FEATURE(FEATURE) # ------------------------ # Expand to a shell expression testing whether the feature is active. AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) # DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) # ------------------------------------------------- # Verify that a required features has the right state before trying to turn on # the DX_CURRENT_FEATURE. AC_DEFUN([DX_CHECK_DEPEND], [ test "$DX_FLAG_$1" = "$2" \ || AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, requires, contradicts) doxygen-DX_CURRENT_FEATURE]) ]) # DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) # ---------------------------------------------------------- # Turn off the DX_CURRENT_FEATURE if the required feature is off. AC_DEFUN([DX_CLEAR_DEPEND], [ test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_DX_CURRENT_FEATURE], 0) ]) # DX_FEATURE_ARG(FEATURE, DESCRIPTION, # CHECK_DEPEND, CLEAR_DEPEND, # REQUIRE, DO-IF-ON, DO-IF-OFF) # -------------------------------------------- # Parse the command-line option controlling a feature. CHECK_DEPEND is called # if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), # otherwise CLEAR_DEPEND is called to turn off the default state if a required # feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional # requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and # DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. AC_DEFUN([DX_ARG_ABLE], [ AC_DEFUN([DX_CURRENT_FEATURE], [$1]) AC_DEFUN([DX_FLAG_DX_CURRENT_FEATURE], [DX_FLAG_$1]) AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) AC_ARG_ENABLE(doxygen-$1, [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], [--enable-doxygen-$1]), DX_IF_FEATURE([$1], [don't $2], [$2]))], [ case "$enableval" in #( y|Y|yes|Yes|YES) AC_SUBST([DX_FLAG_$1], 1) $3 ;; #( n|N|no|No|NO) AC_SUBST([DX_FLAG_$1], 0) ;; #( *) AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) ;; esac ], [ AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) $4 ]) if DX_TEST_FEATURE([$1]); then $5 : fi if DX_TEST_FEATURE([$1]); then AM_CONDITIONAL(DX_COND_$1, :) $6 : else AM_CONDITIONAL(DX_COND_$1, false) $7 : fi ]) ## -------------- ## ## Public macros. ## ## -------------- ## # DX_XXX_FEATURE(DEFAULT_STATE) # ----------------------------- AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])]) AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) # DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR]) # --------------------------------------------------------- # PROJECT also serves as the base name for the documentation files. # The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc". AC_DEFUN([DX_INIT_DOXYGEN], [ # Files: AC_SUBST([DX_PROJECT], [$1]) AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])]) AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) # Environment variables used inside doxygen.cfg: DX_ENV_APPEND(SRCDIR, $srcdir) DX_ENV_APPEND(PROJECT, $DX_PROJECT) DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) # Doxygen itself: DX_ARG_ABLE(doc, [generate any doxygen documentation], [], [], [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) DX_REQUIRE_PROG([DX_PERL], perl)], [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) # Dot for graphics: DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_DOT], dot)], [DX_ENV_APPEND(HAVE_DOT, YES) DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], [DX_ENV_APPEND(HAVE_DOT, NO)]) # Man pages generation: DX_ARG_ABLE(man, [generate doxygen manual pages], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_MAN, YES)], [DX_ENV_APPEND(GENERATE_MAN, NO)]) # RTF file generation: DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_RTF, YES)], [DX_ENV_APPEND(GENERATE_RTF, NO)]) # XML file generation: DX_ARG_ABLE(xml, [generate doxygen XML documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_XML, YES)], [DX_ENV_APPEND(GENERATE_XML, NO)]) # (Compressed) HTML help generation: DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_HHC], hhc)], [DX_ENV_APPEND(HHC_PATH, $DX_HHC) DX_ENV_APPEND(GENERATE_HTML, YES) DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) # Seperate CHI file generation. DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file], [DX_CHECK_DEPEND(chm, 1)], [DX_CLEAR_DEPEND(chm, 1)], [], [DX_ENV_APPEND(GENERATE_CHI, YES)], [DX_ENV_APPEND(GENERATE_CHI, NO)]) # Plain HTML pages generation: DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], [], [DX_ENV_APPEND(GENERATE_HTML, YES)], [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) # PostScript file generation: DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_LATEX], latex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_DVIPS], dvips) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # PDF file generation: DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # LaTeX generation for PS and/or PDF: if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then AM_CONDITIONAL(DX_COND_latex, :) DX_ENV_APPEND(GENERATE_LATEX, YES) else AM_CONDITIONAL(DX_COND_latex, false) DX_ENV_APPEND(GENERATE_LATEX, NO) fi # Paper size for PS and/or PDF: AC_ARG_VAR(DOXYGEN_PAPER_SIZE, [a4wide (default), a4, letter, legal or executive]) case "$DOXYGEN_PAPER_SIZE" in #( "") AC_SUBST(DOXYGEN_PAPER_SIZE, "") ;; #( a4wide|a4|letter|legal|executive) DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) ;; #( *) AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV ]) cvc4-1.5/config/ax_tls.m4000066400000000000000000000057431313116454100152270ustar00rootroot00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_tls.html # =========================================================================== # # SYNOPSIS # # AX_TLS([action-if-found], [action-if-not-found]) # # DESCRIPTION # # Provides a test for the compiler support of thread local storage (TLS) # extensions. Defines TLS if it is found. Currently knows about GCC/ICC # and MSVC. I think SunPro uses the same as GCC, and Borland apparently # supports either. # # LICENSE # # Copyright (c) 2008 Alan Woodland # Copyright (c) 2010 Diego Elio Petteno` # # 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 3 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, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 10 AC_DEFUN([AX_TLS], [ AC_MSG_CHECKING(for thread local storage (TLS) class) AC_CACHE_VAL(ac_cv_tls, [ ax_tls_keywords="__thread __declspec(thread) none" for ax_tls_keyword in $ax_tls_keywords; do AS_CASE([$ax_tls_keyword], [none], [ac_cv_tls=none ; break], [AC_TRY_COMPILE( [#include static void foo(void) { static ] $ax_tls_keyword [ int bar; exit(1); }], [], [ac_cv_tls=$ax_tls_keyword ; break], ac_cv_tls=none )]) done ]) AC_MSG_RESULT($ac_cv_tls) AS_IF([test "$ac_cv_tls" != "none"], AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here]) m4_ifnblank([$1], [$1]), m4_ifnblank([$2], [$2]) ) ]) cvc4-1.5/config/bindings.m4000066400000000000000000000212461313116454100155260ustar00rootroot00000000000000# CVC4_SUPPORTED_BINDINGS # ----------------------- # Supported language bindings for CVC4. AC_DEFUN([CVC4_SUPPORTED_BINDINGS], [c,c++,java]) # CVC4_ALL_BINDINGS # ----------------- # All language bindings for CVC4 (may include unofficial bindings). AC_DEFUN([CVC4_ALL_BINDINGS], [c,java,csharp,perl,php,python,ruby,tcl,ocaml]) # CVC4_NEED_SWIG_FOR_BINDING # -------------------------- # Used by CVC4_CHECK_BINDINGS to ensure swig is available (and correct # version) when a binding needs it AC_DEFUN([CVC4_NEED_SWIG_FOR_BINDING], [ if test -z "$SWIG"; then AC_MSG_WARN([swig not available or incompatible version; $binding bindings require swig 2.0.0 or later]) binding_error=yes fi ]) # CVC4_CHECK_BINDINGS(DEFAULT_BINDINGS_LIST) # ------------------------------------------ # Check for user language binding preferences, and what is possible # to build on the build host. AC_DEFUN([CVC4_CHECK_BINDINGS], [ dnl Check for SWIG (for building language bindings) noswig=no m4_foreach(lang,[CVC4_ALL_BINDINGS], [[cvc4_build_]]lang[[_bindings=no ]]) AC_ARG_VAR(SWIG, [SWIG binary (used to generate language bindings)]) AC_ARG_WITH([swig], [AS_HELP_STRING([--with-swig=BINARY], [path to swig binary])], [if test "$withval" = no; then noswig=yes; else SWIG="$withval"; fi]) AC_ARG_ENABLE([language-bindings], [AS_HELP_STRING([--enable-language-bindings=][CVC4_SUPPORTED_BINDINGS][ | all], [specify language bindings to build])], [if test "$enableval" = yes; then cvc4_check_for_bindings=yes; try_bindings='$1'; else cvc4_check_for_bindings=no; if test "$enableval" = no; then try_bindings=; else try_bindings="$enableval"; fi; fi], [cvc4_check_for_bindings=no; try_bindings=]) CVC4_LANGUAGE_BINDINGS= if test "$noswig" = yes; then AC_MSG_WARN([use of swig disabled by user, native API bindings disabled.]) SWIG= else if test -z "$SWIG"; then AC_CHECK_PROGS(SWIG, [swig swig2.0], [], []) else AC_CHECK_PROG(SWIG, "$SWIG", "$SWIG", []) fi if test -z "$SWIG"; then AC_MSG_RESULT([not found]) AC_MSG_WARN([language bindings for native API disabled, swig not found.]) else AC_MSG_CHECKING([compatibility with version of swig]) cat > conftest.c << _CVC4EOF %module conftest #if !defined(SWIG_VERSION) || SWIG_VERSION < 0x020000 #error bad version #endif _CVC4EOF if $SWIG conftest.c >&AS_MESSAGE_LOG_FD 2>&1; then AC_MSG_RESULT([compatible version]) else AC_MSG_RESULT([incompatible version]) AC_MSG_WARN([swig version 2.0.0 or later is required to build native API bindings]) SWIG= echo '===Failed swig input was:' >&AS_MESSAGE_LOG_FD cat conftest.c >&AS_MESSAGE_LOG_FD echo '===End failed swig input' >&AS_MESSAGE_LOG_FD rm -f conftest.c fi fi fi AC_MSG_CHECKING([for requested user language bindings]) if test "$try_bindings" = all; then try_bindings='CVC4_SUPPORTED_BINDINGS' fi try_bindings=$(echo "$try_bindings" | sed 's/,/ /g') if test -z "$try_bindings"; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([$try_bindings]) fi CVC4_UNSUPPORTED_LANGUAGE_BINDINGS= cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_CXXFLAGS="$CXXFLAGS" AC_LANG_PUSH([C++]) for binding in $try_bindings; do __cvc4_lang_supported=no m4_foreach([__cvc4_supported_binding], [CVC4_SUPPORTED_BINDINGS], [if test "$binding" = "__cvc4_supported_binding"; then __cvc4_lang_supported=yes; fi ])dnl if test $__cvc4_lang_supported = no; then CVC4_UNSUPPORTED_LANGUAGE_BINDINGS="${CVC4_UNSUPPORTED_LANGUAGE_BINDINGS:+$CVC4_UNSUPPORTED_LANGUAGE_BINDINGS }$binding" fi binding_error=no AC_MSG_CHECKING([for availability of $binding binding]) case "$binding" in c++) AC_MSG_RESULT([C++ is built by default]);; c) cvc4_build_c_bindings=yes AC_MSG_RESULT([C support will be built]);; java) AC_MSG_RESULT([Java support will be built]) CVC4_NEED_SWIG_FOR_BINDING AC_ARG_VAR(JAVA_CPPFLAGS, [flags to pass to compiler when building Java bindings]) CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS" AC_CHECK_HEADER([jni.h], [cvc4_build_java_bindings=yes], [binding_error=yes]) ;; csharp) AC_MSG_RESULT([[C# support will be built]]) CVC4_NEED_SWIG_FOR_BINDING AC_ARG_VAR(CSHARP_CPPFLAGS, [flags to pass to compiler when building C# bindings]) CPPFLAGS="$CPPFLAGS $CSHARP_CPPFLAGS" cvc4_build_csharp_bindings=yes ;; perl) AC_MSG_RESULT([perl support will be built]) CVC4_NEED_SWIG_FOR_BINDING AC_ARG_VAR(PERL_CPPFLAGS, [flags to pass to compiler when building perl bindings]) CPPFLAGS="$CPPFLAGS $PERL_CPPFLAGS" AC_CHECK_HEADER([EXTERN.h], [cvc4_build_perl_bindings=yes], [binding_error=yes]) ;; php) AC_MSG_RESULT([php support will be built]) CVC4_NEED_SWIG_FOR_BINDING AC_ARG_VAR(PHP_CPPFLAGS, [flags to pass to compiler when building PHP bindings]) CPPFLAGS="$CPPFLAGS $PHP_CPPFLAGS" AC_CHECK_HEADER([zend.h], [cvc4_build_php_bindings=yes], [binding_error=yes]) ;; python) AC_MSG_RESULT([python support will be built]) CVC4_NEED_SWIG_FOR_BINDING AM_PATH_PYTHON([2.5], [cvc4_build_python_bindings=yes], [binding_error=yes]) AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config]) AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config]) AS_IF([test -z "$PYTHON_INCLUDE"], [ AS_IF([test -z "$PYTHON_CONFIG"], [ AC_PATH_PROGS([PYTHON_CONFIG], [python$PYTHON_VERSION-config python-config], [no] ) AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])]) ]) AC_MSG_CHECKING([python include flags]) AC_SUBST(PYTHON_CXXFLAGS, `$PYTHON_CONFIG --includes`) AC_MSG_RESULT([$PYTHON_CXXFLAGS]) ]) CPPFLAGS="$CPPFLAGS $PYTHON_CXXFLAGS" AC_CHECK_HEADER([Python.h], [cvc4_build_python_bindings=yes], [binding_error=yes]) ;; ruby) AC_MSG_RESULT([ruby support will be built]) CVC4_NEED_SWIG_FOR_BINDING AC_ARG_VAR(RUBY_CPPFLAGS, [flags to pass to compiler when building ruby bindings]) CPPFLAGS="$CPPFLAGS $RUBY_CPPFLAGS" AC_CHECK_HEADER([ruby.h], [cvc4_build_ruby_bindings=yes], [binding_error=yes]) ;; tcl) AC_MSG_RESULT([tcl support will be built]) CVC4_NEED_SWIG_FOR_BINDING AC_ARG_VAR(TCL_CPPFLAGS, [flags to pass to compiler when building tcl bindings]) CPPFLAGS="$CPPFLAGS $TCL_CPPFLAGS" AC_CHECK_HEADER([tcl.h], [cvc4_build_tcl_bindings=yes], [binding_error=yes]) ;; ocaml) AC_MSG_RESULT([OCaml support will be built]) CVC4_NEED_SWIG_FOR_BINDING AC_ARG_VAR(TCL_CPPFLAGS, [flags to pass to compiler when building OCaml bindings]) CPPFLAGS="$CPPFLAGS $OCAML_CPPFLAGS" AC_CHECK_HEADER([caml/misc.h], [cvc4_build_ocaml_bindings=yes], [binding_error=yes]) if test "$binding_error" = no; then AC_ARG_VAR(OCAMLC, [OCaml compiler]) if test -z "$OCAMLC"; then AC_CHECK_PROGS(OCAMLC, ocamlc, ocamlc, []) else AC_CHECK_PROG(OCAMLC, "$OCAMLC", "$OCAMLC", []) fi AC_ARG_VAR(OCAMLMKTOP, [OCaml runtime-maker]) if test -z "$OCAMLMKTOP"; then AC_CHECK_PROGS(OCAMLMKTOP, ocamlmktop, ocamlmktop, []) else AC_CHECK_PROG(OCAMLMKTOP, "$OCAMLMKTOP", "$OCAMLMKTOP", []) fi AC_ARG_VAR(OCAMLFIND, [OCaml-find binary]) if test -z "$OCAMLFIND"; then AC_CHECK_PROGS(OCAMLFIND, ocamlfind, ocamlfind, []) else AC_CHECK_PROG(OCAMLFIND, "$OCAMLFIND", "$OCAMLFIND", []) fi AC_ARG_VAR(CAMLP4O, [camlp4o binary]) if test -z "$CAMLP4O"; then AC_CHECK_PROGS(CAMLP4O, camlp4o, camlp4o, []) else AC_CHECK_PROG(CAMLP4O, "$CAMLP4O", "$CAMLP4O", []) fi fi ;; *) AC_MSG_RESULT([unknown binding]); binding_error=yes;; esac if test "$binding_error" = yes; then if test "$cvc4_check_for_bindings" = no; then AC_MSG_ERROR([Language binding \`$binding' requested by user, but it cannot be built (the preceding few lines should give an indication why this is).]) else AC_MSG_WARN([Language binding \`$binding' cannot be built (the preceding few lines should give an indication why this is).]) fi else CVC4_LANGUAGE_BINDINGS="${CVC4_LANGUAGE_BINDINGS:+$CVC4_LANGUAGE_BINDINGS }$binding" fi AC_LANG_POP([C++]) CXXFLAGS="$cvc4_save_CXXFLAGS" CPPFLAGS="$cvc4_save_CPPFLAGS" done AM_CONDITIONAL([CVC4_HAS_SWIG], [test "$SWIG"]) m4_foreach([lang], [CVC4_ALL_BINDINGS], [AM_CONDITIONAL([CVC4_LANGUAGE_BINDING_]m4_toupper(lang), [test "$cvc4_build_]lang[_bindings" = yes]) ])dnl AC_SUBST(SWIG) AC_SUBST(CVC4_LANGUAGE_BINDINGS) ])# CVC4_CHECK_BINDINGS cvc4-1.5/config/boost.m4000066400000000000000000001276401313116454100150640ustar00rootroot00000000000000# boost.m4: Locate Boost headers and libraries for autoconf-based projects. # Copyright (C) 2007, 2008, 2009, 2010, 2011 Benoit Sigoure # # 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 3 of the License, or # (at your option) any later version. # # Additional permission under section 7 of the GNU General Public # License, version 3 ("GPLv3"): # # If you convey this file as part of a work that contains a # configuration script generated by Autoconf, you may do so under # terms of your choice. # # 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 . m4_define([_BOOST_SERIAL], [m4_translit([ # serial 16 ], [# ], [])]) # Original sources can be found at http://github.com/tsuna/boost.m4 # You can fetch the latest version of the script by doing: # wget http://github.com/tsuna/boost.m4/raw/master/build-aux/boost.m4 # ------ # # README # # ------ # # This file provides several macros to use the various Boost libraries. # The first macro is BOOST_REQUIRE. It will simply check if it's possible to # find the Boost headers of a given (optional) minimum version and it will # define BOOST_CPPFLAGS accordingly. It will add an option --with-boost to # your configure so that users can specify non standard locations. # If the user's environment contains BOOST_ROOT and --with-boost was not # specified, --with-boost=$BOOST_ROOT is implicitly used. # For more README and documentation, go to http://github.com/tsuna/boost.m4 # Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry, # simply read the README, it will show you what to do step by step. m4_pattern_forbid([^_?(BOOST|Boost)_]) # _BOOST_SED_CPP(SED-PROGRAM, PROGRAM, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------- # Same as AC_EGREP_CPP, but leave the result in conftest.i. # # SED-PROGRAM is *not* overquoted, as in AC_EGREP_CPP. It is expanded # in double-quotes, so escape your double quotes. # # It could be useful to turn this into a macro which extracts the # value of any macro. m4_define([_BOOST_SED_CPP], [AC_LANG_PREPROC_REQUIRE()dnl AC_REQUIRE([AC_PROG_SED])dnl AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) AS_IF([dnl eval is necessary to expand ac_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. dnl Beware of Windows end-of-lines, for instance if we are running dnl some Windows programs under Wine. In that case, boost/version.hpp dnl is certainly using "\r\n", but the regular Unix shell will only dnl strip `\n' with backquotes, not the `\r'. This results in dnl boost_cv_lib_version='1_37\r' for instance, which breaks dnl everything else. dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | grep -v "^#" | tr -d '\r\n ' | $SED -n -e "$1" >conftest.i 2>&1], [$3], [$4]) rm -rf conftest* ])# AC_EGREP_CPP # BOOST_REQUIRE([VERSION], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------- # Look for Boost. If version is given, it must either be a literal of the form # "X.Y.Z" where X, Y and Z are integers (the ".Z" part being optional) or a # variable "$var". # Defines the value BOOST_CPPFLAGS. This macro only checks for headers with # the required version, it does not check for any of the Boost libraries. # On # success, defines HAVE_BOOST. On failure, calls the optional # ACTION-IF-NOT-FOUND action if one was supplied. # Otherwise aborts with an error message. AC_DEFUN([BOOST_REQUIRE], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_PROG_GREP])dnl echo "$as_me: this is boost.m4[]_BOOST_SERIAL" >&AS_MESSAGE_LOG_FD boost_save_IFS=$IFS boost_version_req=$1 IFS=. set x $boost_version_req 0 0 0 IFS=$boost_save_IFS shift boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"` boost_version_req_string=$[1].$[2].$[3] AC_ARG_WITH([boost], [AS_HELP_STRING([--with-boost=DIR], [prefix of Boost $1 @<:@guess@:>@])])dnl AC_ARG_VAR([BOOST_ROOT],[Location of Boost installation])dnl # If BOOST_ROOT is set and the user has not provided a value to # --with-boost, then treat BOOST_ROOT as if it the user supplied it. if test x"$BOOST_ROOT" != x; then if test x"$with_boost" = x; then AC_MSG_NOTICE([Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT]) with_boost=$BOOST_ROOT else AC_MSG_NOTICE([Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost]) fi fi AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], ["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"])dnl boost_save_CPPFLAGS=$CPPFLAGS AC_CACHE_CHECK([for Boost headers version >= $boost_version_req_string], [boost_cv_inc_path], [boost_cv_inc_path=no AC_LANG_PUSH([C++])dnl m4_pattern_allow([^BOOST_VERSION$])dnl AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include #if !defined BOOST_VERSION # error BOOST_VERSION is not defined #elif BOOST_VERSION < $boost_version_req # error Boost headers version < $boost_version_req #endif ]])]) # If the user provided a value to --with-boost, use it and only it. case $with_boost in #( ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ /usr/include C:/Boost/include;; #( *) set x "$with_boost/include" "$with_boost";; esac shift for boost_dir do # Without --layout=system, Boost (or at least some versions) installs # itself in /include/boost-. This inner loop helps to # find headers in such directories. # # Any ${boost_dir}/boost-x_xx directories are searched in reverse version # order followed by ${boost_dir}. The final '.' is a sentinel for # searching $boost_dir" itself. Entries are whitespace separated. # # I didn't indent this loop on purpose (to avoid over-indented code) boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \ && echo .` for boost_inc in $boost_layout_system_search_list do if test x"$boost_inc" != x.; then boost_inc="$boost_dir/$boost_inc" else boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list fi if test x"$boost_inc" != x; then # We are going to check whether the version of Boost installed # in $boost_inc is usable by running a compilation that # #includes it. But if we pass a -I/some/path in which Boost # is not installed, the compiler will just skip this -I and # use other locations (either from CPPFLAGS, or from its list # of system include directories). As a result we would use # header installed on the machine instead of the /some/path # specified by the user. So in that precise case (trying # $boost_inc), make sure the version.hpp exists. # # Use test -e as there can be symlinks. test -e "$boost_inc/boost/version.hpp" || continue CPPFLAGS="$CPPFLAGS -I$boost_inc" fi AC_COMPILE_IFELSE([], [boost_cv_inc_path=yes], [boost_cv_version=no]) if test x"$boost_cv_inc_path" = xyes; then if test x"$boost_inc" != x; then boost_cv_inc_path=$boost_inc fi break 2 fi done done AC_LANG_POP([C++])dnl ]) case $boost_cv_inc_path in #( no) boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" m4_if([$2], [], [AC_MSG_ERROR([$boost_errmsg])], [AC_MSG_NOTICE([$boost_errmsg])]) $2 ;;#( yes) BOOST_CPPFLAGS= ;;#( *) AC_SUBST([BOOST_CPPFLAGS], ["-I$boost_cv_inc_path"])dnl ;; esac if test x"$boost_cv_inc_path" != xno; then AC_DEFINE([HAVE_BOOST], [1], [Defined if the requested minimum BOOST version is satisfied]) AC_CACHE_CHECK([for Boost's header version], [boost_cv_lib_version], [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl _BOOST_SED_CPP([/^boost-lib-version=/{s///;s/\"//g;p;q;}], [#include boost-lib-version = BOOST_LIB_VERSION], [boost_cv_lib_version=`cat conftest.i`])]) # e.g. "134" for 1_34_1 or "135" for 1_35 boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` case $boost_major_version in #( '' | *[[!0-9]]*) AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version]) ;; esac fi CPPFLAGS=$boost_save_CPPFLAGS ])# BOOST_REQUIRE # BOOST_STATIC() # -------------- # Add the "--enable-static-boost" configure argument. If this argument is given # on the command line, static versions of the libraries will be looked up. AC_DEFUN([BOOST_STATIC], [AC_ARG_ENABLE([static-boost], [AC_HELP_STRING([--enable-static-boost], [Prefer the static boost libraries over the shared ones [no]])], [enable_static_boost=yes], [enable_static_boost=no])])# BOOST_STATIC # BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) # -------------------------------------------------------------------------- # Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for # some parts of the Boost library which are only made of headers and don't # require linking (such as Boost.Foreach). # # Default ACTION-IF-NOT-FOUND: Fail with a fatal error unless Boost couldn't be # found in the first place, in which case by default a notice is issued to the # user. Presumably if we haven't died already it's because it's OK to not have # Boost, which is why only a notice is issued instead of a hard error. # # Default ACTION-IF-FOUND: define the preprocessor symbol HAVE_ in # case of success # (where HEADER-NAME is written LIKE_THIS, e.g., # HAVE_BOOST_FOREACH_HPP). AC_DEFUN([BOOST_FIND_HEADER], [AC_REQUIRE([BOOST_REQUIRE])dnl if test x"$boost_cv_inc_path" = xno; then m4_default([$2], [AC_MSG_NOTICE([Boost not available, not searching for $1])]) else AC_LANG_PUSH([C++])dnl boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" AC_CHECK_HEADER([$1], [m4_default([$3], [AC_DEFINE(AS_TR_CPP([HAVE_$1]), [1], [Define to 1 if you have <$1>])])], [m4_default([$2], [AC_MSG_ERROR([cannot find $1])])]) CPPFLAGS=$boost_save_CPPFLAGS AC_LANG_POP([C++])dnl fi ])# BOOST_FIND_HEADER # BOOST_FIND_LIB([LIB-NAME], [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], # [CXX-PROLOGUE], [ACTION-IF-NOT-FOUND]) # ------------------------------------------------------------------------- # Look for the Boost library LIB-NAME (e.g., LIB-NAME = `thread', for # libboost_thread). Check that HEADER-NAME works and check that # libboost_LIB-NAME can link with the code CXX-TEST. The optional argument # CXX-PROLOGUE can be used to include some C++ code before the `main' # function. If ACTION-IF-NOT-FOUND is given, errors are nonfatal (otherwise # they are fatal). # # Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). # # Boost libraries typically come compiled with several flavors (with different # runtime options) so PREFERRED-RT-OPT is the preferred suffix. A suffix is one # or more of the following letters: sgdpn (in that order). s = static # runtime, d = debug build, g = debug/diagnostic runtime, p = STLPort build, # n = (unsure) STLPort build without iostreams from STLPort (it looks like `n' # must always be used along with `p'). Additionally, PREFERRED-RT-OPT can # start with `mt-' to indicate that there is a preference for multi-thread # builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp # ... If you want to make sure you have a specific version of Boost # (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. AC_DEFUN([BOOST_FIND_LIB], [AC_REQUIRE([BOOST_REQUIRE])dnl AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl AC_REQUIRE([BOOST_STATIC])dnl AC_REQUIRE([_BOOST_GUESS_WHETHER_TO_USE_MT])dnl if test x"$boost_cv_inc_path" = xno; then AC_MSG_NOTICE([Boost not available, not searching for the Boost $1 library]) else dnl The else branch is huge and wasn't intended on purpose. AC_LANG_PUSH([C++])dnl AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl BOOST_FIND_HEADER([$3], [$6]) boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # Now let's try to find the library. The algorithm is as follows: first look # for a given library name according to the user's PREFERRED-RT-OPT. For each # library name, we prefer to use the ones that carry the tag (toolset name). # Each library is searched through the various standard paths were Boost is # usually installed. If we can't find the standard variants, we try to # enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist # but there's -obviously- libboost_threads-mt.dylib). AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], [Boost_lib=no case "$2" in #( mt | mt-) boost_mt=-mt; boost_rtopt=;; #( mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #( *) boost_mt=; boost_rtopt=$2;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( *d*) boost_rt_d=$boost_rtopt;; #( *[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( *) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?]) boost_save_ac_objext=$ac_objext # Generate the test file. AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$3> $5], [$4])]) dnl Optimization hacks: compiling C++ is slow, especially with Boost. What dnl we're trying to do here is guess the right combination of link flags dnl (LIBS / LDFLAGS) to use a given library. This can take several dnl iterations before it succeeds and is thus *very* slow. So what we do dnl instead is that we compile the code first (and thus get an object file, dnl typically conftest.o). Then we try various combinations of link flags dnl until we succeed to link conftest.o in an executable. The problem is dnl that the various TRY_LINK / COMPILE_IFELSE macros of Autoconf always dnl remove all the temporary files including conftest.o. So the trick here dnl is to temporarily change the value of ac_objext so that conftest.o is dnl preserved accross tests. This is obviously fragile and I will burn in dnl hell for not respecting Autoconf's documented interfaces, but in the dnl mean time, it optimizes the macro by a factor of 5 to 30. dnl Another small optimization: the first argument of AC_COMPILE_IFELSE left dnl empty because the test file is generated only once above (before we dnl start the for loops). AC_COMPILE_IFELSE([], [ac_objext=do_not_rm_me_plz], [m4_if([$6], [], [AC_MSG_ERROR([cannot compile a test that uses Boost $1])], [AC_MSG_NOTICE([cannot compile a test that uses Boost $1])]) $6]) ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the 6 nested for loops, only the 2 innermost ones # matter. for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_$1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_$1$boost_tag_$boost_rtopt_$boost_ver_ \ boost_$1$boost_tag_$boost_mt_$boost_ver_ \ boost_$1$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( *@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do test -e "$boost_ldpath" || continue boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$Boost_lib_LIBS" || continue;; #( *) # No: use -lboost_foo to find the shared library. Boost_lib_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$Boost_lib_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" dnl First argument of AC_LINK_IFELSE left empty because the test file is dnl generated only once above (before we start the for loops). _BOOST_AC_LINK_IFELSE([], [Boost_lib=yes], [Boost_lib=no]) ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$Boost_lib" = xyes; then Boost_lib_LDFLAGS="-L$boost_ldpath -Wl,-rpath -Wl,$boost_ldpath" Boost_lib_LDPATH="$boost_ldpath" break 6 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done rm -f conftest.$ac_objext ]) case $Boost_lib in #(( no) _AC_MSG_LOG_CONFTEST m4_if([$6], [], [AC_MSG_ERROR([cannot find the flags to link with Boost $1])], [AC_MSG_NOTICE([cannot find the flags to link with Boost $1])]) $6 ;; *) AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl ;; esac CPPFLAGS=$boost_save_CPPFLAGS AS_VAR_POPDEF([Boost_lib])dnl AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl AS_VAR_POPDEF([Boost_lib_LDPATH])dnl AS_VAR_POPDEF([Boost_lib_LIBS])dnl AC_LANG_POP([C++])dnl fi ])# BOOST_FIND_LIB # --------------------------------------- # # Checks for the various Boost libraries. # # --------------------------------------- # # List of boost libraries: http://www.boost.org/libs/libraries.htm # The page http://beta.boost.org/doc/libs is useful: it gives the first release # version of each library (among other things). # BOOST_DEFUN(LIBRARY, CODE) # -------------------------- # Define BOOST_ as a macro that runs CODE. # # Use indir to avoid the warning on underquoted macro name given to AC_DEFUN. m4_define([BOOST_DEFUN], [m4_indir([AC_DEFUN], m4_toupper([BOOST_$1]), [m4_pushdef([BOOST_Library], [$1])dnl $2 m4_popdef([BOOST_Library])dnl ]) ]) # BOOST_ARRAY() # ------------- # Look for Boost.Array BOOST_DEFUN([Array], [BOOST_FIND_HEADER([boost/array.hpp])]) # BOOST_ASIO() # ------------ # Look for Boost.Asio (new in Boost 1.35). BOOST_DEFUN([Asio], [AC_REQUIRE([BOOST_SYSTEM])dnl BOOST_FIND_HEADER([boost/asio.hpp])]) # BOOST_BIND() # ------------ # Look for Boost.Bind BOOST_DEFUN([Bind], [BOOST_FIND_HEADER([boost/bind.hpp])]) # BOOST_CHRONO() # ------------------ # Look for Boost.Chrono BOOST_DEFUN([Chrono], [# Do we have to check for Boost.System? This link-time dependency was # added as of 1.35.0. If we have a version <1.35, we must not attempt to # find Boost.System as it didn't exist by then. if test $boost_major_version -ge 135; then BOOST_SYSTEM([$1]) fi # end of the Boost.System check. boost_filesystem_save_LIBS=$LIBS boost_filesystem_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" BOOST_FIND_LIB([chrono], [$1], [boost/chrono.hpp], [boost::chrono::thread_clock d;]) if test $enable_static_boost = yes && test $boost_major_version -ge 135; then AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"]) fi LIBS=$boost_filesystem_save_LIBS LDFLAGS=$boost_filesystem_save_LDFLAGS ])# BOOST_CHRONO # BOOST_CONVERSION() # ------------------ # Look for Boost.Conversion (cast / lexical_cast) BOOST_DEFUN([Conversion], [BOOST_FIND_HEADER([boost/cast.hpp]) BOOST_FIND_HEADER([boost/lexical_cast.hpp]) ])# BOOST_CONVERSION # BOOST_DATE_TIME([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Date_Time], [BOOST_FIND_LIB([date_time], [$1], [boost/date_time/posix_time/posix_time.hpp], [boost::posix_time::ptime t;]) ])# BOOST_DATE_TIME # BOOST_FILESYSTEM([PREFERRED-RT-OPT]) # ------------------------------------ # Look for Boost.Filesystem. For the documentation of PREFERRED-RT-OPT, see # the documentation of BOOST_FIND_LIB above. # Do not check for boost/filesystem.hpp because this file was introduced in # 1.34. BOOST_DEFUN([Filesystem], [# Do we have to check for Boost.System? This link-time dependency was # added as of 1.35.0. If we have a version <1.35, we must not attempt to # find Boost.System as it didn't exist by then. if test $boost_major_version -ge 135; then BOOST_SYSTEM([$1]) fi # end of the Boost.System check. boost_filesystem_save_LIBS=$LIBS boost_filesystem_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" BOOST_FIND_LIB([filesystem], [$1], [boost/filesystem/path.hpp], [boost::filesystem::path p;]) if test $enable_static_boost = yes && test $boost_major_version -ge 135; then AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"]) fi LIBS=$boost_filesystem_save_LIBS LDFLAGS=$boost_filesystem_save_LDFLAGS ])# BOOST_FILESYSTEM # BOOST_FOREACH() # --------------- # Look for Boost.Foreach BOOST_DEFUN([Foreach], [BOOST_FIND_HEADER([boost/foreach.hpp])]) # BOOST_FORMAT() # -------------- # Look for Boost.Format # Note: we can't check for boost/format/format_fwd.hpp because the header isn't # standalone. It can't be compiled because it triggers the following error: # boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std' # does not name a type BOOST_DEFUN([Format], [BOOST_FIND_HEADER([boost/format.hpp])]) # BOOST_FUNCTION() # ---------------- # Look for Boost.Function BOOST_DEFUN([Function], [BOOST_FIND_HEADER([boost/function.hpp])]) # BOOST_GRAPH([PREFERRED-RT-OPT]) # ------------------------------- # Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Graph], [BOOST_FIND_LIB([graph], [$1], [boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;]) ])# BOOST_GRAPH # BOOST_IOSTREAMS([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([IOStreams], [BOOST_FIND_LIB([iostreams], [$1], [boost/iostreams/device/file_descriptor.hpp], [boost::iostreams::file_descriptor fd; fd.close();]) ])# BOOST_IOSTREAMS # BOOST_HASH() # ------------ # Look for Boost.Functional/Hash BOOST_DEFUN([Hash], [BOOST_FIND_HEADER([boost/functional/hash.hpp])]) # BOOST_LAMBDA() # -------------- # Look for Boost.Lambda BOOST_DEFUN([Lambda], [BOOST_FIND_HEADER([boost/lambda/lambda.hpp])]) # BOOST_LOG([PREFERRED-RT-OPT]) # ----------------------------- # Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Log], [BOOST_FIND_LIB([log], [$1], [boost/log/core/core.hpp], [boost::log::attribute a; a.get_value();]) ])# BOOST_LOG # BOOST_LOG_SETUP([PREFERRED-RT-OPT]) # ----------------------------------- # Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Log_Setup], [AC_REQUIRE([BOOST_LOG])dnl BOOST_FIND_LIB([log_setup], [$1], [boost/log/utility/init/from_settings.hpp], [boost::log::basic_settings bs; bs.empty();]) ])# BOOST_LOG_SETUP # BOOST_MATH() # ------------ # Look for Boost.Math # TODO: This library isn't header-only but it comes in multiple different # flavors that don't play well with BOOST_FIND_LIB (e.g, libboost_math_c99, # libboost_math_c99f, libboost_math_c99l, libboost_math_tr1, # libboost_math_tr1f, libboost_math_tr1l). This macro must be fixed to do the # right thing anyway. BOOST_DEFUN([Math], [BOOST_FIND_HEADER([boost/math/special_functions.hpp])]) # BOOST_MULTIARRAY() # ------------------ # Look for Boost.MultiArray BOOST_DEFUN([MultiArray], [BOOST_FIND_HEADER([boost/multi_array.hpp])]) # BOOST_NUMERIC_CONVERSION() # -------------------------- # Look for Boost.NumericConversion (policy-based numeric conversion) BOOST_DEFUN([Numeric_Conversion], [BOOST_FIND_HEADER([boost/numeric/conversion/converter.hpp]) ])# BOOST_NUMERIC_CONVERSION # BOOST_OPTIONAL() # ---------------- # Look for Boost.Optional BOOST_DEFUN([Optional], [BOOST_FIND_HEADER([boost/optional.hpp])]) # BOOST_PREPROCESSOR() # -------------------- # Look for Boost.Preprocessor BOOST_DEFUN([Preprocessor], [BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])]) # BOOST_UNORDERED() # ----------------- # Look for Boost.Unordered BOOST_DEFUN([Unordered], [BOOST_FIND_HEADER([boost/unordered_map.hpp])]) # BOOST_UUID() # ------------ # Look for Boost.Uuid BOOST_DEFUN([Uuid], [BOOST_FIND_HEADER([boost/uuid/uuid.hpp])]) # BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT]) # ----------------------------------------- # Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, # see the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Program_Options], [BOOST_FIND_LIB([program_options], [$1], [boost/program_options.hpp], [boost::program_options::options_description d("test");]) ])# BOOST_PROGRAM_OPTIONS # _BOOST_PYTHON_CONFIG(VARIABLE, FLAG) # ------------------------------------ # Save VARIABLE, and define it via `python-config --FLAG`. # Substitute BOOST_PYTHON_VARIABLE. m4_define([_BOOST_PYTHON_CONFIG], [AC_SUBST([BOOST_PYTHON_$1], [`python-config --$2 2>/dev/null`])dnl boost_python_save_$1=$$1 $1="$$1 $BOOST_PYTHON_$1"]) # BOOST_PYTHON([PREFERRED-RT-OPT]) # -------------------------------- # Look for Boost.Python. For the documentation of PREFERRED-RT-OPT, # see the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Python], [_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes]) _BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) _BOOST_PYTHON_CONFIG([LIBS], [libs]) m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl BOOST_FIND_LIB([python], [$1], [boost/python.hpp], [], [BOOST_PYTHON_MODULE(empty) {}]) CPPFLAGS=$boost_python_save_CPPFLAGS LDFLAGS=$boost_python_save_LDFLAGS LIBS=$boost_python_save_LIBS ])# BOOST_PYTHON # BOOST_REF() # ----------- # Look for Boost.Ref BOOST_DEFUN([Ref], [BOOST_FIND_HEADER([boost/ref.hpp])]) # BOOST_REGEX([PREFERRED-RT-OPT]) # ------------------------------- # Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Regex], [BOOST_FIND_LIB([regex], [$1], [boost/regex.hpp], [boost::regex exp("*"); boost::regex_match("foo", exp);]) ])# BOOST_REGEX # BOOST_SERIALIZATION([PREFERRED-RT-OPT]) # --------------------------------------- # Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see # the documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Serialization], [BOOST_FIND_LIB([serialization], [$1], [boost/archive/text_oarchive.hpp], [std::ostream* o = 0; // Cheap way to get an ostream... boost::archive::text_oarchive t(*o);]) ])# BOOST_SERIALIZATION # BOOST_SIGNALS([PREFERRED-RT-OPT]) # --------------------------------- # Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Signals], [BOOST_FIND_LIB([signals], [$1], [boost/signal.hpp], [boost::signal s;]) ])# BOOST_SIGNALS # BOOST_SMART_PTR() # ----------------- # Look for Boost.SmartPtr BOOST_DEFUN([Smart_Ptr], [BOOST_FIND_HEADER([boost/scoped_ptr.hpp]) BOOST_FIND_HEADER([boost/shared_ptr.hpp]) ]) # BOOST_STATICASSERT() # -------------------- # Look for Boost.StaticAssert BOOST_DEFUN([StaticAssert], [BOOST_FIND_HEADER([boost/static_assert.hpp])]) # BOOST_STRING_ALGO() # ------------------- # Look for Boost.StringAlgo BOOST_DEFUN([String_Algo], [BOOST_FIND_HEADER([boost/algorithm/string.hpp]) ]) # BOOST_SYSTEM([PREFERRED-RT-OPT], [ACTION-IF-NOT-FOUND]) # ------------------------------------------------------- # Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. This library was introduced in Boost # 1.35.0. BOOST_DEFUN([System], [BOOST_FIND_LIB([system], [$1], [boost/system/error_code.hpp], [boost::system::error_code e; e.clear();], [], [$2]) ])# BOOST_SYSTEM # BOOST_TEST([PREFERRED-RT-OPT]) # ------------------------------ # Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Test], [m4_pattern_allow([^BOOST_CHECK$])dnl BOOST_FIND_LIB([unit_test_framework], [$1], [boost/test/unit_test.hpp], [BOOST_CHECK(2 == 2);], [using boost::unit_test::test_suite; test_suite* init_unit_test_suite(int argc, char ** argv) { return NULL; }]) ])# BOOST_TEST # BOOST_THREADS([PREFERRED-RT-OPT], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------- # Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. If ACTION-IF-NOT-FOUND is given, # errors are non-fatal; if it's absent, errors are fatal. # FIXME: Provide an alias "BOOST_THREAD". BOOST_DEFUN([Threads], [dnl Having the pthread flag is required at least on GCC3 where dnl boost/thread.hpp would complain if we try to compile without dnl -pthread on GNU/Linux. AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl boost_threads_save_LIBS=$LIBS boost_threads_save_LDFLAGS=$LDFLAGS boost_threads_save_CPPFLAGS=$CPPFLAGS # Link-time dependency from thread to system was added as of 1.49.0. if test $boost_major_version -ge 149; then BOOST_SYSTEM([$1], [AC_MSG_WARN([[Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that).]])]) fi # end of the Boost.System check. m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" # Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, # boost/thread.hpp will trigger a #error if -pthread isn't used: # boost/config/requires_threads.hpp:47:5: #error "Compiler threading support # is not turned on. Please set the correct command line options for # threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" # When compiling for the Windows platform, the threads library is named # differently. case $host_os in (*mingw*) BOOST_FIND_LIB([thread_win32], [$1], [boost/thread.hpp], [boost::thread t; boost::mutex m;], [], [$2]) BOOST_THREAD_LDFLAGS=$BOOST_THREAD_WIN32_LDFLAGS BOOST_THREAD_LDPATH=$BOOST_THREAD_WIN32_LDPATH BOOST_THREAD_LIBS=$BOOST_THREAD_WIN32_LIBS ;; (*) BOOST_FIND_LIB([thread], [$1], [boost/thread.hpp], [boost::thread t; boost::mutex m;], [], [$2]) ;; esac BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS" BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" LIBS=$boost_threads_save_LIBS LDFLAGS=$boost_threads_save_LDFLAGS CPPFLAGS=$boost_threads_save_CPPFLAGS ])# BOOST_THREADS # BOOST_TOKENIZER() # ----------------- # Look for Boost.Tokenizer BOOST_DEFUN([Tokenizer], [BOOST_FIND_HEADER([boost/tokenizer.hpp])]) # BOOST_TRIBOOL() # --------------- # Look for Boost.Tribool BOOST_DEFUN([Tribool], [BOOST_FIND_HEADER([boost/logic/tribool_fwd.hpp]) BOOST_FIND_HEADER([boost/logic/tribool.hpp]) ]) # BOOST_TUPLE() # ------------- # Look for Boost.Tuple BOOST_DEFUN([Tuple], [BOOST_FIND_HEADER([boost/tuple/tuple.hpp])]) # BOOST_TYPETRAITS() # -------------------- # Look for Boost.TypeTraits BOOST_DEFUN([TypeTraits], [BOOST_FIND_HEADER([boost/type_traits.hpp])]) # BOOST_UTILITY() # --------------- # Look for Boost.Utility (noncopyable, result_of, base-from-member idiom, # etc.) BOOST_DEFUN([Utility], [BOOST_FIND_HEADER([boost/utility.hpp])]) # BOOST_VARIANT() # --------------- # Look for Boost.Variant. BOOST_DEFUN([Variant], [BOOST_FIND_HEADER([boost/variant/variant_fwd.hpp]) BOOST_FIND_HEADER([boost/variant.hpp])]) # BOOST_WAVE([PREFERRED-RT-OPT]) # ------------------------------ # NOTE: If you intend to use Wave/Spirit with thread support, make sure you # call BOOST_THREADS first. # Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the # documentation of BOOST_FIND_LIB above. BOOST_DEFUN([Wave], [AC_REQUIRE([BOOST_FILESYSTEM])dnl AC_REQUIRE([BOOST_DATE_TIME])dnl boost_wave_save_LIBS=$LIBS boost_wave_save_LDFLAGS=$LDFLAGS m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS \ $BOOST_THREAD_LIBS" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS \ $BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS" BOOST_FIND_LIB([wave], [$1], [boost/wave.hpp], [boost::wave::token_id id; get_token_name(id);]) LIBS=$boost_wave_save_LIBS LDFLAGS=$boost_wave_save_LDFLAGS ])# BOOST_WAVE # BOOST_XPRESSIVE() # ----------------- # Look for Boost.Xpressive (new since 1.36.0). BOOST_DEFUN([Xpressive], [BOOST_FIND_HEADER([boost/xpressive/xpressive.hpp])]) # ----------------- # # Internal helpers. # # ----------------- # # _BOOST_PTHREAD_FLAG() # --------------------- # Internal helper for BOOST_THREADS. Based on ACX_PTHREAD: # http://autoconf-archive.cryp.to/acx_pthread.html AC_DEFUN([_BOOST_PTHREAD_FLAG], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_LANG_PUSH([C++])dnl AC_CACHE_CHECK([for the flags needed to use pthreads], [boost_cv_pthread_flag], [ boost_cv_pthread_flag= # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # (none): in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -lpthreads: AIX (must check this before -lpthread) # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads) # -pthreads: Solaris/GCC # -mthreads: MinGW32/GCC, Lynx/GCC # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # -lpthread: GNU Linux, etc. # --thread-safe: KAI C++ case $host_os in #( *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: boost_pthread_flags="-pthreads -lpthread -mt -pthread";; #( *) boost_pthread_flags="-lpthreads -Kthread -kthread -llthread -pthread \ -pthreads -mthreads -lpthread --thread-safe -mt";; esac # Generate the test file. AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0);])]) for boost_pthread_flag in '' $boost_pthread_flags; do boost_pthread_ok=false dnl Re-use the test file already generated. boost_pthreads__save_LIBS=$LIBS LIBS="$LIBS $boost_pthread_flag" AC_LINK_IFELSE([], [if grep ".*$boost_pthread_flag" conftest.err; then echo "This flag seems to have triggered warnings" >&AS_MESSAGE_LOG_FD else boost_pthread_ok=:; boost_cv_pthread_flag=$boost_pthread_flag fi]) LIBS=$boost_pthreads__save_LIBS $boost_pthread_ok && break done ]) AC_LANG_POP([C++])dnl ])# _BOOST_PTHREAD_FLAG # _BOOST_gcc_test(MAJOR, MINOR) # ----------------------------- # Internal helper for _BOOST_FIND_COMPILER_TAG. m4_define([_BOOST_gcc_test], ["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl # _BOOST_FIND_COMPILER_TAG() # -------------------------- # Internal. When Boost is installed without --layout=system, each library # filename will hold a suffix that encodes the compiler used during the # build. The Boost build system seems to call this a `tag'. AC_DEFUN([_BOOST_FIND_COMPILER_TAG], [AC_REQUIRE([AC_PROG_CXX])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag], [boost_cv_lib_tag=unknown if test x$boost_cv_inc_path != xno; then AC_LANG_PUSH([C++])dnl # The following tests are mostly inspired by boost/config/auto_link.hpp # The list is sorted to most recent/common to oldest compiler (in order # to increase the likelihood of finding the right compiler with the # least number of compilation attempt). # Beware that some tests are sensible to the order (for instance, we must # look for MinGW before looking for GCC3). # I used one compilation test per compiler with a #error to recognize # each compiler so that it works even when cross-compiling (let me know # if you know a better approach). # Known missing tags (known from Boost's tools/build/v2/tools/common.jam): # como, edg, kcc, bck, mp, sw, tru, xlc # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines # the same defines as GCC's). for i in \ _BOOST_gcc_test(4, 8) \ _BOOST_gcc_test(4, 7) \ _BOOST_gcc_test(4, 6) \ _BOOST_gcc_test(4, 5) \ _BOOST_gcc_test(4, 4) \ _BOOST_gcc_test(4, 3) \ _BOOST_gcc_test(4, 2) \ _BOOST_gcc_test(4, 1) \ _BOOST_gcc_test(4, 0) \ "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \ _BOOST_gcc_test(3, 4) \ _BOOST_gcc_test(3, 3) \ "defined _MSC_VER && _MSC_VER >= 1500 @ vc90" \ "defined _MSC_VER && _MSC_VER == 1400 @ vc80" \ _BOOST_gcc_test(3, 2) \ "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \ _BOOST_gcc_test(3, 1) \ _BOOST_gcc_test(3, 0) \ "defined __BORLANDC__ @ bcb" \ "defined __ICC && (defined __unix || defined __unix__) @ il" \ "defined __ICL @ iw" \ "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ _BOOST_gcc_test(2, 95) \ "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \ "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8" do boost_tag_test=`expr "X$i" : 'X\([[^@]]*\) @ '` boost_tag=`expr "X$i" : 'X[[^@]]* @ \(.*\)'` AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if $boost_tag_test /* OK */ #else # error $boost_tag_test #endif ]])], [boost_cv_lib_tag=$boost_tag; break], []) done AC_LANG_POP([C++])dnl case $boost_cv_lib_tag in #( # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed # to "gcc41" for instance. *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there. gcc*) boost_tag_x= case $host_os in #( darwin*) if test $boost_major_version -ge 136; then # The `x' added in r46793 of Boost. boost_tag_x=x fi;; esac # We can specify multiple tags in this variable because it's used by # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ... boost_cv_lib_tag="$boost_tag_x$boost_cv_lib_tag -${boost_tag_x}gcc" ;; #( unknown) AC_MSG_WARN([[could not figure out which toolset name to use for $CXX]]) boost_cv_lib_tag= ;; esac fi])dnl end of AC_CACHE_CHECK ])# _BOOST_FIND_COMPILER_TAG # _BOOST_GUESS_WHETHER_TO_USE_MT() # -------------------------------- # Compile a small test to try to guess whether we should favor MT (Multi # Thread) flavors of Boost. Sets boost_guess_use_mt accordingly. AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], [# Check whether we do better use `mt' even though we weren't ask to. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if defined _REENTRANT || defined _MT || defined __MT__ /* use -mt */ #else # error MT not needed #endif ]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) ]) # _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------------- # Fork of _AC_LINK_IFELSE that preserves conftest.o across calls. Fragile, # will break when Autoconf changes its internals. Requires that you manually # rm -f conftest.$ac_objext in between to really different tests, otherwise # you will try to link a conftest.o left behind by a previous test. # Used to aggressively optimize BOOST_FIND_LIB (see the big comment in this # macro). # # Don't use "break" in the actions, as it would short-circuit some code # this macro runs after the actions. m4_define([_BOOST_AC_LINK_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && _AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) AS_IF([_AC_DO_STDERR($ac_link) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_executable_p conftest$ac_exeext dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. }], [$2], [if $boost_use_source; then _AC_MSG_LOG_CONFTEST fi $3]) ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization) dnl information created by the PGI compiler (conftest_ipa8_conftest.oo), dnl as it would interfere with the next link command. rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# _BOOST_AC_LINK_IFELSE # Local Variables: # mode: autoconf # End: cvc4-1.5/config/build-type000077500000000000000000000031431313116454100154670ustar00rootroot00000000000000#!/bin/sh # # build-type # Morgan Deters for CVC4 # # usage: build-type profile [ overrides... ] # # Returns a build string for the given profile and overrides. # For example, "build-type debug noassertions" returns the canonical # build string for a debug build with assertions turned off. # # The default build directory for CVC4 is then (assuming a standard # debug build): # # builds/`config/config.guess`/`config/build-type debug` # # This script is used both in CVC4's configure script and in the # top-level Makefile when you build another profile than the # "current" build (to see if there already was a build of that type). # # The overrides are as follows: # # staticbinary # optimized # proof # debugsymbols # assertions # tracing # muzzle # coverage # profiling # # Also you can specify "cln" or "gmp". If "gmp", the build dir # contains the string "gmp". (gmp is considered the default.) # # Also for glpk and abc. # if [ $# -eq 0 ]; then echo "usage: build-type profile [ overrides... ]" >&2 exit fi build_type=$1 shift while [ $# -gt 0 ]; do case "$1" in cln) cln=1 ;; gmp) ;; no*) eval `expr "$1" : 'no\(.*\)'`=0 ;; *) eval $1=1 ;; esac shift done build_type_suffix= for arg in cln glpk abc staticbinary optimized proof debugsymbols statistics replay assertions tracing muzzle coverage profiling; do if eval [ -n '"${'$arg'+set}"' ]; then if eval [ '"${'$arg'}"' -eq 0 ]; then build_type_suffix=$build_type_suffix-no$arg else build_type_suffix=$build_type_suffix-$arg fi fi done echo $build_type$build_type_suffix cvc4-1.5/config/compile000077500000000000000000000162451313116454100150500ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 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 if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a 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: cvc4-1.5/config/config.guess000077500000000000000000001247531313116454100160160ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # 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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # 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 # # Please send patches to . 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 1992-2015 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 case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # 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=`(uname -p 2>/dev/null || \ /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 ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-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*|earm*|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 # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; 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/[-_].*//' | cut -d. -f1,2` ;; 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}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_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 ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix 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/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 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 ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *: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-${LIBC}`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/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${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-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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 ;; x86_64:Haiku:*:*) echo x86_64-unknown-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 eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 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 case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi 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 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: cvc4-1.5/config/config.sub000077500000000000000000001064601313116454100154540ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # 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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # 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 1992-2015 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-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ 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 | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | 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 \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]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 \ | visium \ | 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 ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | 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-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | 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-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | 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-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | 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-* \ | visium-* \ | 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 ;; asmjs) basic_machine=asmjs-unknown ;; 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 ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; 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 ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-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 ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-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 | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) 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* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -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* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -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* | -tirtos*) # 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 ;; -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 ;; c8051-*) os=-elf ;; 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: cvc4-1.5/config/cryptominisat.m4000066400000000000000000000050731313116454100166360ustar00rootroot00000000000000# CVC4_CHECK_FOR_CRYPTOMINISAT # ------------------ # Look for cryptominisat and link it in, but only if user requested. AC_DEFUN([CVC4_CHECK_FOR_CRYPTOMINISAT], [ AC_MSG_CHECKING([whether user requested cryptominisat support]) have_libcryptominisat=0 CRYPTOMINISAT_LIBS= CRYPTOMINISAT_LDFLAGS= have_libcryptominisat=0 if test "$with_cryptominisat" = no; then AC_MSG_RESULT([no, cryptominisat disabled by user]) elif test -n "$with_cryptominisat"; then AC_MSG_RESULT([yes, cryptominisat requested by user]) AC_ARG_VAR(CRYPTOMINISAT_HOME, [path to top level of cryptominisat source tree]) AC_ARG_WITH( [cryptominisat-dir], AS_HELP_STRING( [--with-cryptominisat-dir=PATH], [path to top level of cryptominisat source tree] ), [CRYPTOMINISAT_HOME="$withval"], [ if test -z "$CRYPTOMINISAT_HOME"; then AC_MSG_FAILURE([must give --with-cryptominisat-dir=PATH or define environment variable CRYPTOMINISAT_HOME!]) fi ] ) if ! test -d "$CRYPTOMINISAT_HOME" || ! test -x "$CRYPTOMINISAT_HOME/install/bin/cryptominisat" ; then AC_MSG_FAILURE([either $CRYPTOMINISAT_HOME is not an cryptominisat install tree or it's not yet built]) fi CPPFLAGS="$CPPFLAGS -I$CRYPTOMINISAT_HOME/install/include" AC_MSG_CHECKING([how to link cryptominisat]) dnl TODO FIXME: dnl For some reason the CVC4_TRY_CRYPTOMINISAT is not working correctly CVC4_TRY_CRYPTOMINISAT_WITH([-pthread]) CVC4_TRY_CRYPTOMINISAT_WITH([-pthread -lm4ri]) if test -z "$CRYPTOMINISAT_LIBS"; then AC_MSG_FAILURE([cannot link against libcryptominisat!]) else AC_MSG_RESULT([$CRYPTOMINISAT_LIBS]) have_libcryptominisat=1 fi CRYPTOMINISAT_LDFLAGS="-L$CRYPTOMINISAT_HOME/install/lib" else AC_MSG_RESULT([no, user didn't request cryptominisat]) with_cryptominisat=no fi ])# CVC4_CHECK_FOR_CRYPTOMINISAT # CVC4_TRY_STATIC_CRYPTOMINISAT_WITH(LIBS) # ------------------------------ # Try AC_CHECK_LIB(cryptominisat) with the given linking libraries AC_DEFUN([CVC4_TRY_CRYPTOMINISAT_WITH], [ if test -z "$CRYPTOMINISAT_LIBS"; then AC_LANG_PUSH([C++]) cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" cvc4_save_CPPFLAGS="$CPPFLAGS" LDFLAGS="-L$CRYPTOMINISAT_HOME/install/lib" LIBS="-lcryptominisat4 $1" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[CMSat::SATSolver test()]])], [CRYPTOMINISAT_LIBS="-lcryptominisat4 $1"], [CRYPTOMINISAT_LIBS=]) LDFLAGS="$cvc4_save_LDFLAGS" CPPFLAGS="$cvc4_save_CPPFLAGS" LIBS="$cvc4_save_LIBS" AC_LANG_POP([C++]) fi ])# CVC4_TRY_CRYPTOMINISAT_WITH cvc4-1.5/config/cvc4.m4000066400000000000000000000164111313116454100145660ustar00rootroot00000000000000# CVC4_AC_INIT # ------------ # Do early initialization/diversion of autoconf things for CVC4 build process. AC_DEFUN([CVC4_AC_INIT], dnl _AS_ME_PREPARE [CVC4_REWRITE_ARGS_FOR_BUILD_PROFILE ])# CVC4_AC_INIT # CVC4_REWRITE_ARGS_FOR_BUILD_PROFILE # ----------------------------------- # Rewrite (e.g.) "./configure debug" to "./configure --with-build=debug" AC_DEFUN([CVC4_REWRITE_ARGS_FOR_BUILD_PROFILE], [m4_divert_push([PARSE_ARGS])dnl CVC4_BSD_LICENSED_CODE_ONLY=1 m4_divert_once([HELP_ENABLE], [[ Licensing and performance options: --bsd disable all GPL dependences (default) --enable-gpl permit GPL dependences, if available --best turn on dependences known to give best performance]])dnl handle_option() { ac_option="$[]1" case $ac_option in --bsd|--disable-gpl|CVC4_BSD_LICENSED_CODE_ONLY=1) if test "$CVC4_LICENSE_OPTION" = gpl; then AC_ERROR([cannot give both --bsd and --enable-gpl]); fi CVC4_LICENSE_OPTION=bsd ac_option="CVC4_BSD_LICENSED_CODE_ONLY=1" eval $ac_option ;; --enable-gpl|--gpl|CVC4_BSD_LICENSED_CODE_ONLY=0) if test "$CVC4_LICENSE_OPTION" = bsd; then AC_ERROR([cannot give both --bsd and --enable-gpl]); fi CVC4_LICENSE_OPTION=gpl ac_option="CVC4_BSD_LICENSED_CODE_ONLY=0" eval $ac_option ;; --best) # set the best configuration handle_option --with-readline handle_option --with-cln handle_option --with-glpk handle_option --with-abc return ;; -enable-proofs|--enable-proofs) ac_option='--enable-proof' ;; -*|*=*) ;; production|production-*|debug|debug-*|competition|competition-*) # regexp `\?' not supported on Mac OS X ac_option_build=`expr "$ac_option" : '\([[^-]]*\)-\{0,1\}'` ac_cvc4_build_profile_set=yes as_me=configure AC_MSG_NOTICE([CVC4: building profile $ac_option_build]) for x in optimized proof statistics replay assertions tracing dumping muzzle coverage profiling; do if expr "$ac_option" : '.*-no'$x'$' >/dev/null || expr "$ac_option" : '.*-no'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-$x\""' fi if expr "$ac_option" : '.*-'$x'$' >/dev/null || expr "$ac_option" : '.*-'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-$x\""' fi done if expr "$ac_option" : '.*-nostaticbinary$' >/dev/null || expr "$ac_option" : '.*-nostaticbinary-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-static-binary\""' fi if expr "$ac_option" : '.*-staticbinary$' >/dev/null || expr "$ac_option" : '.*-staticbinary-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-static-binary\""' fi if expr "$ac_option" : '.*-nodebugsymbols$' >/dev/null || expr "$ac_option" : '.*-nodebugsymbols-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-debug-symbols\""' fi if expr "$ac_option" : '.*-debugsymbols$' >/dev/null || expr "$ac_option" : '.*-debugsymbols-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-debug-symbols\""' fi if expr "$ac_option" : '.*-noglpk' >/dev/null || expr "$ac_option" : '.*-noglpk-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--without-glpk\""' fi if expr "$ac_option" : '.*-glpk' >/dev/null || expr "$ac_option" : '.*-glpk-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--with-glpk\""' fi if expr "$ac_option" : '.*-noabc' >/dev/null || expr "$ac_option" : '.*-noabc-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--without-abc\""' fi if expr "$ac_option" : '.*-abc' >/dev/null || expr "$ac_option" : '.*-abc-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--with-abc\""' fi for x in cln gmp; do if expr "$ac_option" : '.*-no'$x'$' >/dev/null || expr "$ac_option" : '.*-no'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--without-$x\""' fi if expr "$ac_option" : '.*-'$x'$' >/dev/null || expr "$ac_option" : '.*-'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--with-$x\""' fi done ac_option="--with-build=$ac_option_build" esac eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }'\'\$ac_option\'\" } unset ac_cvc4_rewritten_args for ac_option do if test "$ac_option" = personal; then if test -e personal.conf; then handle_option --enable-personal-make-rules while read arg; do handle_option "$arg" done < personal.conf else AC_MSG_ERROR([personal build profile selected, but cannot find personal.conf]) fi else handle_option "$ac_option" fi done eval set x $ac_cvc4_rewritten_args shift dnl echo "args are now:" "${@}" m4_divert_pop([PARSE_ARGS])dnl ])# CVC4_REWRITE_ARGS_FOR_BUILD_PROFILE # CVC4_COPY_IF_CHANGED(FROM, TO) # ------------------------------ # Copy file FROM to TO, if they have textual differences. AC_DEFUN([CVC4_COPY_IF_CHANGED], [ if diff -q "$1" "$2" >/dev/null 2>&1; then dnl they are the same : else dnl they are different cp "$1" "$2" fi ])# CVC4_COPY_IF_CHANGED # CVC4_CONFIG_FILE_ONLY_IF_CHANGED(FILE) # -------------------------------------- # Run AC_CONFIG_FILES to generate file named in the argument, but if it # exists already, only replace it if it would be changed (this preserves # the old timestamp if no textual changes are to be made to the file). AC_DEFUN([CVC4_CONFIG_FILE_ONLY_IF_CHANGED], [ AC_CONFIG_FILES([$1.tmp:$1.in], CVC4_COPY_IF_CHANGED([$1.tmp],[$1])) ])# CVC4_CONFIG_FILE_ONLY_IF_CHANGED # CVC4_CXX_OPTION(OPTION, VAR) # ---------------------------- # Run $(CXX) $(CPPFLAGS) $(CXXFLAGS) OPTION and see if the compiler # likes it. If so, add OPTION to shellvar VAR. AC_DEFUN([CVC4_CXX_OPTION], [ AC_MSG_CHECKING([whether $CXX supports $1]) cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR $1" AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])], [AC_MSG_RESULT([yes]); $2='$1'], [AC_MSG_RESULT([no])]) AC_LANG_POP([C++]) CXXFLAGS="$cvc4_save_CXXFLAGS" ])# CVC4_CXX_OPTION # CVC4_C_OPTION(OPTION, VAR) # -------------------------- # Run $(CC) $(CPPFLAGS) $(CFLAGS) OPTION and see if the compiler # likes it. If so, add OPTION to shellvar VAR. AC_DEFUN([CVC4_C_OPTION], [ AC_MSG_CHECKING([whether $CC supports $1]) cvc4_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $C_WERROR $1" AC_LANG_PUSH([C]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])], [AC_MSG_RESULT([yes]); $2='$1'], [AC_MSG_RESULT([no])]) AC_LANG_POP([C]) CFLAGS="$cvc4_save_CFLAGS" ])# CVC4_C_OPTION cvc4-1.5/config/depcomp000077500000000000000000000560161313116454100150470ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 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 # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} 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" # Avoid interferences from the environment. gccflag= dashmflag= # 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 information. 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## 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). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## 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. tr ' ' "$nl" < "$tmpdepfile" \ | 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 -ne 0; then 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 make_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. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then 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,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_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. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool 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$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; 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 -ne 0; then 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" echo >> "$depfile" # make sure the fragment doesn't end with a backslash 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" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | 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" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | 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: cvc4-1.5/config/doxygen.am000066400000000000000000000112731313116454100154620ustar00rootroot00000000000000# Renamed doxygen.am from aminclude.am for inclusion in CVC4 # Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Automake macro files. # Generate automatic documentation using Doxygen. Goals and variables values # are controlled by the various DX_COND_??? conditionals set by autoconf. # # The provided goals are: # doxygen-doc: Generate all doxygen documentation. # doxygen-run: Run doxygen, which will generate some of the documentation # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post # processing required for the rest of it (PS, PDF, and some MAN). # doxygen-man: Rename some doxygen generated man pages. # doxygen-ps: Generate doxygen PostScript documentation. # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake goals. If # doxygen is used to generate man pages, you can achieve this integration by # setting man3_MANS to the list of man pages generated and then adding the # dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # This is usually added to MOSTLYCLEANFILES. ## --------------------------------- ## ## Format-independent Doxygen rules. ## ## --------------------------------- ## if DX_COND_doc ## ------------------------------- ## ## Rules specific for HTML output. ## ## ------------------------------- ## if DX_COND_html DX_CLEAN_HTML = @DX_DOCDIR@/html endif DX_COND_html ## ------------------------------ ## ## Rules specific for CHM output. ## ## ------------------------------ ## if DX_COND_chm DX_CLEAN_CHM = @DX_DOCDIR@/chm if DX_COND_chi DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi endif DX_COND_chi endif DX_COND_chm ## ------------------------------ ## ## Rules specific for MAN output. ## ## ------------------------------ ## if DX_COND_man DX_CLEAN_MAN = @DX_DOCDIR@/man endif DX_COND_man ## ------------------------------ ## ## Rules specific for RTF output. ## ## ------------------------------ ## if DX_COND_rtf DX_CLEAN_RTF = @DX_DOCDIR@/rtf endif DX_COND_rtf ## ------------------------------ ## ## Rules specific for XML output. ## ## ------------------------------ ## if DX_COND_xml DX_CLEAN_XML = @DX_DOCDIR@/xml endif DX_COND_xml ## ----------------------------- ## ## Rules specific for PS output. ## ## ----------------------------- ## if DX_COND_ps DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps DX_PS_GOAL = doxygen-ps doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_LATEX) refman.tex; \ $(MAKEINDEX_PATH) refman.idx; \ $(DX_LATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_LATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi endif DX_COND_ps ## ------------------------------ ## ## Rules specific for PDF output. ## ## ------------------------------ ## if DX_COND_pdf DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf DX_PDF_GOAL = doxygen-pdf doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_PDFLATEX) refman.tex; \ $(DX_MAKEINDEX) refman.idx; \ $(DX_PDFLATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_PDFLATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ mv refman.pdf ../@PACKAGE@.pdf endif DX_COND_pdf ## ------------------------------------------------- ## ## Rules specific for LaTeX (shared for PS and PDF). ## ## ------------------------------------------------- ## if DX_COND_latex DX_CLEAN_LATEX = @DX_DOCDIR@/latex endif DX_COND_latex .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) rm -rf @DX_DOCDIR@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) DX_CLEANFILES = \ @DX_DOCDIR@/@PACKAGE@.tag \ -r \ $(DX_CLEAN_HTML) \ $(DX_CLEAN_CHM) \ $(DX_CLEAN_CHI) \ $(DX_CLEAN_MAN) \ $(DX_CLEAN_RTF) \ $(DX_CLEAN_XML) \ $(DX_CLEAN_PS) \ $(DX_CLEAN_PDF) \ $(DX_CLEAN_LATEX) endif DX_COND_doc cvc4-1.5/config/doxygen.cfg000066400000000000000000001746721313116454100156410ustar00rootroot00000000000000# Doxyfile 1.6.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = $(PROJECT)-$(VERSION) # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = $(DOCDIR) # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = $(SRCDIR) # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = YES # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it parses. # With this tag you can assign which parser to use for a given extension. # Doxygen has a built-in mapping, but you can override or extend it using this tag. # The format is ext=language, where ext is a file extension, and language is one of # the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, # Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat # .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. EXTENSION_MAPPING = # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen to replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. # When the cache is full, less often used symbols will be written to disk. # For small to medium size projects (<1000 input files) the default value is # probably good enough. For larger projects a too small cache size can cause # doxygen to be busy swapping symbols to and from disk most of the time # causing a significant performance penality. # If the system has enough physical memory increasing the cache will improve the # performance by keeping more symbols in memory. Note that the value works on # a logarithmic scale so increasing the size by one will rougly double the # memory usage. The cache size is given by this formula: # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = $(DOXYGEN_EXTRACT_PRIVATE) # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = $(DOXYGEN_EXTRACT_STATIC) # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 0 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by # doxygen. The layout file controls the global structure of the generated output files # in an output format independent way. The create the layout file that represents # doxygen's defaults, run doxygen with the -l option. You can optionally specify a # file name after the option, if omitted DoxygenLayout.xml will be used as the name # of the layout file. LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = $(SRCDIR)/doc/mainpage.md \ $(CVC4_DOXYGEN_INPUT) # USE_MDFILE_AS_MAINPAGE = $(SRCDIR)/doc/mainpage.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = */generated/* \ *_template.cpp \ *_template.h # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = $(SRCDIR) # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = $(GENERATE_HTML) # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = $(GENERATE_HTMLHELP) # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = ../$(PROJECT).chm # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = $(HHC_PATH) # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = $(GENERATE_CHI) # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = YES # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER # are set, an additional index file will be generated that can be used as input for # Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated # HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. # For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's # filter section matches. # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP) # there is already a search function so this one should typically # be disabled. SEARCHENGINE = YES SERVER_BASED_SEARCH = YES #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = $(GENERATE_LATEX) # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = YES # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = $(PAPER_SIZE) # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = $(GENERATE_PDF) # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = YES # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = $(GENERATE_RTF) # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = YES # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = $(GENERATE_MAN) # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = $(GENERATE_XML) # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = . $(SRCDIR)/src $(SRCDIR)/src/include # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = _DOXYGEN \ "CVC4_THREADLOCAL(x)=x" \ "CVC4_PUBLIC=" \ "CVC4_THERADLOCAL_PUBLIC(x)=x" # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = $(DOCDIR)/$(PROJECT).tag # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/false #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = $(HAVE_DOT) # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This # font does not include all possible unicode characters however, so when you need # these (or just want a differently looking font) you can specify the font name # using DOT_FONTNAME. You need need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = FreeSans # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = $(DOT_PATH) # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = YES # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES cvc4-1.5/config/gcc_version.m4000066400000000000000000000005271313116454100162310ustar00rootroot00000000000000# GCC version 4.5.1 builds Minisat incorrectly with -O2 # and that gives incorrect answers! Warn the user! AC_DEFUN([CVC4_GCC_VERSION], [ if expr "$($CC -dumpversion)" : '4\.5\.1' &>/dev/null; then CVC4_INTEGRITY_WARNING="GCC 4.5.1's optimizer is known to make errors building Minisat (and by extension CVC4)" fi ])# CVC4_GCC_VERSION cvc4-1.5/config/glpk.m4000066400000000000000000000120401313116454100146560ustar00rootroot00000000000000# CVC4_CHECK_FOR_GLPK # ------------------- # Look for glpk and link it in, but only if user requested. AC_DEFUN([CVC4_CHECK_FOR_GLPK], [ AC_MSG_CHECKING([whether user requested glpk support]) LIBGLPK= have_libglpk=0 GLPK_LIBS= GLPK_LDFLAGS= if test "$with_glpk" = no; then AC_MSG_RESULT([no, glpk disabled by user]) elif test -n "$with_glpk"; then AC_MSG_RESULT([yes, glpk requested by user]) # Get the location of all the GLPK stuff AC_ARG_VAR(GLPK_HOME, [path to top level of glpk installation]) AC_ARG_WITH( [glpk-dir], AS_HELP_STRING( [--with-glpk-dir=PATH], [path to top level of glpk installation] ), [GLPK_HOME="$withval"], [ if test -z "$GLPK_HOME"; then AC_MSG_FAILURE([must give --with-glpk-dir=PATH or define environment variable GLPK_HOME!]) fi ] ) if test -n "$GLPK_HOME"; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-I$GLPK_HOME/include" GLPK_LDFLAGS="-L$GLPK_HOME/lib" fi dnl Try a bunch of combinations until something works :-/ GLPK_LIBS= AC_LANG_PUSH([C++]) cvc4_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" AC_CHECK_HEADER([glpk.h], [], [AC_MSG_FAILURE([cannot find glpk.h, the GLPK header!])]) CPPFLAGS="$cvc4_save_CPPFLAGS" AC_LANG_POP([C++]) AC_MSG_CHECKING([how to link glpk]) CVC4_TRY_GLPK_WITH([]) CVC4_TRY_GLPK_WITH([-lgmp]) CVC4_TRY_GLPK_WITH([-lz]) CVC4_TRY_GLPK_WITH([-ldl]) CVC4_TRY_GLPK_WITH([-lltdl]) CVC4_TRY_GLPK_WITH([-lltdl -ldl]) CVC4_TRY_GLPK_WITH([-lz -ldl]) CVC4_TRY_GLPK_WITH([-lz -lltdl]) CVC4_TRY_GLPK_WITH([-lz -lltdl -ldl]) CVC4_TRY_GLPK_WITH([-lgmp -lz]) CVC4_TRY_GLPK_WITH([-lgmp -ldl]) CVC4_TRY_GLPK_WITH([-lgmp -lltdl]) CVC4_TRY_GLPK_WITH([-lgmp -lltdl -ldl]) CVC4_TRY_GLPK_WITH([-lgmp -lz -ldl]) CVC4_TRY_GLPK_WITH([-lgmp -lz -lltdl]) CVC4_TRY_GLPK_WITH([-lgmp -lz -lltdl -ldl]) if test -z "$GLPK_LIBS"; then AC_MSG_FAILURE([cannot link against libglpk! (perhaps you have not switched to glpk-cut-log? see /INSTALL)]) else AC_MSG_RESULT([$GLPK_LIBS]) # make sure it works in static builds, too if test "$enable_static_binary" = yes; then GLPK_LIBS= AC_MSG_CHECKING([whether statically-linked glpk is functional]) CVC4_TRY_STATIC_GLPK_WITH([]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp]) CVC4_TRY_STATIC_GLPK_WITH([-lz]) CVC4_TRY_STATIC_GLPK_WITH([-ldl]) CVC4_TRY_STATIC_GLPK_WITH([-lltdl]) CVC4_TRY_STATIC_GLPK_WITH([-lltdl -ldl]) CVC4_TRY_STATIC_GLPK_WITH([-lz -ldl]) CVC4_TRY_STATIC_GLPK_WITH([-lz -lltdl]) CVC4_TRY_STATIC_GLPK_WITH([-lz -lltdl -ldl]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp -lz]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp -ldl]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp -lltdl]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp -lltdl -ldl]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp -lz -ldl]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp -lz -lltdl]) CVC4_TRY_STATIC_GLPK_WITH([-lgmp -lz -lltdl -ldl]) if test -n "$GLPK_LIBS"; then AC_MSG_RESULT([yes, it works]) with_glpk=yes else AC_MSG_RESULT([no]) AC_MSG_FAILURE([glpk installation appears incompatible with static-binary]) fi else with_glpk=yes fi fi if test "$with_glpk" = yes; then have_libglpk=1 else with_glpk=no have_libreadline=0 GLPK_LIBS= fi else AC_MSG_RESULT([no, user didn't request glpk]) with_glpk=no fi ])# CVC4_CHECK_FOR_GLPK # CVC4_TRY_GLPK_WITH(LIBS) # ------------------------ # Try AC_CHECK_LIB(glpk) with the given linking libraries AC_DEFUN([CVC4_TRY_GLPK_WITH], [ if test -z "$GLPK_LIBS"; then AC_LANG_PUSH([C++]) cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk $1" AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL)])], [GLPK_LIBS="-lglpk $1"], []) LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" AC_LANG_POP([C++]) fi ])# CVC4_TRY_GLPK_WITH # CVC4_TRY_STATIC_GLPK_WITH(LIBS) # ------------------------------- # Try AC_CHECK_LIB(glpk) with the given linking libraries AC_DEFUN([CVC4_TRY_STATIC_GLPK_WITH], [ if test -z "$GLPK_LIBS"; then AC_LANG_PUSH([C++]) cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static $1" AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL)])], [GLPK_LIBS="-lglpk-static $1"], [ LIBS="-lglpk $1" AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL)])], [GLPK_LIBS="-lglpk $1"]) ]) LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" AC_LANG_POP([C++]) fi ])# CVC4_TRY_STATIC_GLPK_WITH cvc4-1.5/config/install-sh000077500000000000000000000354631313116454100155010ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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: cvc4-1.5/config/is_sorted.m4000066400000000000000000000017261313116454100157250ustar00rootroot00000000000000# CHECK_FOR_IS_SORTED # ------------------- # Look for is_sorted in std:: and __gnu_cxx:: and define # some things to make it easy to find later. AC_DEFUN([CHECK_FOR_IS_SORTED], [ AC_MSG_CHECKING([where we can find is_sorted]) AC_LANG_PUSH([C++]) is_sorted_result= AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [std::is_sorted((int*)0L, (int*)0L);])], [is_sorted_result=std], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [__gnu_cxx::is_sorted((int*)0L, (int*)0L);])], [is_sorted_result=__gnu_cxx], [AC_MSG_FAILURE([cannot find std::is_sorted() or __gnu_cxx::is_sorted()])])]) AC_LANG_POP([C++]) AC_MSG_RESULT($is_sorted_result) if test "$is_sorted_result" = __gnu_cxx; then is_sorted_result=1; else is_sorted_result=0; fi AC_DEFINE_UNQUOTED([IS_SORTED_IN_GNUCXX_NAMESPACE], $is_sorted_result, [Define to 1 if __gnu_cxx::is_sorted() exists]) ])# CHECK_FOR_IS_SORTED cvc4-1.5/config/libtool.m4000066400000000000000000011263111313116454100153750ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 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) 2014 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 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 this program. If not, see . ]) # serial 58 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.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 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_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _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 m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that 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 set != "${COLLECT_NAMES+set}"; 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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 0 = "$lt_write_fail" && 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 yes = "$silent" && 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 that 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 # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _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 set != "${COLLECT_NAMES+set}"; 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) 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' 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 0 = "$_lt_result"; 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 0 = "$_lt_result" && $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 yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; 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 no = "$lt_cv_ld_force_load"; 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 yes = "$lt_cv_ld_force_load"; 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 yes != "$lt_cv_apple_cc_single_mod"; 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 set = "${lt_cv_aix_libpath+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 that will find a shell with a builtin # printf (that 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], [AS_HELP_STRING([--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 yes = "$GCC"; 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 where 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 no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. 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 what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. 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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; 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" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; 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 yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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*|x86_64-*-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 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; 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 bitrig* | 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "[$]$2"; 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 yes = "[$]$2"; 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # 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" && \ test undefined != "$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 17 != "$i" # 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 yes = "$cross_compiling"; 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 -fvisibility=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 yes != "$enable_dlopen"; 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 ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) 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 no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && 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 yes = "$lt_cv_dlopen_self"; 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 no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; 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 no = "$hard_links"; 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 where 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 yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; 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 relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; 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_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _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 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; 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` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac 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" elif test -n "$lt_multi_os_dir"; then 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 AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) 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 ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 yes = "$lt_cv_prog_gnu_ld"; 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 yes = "$with_gnu_ld"; 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=sco 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 yes = "$with_gnu_ld"; 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _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], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that 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 that 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 no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [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 # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # 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* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 ;; os2*) 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 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) 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 no != "$lt_cv_path_NM"; 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 -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) 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 one 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 yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # 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 yes = "$GCC"; 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 ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # 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"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$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"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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, # D for any global variable and I for any imported 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};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,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 can'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* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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 yes = "$pipe_works"; 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_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _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_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _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 yes = "$GXX"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ia64 != "$host_cpu"; 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 yes = "$GCC"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ;; 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' case $cc_basename in 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' ;; esac ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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' ;; tcc*) # Fabrice Bellard et al's Tiny 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)='-static' ;; 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 that 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) 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 yes = "$with_gnu_ld"; 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 yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/([^)]\+)\s\+//' 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 ia64 != "$host_cpu"; 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, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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 ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $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 linux-dietlibc = "$host_os"; 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 no = "$tmp_diet" 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' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-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 yes = "$supports_anon_versioning"; 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 tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; 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 yes = "$supports_anon_versioning"; 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 cannot *** 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 no = "$_LT_TAGVAR(ld_shlibs, $1)"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 yes = "$with_gnu_ld"; 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 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 yes = "$GCC"; 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 "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; 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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; 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 yes = "$GCC"; 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 yes = "$lt_cv_irix_exported_symbol"; 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 _LT_TAGVAR(link_all_deplibs, $1)=no 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 ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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* | bitrig*) 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__`"; 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 _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' 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 shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; 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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes,yes = "$GCC,$enable_shared"; 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 what 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); 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 yes != "$_lt_caught_CXX_error"; 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 yes = "$GXX"; 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 yes = "$GXX"; 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 yes = "$with_gnu_ld"; 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 ia64 = "$host_cpu"; 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive 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 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; 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 yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 yes = "$with_gnu_ld"; 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 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; 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 "x$output_objdir/$soname" = "x$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 yes = "$GXX"; 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 "x$output_objdir/$soname" = "x$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 no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$supports_anon_versioning"; 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 ;; openbsd* | bitrig*) 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__`"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 $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 $wl-h $wl$soname -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 $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 $wl-h $wl$soname -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 CANNOT 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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes != "$_lt_caught_CXX_error" 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 @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@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 x-L = "$p" || test x-R = "$p"; 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 no = "$pre_test_object_deps_done"; 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 no = "$pre_test_object_deps_done"; 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)= ;; 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 no = "$F77"; 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 yes != "$_lt_disable_F77"; 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 yes != "$_lt_disable_F77" 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 no = "$FC"; 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 yes != "$_lt_disable_FC"; 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 yes != "$_lt_disable_FC" 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 set = "${GCJFLAGS+set}" || 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 10 -lt "$lt_ac_count" && 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], [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_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what 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 cvc4-1.5/config/ltmain.sh000066400000000000000000011714641313116454100153200ustar00rootroot00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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 this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-0.1" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! 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 ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_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 # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_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 '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. 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. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # 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" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_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 "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # 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. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # 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 "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_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 "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_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_append 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_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || 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_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd 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 -z "$func_relative_path_tlibdir"; 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 -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # 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 () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_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. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # 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). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" 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 () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # 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. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. 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) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "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 yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; 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 } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # 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 # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # 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 test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; 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." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # 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 | func_generated_by_libtool_p } # 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 yes = "$lalib_p" } # 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 () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # 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 () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs 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 () { $debug_cmd 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 () { $debug_cmd 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 yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; 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 "$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 () { $debug_cmd # 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 () { $debug_cmd 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 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd $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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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 yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot 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 yes = "$build_old_libs"; 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 no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; 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 yes = "$need_locks"; 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 warn = "$need_locks"; 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 yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; 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 warn = "$need_locks" && 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 yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; 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 warn = "$need_locks" && 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 no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && 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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 () { $debug_cmd # 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 $opt_dry_run; then # 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 else 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 fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd 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_quiet && 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 finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # 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=false 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=: ;; -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-m = "X$prev" && 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=: if $isdir; 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 ;; os2*) 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 yes = "$build_old_libs"; 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=: 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'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; 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_quiet || { 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 install = "$opt_mode" && 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 () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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) $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 can'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 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; 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 func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' 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[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi 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" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; 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" "${nlist}I"' # 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_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 () { $debug_cmd 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 () { $debug_cmd 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_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 () { $debug_cmd 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 case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) 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 } }'` ;; esac 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 () { $debug_cmd 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 () { $debug_cmd 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 that possess that section. Heuristic: eliminate # all those that 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_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 () { $debug_cmd 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 () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; 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 yes = "$lock_old_archive_extraction"; 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 () { $debug_cmd 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` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result 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 "$sed_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 where 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) $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/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that 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) $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 yes = "$fast_install"; 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 yes = "$shlibpath_overrides_runpath" && 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 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* 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_platform || defined ... */ #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 #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 (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]; size_t 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 = (size_t) (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 (STREQ (str, pat)) *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 size_t 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) { size_t orig_value_len = strlen (orig_value); size_t 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 #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\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 () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd 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 # what 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 that 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= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false 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 yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && 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) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; 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 ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. 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 none = "$pic_object" && test none = "$non_pic_object"; 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 none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; 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 dlprefiles = "$prev"; 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 none != "$non_pic_object"; 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 none = "$pic_object"; 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 ;; os2dllname) os2dllname=$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 rpath = "$prev"; 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-export-symbols = "X$arg"; 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-lc = "X$arg" || test X-lm = "X$arg"; 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && 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-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm 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 ;; -os2dllname) prev=os2dllname 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 # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -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*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) 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 ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # 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 none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; 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 none = "$pic_object"; 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 dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; 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 yes = "$export_dynamic" && 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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" 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 lib = "$linkmode"; 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=false 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 lib,link = "$linkmode,$pass"; 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 lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; 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 lib,dlpreopen = "$linkmode,$pass"; 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 dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; 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 conv = "$pass" && 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 conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; 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 link = "$pass"; 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 conv = "$pass"; 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=false 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=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; 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=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # 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 lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; 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 prog != "$linkmode" && test lib != "$linkmode"; 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 yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; 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 dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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 yes = "$installed"; 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 yes = "$hardcode_automatic" && 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 dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; 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 lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: 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 $linkalldeplibs; 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 prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; 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 yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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* | *os2*) 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 cannot # 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 no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; 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 yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; 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 prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; 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 no = "$link_static" && 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 no != "$link_all_deplibs"; 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 link = "$pass"; then if test prog = "$linkmode"; 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 dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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 no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; 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 pass_all != "$deplibs_check_method"; 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 no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|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" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; 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 0 -ne "$loop"; 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 0 -ne "$loop"; 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 ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 -n "$precious_files_regex"; 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 yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; 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 yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 yes = "$build_libtool_libs"; 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 yes = "$build_libtool_need_lc"; 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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 none = "$deplibs_check_method"; 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 yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || 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 relink = "$opt_mode" || 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 func_dll_def_p "$export_symbols" || { # 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 ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || 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 yes = "$try_normal_branch" \ && { 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 : != "$skipped_export"; 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 : != "$skipped_export" && 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 yes = "$compiler_needs_object" && 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 yes = "$thread_safe" && 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 relink = "$opt_mode"; 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 yes = "$module" && 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 : != "$skipped_export" && 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 : != "$skipped_export" && test yes = "$with_gnu_ld"; 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 : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; 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 -z "$objlist" || 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 1 -eq "$k"; 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 ${skipped_export-false} && { 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 } 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_quiet || { 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 relink = "$opt_mode"; 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 ${skipped_export-false} && { 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 } 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 yes = "$module" && 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=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { 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 relink = "$opt_mode"; 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 relink = "$opt_mode"; 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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags 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 yes = "$build_libtool_libs" || 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 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 test yes = "$build_libtool_libs" || { 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 } if test -n "$pic_flag" || test default != "$pic_mode"; 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" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && 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 CXX = "$tagname"; 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 yes = "$build_old_libs"; 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@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # 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 } 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 yes = "$no_install"; 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 case $hardcode_action,$fast_install in relink,*) # 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" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # 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 case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac 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 yes = "$build_libtool_libs"; 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 -z "$oldobjs"; 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 yes = "$build_old_libs" && 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 yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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 -n "$bindir"; 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) $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 cannot 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 no,yes = "$installed,$need_relink"; 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 } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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=: ;; -*) 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 . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; 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 $rmforce; 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" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || 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 none != "$pic_object"; 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 none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; 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 yes = "$fast_install" && 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 } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi 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 # where 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: cvc4-1.5/config/ltoptions.m4000066400000000000000000000342621313116454100157660ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 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 8 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_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _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_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _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=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])]) cvc4-1.5/config/ltsugar.m4000066400000000000000000000104401313116454100154040ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 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 ]) cvc4-1.5/config/ltversion.m4000066400000000000000000000012731313116454100157540ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 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 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) cvc4-1.5/config/lt~obsolete.m4000066400000000000000000000137741313116454100163120ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 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])]) cvc4-1.5/config/missing000077500000000000000000000153301313116454100150630ustar00rootroot00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man 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 # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # 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: cvc4-1.5/config/mkbuilddir000077500000000000000000000024401313116454100155360ustar00rootroot00000000000000#!/bin/sh # # mkbuilddir # Morgan Deters for CVC4 # # usage: mkbuilddir target build-type # # Sets up the builds/ directory for building build-type for target: # - removes configure detritus from top-level source directory # - makes builds/$target/$build_type directory if it's not already there # - links builds/Makefile to (possibly nonexistent) build Makefile # - creates the builds/current Makefile include snippet # - links builds/src and builds/test into build directory # if [ $# -ne 2 ]; then echo 'usage: mkbuilddir target build_type' >&2 exit 1 fi target=$1 build_type=$2 : ${as_me:=mkbuilddir} : ${as_echo:=echo} : ${RM:=rm -f} : ${MKDIR_P:=mkdir -p} : ${LN_S:=ln -s} $as_echo "$as_me: Setting up builds/$target/$build_type..." $RM config.log config.status confdefs.h builds/Makefile $MKDIR_P "builds/$target/$build_type" $LN_S "$target/$build_type/Makefile.builds" builds/Makefile $as_echo "$as_me: Creating builds/current..." (echo "# This is the most-recently-configured CVC4 build"; \ echo "# 'make' in the top-level source directory applies to this build"; \ echo "CURRENT_BUILD = $target/$build_type") > builds/current for dir in src test; do $as_echo "$as_me: Linking builds/$dir..." $RM "builds/$dir" $LN_S "$target/$build_type/$dir" "builds/$dir" done cvc4-1.5/config/pkg.m4000066400000000000000000000121451313116454100145100ustar00rootroot00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # 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)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 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. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi 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 _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [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 ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES cvc4-1.5/config/readline.m4000066400000000000000000000076371313116454100155240ustar00rootroot00000000000000# CVC4_CHECK_FOR_READLINE # ----------------------- # Look for readline and link it in, but allow user to disable. AC_DEFUN([CVC4_CHECK_FOR_READLINE], [ AC_MSG_CHECKING([whether user requested readline support]) LIBREADLINE= have_libreadline=0 readline_compentry_func_returns_charp=0 READLINE_LIBS= if test "$with_readline" = no; then AC_MSG_RESULT([no, readline disabled by user]) elif test "$with_readline" = check -a "$CVC4_BSD_LICENSED_CODE_ONLY" = 1; then AC_MSG_RESULT([no, using BSD-compatible dependences only]) with_readline=no else if test "$with_readline" = check; then AC_MSG_RESULT([no preference by user, will auto-detect]) else AC_MSG_RESULT([yes, readline enabled by user]) fi dnl Try a bunch of combinations until something works :-/ READLINE_LIBS= CVC4_TRY_READLINE_WITH([]) CVC4_TRY_READLINE_WITH([-ltinfo]) CVC4_TRY_READLINE_WITH([-ltermcap]) CVC4_TRY_READLINE_WITH([-ltermcap -ltinfo]) CVC4_TRY_READLINE_WITH([-lncurses -ltermcap]) CVC4_TRY_READLINE_WITH([-lncurses -ltermcap -ltinfo]) CVC4_TRY_READLINE_WITH([-lcurses -ltermcap]) CVC4_TRY_READLINE_WITH([-lcurses -ltermcap -ltinfo]) if test -z "$READLINE_LIBS"; then if test "$with_readline" != check; then AC_MSG_FAILURE([cannot find libreadline! (or can't get it to work)]) fi with_readline=no else # make sure it works in static builds, too if test "$enable_static_binary" = yes; then READLINE_LIBS= AC_MSG_CHECKING([whether statically-linked readline is functional]) CVC4_TRY_STATIC_READLINE_WITH([]) CVC4_TRY_STATIC_READLINE_WITH([-ltinfo]) CVC4_TRY_STATIC_READLINE_WITH([-ltermcap]) CVC4_TRY_STATIC_READLINE_WITH([-ltermcap -ltinfo]) CVC4_TRY_STATIC_READLINE_WITH([-lncurses -ltermcap]) CVC4_TRY_STATIC_READLINE_WITH([-lncurses -ltermcap -ltinfo]) CVC4_TRY_STATIC_READLINE_WITH([-lcurses -ltermcap]) CVC4_TRY_STATIC_READLINE_WITH([-lcurses -ltermcap -ltinfo]) if test -n "$READLINE_LIBS"; then AC_MSG_RESULT([yes, it works]) with_readline=yes else AC_MSG_RESULT([no]) if test "$with_readline" != check; then AC_MSG_FAILURE([readline installation appears incompatible with static-binary]) fi with_readline=no fi else with_readline=yes fi fi if test "$with_readline" = yes; then have_libreadline=1 AC_MSG_CHECKING([for type of rl_completion_entry_function]) AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include #include char* foo(const char*, int) { return (char*)0; }],[ rl_completion_entry_function = foo;])], [AC_MSG_RESULT([char* (*)(const char*, int)]) readline_compentry_func_returns_charp=1], [AC_MSG_RESULT([Function])]) AC_LANG_POP([C++]) else have_libreadline=0 READLINE_LIBS= fi fi ])# CVC4_CHECK_FOR_READLINE # CVC4_TRY_READLINE_WITH(LIBS) # ---------------------------- # Try AC_CHECK_LIB(readline) with the given linking libraries AC_DEFUN([CVC4_TRY_READLINE_WITH], [ if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline AC_CHECK_LIB([readline], [readline], [AC_CHECK_HEADER([readline/readline.h], [READLINE_LIBS="-lreadline $1"], [])], [], [$1]) fi ])# CVC4_TRY_READLINE_WITH # CVC4_TRY_STATIC_READLINE_WITH(LIBS) # ----------------------------------- # Try AC_CHECK_LIB(readline) with the given linking libraries AC_DEFUN([CVC4_TRY_STATIC_READLINE_WITH], [ if test -z "$READLINE_LIBS"; then AC_LANG_PUSH([C++]) cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline $1" AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [readline("")])], [READLINE_LIBS="-lreadline $1"], []) LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" AC_LANG_POP([C++]) fi ])# CVC4_TRY_STATIC_READLINE_WITH cvc4-1.5/config/test-driver000077500000000000000000000110401313116454100156540ustar00rootroot00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2014 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # 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: cvc4-1.5/configure000077500000000000000000036307241313116454100141430ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for cvc4 1.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: cvc-bugs@cs.nyu.edu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: 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 (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi # 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='cvc4' PACKAGE_TARNAME='cvc4' PACKAGE_VERSION='1.5' PACKAGE_STRING='cvc4 1.5' PACKAGE_BUGREPORT='cvc-bugs@cs.nyu.edu' PACKAGE_URL='' ac_unique_file="src/include/cvc4_public.h" ac_config_libobj_dir=src/lib enable_option_checking=no # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS CVC4_HAS_THREADS CVC4_HAS_THREADS_FALSE CVC4_HAS_THREADS_TRUE MAN_DATE CVC4_USE_GMP_IMP CVC4_USE_CLN_IMP CVC4_FALSE_FALSE CVC4_FALSE_TRUE mk_empty mk_if mk_include cvc4_config_cmdline WHITE_AND_BLACK_TESTS_FALSE WHITE_AND_BLACK_TESTS_TRUE pcvc4_LDFLAGS cvc4_LDFLAGS FLAG_VISIBILITY_HIDDEN CVC4_BINDINGS_LIBRARY_VERSION CVC4_COMPAT_LIBRARY_VERSION CVC4_PARSER_LIBRARY_VERSION CVC4_LIBRARY_VERSION CVC4_TRACING_FALSE CVC4_TRACING_TRUE CVC4_DEBUG_FALSE CVC4_DEBUG_TRUE COVERAGE_ON COVERAGE_ENABLED_FALSE COVERAGE_ENABLED_TRUE STATIC_BINARY_FALSE STATIC_BINARY_TRUE STATIC_BINARY BUILDING_STATIC BUILDING_SHARED CVC4_JAVA_MODULE_EXT JAR JAVAH JAVAC JAVA CVC4_TLS_SUPPORTED CVC4_TLS CVC4_BUILD_LIBCOMPAT_FALSE CVC4_BUILD_LIBCOMPAT_TRUE CVC4_BUILD_LIBCOMPAT READLINE_LIBS CVC4_BUILD_PCVC4_FALSE CVC4_BUILD_PCVC4_TRUE BOOST_THREAD_LIBS BOOST_THREAD_LDPATH BOOST_THREAD_LDFLAGS BOOST_THREAD_WIN32_LIBS BOOST_THREAD_WIN32_LDPATH BOOST_THREAD_WIN32_LDFLAGS BOOST_SYSTEM_LIBS BOOST_LDPATH BOOST_SYSTEM_LDPATH BOOST_SYSTEM_LDFLAGS BOOST_CPPFLAGS DISTCHECK_CONFIGURE_FLAGS BOOST_ROOT CVC4_LANGUAGE_BINDINGS CVC4_LANGUAGE_BINDING_OCAML_FALSE CVC4_LANGUAGE_BINDING_OCAML_TRUE CVC4_LANGUAGE_BINDING_TCL_FALSE CVC4_LANGUAGE_BINDING_TCL_TRUE CVC4_LANGUAGE_BINDING_RUBY_FALSE CVC4_LANGUAGE_BINDING_RUBY_TRUE CVC4_LANGUAGE_BINDING_PYTHON_FALSE CVC4_LANGUAGE_BINDING_PYTHON_TRUE CVC4_LANGUAGE_BINDING_PHP_FALSE CVC4_LANGUAGE_BINDING_PHP_TRUE CVC4_LANGUAGE_BINDING_PERL_FALSE CVC4_LANGUAGE_BINDING_PERL_TRUE CVC4_LANGUAGE_BINDING_CSHARP_FALSE CVC4_LANGUAGE_BINDING_CSHARP_TRUE CVC4_LANGUAGE_BINDING_JAVA_FALSE CVC4_LANGUAGE_BINDING_JAVA_TRUE CVC4_LANGUAGE_BINDING_C_FALSE CVC4_LANGUAGE_BINDING_C_TRUE CVC4_HAS_SWIG_FALSE CVC4_HAS_SWIG_TRUE CAMLP4O OCAMLFIND OCAMLMKTOP OCAMLC TCL_CPPFLAGS RUBY_CPPFLAGS PYTHON_CXXFLAGS PYTHON_CONFIG PYTHON_INCLUDE pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PHP_CPPFLAGS PERL_CPPFLAGS CSHARP_CPPFLAGS JAVA_CPPFLAGS SWIG ANTLR_LDFLAGS ANTLR_INCLUDES ANTLR_HOME LIBOBJS PYTHON PERL TEST_LDFLAGS TEST_CXXFLAGS TEST_CPPFLAGS HAVE_CXXTESTGEN_FALSE HAVE_CXXTESTGEN_TRUE CXXTESTGEN RUN_REGRESSION_ARGS TESTS_ENVIRONMENT CXXTEST DOXYGEN_PAPER_SIZE DX_COND_latex_FALSE DX_COND_latex_TRUE DX_COND_pdf_FALSE DX_COND_pdf_TRUE DX_PDFLATEX DX_FLAG_pdf DX_COND_ps_FALSE DX_COND_ps_TRUE DX_EGREP DX_DVIPS DX_MAKEINDEX DX_LATEX DX_FLAG_ps DX_COND_html_FALSE DX_COND_html_TRUE DX_FLAG_html DX_COND_chi_FALSE DX_COND_chi_TRUE DX_FLAG_chi DX_COND_chm_FALSE DX_COND_chm_TRUE DX_HHC DX_FLAG_chm DX_COND_xml_FALSE DX_COND_xml_TRUE DX_FLAG_xml DX_COND_rtf_FALSE DX_COND_rtf_TRUE DX_FLAG_rtf DX_COND_man_FALSE DX_COND_man_TRUE DX_FLAG_man DX_COND_dot_FALSE DX_COND_dot_TRUE DX_DOT DX_FLAG_dot DX_COND_doc_FALSE DX_COND_doc_TRUE DX_PERL DX_FLAG_DX_CURRENT_FEATURE DX_DOXYGEN DX_FLAG_doc DX_ENV DX_DOCDIR DX_CONFIG DX_PROJECT DOXYGEN_EXTRACT_STATIC DOXYGEN_EXTRACT_PRIVATE zz_cvc4_use_personal_make_rules FNO_STRICT_ALIASING WNO_UNUSED_VARIABLE WNO_UNINITIALIZED WNO_PARENTHESES WNO_TAUTOLOGICAL_COMPARE WNO_CONVERSION_NULL WERROR ANTLR CVC4_NEED_INT64_T_OVERLOADS CRYPTOMINISAT_LIBS CRYPTOMINISAT_LDFLAGS CVC4_USE_CRYPTOMINISAT_FALSE CVC4_USE_CRYPTOMINISAT_TRUE CRYPTOMINISAT_HOME ABC_LIBS ABC_LDFLAGS CVC4_USE_ABC_FALSE CVC4_USE_ABC_TRUE ABC_HOME GLPK_LIBS GLPK_LDFLAGS CVC4_USE_GLPK_FALSE CVC4_USE_GLPK_TRUE GLPK_HOME CVC4_PROOF_FALSE CVC4_PROOF_TRUE CVC4_BUILD_PROFILE_COMPETITION_FALSE CVC4_BUILD_PROFILE_COMPETITION_TRUE CVC4_BUILD_PROFILE_DEFAULT_FALSE CVC4_BUILD_PROFILE_DEFAULT_TRUE CVC4_BUILD_PROFILE_DEBUG_FALSE CVC4_BUILD_PROFILE_DEBUG_TRUE CVC4_BUILD_PROFILE_PRODUCTION_FALSE CVC4_BUILD_PROFILE_PRODUCTION_TRUE CVC4_GMP_IMP_FALSE CVC4_GMP_IMP_TRUE CVC4_CLN_IMP_FALSE CVC4_CLN_IMP_TRUE CLN_LIBS CLN_CFLAGS PKG_CONFIG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL AUTOMAKE_1_11_FALSE AUTOMAKE_1_11_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V subdirs 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 runstatedir 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_silent_rules enable_maintainer_mode enable_shared enable_static with_build with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock with_cln with_gmp enable_static_binary enable_proof enable_optimized enable_debug_symbols enable_statistics enable_replay enable_assertions enable_tracing enable_dumping enable_muzzle enable_coverage enable_profiling with_glpk with_glpk_dir with_abc with_abc_dir with_cryptominisat with_cryptominisat_dir enable_personal_make_rules enable_internals_documentation enable_doxygen_doc enable_doxygen_dot enable_doxygen_man enable_doxygen_rtf enable_doxygen_xml enable_doxygen_chm enable_doxygen_chi enable_doxygen_html enable_doxygen_ps enable_doxygen_pdf enable_unit_testing with_cxxtest_dir with_antlr_dir with_swig enable_language_bindings with_boost with_portfolio enable_thread_support enable_static_boost with_readline with_compat enable_tls with_google_perftools ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG CLN_CFLAGS CLN_LIBS GLPK_HOME ABC_HOME CRYPTOMINISAT_HOME ANTLR DOXYGEN_PAPER_SIZE CXXTEST TEST_CPPFLAGS TEST_CXXFLAGS TEST_LDFLAGS PERL PYTHON ANTLR_HOME SWIG JAVA_CPPFLAGS CSHARP_CPPFLAGS PERL_CPPFLAGS PHP_CPPFLAGS PYTHON_INCLUDE PYTHON_CONFIG RUBY_CPPFLAGS TCL_CPPFLAGS OCAMLC OCAMLMKTOP OCAMLFIND CAMLP4O BOOST_ROOT JAVA JAVAC JAVAH JAR' ac_subdirs_all='proofs/lfsc_checker' CVC4_BSD_LICENSED_CODE_ONLY=1 handle_option() { ac_option="$1" case $ac_option in --bsd|--disable-gpl|CVC4_BSD_LICENSED_CODE_ONLY=1) if test "$CVC4_LICENSE_OPTION" = gpl; then as_fn_error $? "cannot give both --bsd and --enable-gpl"; fi CVC4_LICENSE_OPTION=bsd ac_option="CVC4_BSD_LICENSED_CODE_ONLY=1" eval $ac_option ;; --enable-gpl|--gpl|CVC4_BSD_LICENSED_CODE_ONLY=0) if test "$CVC4_LICENSE_OPTION" = bsd; then as_fn_error $? "cannot give both --bsd and --enable-gpl"; fi CVC4_LICENSE_OPTION=gpl ac_option="CVC4_BSD_LICENSED_CODE_ONLY=0" eval $ac_option ;; --best) # set the best configuration handle_option --with-readline handle_option --with-cln handle_option --with-glpk handle_option --with-abc return ;; -enable-proofs|--enable-proofs) ac_option='--enable-proof' ;; -*|*=*) ;; production|production-*|debug|debug-*|competition|competition-*) # regexp `\?' not supported on Mac OS X ac_option_build=`expr "$ac_option" : '\([^-]*\)-\{0,1\}'` ac_cvc4_build_profile_set=yes as_me=configure $as_echo "$as_me: CVC4: building profile $ac_option_build" >&6 for x in optimized proof statistics replay assertions tracing dumping muzzle coverage profiling; do if expr "$ac_option" : '.*-no'$x'$' >/dev/null || expr "$ac_option" : '.*-no'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-$x\""' fi if expr "$ac_option" : '.*-'$x'$' >/dev/null || expr "$ac_option" : '.*-'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-$x\""' fi done if expr "$ac_option" : '.*-nostaticbinary$' >/dev/null || expr "$ac_option" : '.*-nostaticbinary-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-static-binary\""' fi if expr "$ac_option" : '.*-staticbinary$' >/dev/null || expr "$ac_option" : '.*-staticbinary-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-static-binary\""' fi if expr "$ac_option" : '.*-nodebugsymbols$' >/dev/null || expr "$ac_option" : '.*-nodebugsymbols-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--disable-debug-symbols\""' fi if expr "$ac_option" : '.*-debugsymbols$' >/dev/null || expr "$ac_option" : '.*-debugsymbols-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--enable-debug-symbols\""' fi if expr "$ac_option" : '.*-noglpk' >/dev/null || expr "$ac_option" : '.*-noglpk-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--without-glpk\""' fi if expr "$ac_option" : '.*-glpk' >/dev/null || expr "$ac_option" : '.*-glpk-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--with-glpk\""' fi if expr "$ac_option" : '.*-noabc' >/dev/null || expr "$ac_option" : '.*-noabc-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--without-abc\""' fi if expr "$ac_option" : '.*-abc' >/dev/null || expr "$ac_option" : '.*-abc-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--with-abc\""' fi for x in cln gmp; do if expr "$ac_option" : '.*-no'$x'$' >/dev/null || expr "$ac_option" : '.*-no'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--without-$x\""' fi if expr "$ac_option" : '.*-'$x'$' >/dev/null || expr "$ac_option" : '.*-'$x'-' >/dev/null; then eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }\"--with-$x\""' fi done ac_option="--with-build=$ac_option_build" esac eval 'ac_cvc4_rewritten_args="${ac_cvc4_rewritten_args+$ac_cvc4_rewritten_args }'\'\$ac_option\'\" } unset ac_cvc4_rewritten_args for ac_option do if test "$ac_option" = personal; then if test -e personal.conf; then handle_option --enable-personal-make-rules while read arg; do handle_option "$arg" done < personal.conf else as_fn_error $? "personal build profile selected, but cannot find personal.conf" fi else handle_option "$ac_option" fi done eval set x $ac_cvc4_rewritten_args shift # 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' runstatedir='${localstatedir}/run' 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 ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -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 runstatedir 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 cvc4 1.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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/cvc4] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] Licensing and performance options: --bsd disable all GPL dependences (default) --enable-gpl permit GPL dependences, if available --best turn on dependences known to give best performance _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of cvc4 1.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-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=no] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --enable-static-binary build a fully statically-linked binary [default=no] --disable-proof do not support proof generation --enable-optimized optimize the build --disable-debug-symbols do not include debug symbols in libcvc4 --disable-statistics do not include statistics in libcvc4 --disable-replay turn off the replay feature in libcvc4 --disable-assertions turn off assertions in build --disable-tracing remove all tracing code from CVC4 --disable-dumping remove all dumping code from CVC4 --enable-muzzle completely silence CVC4; remove ALL non-result output from build --enable-coverage build with support for gcov coverage testing --enable-profiling build with support for gprof profiling --enable-personal-make-rules include top-level personal.mk (if it exists) --enable-internals-documentation build Doxygen documentation for static and private member functions --disable-doxygen-doc don't generate any doxygen documentation --enable-doxygen-dot generate graphics for doxygen documentation --enable-doxygen-man generate doxygen manual pages --enable-doxygen-rtf generate doxygen RTF documentation --enable-doxygen-xml generate doxygen XML documentation --enable-doxygen-chm generate doxygen compressed HTML help documentation --enable-doxygen-chi generate doxygen seperate compressed HTML help index file --disable-doxygen-html don't generate doxygen plain HTML documentation --enable-doxygen-ps generate doxygen PostScript documentation --enable-doxygen-pdf generate doxygen PDF documentation --disable-unit-testing don't build support for unit testing, even if available --enable-language-bindings=c,c++,java | all specify language bindings to build --disable-thread-support do not support multithreaded-capable library --enable-static-boost Prefer the static boost libraries over the shared ones [no] --disable-tls don't use compiler-native TLS Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-build=profile for profile in {production,debug,competition,personal} --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --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-cln use CLN instead of GMP --with-gmp use GMP instead of CLN --with-glpk use GLPK simplex solver --with-glpk-dir=PATH path to top level of glpk installation --with-abc use the ABC AIG library --with-abc-dir=PATH path to top level of abc source tree --with-cryptominisat use the CRYPTOMINISAT sat solver --with-cryptominisat-dir=PATH path to top level of cryptominisat source tree --with-cxxtest-dir=DIR path to CxxTest installation --with-antlr-dir=PATH path to ANTLR C headers and libraries --with-swig=BINARY path to swig binary --with-boost=DIR prefix of Boost [guess] --with-portfolio build the multithreaded portfolio version of CVC4 (pcvc4) --with-readline support the readline library --with-compat build compatibility library (CVC3 API layer) --with-google-perftools use Google Performance Tools 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 LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility CLN_CFLAGS C compiler flags for CLN, overriding pkg-config CLN_LIBS linker flags for CLN, overriding pkg-config GLPK_HOME path to top level of glpk installation ABC_HOME path to top level of abc source tree CRYPTOMINISAT_HOME path to top level of cryptominisat source tree ANTLR location of the antlr3 script DOXYGEN_PAPER_SIZE a4wide (default), a4, letter, legal or executive CXXTEST path to CxxTest installation TEST_CPPFLAGS CPPFLAGS to use when testing (default=$CPPFLAGS) TEST_CXXFLAGS CXXFLAGS to use when testing (default=$CXXFLAGS) TEST_LDFLAGS LDFLAGS to use when testing (default=$LDFLAGS) PERL PERL interpreter (used when testing) PYTHON PYTHON interpreter (used for building legacy Java library interface) ANTLR_HOME path to libantlr3c installation SWIG SWIG binary (used to generate language bindings) JAVA_CPPFLAGS flags to pass to compiler when building Java bindings CSHARP_CPPFLAGS flags to pass to compiler when building C# bindings PERL_CPPFLAGS flags to pass to compiler when building perl bindings PHP_CPPFLAGS flags to pass to compiler when building PHP bindings PYTHON_INCLUDE Include flags for python, bypassing python-config PYTHON_CONFIG Path to python-config RUBY_CPPFLAGS flags to pass to compiler when building ruby bindings TCL_CPPFLAGS flags to pass to compiler when building tcl bindings OCAMLC OCaml compiler OCAMLMKTOP OCaml runtime-maker OCAMLFIND OCaml-find binary CAMLP4O camlp4o binary BOOST_ROOT Location of Boost installation JAVA Java interpreter (used when testing Java interface) JAVAC Java compiler (used when building and testing Java interface) JAVAH Java compiler (used when building and testing Java interface) JAR Jar archiver (used when building Java interface) Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { 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 cvc4 configure 1.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_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$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 cvc-bugs@cs.nyu.edu ## ## ---------------------------------- ##" ) | 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 cvc-bugs@cs.nyu.edu ## ## ---------------------------------- ##" ) | 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_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_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_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by cvc4 $as_me 1.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 # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. subdirs="$subdirs proofs/lfsc_checker" # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' CVC4_MAJOR=1 CVC4_MINOR=5 CVC4_RELEASE=0 CVC4_EXTRAVERSION= CVC4_RELEASE_STRING=1.5 # Libtool version numbers for libraries # Version numbers are in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # # For more information, see: # http://www.gnu.org/software/libtool/manual/libtool.html#Versioning # For guidance on when to change the version number, refer to the # developer's guide. CVC4_LIBRARY_VERSION=4:0:0 CVC4_PARSER_LIBRARY_VERSION=4:0:0 CVC4_COMPAT_LIBRARY_VERSION=4:0:0 CVC4_BINDINGS_LIBRARY_VERSION=4:0:0 # Using the AC_CANONICAL_* macros destroy the command line you get # from $@, which we want later for determining the build profile. So # we save it. (We can't do our build profile stuff here, or it's not # included in the output... autoconf overrides us on the orderings of # some things.) config_cmdline=("$@") cvc4_config_cmdline="${config_cmdline[@]}" # remember if the user set these explicitly (or whether autoconf does) user_specified_enable_or_disable_static=${enable_static+yes} user_specified_enable_or_disable_shared=${enable_shared+yes} if test -e src/include/cvc4_public.h; then CVC4_CONFIGURE_AT_TOP_LEVEL=yes else CVC4_CONFIGURE_AT_TOP_LEVEL=no fi # override autoconf: we don't want it giving us CFLAGS/CXXFLAGS, but we do # want to respect the user's flags if test -z "${CFLAGS+set}"; then CFLAGS=; fi if test -z "${CXXFLAGS+set}"; then CXXFLAGS=; fi # on by default { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # turn off static lib building by default # 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=no fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- as_me=configure if test "$enable_shared" = no -a "$user_specified_enable_or_disable_shared" = yes; then enable_static=yes fi # Features requested by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking for requested build profile" >&5 $as_echo_n "checking for requested build profile... " >&6; } # Check whether --with-build was given. if test "${with_build+set}" = set; then : withval=$with_build; fi if test -z "${with_build+set}"; then with_build=production fi if test -z "${enable_optimized+set}" -a -z "${enable_debug_symbols+set}" -a -z "${enable_assertions+set}" -a -z "${enable_tracing+set}" -a -z "${enable_dumping+set}" -a -z "${enable_muzzle+set}" -a -z "${enable_coverage+set}" -a -z "${enable_profiling+set}" -a -z "${enable_statistics+set}" -a -z "${enable_replay+set}" -a -z "${with_gmp+set}" -a -z "${with_cln+set}" -a -z "${with_glpk+set}" -a -z "${with_abc+set}" -a -z "${with_cryptominisat+set}"; then custom_build_profile=no else custom_build_profile=yes fi btargs= if test -n "${enable_optimized+set}"; then if test "$enable_optimized" = yes; then btargs="$btargs optimized" else btargs="$btargs nooptimized" fi fi # --enable-staticbinary is an alias for --enable-static-binary if test -n "${enable_staticbinary+set}"; then enable_static_binary="$enable_staticbinary" fi if test -n "${enable_static_binary+set}"; then if test "$enable_static_binary" = yes; then btargs="$btargs staticbinary" else btargs="$btargs nostaticbinary" fi fi if test -n "${enable_debug_symbols+set}"; then if test "$enable_debug_symbols" = yes; then btargs="$btargs debugsymbols" else btargs="$btargs nodebugsymbols" fi fi if test -n "${enable_assertions+set}"; then if test "$enable_assertions" = yes; then btargs="$btargs assertions" else btargs="$btargs noassertions" fi fi if test -n "${enable_proof+set}"; then if test "$enable_proof" = yes; then btargs="$btargs proof" else btargs="$btargs noproof" fi fi if test -n "${enable_tracing+set}"; then if test "$enable_tracing" = yes; then btargs="$btargs tracing" else btargs="$btargs notracing" fi fi if test -n "${enable_dumping+set}"; then if test "$enable_dumping" = yes; then btargs="$btargs dumping" else btargs="$btargs nodumping" fi fi if test -n "${enable_muzzle+set}"; then if test "$enable_muzzle" = yes; then btargs="$btargs muzzle" else btargs="$btargs nomuzzle" fi fi if test -n "${enable_coverage+set}"; then if test "$enable_coverage" = yes; then btargs="$btargs coverage" else btargs="$btargs nocoverage" fi fi if test -n "${enable_profiling+set}"; then if test "$enable_profiling" = yes; then btargs="$btargs profiling" else btargs="$btargs noprofiling" fi fi if test -n "${enable_statistics+set}"; then if test "$enable_statistics" = yes; then btargs="$btargs statistics" else btargs="$btargs nostatistics" fi fi if test -n "${enable_replay+set}"; then if test "$enable_replay" = yes; then btargs="$btargs replay" else btargs="$btargs noreplay" fi fi if test -n "${with_glpk+set}"; then if test "$with_glpk" = yes; then btargs="$btargs glpk" fi fi if test -n "${with_abc+set}"; then if test "$with_abc" = yes; then btargs="$btargs abc" fi fi if test -n "${with_cryptominisat+set}"; then if test "$with_cryptominisat" = yes; then btargs="$btargs cryptominisat" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_build" >&5 $as_echo "$with_build" >&6; } am__api_version='1.15' # 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; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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 --is-lightweight"; then am_missing_run="$MISSING " 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+set}" != 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; } 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 { $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 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='cvc4' VERSION='1.5' # 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"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). 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}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -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 pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -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_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers cvc4autoconfig.h" # automake 1.12 changes the test driver mechanism in a way that is # completely incompatible with 1.11. We figure out here which version # we're using in order to set up test makefiles correctly. # See http://lists.gnu.org/archive/html/automake/2012-04/msg00060.html if test -z "$am__api_version"; then as_fn_error $? "Cannot determine automake API version ?!" "$LINENO" 5 fi case "$am__api_version" in 1.11*) automake111=true ;; *) automake111=false ;; esac if $automake111; then AUTOMAKE_1_11_TRUE= AUTOMAKE_1_11_FALSE='#' else AUTOMAKE_1_11_TRUE='#' AUTOMAKE_1_11_FALSE= fi # Initialize libtool's configuration options. # we're not DLL-clean yet (i.e., don't properly use dllexport and dllimport) # _LT_SET_OPTION([LT_INIT],[win32-dll]) 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.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # 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 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 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 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 whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_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. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != 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 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="$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 10 /bin/sh. echo '/* dummy */' > 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 { $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 no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) 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 no != "$lt_cv_path_NM"; 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 -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # 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" && \ test undefined != "$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 17 != "$i" # 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"} 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 yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; 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 # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # 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* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 ;; os2*) 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 one 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 0 -eq "$ac_status"; 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 0 -ne "$ac_status"; 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 no = "$lt_cv_ar_at_file"; 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 bitrig* | 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 # 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 ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # 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"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$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"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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, # D for any global variable and I for any imported 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};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,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 can'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* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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 yes = "$pipe_works"; 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 yes = "$GCC"; 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; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_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 dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. 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 what ABI is being produced by ac_compile, and set linker # options accordingly. 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 yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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 emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. 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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; 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" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; 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 yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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*|x86_64-*-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 yes != "$lt_cv_path_mainfest_tool"; 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 0 = "$_lt_result"; 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 0 = "$_lt_result" && $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 yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; 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 no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; 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 --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 # 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 shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # 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 set != "${COLLECT_NAMES+set}"; 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 func_cc_basename $compiler cc_basename=$func_cc_basename_result # 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 yes = "$GCC"; 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "$lt_cv_prog_compiler_rtti_exceptions"; 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 yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; 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' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; 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 that 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "$lt_cv_prog_compiler_pic_works"; 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 yes = "$lt_cv_prog_compiler_static_works"; 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 no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; 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 no = "$hard_links"; 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 yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) 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 yes = "$with_gnu_ld"; 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 yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/(^)\+)\s\+//' 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 ia64 != "$host_cpu"; 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, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=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 linux-dietlibc = "$host_os"; 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 no = "$tmp_diet" 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' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-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 yes = "$supports_anon_versioning"; 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 tcc*) export_dynamic_flag_spec='-rdynamic' ;; 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 yes = "$supports_anon_versioning"; 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 cannot *** 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 no = "$ld_shlibs"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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 set = "${lt_cv_aix_libpath+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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 set = "${lt_cv_aix_libpath+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 yes = "$with_gnu_ld"; 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 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 yes = "$lt_cv_ld_force_load"; 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 yes = "$GCC"; 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 "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; 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 yes,no = "$GCC,$with_gnu_ld"; 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 yes = "$lt_cv_prog_compiler__b"; 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 no = "$with_gnu_ld"; 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 yes = "$GCC"; 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 yes = "$lt_cv_irix_exported_symbol"; 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 link_all_deplibs=no 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 ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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* | bitrig*) 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__`"; 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 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; 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 no = "$ld_shlibs" && 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 yes,yes = "$GCC,$enable_shared"; 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 yes = "$GCC"; 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` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac 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" elif test -n "$lt_multi_os_dir"; then 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 ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 yes = "$lt_cv_prog_gnu_ld"; 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 yes = "$with_gnu_ld"; 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=sco 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 yes = "$with_gnu_ld"; 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $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 yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; 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 relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; 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 ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) 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 no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && 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 yes = "$cross_compiling"; 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 -fvisibility=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 yes = "$lt_cv_dlopen_self"; 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 yes = "$cross_compiling"; 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 -fvisibility=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 what 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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: # 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 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=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 whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_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. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != 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 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="$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 10 /bin/sh. echo '/* dummy */' > 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 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 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 10 /bin/sh. echo '/* dummy */' > 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 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 no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); 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 yes != "$_lt_caught_CXX_error"; 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 func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; 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 no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 yes = "$with_gnu_ld"; 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 ia64 = "$host_cpu"; 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive 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 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; 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 yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 set = "${lt_cv_aix_libpath+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 yes = "$with_gnu_ld"; 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 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 yes = "$lt_cv_ld_force_load"; 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 yes != "$lt_cv_apple_cc_single_mod"; 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 ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; 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 "x$output_objdir/$soname" = "x$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 yes = "$GXX"; 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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$supports_anon_versioning"; 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 ;; openbsd* | bitrig*) 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__`"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 $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 $wl-h $wl$soname -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 $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 $wl-h $wl$soname -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 CANNOT 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 no = "$ld_shlibs_CXX" && 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 x-L = "$p" || test x-R = "$p"; 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 no = "$pre_test_object_deps_done"; 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 no = "$pre_test_object_deps_done"; 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= ;; 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 yes = "$GXX"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; 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' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ia64 != "$host_cpu"; 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 that 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "$lt_cv_prog_compiler_pic_works_CXX"; 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 yes = "$lt_cv_prog_compiler_static_works_CXX"; 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 no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; 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 no = "$hard_links"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 no = "$ld_shlibs_CXX" && 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 yes,yes = "$GCC,$enable_shared"; 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 ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 yes = "$lt_cv_prog_gnu_ld"; 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 yes = "$with_gnu_ld"; 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=sco 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 yes = "$with_gnu_ld"; 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $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 yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; 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 relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; 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 yes != "$_lt_caught_CXX_error" 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 expr "$($CC -dumpversion)" : '4\.5\.1' &>/dev/null; then CVC4_INTEGRITY_WARNING="GCC 4.5.1's optimizer is known to make errors building Minisat (and by extension CVC4)" fi if test $cross_compiling = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ exceptions work" >&5 $as_echo_n "checking whether C++ exceptions work... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int result = 1; try { throw std::exception(); } catch (...) { result = 0; } return result; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "C++ exceptions do not work." "$LINENO" 5 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext 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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cross compiling, cannot check whether exceptions work" >&5 $as_echo "$as_me: WARNING: Cross compiling, cannot check whether exceptions work" >&2;} fi cvc4_use_gmp=2 cvc4_use_cln=2 # Check whether --with-cln was given. if test "${with_cln+set}" = set; then : withval=$with_cln; case "$withval" in y|ye|yes|Y|YE|YES) cvc4_use_cln=1 ;; n|no|N|NO) cvc4_use_cln=0 ;; esac fi # Check whether --with-gmp was given. if test "${with_gmp+set}" = set; then : withval=$with_gmp; case "$withval" in y|ye|yes|Y|YE|YES) cvc4_use_gmp=1 ;; n|no|N|NO) cvc4_use_gmp=0 ;; esac fi if test $cvc4_use_cln = 1 -a $cvc4_use_gmp = 1 || test $cvc4_use_cln = 0 -a $cvc4_use_gmp = 0; then as_fn_error $? "You must use either CLN and GMP. Please pick one." "$LINENO" 5 fi if test $cvc4_use_gmp = 1; then cvc4_use_cln=0 elif test $cvc4_use_gmp = 0; then cvc4_use_cln=1 elif test $cvc4_use_cln = 1; then cvc4_use_gmp=0 elif test $cvc4_use_cln = 0; then cvc4_use_gmp=1 fi # try GMP, fail if not found; GMP is required for both CLN and for GMP # versions of CVC4 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5 $as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } if ${ac_cv_lib_gmp___gmpz_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $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 __gmpz_init (); int main () { return __gmpz_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gmp___gmpz_init=yes else ac_cv_lib_gmp___gmpz_init=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_gmp___gmpz_init" >&5 $as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } if test "x$ac_cv_lib_gmp___gmpz_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGMP 1 _ACEOF LIBS="-lgmp $LIBS" else as_fn_error $? "GNU MP (libgmp) not found, see http://gmplib.org/" "$LINENO" 5 fi if test $cvc4_use_cln = 2; then if test "$CVC4_BSD_LICENSED_CODE_ONLY" = 1 -o "$with_portfolio" = yes; then cvc4_use_cln=0 cvc4_use_gmp=1 fi fi if test $cvc4_use_cln != 0; then # [mdeters] The PKG_CHECK_MODULES macro isn't customizable and doesn't fail # gracefully. You can only specify it once for a given library name. That # is, even on separate if/else branches, you can't put # PKG_CHECK_MODULES([CLN], ...). That's why things are so convoluted here, # we have to have PKG_CHECK_MODULES _exactly_ once in configure.ac ! 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 CLN" >&5 $as_echo_n "checking for CLN... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$CLN_CFLAGS"; then pkg_cv_CLN_CFLAGS="$CLN_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cln >= 1.2.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "cln >= 1.2.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CLN_CFLAGS=`$PKG_CONFIG --cflags "cln >= 1.2.2" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$CLN_LIBS"; then pkg_cv_CLN_LIBS="$CLN_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cln >= 1.2.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "cln >= 1.2.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CLN_LIBS=`$PKG_CONFIG --libs "cln >= 1.2.2" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then 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 CLN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cln >= 1.2.2"` else CLN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cln >= 1.2.2"` fi # Put the nasty error message in config.log where it belongs echo "$CLN_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test $cvc4_use_cln = 1; then # fail as_fn_error $? "CLN not installed (or too old) or pkgconfig missing" "$LINENO" 5 else # fall back to GMP { $as_echo "$as_me:${as_lineno-$LINENO}: CLN not installed (or too old) or pkgconfig missing, will use gmp" >&5 $as_echo "$as_me: CLN not installed (or too old) or pkgconfig missing, will use gmp" >&6;} cvc4_use_cln=0 cvc4_use_gmp=1 fi elif test $pkg_failed = untried; then if test $cvc4_use_cln = 1; then # fail as_fn_error $? "CLN not installed (or too old) or pkgconfig missing" "$LINENO" 5 else # fall back to GMP { $as_echo "$as_me:${as_lineno-$LINENO}: CLN not installed (or too old) or pkgconfig missing, will use gmp" >&5 $as_echo "$as_me: CLN not installed (or too old) or pkgconfig missing, will use gmp" >&6;} cvc4_use_cln=0 cvc4_use_gmp=1 fi else CLN_CFLAGS=$pkg_cv_CLN_CFLAGS CLN_LIBS=$pkg_cv_CLN_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu save_LIBS="$LIBS" save_CXXFLAGS="$CXXFLAGS" LIBS="$CLN_LIBS $LIBS" CXXFLAGS="$CLN_CFLAGS $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { cln::cl_F pi = "3.1415926"; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cvc4_use_cln=1 else if test $cvc4_use_cln = 1; then # fail as_fn_error $? "CLN installation missing, too old, or not functional for this architecture" "$LINENO" 5 else # fall back to GMP { $as_echo "$as_me:${as_lineno-$LINENO}: CLN installation missing, too old, or not functional for this architecture, will use gmp instead" >&5 $as_echo "$as_me: CLN installation missing, too old, or not functional for this architecture, will use gmp instead" >&6;} cvc4_use_cln=0 cvc4_use_gmp=1 fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CXXFLAGS="$save_CXXFLAGS" LIBS="$save_LIBS" 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 fi if test $cvc4_use_cln = 0; then # try GMPXX, fail if not found; don't need to link against it, only need its header 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" "gmpxx.h" "ac_cv_header_gmpxx_h" "$ac_includes_default" if test "x$ac_cv_header_gmpxx_h" = xyes; then : else as_fn_error $? "GNU MP C++ library header (gmpxx.h) required but not found, see http://gmplib.org/" "$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 cvc4_cln_or_gmp=gmp else CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }$CLN_CFLAGS" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }$CLN_CFLAGS" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }$CLN_CFLAGS" LIBS="$CLN_LIBS${LIBS:+ $LIBS}" cvc4_cln_or_gmp=cln fi if test $cvc4_cln_or_gmp = cln; then cat >>confdefs.h <<_ACEOF #define CVC4_CLN_IMP /**/ _ACEOF else cat >>confdefs.h <<_ACEOF #define CVC4_GMP_IMP /**/ _ACEOF fi if test $cvc4_cln_or_gmp = cln; then CVC4_CLN_IMP_TRUE= CVC4_CLN_IMP_FALSE='#' else CVC4_CLN_IMP_TRUE='#' CVC4_CLN_IMP_FALSE= fi if test $cvc4_cln_or_gmp = gmp; then CVC4_GMP_IMP_TRUE= CVC4_GMP_IMP_FALSE='#' else CVC4_GMP_IMP_TRUE='#' CVC4_GMP_IMP_FALSE= fi # construct the build string { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate build string" >&5 $as_echo_n "checking for appropriate build string... " >&6; } if test -z "$ac_confdir"; then ac_confdir="$srcdir" fi build_type=`$ac_confdir/config/build-type $with_build $btargs $cvc4_cln_or_gmp` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $build_type" >&5 $as_echo "$build_type" >&6; } # Require building in target and build-specific build directory: # # If the configure script is invoked from the top-level source # directory, it creates a suitable build directory (based on the build # architecture and build profile from $build_type), changes into it, # and reinvokes itself. CVC4_CONFIGURE_IN_BUILDS is an envariable # that breaks any possibility of infinite recursion in this process. { $as_echo "$as_me:${as_lineno-$LINENO}: checking what dir to configure" >&5 $as_echo_n "checking what dir to configure... " >&6; } if test "$CVC4_CONFIGURE_IN_BUILDS" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: this one (in builds/)" >&5 $as_echo "this one (in builds/)" >&6; } elif test "$CVC4_CONFIGURE_AT_TOP_LEVEL" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: builds/$target/$build_type" >&5 $as_echo "builds/$target/$build_type" >&6; } $as_echo if test -z "$ac_srcdir"; then mkbuilddir=./config/mkbuilddir else mkbuilddir=$ac_srcdir/config/mkbuilddir fi $as_echo "$mkbuilddir $target $build_type" source $mkbuilddir "$target" "$build_type" $as_echo "cd builds/$target/$build_type" cd "builds/$target/$build_type" CVC4_CONFIGURE_IN_BUILDS=yes; export CVC4_CONFIGURE_IN_BUILDS # Runs the single recursive configure invocation using a relative path. # See https://lists.gnu.org/archive/html/autoconf/2011-04/msg00060.html echo "$SHELL ../../../configure ${config_cmdline[@]}" "$SHELL" "../../../configure" "${config_cmdline[@]}" exitval=$? cd ../../.. if test $exitval -eq 0; then cat >config.reconfig <&2; exit; fi current=(\`grep '^CURRENT_BUILD' builds/current | sed 's,^CURRENT_BUILD *= *\([^/]*\\)/\\(.*\\),\\1 \\2,'\`) arch=\${current[0]} build=\${current[1]} echo "reconfiguring in builds/\$arch/\$build..." cd "builds/\$arch/\$build" echo ./config.status "\$@" ./config.status "\$@" EOF chmod +x config.reconfig fi ln -sf "$target/$build_type/config.log" "builds/config.log" exit $exitval else { $as_echo "$as_me:${as_lineno-$LINENO}: result: this one (user-specified)" >&5 $as_echo "this one (user-specified)" >&6; } fi as_me=configure # Unpack standard build types. Any particular options can be overriden with # --enable/disable-X options # Tim: This needs to keep CVC4CPPFLAGS, CVC4CXXFLAGS, etc. set by earlier checks case "$with_build" in production) # highly optimized, no assertions, no tracing, dumping CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden' if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=3 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_replay+set}" ; then enable_replay=no ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=no ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; debug) # unoptimized, debug symbols, assertions, tracing, dumping CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_DEBUG" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-fno-inline" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-fno-inline" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN= if test -z "${enable_optimized+set}" ; then enable_optimized=no ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_replay+set}" ; then enable_replay=yes ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; default) # moderately optimized, assertions, tracing, dumping CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden' if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=2 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_replay+set}" ; then enable_replay=yes ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; competition) # maximally optimized, no assertions, no tracing, no dumping, muzzled CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_COMPETITION_MODE" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-funroll-all-loops -fexpensive-optimizations -fno-enforce-eh-specs" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-funroll-all-loops -fexpensive-optimizations -fno-enforce-eh-specs" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden' if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=9 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=no ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=no ; fi if test -z "${enable_replay+set}" ; then enable_replay=no ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi if test -z "${enable_proof+set}" ; then enable_proof=no ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=no ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=no ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=yes ; fi if test -z "${user_specified_enable_or_disable_shared}"; then enable_shared=no; fi if test -z "${user_specified_enable_or_disable_static}"; then enable_static=yes; fi if test -z "${enable_static_binary+set}"; then enable_static_binary=yes ; fi ;; *) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unknown build profile: $with_build See \`config.log' for more details" "$LINENO" 5; } ;; esac if test -z "${OPTLEVEL+set}"; then OPTLEVEL=3; fi if test "$with_build" = production; then CVC4_BUILD_PROFILE_PRODUCTION_TRUE= CVC4_BUILD_PROFILE_PRODUCTION_FALSE='#' else CVC4_BUILD_PROFILE_PRODUCTION_TRUE='#' CVC4_BUILD_PROFILE_PRODUCTION_FALSE= fi if test "$with_build" = debug; then CVC4_BUILD_PROFILE_DEBUG_TRUE= CVC4_BUILD_PROFILE_DEBUG_FALSE='#' else CVC4_BUILD_PROFILE_DEBUG_TRUE='#' CVC4_BUILD_PROFILE_DEBUG_FALSE= fi if test "$with_build" = default; then CVC4_BUILD_PROFILE_DEFAULT_TRUE= CVC4_BUILD_PROFILE_DEFAULT_FALSE='#' else CVC4_BUILD_PROFILE_DEFAULT_TRUE='#' CVC4_BUILD_PROFILE_DEFAULT_FALSE= fi if test "$with_build" = competition; then CVC4_BUILD_PROFILE_COMPETITION_TRUE= CVC4_BUILD_PROFILE_COMPETITION_FALSE='#' else CVC4_BUILD_PROFILE_COMPETITION_TRUE='#' CVC4_BUILD_PROFILE_COMPETITION_FALSE= fi # permit a static binary { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build a static binary" >&5 $as_echo_n "checking whether to build a static binary... " >&6; } # Check whether --enable-static-binary was given. if test "${enable_static_binary+set}" = set; then : enableval=$enable_static_binary; fi if test -z "${enable_static_binary+set}"; then enable_static_binary=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static_binary" >&5 $as_echo "$enable_static_binary" >&6; } if test "$enable_static_binary" = yes; then if test "$target_vendor" = apple; then if test -z "$MAC_STATIC_BINARY_MANUAL_OVERRIDE"; then as_fn_error $? "Statically-linked binaries are not supported on Mac OS. See https://developer.apple.com/library/mac/#qa/qa2001/qa1118.html . (If you ABSOLUTELY insist on this going forward and you know what you are doing, set MAC_STATIC_BINARY_MANUAL_OVERRIDE=1)" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MAC_STATIC_BINARY_MANUAL_OVERRIDE was set!" >&5 $as_echo "$as_me: WARNING: MAC_STATIC_BINARY_MANUAL_OVERRIDE was set!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will make a static binary during this build. Note that it may fail!" >&5 $as_echo "$as_me: WARNING: Will make a static binary during this build. Note that it may fail!" >&2;} fi fi if test "$enable_static" != yes; then enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: forcing static-library building, --enable-static-binary given" >&5 $as_echo "$as_me: WARNING: forcing static-library building, --enable-static-binary given" >&2;} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support proofs in libcvc4" >&5 $as_echo_n "checking whether to support proofs in libcvc4... " >&6; } # Check whether --enable-proof was given. if test "${enable_proof+set}" = set; then : enableval=$enable_proof; fi if test -z "${enable_proof+set}"; then enable_proof=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_proof" >&5 $as_echo "$enable_proof" >&6; } if test "$enable_proof" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PROOF" fi if test "$enable_proof" = yes; then CVC4_PROOF_TRUE= CVC4_PROOF_FALSE='#' else CVC4_PROOF_TRUE='#' CVC4_PROOF_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to optimize libcvc4" >&5 $as_echo_n "checking whether to optimize libcvc4... " >&6; } # Check whether --enable-optimized was given. if test "${enable_optimized+set}" = set; then : enableval=$enable_optimized; fi if test -z "${enable_optimized+set}"; then enable_optimized=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_optimized" >&5 $as_echo "$enable_optimized" >&6; } if test "$enable_optimized" = yes; then CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-O$OPTLEVEL" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-O$OPTLEVEL" else CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-O0" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-O0" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include debugging symbols in libcvc4" >&5 $as_echo_n "checking whether to include debugging symbols in libcvc4... " >&6; } # Check whether --enable-debug-symbols was given. if test "${enable_debug_symbols+set}" = set; then : enableval=$enable_debug_symbols; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_debug_symbols" >&5 $as_echo "$enable_debug_symbols" >&6; } if test "$enable_debug_symbols" = yes; then CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-ggdb3" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-ggdb3" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include statistics are turned on in libcvc4" >&5 $as_echo_n "checking whether to include statistics are turned on in libcvc4... " >&6; } # Check whether --enable-statistics was given. if test "${enable_statistics+set}" = set; then : enableval=$enable_statistics; fi if test -z "${enable_statistics+set}"; then enable_statistics=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_statistics" >&5 $as_echo "$enable_statistics" >&6; } if test "$enable_statistics" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_STATISTICS_ON" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the replay feature should be turned on in libcvc4" >&5 $as_echo_n "checking whether the replay feature should be turned on in libcvc4... " >&6; } # Check whether --enable-replay was given. if test "${enable_replay+set}" = set; then : enableval=$enable_replay; fi if test -z "${enable_replay+set}"; then enable_replay=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_replay" >&5 $as_echo "$enable_replay" >&6; } if test "$enable_replay" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_REPLAY" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include assertions in build" >&5 $as_echo_n "checking whether to include assertions in build... " >&6; } # Check whether --enable-assertions was given. if test "${enable_assertions+set}" = set; then : enableval=$enable_assertions; fi if test -z "${enable_assertions+set}"; then enable_assertions=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assertions" >&5 $as_echo "$enable_assertions" >&6; } if test "$enable_assertions" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_ASSERTIONS" else # turn off regular C assert() also CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DNDEBUG" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do a traceable build of CVC4" >&5 $as_echo_n "checking whether to do a traceable build of CVC4... " >&6; } # Check whether --enable-tracing was given. if test "${enable_tracing+set}" = set; then : enableval=$enable_tracing; fi if test -z "${enable_tracing+set}"; then enable_tracing=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_tracing" >&5 $as_echo "$enable_tracing" >&6; } if test "$enable_tracing" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_TRACING" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do a dump-capable build of CVC4" >&5 $as_echo_n "checking whether to do a dump-capable build of CVC4... " >&6; } # Check whether --enable-dumping was given. if test "${enable_dumping+set}" = set; then : enableval=$enable_dumping; fi if test -z "${enable_dumping+set}"; then enable_dumping=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_dumping" >&5 $as_echo "$enable_dumping" >&6; } if test "$enable_dumping" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_DUMPING" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do a muzzled build of CVC4" >&5 $as_echo_n "checking whether to do a muzzled build of CVC4... " >&6; } # Check whether --enable-muzzle was given. if test "${enable_muzzle+set}" = set; then : enableval=$enable_muzzle; fi if test -z "${enable_muzzle+set}"; then enable_muzzle=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_muzzle" >&5 $as_echo "$enable_muzzle" >&6; } if test "$enable_muzzle" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_MUZZLE" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do a gcov-enabled build of CVC4" >&5 $as_echo_n "checking whether to do a gcov-enabled build of CVC4... " >&6; } # Check whether --enable-coverage was given. if test "${enable_coverage+set}" = set; then : enableval=$enable_coverage; fi if test -z "${enable_coverage+set}"; then enable_coverage=no # make COVERAGE_ON the empty string for makefile conditional function # $(if $(COVERAGE_ON), action1, action2) COVERAGE_ON= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_coverage" >&5 $as_echo "$enable_coverage" >&6; } if test "$enable_coverage" = yes; then # For coverage testing, we prefer: # --enable-static --disable-shared --disable-static-binary # If the user didn't specify these, we force them here. If the # user specified them in opposite phase, give warnings that they # shouldn't do that, or bomb out. COVERAGE_ON=yes if test "$user_specified_enable_or_disable_shared" != yes; then enable_shared=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: turning off shared library building due to --enable-coverage" >&5 $as_echo "$as_me: WARNING: turning off shared library building due to --enable-coverage" >&2;} elif test "$enable_shared" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It is not recommended to configure with --enable-coverage --enable-shared" >&5 $as_echo "$as_me: WARNING: It is not recommended to configure with --enable-coverage --enable-shared" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcov does not support shared libraries, so only your static libraries will be coverage-testable." >&5 $as_echo "$as_me: WARNING: gcov does not support shared libraries, so only your static libraries will be coverage-testable." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your cvc4 driver and testing binaries will not be coverage-testable." >&5 $as_echo "$as_me: WARNING: Your cvc4 driver and testing binaries will not be coverage-testable." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} fi if test "${enable_static_binary+set}" = set -a "$enable_static_binary" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It is not recommended to configure with --enable-coverage --enable-static-binary" >&5 $as_echo "$as_me: WARNING: It is not recommended to configure with --enable-coverage --enable-static-binary" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your cvc4 driver and testing binaries will be fully-statically linked and may not be coverage-testable." >&5 $as_echo "$as_me: WARNING: Your cvc4 driver and testing binaries will be fully-statically linked and may not be coverage-testable." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} fi if test "$user_specified_enable_or_disable_static" != yes; then enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: turning on static library building due to --enable-coverage" >&5 $as_echo "$as_me: WARNING: turning on static library building due to --enable-coverage" >&2;} elif test "$enable_static" != yes; then as_fn_error $? "--enable-coverage and --disable-static are incompatible; gcov only supports static libraries." "$LINENO" 5 fi CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_COVERAGE" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }--coverage" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }--coverage" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }--coverage" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do a profiling-enabled build of CVC4" >&5 $as_echo_n "checking whether to do a profiling-enabled build of CVC4... " >&6; } # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; fi if test -z "${enable_profiling+set}"; then enable_profiling=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 $as_echo "$enable_profiling" >&6; } if test "$enable_profiling" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PROFILING" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-pg" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-pg" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }-pg" fi # Check for libglpk (defined in config/glpk.m4) # Check whether --with-glpk was given. if test "${with_glpk+set}" = set; then : withval=$with_glpk; else with_glpk= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether user requested glpk support" >&5 $as_echo_n "checking whether user requested glpk support... " >&6; } LIBGLPK= have_libglpk=0 GLPK_LIBS= GLPK_LDFLAGS= if test "$with_glpk" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, glpk disabled by user" >&5 $as_echo "no, glpk disabled by user" >&6; } elif test -n "$with_glpk"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, glpk requested by user" >&5 $as_echo "yes, glpk requested by user" >&6; } # Get the location of all the GLPK stuff # Check whether --with-glpk-dir was given. if test "${with_glpk_dir+set}" = set; then : withval=$with_glpk_dir; GLPK_HOME="$withval" else if test -z "$GLPK_HOME"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "must give --with-glpk-dir=PATH or define environment variable GLPK_HOME! See \`config.log' for more details" "$LINENO" 5; } fi fi if test -n "$GLPK_HOME"; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-I$GLPK_HOME/include" GLPK_LDFLAGS="-L$GLPK_HOME/lib" fi GLPK_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 cvc4_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "glpk.h" "ac_cv_header_glpk_h" "$ac_includes_default" if test "x$ac_cv_header_glpk_h" = xyes; 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 $? "cannot find glpk.h, the GLPK header! See \`config.log' for more details" "$LINENO" 5; } fi CPPFLAGS="$cvc4_save_CPPFLAGS" 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 link glpk" >&5 $as_echo_n "checking how to link glpk... " >&6; } if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk " fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lz" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lz -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lz -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lz -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp -lz" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp -lz -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp -lz -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="$GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk -lgmp -lz -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot link against libglpk! (perhaps you have not switched to glpk-cut-log? see /INSTALL) See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLPK_LIBS" >&5 $as_echo "$GLPK_LIBS" >&6; } # make sure it works in static builds, too if test "$enable_static_binary" = yes; then GLPK_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether statically-linked glpk is functional" >&5 $as_echo_n "checking whether statically-linked glpk is functional... " >&6; } if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static " else LIBS="-lglpk " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk " fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp" else LIBS="-lglpk -lgmp" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lz" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lz" else LIBS="-lglpk -lz" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -ldl" else LIBS="-lglpk -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lltdl" else LIBS="-lglpk -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lltdl -ldl" else LIBS="-lglpk -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lz -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lz -ldl" else LIBS="-lglpk -lz -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lz -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lz -lltdl" else LIBS="-lglpk -lz -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lz -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lz -lltdl -ldl" else LIBS="-lglpk -lz -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lz -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp -lz" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp -lz" else LIBS="-lglpk -lgmp -lz" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp -ldl" else LIBS="-lglpk -lgmp -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp -lltdl" else LIBS="-lglpk -lgmp -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp -lltdl -ldl" else LIBS="-lglpk -lgmp -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp -lz -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp -lz -ldl" else LIBS="-lglpk -lgmp -lz -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp -lz -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp -lz -lltdl" else LIBS="-lglpk -lgmp -lz -lltdl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz -lltdl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$GLPK_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CVC4CPPFLAGS $CPPFLAGS" LDFLAGS="-static $GLPK_LDFLAGS $LDFLAGS" LIBS="-lglpk-static -lgmp -lz -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk-static -lgmp -lz -lltdl -ldl" else LIBS="-lglpk -lgmp -lz -lltdl -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = glp_ios_get_cut(NULL, 0, NULL, NULL, NULL, NULL, NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : GLPK_LIBS="-lglpk -lgmp -lz -lltdl -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" CPPFLAGS="$cvc4_save_CPPFLAGS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -n "$GLPK_LIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, it works" >&5 $as_echo "yes, it works" >&6; } with_glpk=yes else { $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 $? "glpk installation appears incompatible with static-binary See \`config.log' for more details" "$LINENO" 5; } fi else with_glpk=yes fi fi if test "$with_glpk" = yes; then have_libglpk=1 else with_glpk=no have_libreadline=0 GLPK_LIBS= fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, user didn't request glpk" >&5 $as_echo "no, user didn't request glpk" >&6; } with_glpk=no fi if test $have_libglpk -eq 1; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_GLPK" fi if test $have_libglpk -eq 1; then CVC4_USE_GLPK_TRUE= CVC4_USE_GLPK_FALSE='#' else CVC4_USE_GLPK_TRUE='#' CVC4_USE_GLPK_FALSE= fi # Build with libabc (defined in config/abc.m4) # Check whether --with-abc was given. if test "${with_abc+set}" = set; then : withval=$with_abc; else with_abc= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether user requested abc support" >&5 $as_echo_n "checking whether user requested abc support... " >&6; } LIBABC= have_libabc=0 ABC_LIBS= ABC_LDFLAGS= if test "$with_abc" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, abc disabled by user" >&5 $as_echo "no, abc disabled by user" >&6; } elif test -n "$with_abc"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, abc requested by user" >&5 $as_echo "yes, abc requested by user" >&6; } # Get the location of all the ABC stuff # Check whether --with-abc-dir was given. if test "${with_abc_dir+set}" = set; then : withval=$with_abc_dir; ABC_HOME="$withval" else if test -z "$ABC_HOME"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "must give --with-abc-dir=PATH or define environment variable ABC_HOME! See \`config.log' for more details" "$LINENO" 5; } fi fi if ! test -d "$ABC_HOME" || ! test -x "$ABC_HOME/arch_flags"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "either $ABC_HOME is not an abc source tree or it's not yet built See \`config.log' for more details" "$LINENO" 5; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch_flags to use with libabc" >&5 $as_echo_n "checking for arch_flags to use with libabc... " >&6; } libabc_arch_flags="$("$ABC_HOME/arch_flags")" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libabc_arch_flags" >&5 $as_echo "$libabc_arch_flags" >&6; } CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-I$ABC_HOME/src $libabc_arch_flags" ABC_LDFLAGS="-L$ABC_HOME" cvc4_save_LDFLAGS="$LDFLAGS" ABC_LIBS= CPPFLAGS="$CPPFLAGS -I$ABC_HOME/src $libabc_arch_flags" LDFLAGS="$LDFLAGS $ABC_LDFLAGS" ac_fn_c_check_header_mongrel "$LINENO" "base/abc/abc.h" "ac_cv_header_base_abc_abc_h" "$ac_includes_default" if test "x$ac_cv_header_base_abc_abc_h" = xyes; 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 $? "cannot find abc.h, the ABC header! See \`config.log' for more details" "$LINENO" 5; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link abc" >&5 $as_echo_n "checking how to link abc... " >&6; } if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc " fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm -lrt" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lrt" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm -lrt -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lrt -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm -lrt -lreadline -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lrt -lreadline -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm -lpthread" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm -lpthread -lrt" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread -lrt" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm -lpthread -lrt -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread -lrt -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" LIBS="-labc -lm -lpthread -lrt -lreadline -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread -lrt -lreadline -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" 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 if test -z "$ABC_LIBS"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot link against libabc! See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABC_LIBS" >&5 $as_echo "$ABC_LIBS" >&6; } # make sure it works in static builds, too if test "$enable_static_binary" = yes; then ABC_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether statically-linked abc is functional" >&5 $as_echo_n "checking whether statically-linked abc is functional... " >&6; } if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static " else LIBS="-labc " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc " fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm" else LIBS="-labc -lm" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm -lrt" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm -lrt" else LIBS="-labc -lm -lrt" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lrt" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm -lrt -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm -lrt -ldl" else LIBS="-labc -lm -lrt -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lrt -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm -lrt -lreadline -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm -lrt -lreadline -ldl" else LIBS="-labc -lm -lrt -lreadline -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lrt -lreadline -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm -lpthread" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm -lpthread" else LIBS="-labc -lm -lpthread" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm -lpthread -lrt" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm -lpthread -lrt" else LIBS="-labc -lm -lpthread -lrt" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread -lrt" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm -lpthread -lrt -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm -lpthread -lrt -ldl" else LIBS="-labc -lm -lpthread -lrt -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread -lrt -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$ABC_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-labc-static -lm -lpthread -lrt -lreadline -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc-static -lm -lpthread -lrt -lreadline -ldl" else LIBS="-labc -lm -lpthread -lrt -lreadline -ldl" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern "C" { void Abc_Start(); } int main () { Abc_Start() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ABC_LIBS="-labc -lm -lpthread -lrt -lreadline -ldl" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -n "$ABC_LIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, it works" >&5 $as_echo "yes, it works" >&6; } with_abc=yes else { $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 $? "abc installation appears incompatible with static-binary See \`config.log' for more details" "$LINENO" 5; } fi else with_abc=yes fi fi if test "$with_abc" = yes; then have_libabc=1 else with_abc=no have_libreadline=0 ABC_LIBS= fi LDFLAGS="$cvc4_save_LDFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, user didn't request abc" >&5 $as_echo "no, user didn't request abc" >&6; } with_abc=no fi if test $have_libabc -eq 1; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_ABC" fi if test $have_libabc -eq 1; then CVC4_USE_ABC_TRUE= CVC4_USE_ABC_FALSE='#' else CVC4_USE_ABC_TRUE='#' CVC4_USE_ABC_FALSE= fi # Build with libcryptominisat # Check whether --with-cryptominisat was given. if test "${with_cryptominisat+set}" = set; then : withval=$with_cryptominisat; else with_cryptominisat= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether user requested cryptominisat support" >&5 $as_echo_n "checking whether user requested cryptominisat support... " >&6; } have_libcryptominisat=0 CRYPTOMINISAT_LIBS= CRYPTOMINISAT_LDFLAGS= have_libcryptominisat=0 if test "$with_cryptominisat" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cryptominisat disabled by user" >&5 $as_echo "no, cryptominisat disabled by user" >&6; } elif test -n "$with_cryptominisat"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, cryptominisat requested by user" >&5 $as_echo "yes, cryptominisat requested by user" >&6; } # Check whether --with-cryptominisat-dir was given. if test "${with_cryptominisat_dir+set}" = set; then : withval=$with_cryptominisat_dir; CRYPTOMINISAT_HOME="$withval" else if test -z "$CRYPTOMINISAT_HOME"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "must give --with-cryptominisat-dir=PATH or define environment variable CRYPTOMINISAT_HOME! See \`config.log' for more details" "$LINENO" 5; } fi fi if ! test -d "$CRYPTOMINISAT_HOME" || ! test -x "$CRYPTOMINISAT_HOME/install/bin/cryptominisat" ; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "either $CRYPTOMINISAT_HOME is not an cryptominisat install tree or it's not yet built See \`config.log' for more details" "$LINENO" 5; } fi CPPFLAGS="$CPPFLAGS -I$CRYPTOMINISAT_HOME/install/include" { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link cryptominisat" >&5 $as_echo_n "checking how to link cryptominisat... " >&6; } if test -z "$CRYPTOMINISAT_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" cvc4_save_CPPFLAGS="$CPPFLAGS" LDFLAGS="-L$CRYPTOMINISAT_HOME/install/lib" LIBS="-lcryptominisat4 -pthread" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CMSat::SATSolver test() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : CRYPTOMINISAT_LIBS="-lcryptominisat4 -pthread" else CRYPTOMINISAT_LIBS= fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$cvc4_save_LDFLAGS" CPPFLAGS="$cvc4_save_CPPFLAGS" LIBS="$cvc4_save_LIBS" 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 if test -z "$CRYPTOMINISAT_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" cvc4_save_CPPFLAGS="$CPPFLAGS" LDFLAGS="-L$CRYPTOMINISAT_HOME/install/lib" LIBS="-lcryptominisat4 -pthread -lm4ri" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CMSat::SATSolver test() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : CRYPTOMINISAT_LIBS="-lcryptominisat4 -pthread -lm4ri" else CRYPTOMINISAT_LIBS= fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$cvc4_save_LDFLAGS" CPPFLAGS="$cvc4_save_CPPFLAGS" LIBS="$cvc4_save_LIBS" 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 if test -z "$CRYPTOMINISAT_LIBS"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot link against libcryptominisat! See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CRYPTOMINISAT_LIBS" >&5 $as_echo "$CRYPTOMINISAT_LIBS" >&6; } have_libcryptominisat=1 fi CRYPTOMINISAT_LDFLAGS="-L$CRYPTOMINISAT_HOME/install/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, user didn't request cryptominisat" >&5 $as_echo "no, user didn't request cryptominisat" >&6; } with_cryptominisat=no fi if test $have_libcryptominisat -eq 1; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_CRYPTOMINISAT" CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-I$CRYPTOMINISAT_HOME/install/include" fi if test $have_libcryptominisat -eq 1; then CVC4_USE_CRYPTOMINISAT_TRUE= CVC4_USE_CRYPTOMINISAT_FALSE='#' else CVC4_USE_CRYPTOMINISAT_TRUE='#' CVC4_USE_CRYPTOMINISAT_FALSE= fi # Check to see if this version/architecture of GNU C++ explicitly # instantiates __gnu_cxx::hash or not. Some do, some don't. # See src/util/hash.h. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __gnu_cxx::hash is already specialized" >&5 $as_echo_n "checking whether __gnu_cxx::hash is already specialized... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include namespace __gnu_cxx { template<> struct hash {}; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_NEED_HASH_UINT64_T" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 # Check whether "long" and "int64_t" are distinct types w.r.t. overloading. # Even if they have the same size, they can be distinct, and some platforms # can have problems with ambiguous function calls when auto-converting # int64_t to long, and others will complain if you overload a function # that takes an int64_t with one that takes a long (giving a redefinition # error). So we have to keep both happy. Probably the same underlying # issue as the hash specialization above, but let's check separately # for flexibility. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the relationship between long and int64_t" >&5 $as_echo_n "checking for the relationship between long and int64_t... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include void foo(long) {} void foo(int64_t) {} _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no relationship detected" >&5 $as_echo "no relationship detected" >&6; }; CVC4_NEED_INT64_T_OVERLOADS=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: typedef or similar" >&5 $as_echo "typedef or similar" >&6; }; CVC4_NEED_INT64_T_OVERLOADS=0 fi rm -f core conftest.err conftest.$ac_objext 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 # Check for ANTLR runantlr script (defined in config/antlr.m4) # Check the existence of the runantlr script if test "x$ANTLR" = "x"; then # Extract the first word of "antlr3", so it can be a program name with args. set dummy antlr3; 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_ANTLR+:} false; then : $as_echo_n "(cached) " >&6 else case $ANTLR in [\\/]* | ?:[\\/]*) ac_cv_path_ANTLR="$ANTLR" # 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_ANTLR="$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 ANTLR=$ac_cv_path_ANTLR if test -n "$ANTLR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANTLR" >&5 $as_echo "$ANTLR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking antlr3 script ($ANTLR)" >&5 $as_echo_n "checking antlr3 script ($ANTLR)... " >&6; } if test ! -e "$ANTLR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } unset ANTLR elif test ! -x "$ANTLR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not executable" >&5 $as_echo "not executable" >&6; } unset ANTLR else { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5 $as_echo "OK" >&6; } fi fi if test "x$ANTLR" = "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No usable antlr3 script found. Make sure that the parser code has been generated already. To obtain ANTLR see . " >&5 $as_echo "$as_me: WARNING: No usable antlr3 script found. Make sure that the parser code has been generated already. To obtain ANTLR see . " >&2;} ANTLR_VERSION= else ANTLR_VERSION="`$ANTLR -version 2>&1 | sed 's,.*Version *\([0-9.]*\).*,\1,'`" case "$ANTLR_VERSION" in 3.2|3.2.*) ANTLR_VERSION=3.2 ;; 3.4|3.4.*) ANTLR_VERSION=3.4 ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown version of antlr: $ANTLR_VERSION" >&5 $as_echo "$as_me: WARNING: unknown version of antlr: $ANTLR_VERSION" >&2;};; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Werror" >&5 $as_echo_n "checking whether $CXX supports -Werror... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -Werror" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; WERROR='-Werror' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5 $as_echo_n "checking whether $CC supports -Werror... " >&6; } cvc4_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $C_WERROR -Werror" 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_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; C_WERROR='-Werror' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CFLAGS="$cvc4_save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Wno-deprecated" >&5 $as_echo_n "checking whether $CXX supports -Wno-deprecated... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -Wno-deprecated" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; WNO_DEPRECATED='-Wno-deprecated' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-deprecated" >&5 $as_echo_n "checking whether $CC supports -Wno-deprecated... " >&6; } cvc4_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $C_WERROR -Wno-deprecated" 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_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; C_WNO_DEPRECATED='-Wno-deprecated' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CFLAGS="$cvc4_save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Wno-conversion-null" >&5 $as_echo_n "checking whether $CXX supports -Wno-conversion-null... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -Wno-conversion-null" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; WNO_CONVERSION_NULL='-Wno-conversion-null' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Wno-tautological-compare" >&5 $as_echo_n "checking whether $CXX supports -Wno-tautological-compare... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -Wno-tautological-compare" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; WNO_TAUTOLOGICAL_COMPARE='-Wno-tautological-compare' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Wno-parentheses" >&5 $as_echo_n "checking whether $CXX supports -Wno-parentheses... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -Wno-parentheses" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; WNO_PARENTHESES='-Wno-parentheses' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Wno-uninitialized" >&5 $as_echo_n "checking whether $CXX supports -Wno-uninitialized... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -Wno-uninitialized" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; WNO_UNINITIALIZED='-Wno-uninitialized' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -Wno-unused-variable" >&5 $as_echo_n "checking whether $CXX supports -Wno-unused-variable... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -Wno-unused-variable" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; WNO_UNUSED_VARIABLE='-Wno-unused-variable' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fno-strict-aliasing" >&5 $as_echo_n "checking whether $CXX supports -fno-strict-aliasing... " >&6; } cvc4_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $WERROR -fno-strict-aliasing" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }; FNO_STRICT_ALIASING='-fno-strict-aliasing' else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 CXXFLAGS="$cvc4_save_CXXFLAGS" # On Mac, we have to fix the visibility of standard library symbols. # Otherwise, exported template instantiations---even though explicitly # CVC4_PUBLIC, can be generated as symbols with internal-only linkage. # Presumably, Apple is distributing a libstdc++ that is built *without* # --enable-libstdcxx-visibility (?) if test "$target_vendor" = apple; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-D_GLIBCXX_VISIBILITY_DEFAULT=\"__attribute__((__visibility__(\\\"default\\\")))\"" fi # Tell top-level Makefile to include $(top_srcdir)/personal.mk # Check whether --enable-personal-make-rules was given. if test "${enable_personal_make_rules+set}" = set; then : enableval=$enable_personal_make_rules; fi if test "$enable_personal_make_rules" = yes; then # This allows us to include a personal.mk makefile from every # generated makefile. Named zz_* in order to make sure this # comes last, so it gets other definitions (in particular top_srcdir). zz_cvc4_use_personal_make_rules='yes all:; include $(top_srcdir)/personal.mk $(top_srcdir)/personal.mk:; @touch "$@"' fi # Doxygen configuration # Check whether --enable-internals-documentation was given. if test "${enable_internals_documentation+set}" = set; then : enableval=$enable_internals_documentation; fi if test "$enable_internals_documentation" = yes; then DOXYGEN_EXTRACT_PRIVATE=YES DOXYGEN_EXTRACT_STATIC=YES else DOXYGEN_EXTRACT_PRIVATE=NO DOXYGEN_EXTRACT_STATIC=NO fi # Files: DX_PROJECT=$PACKAGE_NAME DX_CONFIG=config/doxygen.cfg DX_DOCDIR=$srcdir/doc/doxygen # Environment variables used inside doxygen.cfg: DX_ENV="$DX_ENV SRCDIR='$srcdir'" DX_ENV="$DX_ENV PROJECT='$DX_PROJECT'" DX_ENV="$DX_ENV DOCDIR='$DX_DOCDIR'" DX_ENV="$DX_ENV VERSION='$PACKAGE_VERSION'" # Doxygen itself: # Check whether --enable-doxygen-doc was given. if test "${enable_doxygen_doc+set}" = set; then : enableval=$enable_doxygen_doc; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_doc=1 ;; #( n|N|no|No|NO) DX_FLAG_doc=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-doc" "$LINENO" 5 ;; esac else DX_FLAG_doc=1 fi if test "$DX_FLAG_doc" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args. set dummy ${ac_tool_prefix}doxygen; 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_DX_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOXYGEN="$DX_DOXYGEN" # 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_DX_DOXYGEN="$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 DX_DOXYGEN=$ac_cv_path_DX_DOXYGEN if test -n "$DX_DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOXYGEN" >&5 $as_echo "$DX_DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOXYGEN"; then ac_pt_DX_DOXYGEN=$DX_DOXYGEN # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; 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_DX_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOXYGEN="$ac_pt_DX_DOXYGEN" # 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_DX_DOXYGEN="$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_DX_DOXYGEN=$ac_cv_path_ac_pt_DX_DOXYGEN if test -n "$ac_pt_DX_DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOXYGEN" >&5 $as_echo "$ac_pt_DX_DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOXYGEN" = x; then DX_DOXYGEN="" 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 DX_DOXYGEN=$ac_pt_DX_DOXYGEN fi else DX_DOXYGEN="$ac_cv_path_DX_DOXYGEN" fi if test "$DX_FLAG_doc$DX_DOXYGEN" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - will not generate any doxygen documentation" >&5 $as_echo "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args. set dummy ${ac_tool_prefix}perl; 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_DX_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PERL="$DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_PERL="$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 DX_PERL=$ac_cv_path_DX_PERL if test -n "$DX_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PERL" >&5 $as_echo "$DX_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_PERL"; then ac_pt_DX_PERL=$DX_PERL # Extract the first word of "perl", so it can be a program name with args. set dummy perl; 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_DX_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PERL="$ac_pt_DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_PERL="$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_DX_PERL=$ac_cv_path_ac_pt_DX_PERL if test -n "$ac_pt_DX_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PERL" >&5 $as_echo "$ac_pt_DX_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_PERL" = x; then DX_PERL="" 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 DX_PERL=$ac_pt_DX_PERL fi else DX_PERL="$ac_cv_path_DX_PERL" fi if test "$DX_FLAG_doc$DX_PERL" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - will not generate any doxygen documentation" >&5 $as_echo "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi : fi if test "$DX_FLAG_doc" = 1; then if :; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi DX_ENV="$DX_ENV PERL_PATH='$DX_PERL'" : else if false; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi : fi # Dot for graphics: # Check whether --enable-doxygen-dot was given. if test "${enable_doxygen_dot+set}" = set; then : enableval=$enable_doxygen_dot; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_dot=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-dot requires doxygen-dot" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_dot=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-dot" "$LINENO" 5 ;; esac else DX_FLAG_dot=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_dot=0 fi if test "$DX_FLAG_dot" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dot", so it can be a program name with args. set dummy ${ac_tool_prefix}dot; 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_DX_DOT+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOT="$DX_DOT" # 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_DX_DOT="$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 DX_DOT=$ac_cv_path_DX_DOT if test -n "$DX_DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOT" >&5 $as_echo "$DX_DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOT"; then ac_pt_DX_DOT=$DX_DOT # Extract the first word of "dot", so it can be a program name with args. set dummy dot; 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_DX_DOT+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOT="$ac_pt_DX_DOT" # 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_DX_DOT="$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_DX_DOT=$ac_cv_path_ac_pt_DX_DOT if test -n "$ac_pt_DX_DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOT" >&5 $as_echo "$ac_pt_DX_DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOT" = x; then DX_DOT="" 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 DX_DOT=$ac_pt_DX_DOT fi else DX_DOT="$ac_cv_path_DX_DOT" fi if test "$DX_FLAG_dot$DX_DOT" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5 $as_echo "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;} DX_FLAG_dot=0 fi : fi if test "$DX_FLAG_dot" = 1; then if :; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='YES'" DX_ENV="$DX_ENV DOT_PATH='`expr ".$DX_DOT" : '\(\.\)[^/]*$' \| "x$DX_DOT" : 'x\(.*\)/[^/]*$'`'" : else if false; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='NO'" : fi # Man pages generation: # Check whether --enable-doxygen-man was given. if test "${enable_doxygen_man+set}" = set; then : enableval=$enable_doxygen_man; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_man=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-man requires doxygen-man" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_man=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-man" "$LINENO" 5 ;; esac else DX_FLAG_man=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_man=0 fi if test "$DX_FLAG_man" = 1; then : fi if test "$DX_FLAG_man" = 1; then if :; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='YES'" : else if false; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='NO'" : fi # RTF file generation: # Check whether --enable-doxygen-rtf was given. if test "${enable_doxygen_rtf+set}" = set; then : enableval=$enable_doxygen_rtf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_rtf=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-rtf requires doxygen-rtf" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_rtf=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-rtf" "$LINENO" 5 ;; esac else DX_FLAG_rtf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_rtf=0 fi if test "$DX_FLAG_rtf" = 1; then : fi if test "$DX_FLAG_rtf" = 1; then if :; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='YES'" : else if false; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='NO'" : fi # XML file generation: # Check whether --enable-doxygen-xml was given. if test "${enable_doxygen_xml+set}" = set; then : enableval=$enable_doxygen_xml; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_xml=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-xml requires doxygen-xml" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_xml=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-xml" "$LINENO" 5 ;; esac else DX_FLAG_xml=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_xml=0 fi if test "$DX_FLAG_xml" = 1; then : fi if test "$DX_FLAG_xml" = 1; then if :; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='YES'" : else if false; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='NO'" : fi # (Compressed) HTML help generation: # Check whether --enable-doxygen-chm was given. if test "${enable_doxygen_chm+set}" = set; then : enableval=$enable_doxygen_chm; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chm=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-chm requires doxygen-chm" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_chm=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-chm" "$LINENO" 5 ;; esac else DX_FLAG_chm=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_chm=0 fi if test "$DX_FLAG_chm" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}hhc", so it can be a program name with args. set dummy ${ac_tool_prefix}hhc; 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_DX_HHC+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_DX_HHC="$DX_HHC" # 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_DX_HHC="$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 DX_HHC=$ac_cv_path_DX_HHC if test -n "$DX_HHC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_HHC" >&5 $as_echo "$DX_HHC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_HHC"; then ac_pt_DX_HHC=$DX_HHC # Extract the first word of "hhc", so it can be a program name with args. set dummy hhc; 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_DX_HHC+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_HHC="$ac_pt_DX_HHC" # 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_DX_HHC="$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_DX_HHC=$ac_cv_path_ac_pt_DX_HHC if test -n "$ac_pt_DX_HHC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_HHC" >&5 $as_echo "$ac_pt_DX_HHC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_HHC" = x; then DX_HHC="" 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 DX_HHC=$ac_pt_DX_HHC fi else DX_HHC="$ac_cv_path_DX_HHC" fi if test "$DX_FLAG_chm$DX_HHC" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5 $as_echo "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;} DX_FLAG_chm=0 fi : fi if test "$DX_FLAG_chm" = 1; then if :; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV HHC_PATH='$DX_HHC'" DX_ENV="$DX_ENV GENERATE_HTML='YES'" DX_ENV="$DX_ENV GENERATE_HTMLHELP='YES'" : else if false; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTMLHELP='NO'" : fi # Seperate CHI file generation. # Check whether --enable-doxygen-chi was given. if test "${enable_doxygen_chi+set}" = set; then : enableval=$enable_doxygen_chi; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chi=1 test "$DX_FLAG_chm" = "1" \ || as_fn_error $? "doxygen-chi requires doxygen-chi" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_chi=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-chi" "$LINENO" 5 ;; esac else DX_FLAG_chi=0 test "$DX_FLAG_chm" = "1" || DX_FLAG_chi=0 fi if test "$DX_FLAG_chi" = 1; then : fi if test "$DX_FLAG_chi" = 1; then if :; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='YES'" : else if false; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='NO'" : fi # Plain HTML pages generation: # Check whether --enable-doxygen-html was given. if test "${enable_doxygen_html+set}" = set; then : enableval=$enable_doxygen_html; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-html requires doxygen-html" "$LINENO" 5 test "$DX_FLAG_chm" = "0" \ || as_fn_error $? "doxygen-html contradicts doxygen-html" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_html=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-html" "$LINENO" 5 ;; esac else DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" || DX_FLAG_html=0 test "$DX_FLAG_chm" = "0" || DX_FLAG_html=0 fi if test "$DX_FLAG_html" = 1; then : fi if test "$DX_FLAG_html" = 1; then if :; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTML='YES'" : else if false; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi test "$DX_FLAG_chm" = 1 || DX_ENV="$DX_ENV GENERATE_HTML='NO'" : fi # PostScript file generation: # Check whether --enable-doxygen-ps was given. if test "${enable_doxygen_ps+set}" = set; then : enableval=$enable_doxygen_ps; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_ps=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-ps requires doxygen-ps" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_ps=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-ps" "$LINENO" 5 ;; esac else DX_FLAG_ps=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_ps=0 fi if test "$DX_FLAG_ps" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}latex", so it can be a program name with args. set dummy ${ac_tool_prefix}latex; 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_DX_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_LATEX="$DX_LATEX" # 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_DX_LATEX="$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 DX_LATEX=$ac_cv_path_DX_LATEX if test -n "$DX_LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_LATEX" >&5 $as_echo "$DX_LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_LATEX"; then ac_pt_DX_LATEX=$DX_LATEX # Extract the first word of "latex", so it can be a program name with args. set dummy latex; 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_DX_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_LATEX="$ac_pt_DX_LATEX" # 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_DX_LATEX="$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_DX_LATEX=$ac_cv_path_ac_pt_DX_LATEX if test -n "$ac_pt_DX_LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_LATEX" >&5 $as_echo "$ac_pt_DX_LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_LATEX" = x; then DX_LATEX="" 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 DX_LATEX=$ac_pt_DX_LATEX fi else DX_LATEX="$ac_cv_path_DX_LATEX" fi if test "$DX_FLAG_ps$DX_LATEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: latex not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: latex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; 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_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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 DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 $as_echo "$DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; 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_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 $as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" 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 DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_ps$DX_MAKEINDEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dvips", so it can be a program name with args. set dummy ${ac_tool_prefix}dvips; 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_DX_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DVIPS="$DX_DVIPS" # 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_DX_DVIPS="$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 DX_DVIPS=$ac_cv_path_DX_DVIPS if test -n "$DX_DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DVIPS" >&5 $as_echo "$DX_DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DVIPS"; then ac_pt_DX_DVIPS=$DX_DVIPS # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; 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_DX_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DVIPS="$ac_pt_DX_DVIPS" # 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_DX_DVIPS="$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_DX_DVIPS=$ac_cv_path_ac_pt_DX_DVIPS if test -n "$ac_pt_DX_DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DVIPS" >&5 $as_echo "$ac_pt_DX_DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DVIPS" = x; then DX_DVIPS="" 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 DX_DVIPS=$ac_pt_DX_DVIPS fi else DX_DVIPS="$ac_cv_path_DX_DVIPS" fi if test "$DX_FLAG_ps$DX_DVIPS" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; 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_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # 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_DX_EGREP="$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 DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 $as_echo "$DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; 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_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # 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_DX_EGREP="$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_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 $as_echo "$ac_pt_DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" 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 DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_ps$DX_EGREP" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi : fi if test "$DX_FLAG_ps" = 1; then if :; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : else if false; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : fi # PDF file generation: # Check whether --enable-doxygen-pdf was given. if test "${enable_doxygen_pdf+set}" = set; then : enableval=$enable_doxygen_pdf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_pdf=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-pdf requires doxygen-pdf" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_pdf=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-pdf" "$LINENO" 5 ;; esac else DX_FLAG_pdf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_pdf=0 fi if test "$DX_FLAG_pdf" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args. set dummy ${ac_tool_prefix}pdflatex; 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_DX_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PDFLATEX="$DX_PDFLATEX" # 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_DX_PDFLATEX="$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 DX_PDFLATEX=$ac_cv_path_DX_PDFLATEX if test -n "$DX_PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PDFLATEX" >&5 $as_echo "$DX_PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_PDFLATEX"; then ac_pt_DX_PDFLATEX=$DX_PDFLATEX # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; 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_DX_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PDFLATEX="$ac_pt_DX_PDFLATEX" # 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_DX_PDFLATEX="$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_DX_PDFLATEX=$ac_cv_path_ac_pt_DX_PDFLATEX if test -n "$ac_pt_DX_PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PDFLATEX" >&5 $as_echo "$ac_pt_DX_PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_PDFLATEX" = x; then DX_PDFLATEX="" 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 DX_PDFLATEX=$ac_pt_DX_PDFLATEX fi else DX_PDFLATEX="$ac_cv_path_DX_PDFLATEX" fi if test "$DX_FLAG_pdf$DX_PDFLATEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; 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_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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 DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 $as_echo "$DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; 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_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 $as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" 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 DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_pdf$DX_MAKEINDEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; 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_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # 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_DX_EGREP="$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 DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 $as_echo "$DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; 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_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # 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_DX_EGREP="$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_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 $as_echo "$ac_pt_DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" 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 DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_pdf$DX_EGREP" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi : fi if test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : else if false; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : fi # LaTeX generation for PS and/or PDF: if test "$DX_FLAG_ps" = 1 || test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='YES'" else if false; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='NO'" fi # Paper size for PS and/or PDF: case "$DOXYGEN_PAPER_SIZE" in #( "") DOXYGEN_PAPER_SIZE="" ;; #( a4wide|a4|letter|legal|executive) DX_ENV="$DX_ENV PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" ;; #( *) as_fn_error $? "unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" "$LINENO" 5 ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV # Check whether --enable-unit-testing was given. if test "${enable_unit_testing+set}" = set; then : enableval=$enable_unit_testing; else enable_unit_testing=check fi # Check whether --with-cxxtest-dir was given. if test "${with_cxxtest_dir+set}" = set; then : withval=$with_cxxtest_dir; CXXTEST="$withval" fi # In the case of "./configure --with-cxxtest-dir=../cxxtest" (or other # relative path) and having switched the configure directory (see above), # search with respect to the top source dir, not the build dir if test "$CVC4_CONFIGURE_IN_BUILDS" = yes -a -n "$CXXTEST"; then case "$CXXTEST" in /*) ;; *) CXXTEST="$srcdir/$CXXTEST" ;; esac fi TESTS_ENVIRONMENT= RUN_REGRESSION_ARGS= if test "$enable_proof" = yes; then RUN_REGRESSION_ARGS="${RUN_REGRESSION_ARGS:+$RUN_REGRESSION_ARGS }--proof" fi CXXTESTGEN= # Extract the first word of "cxxtestgen.pl", so it can be a program name with args. set dummy cxxtestgen.pl; 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_CXXTESTGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CXXTESTGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CXXTESTGEN="$CXXTESTGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$CXXTEST:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CXXTESTGEN="$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 CXXTESTGEN=$ac_cv_path_CXXTESTGEN if test -n "$CXXTESTGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXTESTGEN" >&5 $as_echo "$CXXTESTGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$CXXTESTGEN"; then # Extract the first word of "cxxtestgen.py", so it can be a program name with args. set dummy cxxtestgen.py; 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_CXXTESTGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CXXTESTGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CXXTESTGEN="$CXXTESTGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$CXXTEST:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CXXTESTGEN="$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 CXXTESTGEN=$ac_cv_path_CXXTESTGEN if test -n "$CXXTESTGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXTESTGEN" >&5 $as_echo "$CXXTESTGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CXXTESTGEN"; then # Extract the first word of "cxxtestgen", so it can be a program name with args. set dummy cxxtestgen; 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_CXXTESTGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CXXTESTGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CXXTESTGEN="$CXXTESTGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$CXXTEST:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CXXTESTGEN="$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 CXXTESTGEN=$ac_cv_path_CXXTESTGEN if test -n "$CXXTESTGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXTESTGEN" >&5 $as_echo "$CXXTESTGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi # The latest version of cxxtest distributed from the git repository places # cxxtest under /bin/cxxtest if test -z "$CXXTESTGEN"; then # Extract the first word of "cxxtestgen", so it can be a program name with args. set dummy cxxtestgen; 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_CXXTESTGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CXXTESTGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CXXTESTGEN="$CXXTESTGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$CXXTEST/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CXXTESTGEN="$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 CXXTESTGEN=$ac_cv_path_CXXTESTGEN if test -n "$CXXTESTGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXTESTGEN" >&5 $as_echo "$CXXTESTGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$enable_unit_testing" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: unit tests disabled by user request." >&5 $as_echo "$as_me: unit tests disabled by user request." >&6;} CXXTESTGEN= CXXTEST= elif test -z "$CXXTESTGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: unit tests disabled, could not find cxxtestgen.pl or cxxtestgen.py or cxxtestgen" >&5 $as_echo "$as_me: unit tests disabled, could not find cxxtestgen.pl or cxxtestgen.py or cxxtestgen" >&6;} elif test -z "$CXXTEST"; then CXXTEST=`dirname "$CXXTESTGEN"` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of CxxTest headers" >&5 $as_echo_n "checking for location of CxxTest headers... " >&6; } if test -e "$CXXTEST/cxxtest/TestRunner.h"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXTEST" >&5 $as_echo "$CXXTEST" >&6; } else if test -e "/usr/include/cxxtest/TestRunner.h"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: /usr/include" >&5 $as_echo "/usr/include" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unit tests disabled, CxxTest headers not found." >&5 $as_echo "$as_me: WARNING: unit tests disabled, CxxTest headers not found." >&2;} CXXTESTGEN= CXXTEST= fi fi fi if test "$enable_unit_testing" = yes -a -z "$CXXTESTGEN"; then as_fn_error $? "--enable-unit-testing given but cxxtest not found." "$LINENO" 5 fi if test -n "$CXXTESTGEN"; then HAVE_CXXTESTGEN_TRUE= HAVE_CXXTESTGEN_FALSE='#' else HAVE_CXXTESTGEN_TRUE='#' HAVE_CXXTESTGEN_FALSE= fi if test -n "$CXXTEST"; then if test -z "$PERL"; then for ac_prog in perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # 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_PERL="$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 PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done test -n "$PERL" || PERL="perl" else # Extract the first word of ""$PERL"", so it can be a program name with args. set dummy "$PERL"; 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_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # 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_PERL=""$PERL"" $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 PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unit tests disabled, perl not found." >&5 $as_echo "$as_me: WARNING: unit tests disabled, perl not found." >&2;} CXXTESTGEN= CXXTEST= fi fi if test -z "$PYTHON"; then for ac_prog in python do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # 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_PYTHON="$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 PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON="python" else # Extract the first word of ""$PYTHON"", so it can be a program name with args. set dummy "$PYTHON"; 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_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # 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_PYTHON=""$PYTHON"" $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 PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python not found, cannot build libcvc4compat_java (the legacy Java interface)." >&5 $as_echo "$as_me: WARNING: python not found, cannot build libcvc4compat_java (the legacy Java interface)." >&2;} CXXTESTGEN= CXXTEST= fi # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h else case " $LIBOBJS " in *" clock_gettime.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS clock_gettime.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" if test "x$ac_cv_func_strtok_r" = xyes; then : $as_echo "#define HAVE_STRTOK_R 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs" if test "x$ac_cv_func_ffs" = xyes; then : $as_echo "#define HAVE_FFS 1" >>confdefs.h fi case " $LIBOBJS " in *" strtok_r ffs.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtok_r ffs.$ac_objext" ;; esac # Check for sigaltstack (missing in emscripten and mingw) ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack" if test "x$ac_cv_func_sigaltstack" = xyes; then : $as_echo "#define HAVE_SIGALTSTACK 1" >>confdefs.h fi # Check for antlr C++ runtime (defined in config/antlr.m4) # Get the location of the ANTLR3 C includes and libraries # Check whether --with-antlr-dir was given. if test "${with_antlr_dir+set}" = set; then : withval=$with_antlr_dir; ANTLR_PREFIXES="$withval" else ANTLR_PREFIXES="$ANTLR_HOME /usr/local /usr /opt/local /opt" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANTLR3 C runtime library" >&5 $as_echo_n "checking for ANTLR3 C runtime library... " >&6; } # Use C and remember the variables we are changing 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 OLD_CPPFLAGS="$CPPFLAGS" OLD_LIBS="$LIBS" # Try all the includes/libs set in ANTLR_PREFIXES for antlr_prefix in $ANTLR_PREFIXES do CPPFLAGS="$OLD_CPPFLAGS -I$antlr_prefix/include" LIBS="$OLD_LIBS -L$antlr_prefix/lib -lantlr3c" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { pANTLR3_TOKEN_FACTORY factory = antlr3TokenFactoryNew((pANTLR3_INPUT_STREAM) NULL); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in $antlr_prefix" >&5 $as_echo "found in $antlr_prefix" >&6; } ANTLR_INCLUDES="-I$antlr_prefix/include" ANTLR_LDFLAGS="-L$antlr_prefix/lib -lantlr3c" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "ANTLR3 C runtime not found, see " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of older antlr3AsciiFileStreamNew()" >&5 $as_echo_n "checking for presence of older antlr3AsciiFileStreamNew()... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { pANTLR3_UINT8 fName = (pANTLR3_UINT8)"foo"; pANTLR3_INPUT_STREAM input = antlr3AsciiFileStreamNew(fName); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found it (must be antlr3 3.2 or similar)" >&5 $as_echo "found it (must be antlr3 3.2 or similar)" >&6; } if test -n "$ANTLR_VERSION" -a "$ANTLR_VERSION" != 3.2; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your antlr parser generator is version $ANTLR_VERSION, which doesn't match the library!" >&5 $as_echo "$as_me: WARNING: your antlr parser generator is version $ANTLR_VERSION, which doesn't match the library!" >&2;} fi CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_ANTLR3_OLD_INPUT_STREAM" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of newer antlr3FileStreamNew()" >&5 $as_echo_n "checking for presence of newer antlr3FileStreamNew()... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { pANTLR3_UINT8 fName = (pANTLR3_UINT8)"foo"; pANTLR3_INPUT_STREAM input = antlr3FileStreamNew(fName, ANTLR3_ENC_8BIT); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: found it (must be antlr3 3.4 or similar)" >&5 $as_echo "found it (must be antlr3 3.4 or similar)" >&6; } if test -n "$ANTLR_VERSION" -a "$ANTLR_VERSION" != 3.4; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your antlr parser generator is version $ANTLR_VERSION, which doesn't match the library!" >&5 $as_echo "$as_me: WARNING: your antlr parser generator is version $ANTLR_VERSION, which doesn't match the library!" >&2;} fi else as_fn_error $? "cannot figure out how to create an antlr3 input stream, bailing.." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # Return the old compile variables and pop the language. LIBS="$OLD_LIBS" CPPFLAGS="$OLD_CPPFLAGS" 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 # Define the ANTLR include/libs variables # Check for user preferences for language bindings to build, and for # build support. The arg list is the default set if unspecified by # the user (the actual built set is the subset that appears to be # supported by the build host). noswig=no cvc4_build_c_bindings=no cvc4_build_java_bindings=no cvc4_build_csharp_bindings=no cvc4_build_perl_bindings=no cvc4_build_php_bindings=no cvc4_build_python_bindings=no cvc4_build_ruby_bindings=no cvc4_build_tcl_bindings=no cvc4_build_ocaml_bindings=no # Check whether --with-swig was given. if test "${with_swig+set}" = set; then : withval=$with_swig; if test "$withval" = no; then noswig=yes; else SWIG="$withval"; fi fi # Check whether --enable-language-bindings was given. if test "${enable_language_bindings+set}" = set; then : enableval=$enable_language_bindings; if test "$enableval" = yes; then cvc4_check_for_bindings=yes; try_bindings='c java'; else cvc4_check_for_bindings=no; if test "$enableval" = no; then try_bindings=; else try_bindings="$enableval"; fi; fi else cvc4_check_for_bindings=no; try_bindings= fi CVC4_LANGUAGE_BINDINGS= if test "$noswig" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: use of swig disabled by user, native API bindings disabled." >&5 $as_echo "$as_me: WARNING: use of swig disabled by user, native API bindings disabled." >&2;} SWIG= else if test -z "$SWIG"; then for ac_prog in swig swig2.0 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_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$SWIG"; then ac_cv_prog_SWIG="$SWIG" # 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_SWIG="$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 SWIG=$ac_cv_prog_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$SWIG" && break done else # Extract the first word of ""$SWIG"", so it can be a program name with args. set dummy "$SWIG"; 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_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$SWIG"; then ac_cv_prog_SWIG="$SWIG" # 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_SWIG=""$SWIG"" $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 SWIG=$ac_cv_prog_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: language bindings for native API disabled, swig not found." >&5 $as_echo "$as_me: WARNING: language bindings for native API disabled, swig not found." >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: checking compatibility with version of swig" >&5 $as_echo_n "checking compatibility with version of swig... " >&6; } cat > conftest.c << _CVC4EOF %module conftest #if !defined(SWIG_VERSION) || SWIG_VERSION < 0x020000 #error bad version #endif _CVC4EOF if $SWIG conftest.c >&5 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: compatible version" >&5 $as_echo "compatible version" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: incompatible version" >&5 $as_echo "incompatible version" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig version 2.0.0 or later is required to build native API bindings" >&5 $as_echo "$as_me: WARNING: swig version 2.0.0 or later is required to build native API bindings" >&2;} SWIG= echo '===Failed swig input was:' >&5 cat conftest.c >&5 echo '===End failed swig input' >&5 rm -f conftest.c fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for requested user language bindings" >&5 $as_echo_n "checking for requested user language bindings... " >&6; } if test "$try_bindings" = all; then try_bindings='c,c++,java' fi try_bindings=$(echo "$try_bindings" | sed 's/,/ /g') if test -z "$try_bindings"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try_bindings" >&5 $as_echo "$try_bindings" >&6; } fi CVC4_UNSUPPORTED_LANGUAGE_BINDINGS= cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_CXXFLAGS="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for binding in $try_bindings; do __cvc4_lang_supported=no if test "$binding" = "c"; then __cvc4_lang_supported=yes; fi if test "$binding" = "c++"; then __cvc4_lang_supported=yes; fi if test "$binding" = "java"; then __cvc4_lang_supported=yes; fi if test $__cvc4_lang_supported = no; then CVC4_UNSUPPORTED_LANGUAGE_BINDINGS="${CVC4_UNSUPPORTED_LANGUAGE_BINDINGS:+$CVC4_UNSUPPORTED_LANGUAGE_BINDINGS }$binding" fi binding_error=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of $binding binding" >&5 $as_echo_n "checking for availability of $binding binding... " >&6; } case "$binding" in c++) { $as_echo "$as_me:${as_lineno-$LINENO}: result: C++ is built by default" >&5 $as_echo "C++ is built by default" >&6; };; c) cvc4_build_c_bindings=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: C support will be built" >&5 $as_echo "C support will be built" >&6; };; java) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Java support will be built" >&5 $as_echo "Java support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default" if test "x$ac_cv_header_jni_h" = xyes; then : cvc4_build_java_bindings=yes else binding_error=yes fi ;; csharp) { $as_echo "$as_me:${as_lineno-$LINENO}: result: C# support will be built" >&5 $as_echo "C# support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi CPPFLAGS="$CPPFLAGS $CSHARP_CPPFLAGS" cvc4_build_csharp_bindings=yes ;; perl) { $as_echo "$as_me:${as_lineno-$LINENO}: result: perl support will be built" >&5 $as_echo "perl support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi CPPFLAGS="$CPPFLAGS $PERL_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "EXTERN.h" "ac_cv_header_EXTERN_h" "$ac_includes_default" if test "x$ac_cv_header_EXTERN_h" = xyes; then : cvc4_build_perl_bindings=yes else binding_error=yes fi ;; php) { $as_echo "$as_me:${as_lineno-$LINENO}: result: php support will be built" >&5 $as_echo "php support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi CPPFLAGS="$CPPFLAGS $PHP_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "zend.h" "ac_cv_header_zend_h" "$ac_includes_default" if test "x$ac_cv_header_zend_h" = xyes; then : cvc4_build_php_bindings=yes else binding_error=yes fi ;; python) { $as_echo "$as_me:${as_lineno-$LINENO}: result: python support will be built" >&5 $as_echo "python support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.5" >&5 $as_echo_n "checking whether $PYTHON version is >= 2.5... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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_fn_error $? "Python interpreter is too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.5" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.5... " >&6; } if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; 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_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$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 PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then binding_error=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[:3] == '2.7': can_use_sysconfig = 0 except ImportError: pass" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE cvc4_build_python_bindings=yes fi if test -z "$PYTHON_INCLUDE"; then : if test -z "$PYTHON_CONFIG"; then : for ac_prog in python$PYTHON_VERSION-config python-config 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_path_PYTHON_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON_CONFIG="$PYTHON_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_PYTHON_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 PYTHON_CONFIG=$ac_cv_path_PYTHON_CONFIG if test -n "$PYTHON_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CONFIG" >&5 $as_echo "$PYTHON_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON_CONFIG" && break done test -n "$PYTHON_CONFIG" || PYTHON_CONFIG="no " if test "$PYTHON_CONFIG" = no; then : as_fn_error $? "cannot find python-config for $PYTHON." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking python include flags" >&5 $as_echo_n "checking python include flags... " >&6; } PYTHON_CXXFLAGS=`$PYTHON_CONFIG --includes` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CXXFLAGS" >&5 $as_echo "$PYTHON_CXXFLAGS" >&6; } fi CPPFLAGS="$CPPFLAGS $PYTHON_CXXFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : cvc4_build_python_bindings=yes else binding_error=yes fi ;; ruby) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ruby support will be built" >&5 $as_echo "ruby support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi CPPFLAGS="$CPPFLAGS $RUBY_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "ruby.h" "ac_cv_header_ruby_h" "$ac_includes_default" if test "x$ac_cv_header_ruby_h" = xyes; then : cvc4_build_ruby_bindings=yes else binding_error=yes fi ;; tcl) { $as_echo "$as_me:${as_lineno-$LINENO}: result: tcl support will be built" >&5 $as_echo "tcl support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi CPPFLAGS="$CPPFLAGS $TCL_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default" if test "x$ac_cv_header_tcl_h" = xyes; then : cvc4_build_tcl_bindings=yes else binding_error=yes fi ;; ocaml) { $as_echo "$as_me:${as_lineno-$LINENO}: result: OCaml support will be built" >&5 $as_echo "OCaml support will be built" >&6; } if test -z "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&5 $as_echo "$as_me: WARNING: swig not available or incompatible version; $binding bindings require swig 2.0.0 or later" >&2;} binding_error=yes fi CPPFLAGS="$CPPFLAGS $OCAML_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "caml/misc.h" "ac_cv_header_caml_misc_h" "$ac_includes_default" if test "x$ac_cv_header_caml_misc_h" = xyes; then : cvc4_build_ocaml_bindings=yes else binding_error=yes fi if test "$binding_error" = no; then if test -z "$OCAMLC"; then for ac_prog in ocamlc 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_OCAMLC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLC"; then ac_cv_prog_OCAMLC="$OCAMLC" # 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_OCAMLC="$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 OCAMLC=$ac_cv_prog_OCAMLC if test -n "$OCAMLC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5 $as_echo "$OCAMLC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OCAMLC" && break done test -n "$OCAMLC" || OCAMLC="ocamlc" else # Extract the first word of ""$OCAMLC"", so it can be a program name with args. set dummy "$OCAMLC"; 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_OCAMLC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLC"; then ac_cv_prog_OCAMLC="$OCAMLC" # 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_OCAMLC=""$OCAMLC"" $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 OCAMLC=$ac_cv_prog_OCAMLC if test -n "$OCAMLC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5 $as_echo "$OCAMLC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$OCAMLMKTOP"; then for ac_prog in ocamlmktop 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_OCAMLMKTOP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKTOP"; then ac_cv_prog_OCAMLMKTOP="$OCAMLMKTOP" # 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_OCAMLMKTOP="$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 OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP if test -n "$OCAMLMKTOP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKTOP" >&5 $as_echo "$OCAMLMKTOP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OCAMLMKTOP" && break done test -n "$OCAMLMKTOP" || OCAMLMKTOP="ocamlmktop" else # Extract the first word of ""$OCAMLMKTOP"", so it can be a program name with args. set dummy "$OCAMLMKTOP"; 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_OCAMLMKTOP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLMKTOP"; then ac_cv_prog_OCAMLMKTOP="$OCAMLMKTOP" # 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_OCAMLMKTOP=""$OCAMLMKTOP"" $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 OCAMLMKTOP=$ac_cv_prog_OCAMLMKTOP if test -n "$OCAMLMKTOP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLMKTOP" >&5 $as_echo "$OCAMLMKTOP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$OCAMLFIND"; then for ac_prog in ocamlfind 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_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLFIND"; then ac_cv_prog_OCAMLFIND="$OCAMLFIND" # 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_OCAMLFIND="$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 OCAMLFIND=$ac_cv_prog_OCAMLFIND if test -n "$OCAMLFIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 $as_echo "$OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$OCAMLFIND" && break done test -n "$OCAMLFIND" || OCAMLFIND="ocamlfind" else # Extract the first word of ""$OCAMLFIND"", so it can be a program name with args. set dummy "$OCAMLFIND"; 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_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OCAMLFIND"; then ac_cv_prog_OCAMLFIND="$OCAMLFIND" # 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_OCAMLFIND=""$OCAMLFIND"" $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 OCAMLFIND=$ac_cv_prog_OCAMLFIND if test -n "$OCAMLFIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 $as_echo "$OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CAMLP4O"; then for ac_prog in camlp4o 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_CAMLP4O+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CAMLP4O"; then ac_cv_prog_CAMLP4O="$CAMLP4O" # 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_CAMLP4O="$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 CAMLP4O=$ac_cv_prog_CAMLP4O if test -n "$CAMLP4O"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4O" >&5 $as_echo "$CAMLP4O" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CAMLP4O" && break done test -n "$CAMLP4O" || CAMLP4O="camlp4o" else # Extract the first word of ""$CAMLP4O"", so it can be a program name with args. set dummy "$CAMLP4O"; 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_CAMLP4O+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CAMLP4O"; then ac_cv_prog_CAMLP4O="$CAMLP4O" # 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_CAMLP4O=""$CAMLP4O"" $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 CAMLP4O=$ac_cv_prog_CAMLP4O if test -n "$CAMLP4O"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAMLP4O" >&5 $as_echo "$CAMLP4O" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown binding" >&5 $as_echo "unknown binding" >&6; }; binding_error=yes;; esac if test "$binding_error" = yes; then if test "$cvc4_check_for_bindings" = no; then as_fn_error $? "Language binding \`$binding' requested by user, but it cannot be built (the preceding few lines should give an indication why this is)." "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Language binding \`$binding' cannot be built (the preceding few lines should give an indication why this is)." >&5 $as_echo "$as_me: WARNING: Language binding \`$binding' cannot be built (the preceding few lines should give an indication why this is)." >&2;} fi else CVC4_LANGUAGE_BINDINGS="${CVC4_LANGUAGE_BINDINGS:+$CVC4_LANGUAGE_BINDINGS }$binding" 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 CXXFLAGS="$cvc4_save_CXXFLAGS" CPPFLAGS="$cvc4_save_CPPFLAGS" done if test "$SWIG"; then CVC4_HAS_SWIG_TRUE= CVC4_HAS_SWIG_FALSE='#' else CVC4_HAS_SWIG_TRUE='#' CVC4_HAS_SWIG_FALSE= fi if test "$cvc4_build_c_bindings" = yes; then CVC4_LANGUAGE_BINDING_C_TRUE= CVC4_LANGUAGE_BINDING_C_FALSE='#' else CVC4_LANGUAGE_BINDING_C_TRUE='#' CVC4_LANGUAGE_BINDING_C_FALSE= fi if test "$cvc4_build_java_bindings" = yes; then CVC4_LANGUAGE_BINDING_JAVA_TRUE= CVC4_LANGUAGE_BINDING_JAVA_FALSE='#' else CVC4_LANGUAGE_BINDING_JAVA_TRUE='#' CVC4_LANGUAGE_BINDING_JAVA_FALSE= fi if test "$cvc4_build_csharp_bindings" = yes; then CVC4_LANGUAGE_BINDING_CSHARP_TRUE= CVC4_LANGUAGE_BINDING_CSHARP_FALSE='#' else CVC4_LANGUAGE_BINDING_CSHARP_TRUE='#' CVC4_LANGUAGE_BINDING_CSHARP_FALSE= fi if test "$cvc4_build_perl_bindings" = yes; then CVC4_LANGUAGE_BINDING_PERL_TRUE= CVC4_LANGUAGE_BINDING_PERL_FALSE='#' else CVC4_LANGUAGE_BINDING_PERL_TRUE='#' CVC4_LANGUAGE_BINDING_PERL_FALSE= fi if test "$cvc4_build_php_bindings" = yes; then CVC4_LANGUAGE_BINDING_PHP_TRUE= CVC4_LANGUAGE_BINDING_PHP_FALSE='#' else CVC4_LANGUAGE_BINDING_PHP_TRUE='#' CVC4_LANGUAGE_BINDING_PHP_FALSE= fi if test "$cvc4_build_python_bindings" = yes; then CVC4_LANGUAGE_BINDING_PYTHON_TRUE= CVC4_LANGUAGE_BINDING_PYTHON_FALSE='#' else CVC4_LANGUAGE_BINDING_PYTHON_TRUE='#' CVC4_LANGUAGE_BINDING_PYTHON_FALSE= fi if test "$cvc4_build_ruby_bindings" = yes; then CVC4_LANGUAGE_BINDING_RUBY_TRUE= CVC4_LANGUAGE_BINDING_RUBY_FALSE='#' else CVC4_LANGUAGE_BINDING_RUBY_TRUE='#' CVC4_LANGUAGE_BINDING_RUBY_FALSE= fi if test "$cvc4_build_tcl_bindings" = yes; then CVC4_LANGUAGE_BINDING_TCL_TRUE= CVC4_LANGUAGE_BINDING_TCL_FALSE='#' else CVC4_LANGUAGE_BINDING_TCL_TRUE='#' CVC4_LANGUAGE_BINDING_TCL_FALSE= fi if test "$cvc4_build_ocaml_bindings" = yes; then CVC4_LANGUAGE_BINDING_OCAML_TRUE= CVC4_LANGUAGE_BINDING_OCAML_FALSE='#' else CVC4_LANGUAGE_BINDING_OCAML_TRUE='#' CVC4_LANGUAGE_BINDING_OCAML_FALSE= fi # Checks for header files and their contents. for ac_header in getopt.h unistd.h ext/stdio_filebuf.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 # Checks for typedefs, structures, and compiler characteristics. #AC_HEADER_STDBOOL # these are bad macros, they clash with system header !! #AC_TYPE_UINT16_T #AC_TYPE_UINT32_T #AC_TYPE_UINT64_T #AC_TYPE_SIZE_T # guard against double-inclusion of the autoheader ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include " if test "x$ac_cv_have_decl_optreset" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_OPTRESET $ac_have_decl _ACEOF # check with which standard strerror_r() complies ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR_R $ac_have_decl _ACEOF for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); char *p = strerror_r (0, buf, sizeof buf); return !p || x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else # strerror_r is not declared. Choose between # systems that have relatively inaccessible declarations for the # function. BeOS and DEC UNIX 4.0 fall in this category, but the # former has a strerror_r that returns char*, while the latter # has a strerror_r that returns `int'. # This test should segfault on the DEC system. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default extern char *strerror_r (); int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); return ! isalpha (x); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes 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_func_strerror_r_char_p" >&5 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h fi # is is_sorted() in std or __gnu_cxx? { $as_echo "$as_me:${as_lineno-$LINENO}: checking where we can find is_sorted" >&5 $as_echo_n "checking where we can find is_sorted... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu is_sorted_result= cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { std::is_sorted((int*)0L, (int*)0L); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : is_sorted_result=std else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { __gnu_cxx::is_sorted((int*)0L, (int*)0L); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : is_sorted_result=__gnu_cxx 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 find std::is_sorted() or __gnu_cxx::is_sorted() See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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}: result: $is_sorted_result" >&5 $as_echo "$is_sorted_result" >&6; } if test "$is_sorted_result" = __gnu_cxx; then is_sorted_result=1; else is_sorted_result=0; fi cat >>confdefs.h <<_ACEOF #define IS_SORTED_IN_GNUCXX_NAMESPACE $is_sorted_result _ACEOF # require boost library echo "$as_me: this is boost.m4 serial 16" >&5 boost_save_IFS=$IFS boost_version_req= IFS=. set x $boost_version_req 0 0 0 IFS=$boost_save_IFS shift boost_version_req=`expr "$1" '*' 100000 + "$2" '*' 100 + "$3"` boost_version_req_string=$1.$2.$3 # Check whether --with-boost was given. if test "${with_boost+set}" = set; then : withval=$with_boost; fi # If BOOST_ROOT is set and the user has not provided a value to # --with-boost, then treat BOOST_ROOT as if it the user supplied it. if test x"$BOOST_ROOT" != x; then if test x"$with_boost" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&5 $as_echo "$as_me: Detected BOOST_ROOT; continuing with --with-boost=$BOOST_ROOT" >&6;} with_boost=$BOOST_ROOT else { $as_echo "$as_me:${as_lineno-$LINENO}: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&5 $as_echo "$as_me: Detected BOOST_ROOT=$BOOST_ROOT, but overridden by --with-boost=$with_boost" >&6;} fi fi DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'" boost_save_CPPFLAGS=$CPPFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost headers version >= $boost_version_req_string" >&5 $as_echo_n "checking for Boost headers version >= $boost_version_req_string... " >&6; } if ${boost_cv_inc_path+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_inc_path=no ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined BOOST_VERSION # error BOOST_VERSION is not defined #elif BOOST_VERSION < $boost_version_req # error Boost headers version < $boost_version_req #endif int main () { ; return 0; } _ACEOF # If the user provided a value to --with-boost, use it and only it. case $with_boost in #( ''|yes) set x '' /opt/local/include /usr/local/include /opt/include \ /usr/include C:/Boost/include;; #( *) set x "$with_boost/include" "$with_boost";; esac shift for boost_dir do # Without --layout=system, Boost (or at least some versions) installs # itself in /include/boost-. This inner loop helps to # find headers in such directories. # # Any ${boost_dir}/boost-x_xx directories are searched in reverse version # order followed by ${boost_dir}. The final '.' is a sentinel for # searching $boost_dir" itself. Entries are whitespace separated. # # I didn't indent this loop on purpose (to avoid over-indented code) boost_layout_system_search_list=`cd "$boost_dir" 2>/dev/null \ && ls -1 | "${GREP}" '^boost-' | sort -rn -t- -k2 \ && echo .` for boost_inc in $boost_layout_system_search_list do if test x"$boost_inc" != x.; then boost_inc="$boost_dir/$boost_inc" else boost_inc="$boost_dir" # Uses sentinel in boost_layout_system_search_list fi if test x"$boost_inc" != x; then # We are going to check whether the version of Boost installed # in $boost_inc is usable by running a compilation that # #includes it. But if we pass a -I/some/path in which Boost # is not installed, the compiler will just skip this -I and # use other locations (either from CPPFLAGS, or from its list # of system include directories). As a result we would use # header installed on the machine instead of the /some/path # specified by the user. So in that precise case (trying # $boost_inc), make sure the version.hpp exists. # # Use test -e as there can be symlinks. test -e "$boost_inc/boost/version.hpp" || continue CPPFLAGS="$CPPFLAGS -I$boost_inc" fi if ac_fn_cxx_try_compile "$LINENO"; then : boost_cv_inc_path=yes else boost_cv_version=no fi rm -f core conftest.err conftest.$ac_objext if test x"$boost_cv_inc_path" = xyes; then if test x"$boost_inc" != x; then boost_cv_inc_path=$boost_inc fi break 2 fi done 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_inc_path" >&5 $as_echo "$boost_cv_inc_path" >&6; } case $boost_cv_inc_path in #( no) boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" as_fn_error $? "$boost_errmsg" "$LINENO" 5 ;;#( yes) BOOST_CPPFLAGS= ;;#( *) BOOST_CPPFLAGS="-I$boost_cv_inc_path" ;; esac if test x"$boost_cv_inc_path" != xno; then $as_echo "#define HAVE_BOOST 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boost's header version" >&5 $as_echo_n "checking for Boost's header version... " >&6; } if ${boost_cv_lib_version+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include boost-lib-version = BOOST_LIB_VERSION _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | grep -v "^#" | tr -d '\r\n ' | $SED -n -e "/^boost-lib-version=/{s///;s/\"//g;p;q;}" >conftest.i 2>&1; then : boost_cv_lib_version=`cat conftest.i` fi rm -rf conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_version" >&5 $as_echo "$boost_cv_lib_version" >&6; } # e.g. "134" for 1_34_1 or "135" for 1_35 boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` case $boost_major_version in #( '' | *[!0-9]*) as_fn_error $? "invalid value: boost_major_version=$boost_major_version" "$LINENO" 5 ;; esac fi CPPFLAGS=$boost_save_CPPFLAGS # look for boost threading library # Check whether --with-portfolio was given. if test "${with_portfolio+set}" = set; then : withval=$with_portfolio; fi cvc4_save_LDFLAGS="$LDFLAGS" if test "$enable_static_binary" = yes; then LDFLAGS="-static $LDFLAGS" fi cvc4_has_threads=yes # Check whether --enable-thread-support was given. if test "${enable_thread_support+set}" = set; then : enableval=$enable_thread_support; fi if test "$enable_thread_support" = no; then cvc4_has_threads=no if test "$with_portfolio" = yes; then as_fn_error $? "user gave both --with-portfolio and --disable-thread-support, which are contradictory" "$LINENO" 5 fi else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the flags needed to use pthreads" >&5 $as_echo_n "checking for the flags needed to use pthreads... " >&6; } if ${boost_cv_pthread_flag+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_pthread_flag= # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # (none): in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -lpthreads: AIX (must check this before -lpthread) # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads) # -pthreads: Solaris/GCC # -mthreads: MinGW32/GCC, Lynx/GCC # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # -lpthread: GNU Linux, etc. # --thread-safe: KAI C++ case $host_os in #( *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: boost_pthread_flags="-pthreads -lpthread -mt -pthread";; #( *) boost_pthread_flags="-lpthreads -Kthread -kthread -llthread -pthread \ -pthreads -mthreads -lpthread --thread-safe -mt";; esac # Generate the test file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF for boost_pthread_flag in '' $boost_pthread_flags; do boost_pthread_ok=false boost_pthreads__save_LIBS=$LIBS LIBS="$LIBS $boost_pthread_flag" if ac_fn_cxx_try_link "$LINENO"; then : if grep ".*$boost_pthread_flag" conftest.err; then echo "This flag seems to have triggered warnings" >&5 else boost_pthread_ok=:; boost_cv_pthread_flag=$boost_pthread_flag fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext LIBS=$boost_pthreads__save_LIBS $boost_pthread_ok && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_pthread_flag" >&5 $as_echo "$boost_cv_pthread_flag" >&6; } 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 the toolset name used by Boost for $CXX" >&5 $as_echo_n "checking for the toolset name used by Boost for $CXX... " >&6; } if ${boost_cv_lib_tag+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_lib_tag=unknown if test x$boost_cv_inc_path != xno; 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 # The following tests are mostly inspired by boost/config/auto_link.hpp # The list is sorted to most recent/common to oldest compiler (in order # to increase the likelihood of finding the right compiler with the # least number of compilation attempt). # Beware that some tests are sensible to the order (for instance, we must # look for MinGW before looking for GCC3). # I used one compilation test per compiler with a #error to recognize # each compiler so that it works even when cross-compiling (let me know # if you know a better approach). # Known missing tags (known from Boost's tools/build/v2/tools/common.jam): # como, edg, kcc, bck, mp, sw, tru, xlc # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines # the same defines as GCC's). for i in \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 8 && !defined __ICC @ gcc48" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 7 && !defined __ICC @ gcc47" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 6 && !defined __ICC @ gcc46" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 5 && !defined __ICC @ gcc45" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 4 && !defined __ICC @ gcc44" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc43" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc42" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc41" \ "defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc40" \ "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 4 && !defined __ICC @ gcc34" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 3 && !defined __ICC @ gcc33" \ "defined _MSC_VER && _MSC_VER >= 1500 @ vc90" \ "defined _MSC_VER && _MSC_VER == 1400 @ vc80" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 2 && !defined __ICC @ gcc32" \ "defined _MSC_VER && _MSC_VER == 1310 @ vc71" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 1 && !defined __ICC @ gcc31" \ "defined __GNUC__ && __GNUC__ == 3 && __GNUC_MINOR__ == 0 && !defined __ICC @ gcc30" \ "defined __BORLANDC__ @ bcb" \ "defined __ICC && (defined __unix || defined ) @ il" \ "defined __ICL @ iw" \ "defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ "defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ == 95 && !defined __ICC @ gcc295" \ "defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ "defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ "defined _MSC_VER && _MSC_VER < 1300 && defined UNDER_CE @ evc4" \ "defined __MWERKS__ && __MWERKS__ <= 0x31FF @ cw8" do boost_tag_test=`expr "X$i" : 'X\([^@]*\) @ '` boost_tag=`expr "X$i" : 'X[^@]* @ \(.*\)'` cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if $boost_tag_test /* OK */ #else # error $boost_tag_test #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : boost_cv_lib_tag=$boost_tag; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 case $boost_cv_lib_tag in #( # Some newer (>= 1.35?) versions of Boost seem to only use "gcc" as opposed # to "gcc41" for instance. *-gcc | *'-gcc ') :;; #( Don't re-add -gcc: it's already in there. gcc*) boost_tag_x= case $host_os in #( darwin*) if test $boost_major_version -ge 136; then # The `x' added in r46793 of Boost. boost_tag_x=x fi;; esac # We can specify multiple tags in this variable because it's used by # BOOST_FIND_LIB that does a `for tag in -$boost_cv_lib_tag' ... boost_cv_lib_tag="$boost_tag_x$boost_cv_lib_tag -${boost_tag_x}gcc" ;; #( unknown) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not figure out which toolset name to use for $CXX" >&5 $as_echo "$as_me: WARNING: could not figure out which toolset name to use for $CXX" >&2;} boost_cv_lib_tag= ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_tag" >&5 $as_echo "$boost_cv_lib_tag" >&6; } # Check whether --enable-static-boost was given. if test "${enable_static_boost+set}" = set; then : enableval=$enable_static_boost; enable_static_boost=yes else enable_static_boost=no fi # Check whether we do better use `mt' even though we weren't ask to. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _REENTRANT || defined _MT || defined __MT__ /* use -mt */ #else # error MT not needed #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : boost_guess_use_mt=: else boost_guess_use_mt=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext boost_threads_save_LIBS=$LIBS boost_threads_save_LDFLAGS=$LDFLAGS boost_threads_save_CPPFLAGS=$CPPFLAGS # Link-time dependency from thread to system was added as of 1.49.0. if test $boost_major_version -ge 149; then if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost system library" >&5 $as_echo "$as_me: Boost not available, not searching for the Boost system library" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&5 $as_echo "$as_me: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&2;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/system/error_code.hpp" "ac_cv_header_boost_system_error_code_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_system_error_code_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_SYSTEM_ERROR_CODE_HPP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&5 $as_echo "$as_me: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&2;} fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # Now let's try to find the library. The algorithm is as follows: first look # for a given library name according to the user's PREFERRED-RT-OPT. For each # library name, we prefer to use the ones that carry the tag (toolset name). # Each library is searched through the various standard paths were Boost is # usually installed. If we can't find the standard variants, we try to # enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist # but there's -obviously- libboost_threads-mt.dylib). { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Boost system library" >&5 $as_echo_n "checking for the Boost system library... " >&6; } if ${boost_cv_lib_system+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_lib_system=no case "" in #( mt | mt-) boost_mt=-mt; boost_rtopt=;; #( mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #( *) boost_mt=; boost_rtopt=;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( *d*) boost_rt_d=$boost_rtopt;; #( *[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( *) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5 boost_save_ac_objext=$ac_objext # Generate the test file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { boost::system::error_code e; e.clear(); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_objext=do_not_rm_me_plz else { $as_echo "$as_me:${as_lineno-$LINENO}: cannot compile a test that uses Boost system" >&5 $as_echo "$as_me: cannot compile a test that uses Boost system" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&5 $as_echo "$as_me: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&2;} fi rm -f core conftest.err conftest.$ac_objext ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the 6 nested for loops, only the 2 innermost ones # matter. for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_system$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_system$boost_tag_$boost_rtopt_$boost_ver_ \ boost_system$boost_tag_$boost_mt_$boost_ver_ \ boost_system$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( *@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do test -e "$boost_ldpath" || continue boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) boost_cv_lib_system_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$boost_cv_lib_system_LIBS" || continue;; #( *) # No: use -lboost_foo to find the shared library. boost_cv_lib_system_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$boost_cv_lib_system_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && $as_echo "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5 if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_executable_p conftest$ac_exeext }; then : boost_cv_lib_system=yes else if $boost_use_source; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi boost_cv_lib_system=no fi ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$boost_cv_lib_system" = xyes; then boost_cv_lib_system_LDFLAGS="-L$boost_ldpath -Wl,-rpath -Wl,$boost_ldpath" boost_cv_lib_system_LDPATH="$boost_ldpath" break 6 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done rm -f conftest.$ac_objext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_system" >&5 $as_echo "$boost_cv_lib_system" >&6; } case $boost_cv_lib_system in #(( no) $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: cannot find the flags to link with Boost system" >&5 $as_echo "$as_me: cannot find the flags to link with Boost system" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&5 $as_echo "$as_me: WARNING: Boost system library (libboost-system) not installed or unusable; this may lead to problems with using threads. It is recommended that you install your distribution's libboost-system development package (probably named libboost-system###-dev, or boost-system-devel, or something like that)." >&2;} ;; *) BOOST_SYSTEM_LDFLAGS=$boost_cv_lib_system_LDFLAGS BOOST_SYSTEM_LDPATH=$boost_cv_lib_system_LDPATH BOOST_LDPATH=$boost_cv_lib_system_LDPATH BOOST_SYSTEM_LIBS=$boost_cv_lib_system_LIBS ;; esac CPPFLAGS=$boost_save_CPPFLAGS 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 fi # end of the Boost.System check. LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" # Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, # boost/thread.hpp will trigger a #error if -pthread isn't used: # boost/config/requires_threads.hpp:47:5: #error "Compiler threading support # is not turned on. Please set the correct command line options for # threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" # When compiling for the Windows platform, the threads library is named # differently. case $host_os in (*mingw*) if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost thread_win32 library" >&5 $as_echo "$as_me: Boost not available, not searching for the Boost thread_win32 library" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/thread.hpp" "ac_cv_header_boost_thread_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_thread_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_THREAD_HPP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # Now let's try to find the library. The algorithm is as follows: first look # for a given library name according to the user's PREFERRED-RT-OPT. For each # library name, we prefer to use the ones that carry the tag (toolset name). # Each library is searched through the various standard paths were Boost is # usually installed. If we can't find the standard variants, we try to # enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist # but there's -obviously- libboost_threads-mt.dylib). { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Boost thread_win32 library" >&5 $as_echo_n "checking for the Boost thread_win32 library... " >&6; } if ${boost_cv_lib_thread_win32+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_lib_thread_win32=no case "" in #( mt | mt-) boost_mt=-mt; boost_rtopt=;; #( mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #( *) boost_mt=; boost_rtopt=;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( *d*) boost_rt_d=$boost_rtopt;; #( *[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( *) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5 boost_save_ac_objext=$ac_objext # Generate the test file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { boost::thread t; boost::mutex m; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_objext=do_not_rm_me_plz else { $as_echo "$as_me:${as_lineno-$LINENO}: cannot compile a test that uses Boost thread_win32" >&5 $as_echo "$as_me: cannot compile a test that uses Boost thread_win32" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no fi rm -f core conftest.err conftest.$ac_objext ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the 6 nested for loops, only the 2 innermost ones # matter. for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_thread_win32$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_thread_win32$boost_tag_$boost_rtopt_$boost_ver_ \ boost_thread_win32$boost_tag_$boost_mt_$boost_ver_ \ boost_thread_win32$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( *@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do test -e "$boost_ldpath" || continue boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) boost_cv_lib_thread_win32_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$boost_cv_lib_thread_win32_LIBS" || continue;; #( *) # No: use -lboost_foo to find the shared library. boost_cv_lib_thread_win32_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$boost_cv_lib_thread_win32_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && $as_echo "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5 if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_executable_p conftest$ac_exeext }; then : boost_cv_lib_thread_win32=yes else if $boost_use_source; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi boost_cv_lib_thread_win32=no fi ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$boost_cv_lib_thread_win32" = xyes; then boost_cv_lib_thread_win32_LDFLAGS="-L$boost_ldpath -Wl,-rpath -Wl,$boost_ldpath" boost_cv_lib_thread_win32_LDPATH="$boost_ldpath" break 6 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done rm -f conftest.$ac_objext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_thread_win32" >&5 $as_echo "$boost_cv_lib_thread_win32" >&6; } case $boost_cv_lib_thread_win32 in #(( no) $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: cannot find the flags to link with Boost thread_win32" >&5 $as_echo "$as_me: cannot find the flags to link with Boost thread_win32" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no ;; *) BOOST_THREAD_WIN32_LDFLAGS=$boost_cv_lib_thread_win32_LDFLAGS BOOST_THREAD_WIN32_LDPATH=$boost_cv_lib_thread_win32_LDPATH BOOST_LDPATH=$boost_cv_lib_thread_win32_LDPATH BOOST_THREAD_WIN32_LIBS=$boost_cv_lib_thread_win32_LIBS ;; esac CPPFLAGS=$boost_save_CPPFLAGS 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 BOOST_THREAD_LDFLAGS=$BOOST_THREAD_WIN32_LDFLAGS BOOST_THREAD_LDPATH=$BOOST_THREAD_WIN32_LDPATH BOOST_THREAD_LIBS=$BOOST_THREAD_WIN32_LIBS ;; (*) if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: Boost not available, not searching for the Boost thread library" >&5 $as_echo "$as_me: Boost not available, not searching for the Boost thread library" >&6;} else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test x"$boost_cv_inc_path" = xno; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" ac_fn_cxx_check_header_mongrel "$LINENO" "boost/thread.hpp" "ac_cv_header_boost_thread_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_thread_hpp" = xyes; then : $as_echo "#define HAVE_BOOST_THREAD_HPP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no fi CPPFLAGS=$boost_save_CPPFLAGS ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi boost_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # Now let's try to find the library. The algorithm is as follows: first look # for a given library name according to the user's PREFERRED-RT-OPT. For each # library name, we prefer to use the ones that carry the tag (toolset name). # Each library is searched through the various standard paths were Boost is # usually installed. If we can't find the standard variants, we try to # enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist # but there's -obviously- libboost_threads-mt.dylib). { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Boost thread library" >&5 $as_echo_n "checking for the Boost thread library... " >&6; } if ${boost_cv_lib_thread+:} false; then : $as_echo_n "(cached) " >&6 else boost_cv_lib_thread=no case "" in #( mt | mt-) boost_mt=-mt; boost_rtopt=;; #( mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X" : 'Xmt-*\(.*\)'`;; #( *) boost_mt=; boost_rtopt=;; esac if test $enable_static_boost = yes; then boost_rtopt="s$boost_rtopt" fi # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( *d*) boost_rt_d=$boost_rtopt;; #( *[sgpn]*) # Insert the `d' at the right place (in between `sg' and `pn') boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( *) boost_rt_d='-d';; esac # If the PREFERRED-RT-OPT are not empty, prepend a `-'. test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. test -z "$libext" && as_fn_error $? "the libext variable is empty, did you invoke Libtool?" "$LINENO" 5 boost_save_ac_objext=$ac_objext # Generate the test file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { boost::thread t; boost::mutex m; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_objext=do_not_rm_me_plz else { $as_echo "$as_me:${as_lineno-$LINENO}: cannot compile a test that uses Boost thread" >&5 $as_echo "$as_me: cannot compile a test that uses Boost thread" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no fi rm -f core conftest.err conftest.$ac_objext ac_objext=$boost_save_ac_objext boost_failed_libs= # Don't bother to ident the 6 nested for loops, only the 2 innermost ones # matter. for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do for boost_rtopt_ in $boost_rtopt '' -d; do for boost_lib in \ boost_thread$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ boost_thread$boost_tag_$boost_rtopt_$boost_ver_ \ boost_thread$boost_tag_$boost_mt_$boost_ver_ \ boost_thread$boost_tag_$boost_ver_ do # Avoid testing twice the same lib case $boost_failed_libs in #( *@$boost_lib@*) continue;; esac # If with_boost is empty, we'll search in /lib first, which is not quite # right so instead we'll try to a location based on where the headers are. boost_tmp_lib=$with_boost test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} for boost_ldpath in "$boost_tmp_lib/lib" '' \ /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ "$with_boost" C:/Boost/lib /lib* do test -e "$boost_ldpath" || continue boost_save_LDFLAGS=$LDFLAGS # Are we looking for a static library? case $boost_ldpath:$boost_rtopt_ in #( *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) boost_cv_lib_thread_LIBS="$boost_ldpath/lib$boost_lib.$libext" test -e "$boost_cv_lib_thread_LIBS" || continue;; #( *) # No: use -lboost_foo to find the shared library. boost_cv_lib_thread_LIBS="-l$boost_lib";; esac boost_save_LIBS=$LIBS LIBS="$boost_cv_lib_thread_LIBS $LIBS" test x"$boost_ldpath" != x && LDFLAGS="$LDFLAGS -L$boost_ldpath" rm -f conftest$ac_exeext boost_save_ac_ext=$ac_ext boost_use_source=: # If we already have a .o, re-use it. We change $ac_ext so that $ac_link # tries to link the existing object file instead of compiling from source. test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && $as_echo "$as_me:${as_lineno-$LINENO}: re-using the existing conftest.$ac_objext" >&5 if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_executable_p conftest$ac_exeext }; then : boost_cv_lib_thread=yes else if $boost_use_source; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi boost_cv_lib_thread=no fi ac_objext=$boost_save_ac_objext ac_ext=$boost_save_ac_ext rm -f core conftest.err conftest_ipa8_conftest.oo \ conftest$ac_exeext ac_objext=$boost_save_ac_objext LDFLAGS=$boost_save_LDFLAGS LIBS=$boost_save_LIBS if test x"$boost_cv_lib_thread" = xyes; then boost_cv_lib_thread_LDFLAGS="-L$boost_ldpath -Wl,-rpath -Wl,$boost_ldpath" boost_cv_lib_thread_LDPATH="$boost_ldpath" break 6 else boost_failed_libs="$boost_failed_libs@$boost_lib@" fi done done done done done done rm -f conftest.$ac_objext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boost_cv_lib_thread" >&5 $as_echo "$boost_cv_lib_thread" >&6; } case $boost_cv_lib_thread in #(( no) $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: cannot find the flags to link with Boost thread" >&5 $as_echo "$as_me: cannot find the flags to link with Boost thread" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling multithreaded support" >&5 $as_echo "$as_me: WARNING: disabling multithreaded support" >&2;} cvc4_has_threads=no ;; *) BOOST_THREAD_LDFLAGS=$boost_cv_lib_thread_LDFLAGS BOOST_THREAD_LDPATH=$boost_cv_lib_thread_LDPATH BOOST_LDPATH=$boost_cv_lib_thread_LDPATH BOOST_THREAD_LIBS=$boost_cv_lib_thread_LIBS ;; esac CPPFLAGS=$boost_save_CPPFLAGS 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 ;; esac BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS" BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" LIBS=$boost_threads_save_LIBS LDFLAGS=$boost_threads_save_LDFLAGS CPPFLAGS=$boost_threads_save_CPPFLAGS fi LDFLAGS="$cvc4_save_LDFLAGS" if test $cvc4_has_threads = no; then if test "$enable_thread_support" = yes; then as_fn_error $? "user gave --enable-thread-support but could not build with threads; maybe boost threading library is missing?" "$LINENO" 5 fi if test "$with_portfolio" = yes; then as_fn_error $? "user gave --with-portfolio but could not build with threads; maybe boost threading library is missing?" "$LINENO" 5 fi with_portfolio=no fi if test "$with_portfolio" != yes; then with_portfolio=no fi if test "$with_portfolio" = yes; then CVC4_BUILD_PCVC4_TRUE= CVC4_BUILD_PCVC4_FALSE='#' else CVC4_BUILD_PCVC4_TRUE='#' CVC4_BUILD_PCVC4_FALSE= fi if test "$with_portfolio" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PORTFOLIO" # see if Boost has thread attributes (should be any version >= 1.50.0) # non-fatal error if not, but we won't support --thread-stack option { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Boost threads support thread attrs" >&5 $as_echo_n "checking whether Boost threads support thread attrs... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" LIBS="$LIBS $BOOST_THREAD_LIBS" LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { boost::thread::attributes attrs; attrs.set_stack_size(10 * 1024 * 1024); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cvc4_boost_has_thread_attr=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else cvc4_boost_has_thread_attr=0; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS="$cvc4_save_CPPFLAGS" LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 cvc4_boost_has_thread_attr=0 fi cat >>confdefs.h <<_ACEOF #define BOOST_HAS_THREAD_ATTR $cvc4_boost_has_thread_attr _ACEOF # Check for libreadline (defined in config/readline.m4) # Check whether --with-readline was given. if test "${with_readline+set}" = set; then : withval=$with_readline; else with_readline=check fi # make the flags as close as possible to the final flags, because the Boost # flags can bring in a different, incompatible readline library than we'd # get otherwise (e.g. on Mac, where there are commonly two different readlines, # one in /usr and one in /opt/local) cvc4_rlcheck_save_CPPFLAGS="$CPPFLAGS" cvc4_rlcheck_save_CXXFLAGS="$CXXFLAGS" cvc4_rlcheck_save_CFLAGS="$CFLAGS" cvc4_rlcheck_save_LDFLAGS="$LDFLAGS" CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }${BOOST_CPPFLAGS:+$BOOST_CPPFLAGS }$CVC4CPPFLAGS" CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$CVC4CXXFLAGS $WNO_DEPRECATED" CFLAGS="${CFLAGS:+$CFLAGS }$CVC4CFLAGS $C_WNO_DEPRECATED -fexceptions" LDFLAGS="${LDFLAGS:+$LDFLAGS }$CVC4LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether user requested readline support" >&5 $as_echo_n "checking whether user requested readline support... " >&6; } LIBREADLINE= have_libreadline=0 readline_compentry_func_returns_charp=0 READLINE_LIBS= if test "$with_readline" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, readline disabled by user" >&5 $as_echo "no, readline disabled by user" >&6; } elif test "$with_readline" = check -a "$CVC4_BSD_LICENSED_CODE_ONLY" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using BSD-compatible dependences only" >&5 $as_echo "no, using BSD-compatible dependences only" >&6; } with_readline=no else if test "$with_readline" = check; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no preference by user, will auto-detect" >&5 $as_echo "no preference by user, will auto-detect" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, readline enabled by user" >&5 $as_echo "yes, readline enabled by user" >&6; } fi READLINE_LIBS= if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline " fi fi fi if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -ltinfo $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline -ltinfo" fi fi fi if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -ltermcap $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline -ltermcap" fi fi fi if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -ltermcap -ltinfo $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline -ltermcap -ltinfo" fi fi fi if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -lncurses -ltermcap $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline -lncurses -ltermcap" fi fi fi if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -lncurses -ltermcap -ltinfo $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline -lncurses -ltermcap -ltinfo" fi fi fi if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -lcurses -ltermcap $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline -lcurses -ltermcap" fi fi fi if test -z "$READLINE_LIBS"; then unset ac_cv_lib_readline_readline { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline -lcurses -ltermcap -ltinfo $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 readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=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_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes; then : READLINE_LIBS="-lreadline -lcurses -ltermcap -ltinfo" fi fi fi if test -z "$READLINE_LIBS"; then if test "$with_readline" != check; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot find libreadline! (or can't get it to work) See \`config.log' for more details" "$LINENO" 5; } fi with_readline=no else # make sure it works in static builds, too if test "$enable_static_binary" = yes; then READLINE_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether statically-linked readline is functional" >&5 $as_echo_n "checking whether statically-linked readline is functional... " >&6; } if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline " fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline -ltinfo" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline -ltinfo" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline -ltermcap" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline -ltermcap" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline -ltermcap -ltinfo" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline -ltermcap -ltinfo" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline -lncurses -ltermcap" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline -lncurses -ltermcap" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline -lncurses -ltermcap -ltinfo" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline -lncurses -ltermcap -ltinfo" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline -lcurses -ltermcap" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline -lcurses -ltermcap" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -z "$READLINE_LIBS"; 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 cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" LIBS="-lreadline -lcurses -ltermcap -ltinfo" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { readline("") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : READLINE_LIBS="-lreadline -lcurses -ltermcap -ltinfo" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" 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 if test -n "$READLINE_LIBS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, it works" >&5 $as_echo "yes, it works" >&6; } with_readline=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$with_readline" != check; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "readline installation appears incompatible with static-binary See \`config.log' for more details" "$LINENO" 5; } fi with_readline=no fi else with_readline=yes fi fi if test "$with_readline" = yes; then have_libreadline=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of rl_completion_entry_function" >&5 $as_echo_n "checking for type of rl_completion_entry_function... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include char* foo(const char*, int) { return (char*)0; } int main () { rl_completion_entry_function = foo; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: char* (*)(const char*, int)" >&5 $as_echo "char* (*)(const char*, int)" >&6; } readline_compentry_func_returns_charp=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Function" >&5 $as_echo "Function" >&6; } fi rm -f core conftest.err conftest.$ac_objext 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 else have_libreadline=0 READLINE_LIBS= fi fi CPPFLAGS="$cvc4_rlcheck_save_CPPFLAGS" CXXFLAGS="$cvc4_rlcheck_save_CXXFLAGS" CFLAGS="$cvc4_rlcheck_save_CFLAGS" LDFLAGS="$cvc4_rlcheck_save_LDFLAGS" cat >>confdefs.h <<_ACEOF #define HAVE_LIBREADLINE $have_libreadline _ACEOF cat >>confdefs.h <<_ACEOF #define READLINE_COMPENTRY_FUNC_RETURNS_CHARP $readline_compentry_func_returns_charp _ACEOF # Whether to build compatibility library CVC4_BUILD_LIBCOMPAT=yes # Check whether --with-compat was given. if test "${with_compat+set}" = set; then : withval=$with_compat; if test "$withval" = no; then CVC4_BUILD_LIBCOMPAT=no; fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build compatibility library (CVC3 API layer)" >&5 $as_echo_n "checking whether to build compatibility library (CVC3 API layer)... " >&6; } if test "$CVC4_BUILD_LIBCOMPAT" = 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, disabled by user" >&5 $as_echo "no, disabled by user" >&6; } fi if test "$CVC4_BUILD_LIBCOMPAT" = yes; then CVC4_BUILD_LIBCOMPAT_TRUE= CVC4_BUILD_LIBCOMPAT_FALSE='#' else CVC4_BUILD_LIBCOMPAT_TRUE='#' CVC4_BUILD_LIBCOMPAT_FALSE= fi # Check for availability of TLS support (e.g. __thread storage class) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use compiler-supported TLS if available" >&5 $as_echo_n "checking whether to use compiler-supported TLS if available... " >&6; } # Check whether --enable-tls was given. if test "${enable_tls+set}" = set; then : enableval=$enable_tls; fi if test $cvc4_has_threads = no; then # We disable TLS entirely by simply telling the build system that # the empty string is the __thread keyword. { $as_echo "$as_me:${as_lineno-$LINENO}: result: multithreading disabled" >&5 $as_echo "multithreading disabled" >&6; } CVC4_TLS_SUPPORTED=1 CVC4_TLS= CVC4_TLS_explanation='disabled (no multithreading support)' else if test -z "${enable_tls+set}" || test "$enable_tls" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread local storage (TLS) class" >&5 $as_echo_n "checking for thread local storage (TLS) class... " >&6; } if ${ac_cv_tls+:} false; then : $as_echo_n "(cached) " >&6 else ax_tls_keywords="__thread __declspec(thread) none" for ax_tls_keyword in $ax_tls_keywords; do case $ax_tls_keyword in #( none) : ac_cv_tls=none ; break ;; #( *) : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static void foo(void) { static $ax_tls_keyword int bar; exit(1); } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_tls=$ax_tls_keyword ; break else ac_cv_tls=none fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 $as_echo "$ac_cv_tls" >&6; } if test "$ac_cv_tls" != "none"; then : cat >>confdefs.h <<_ACEOF #define TLS $ac_cv_tls _ACEOF CVC4_TLS=$ac_cv_tls else CVC4_TLS= fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CVC4_TLS= fi if test -n "$CVC4_TLS"; then CVC4_TLS_SUPPORTED=1 CVC4_TLS_explanation="$CVC4_TLS" else CVC4_TLS_explanation='pthread_getspecific()' CVC4_TLS_SUPPORTED=0 fi fi # Whether to compile with google profiling tools cvc4_use_google_perftools=0 # Check whether --with-google_perftools was given. if test "${with_google_perftools+set}" = set; then : withval=$with_google_perftools; if test "$withval" != no; then cvc4_use_google_perftools=1 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link in google perftools libraries" >&5 $as_echo_n "checking whether to link in google perftools libraries... " >&6; } if test $cvc4_use_google_perftools = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MallocExtension_GetAllocatedSize in -ltcmalloc" >&5 $as_echo_n "checking for MallocExtension_GetAllocatedSize in -ltcmalloc... " >&6; } if ${ac_cv_lib_tcmalloc_MallocExtension_GetAllocatedSize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltcmalloc -lpthread $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 MallocExtension_GetAllocatedSize (); int main () { return MallocExtension_GetAllocatedSize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tcmalloc_MallocExtension_GetAllocatedSize=yes else ac_cv_lib_tcmalloc_MallocExtension_GetAllocatedSize=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_tcmalloc_MallocExtension_GetAllocatedSize" >&5 $as_echo "$ac_cv_lib_tcmalloc_MallocExtension_GetAllocatedSize" >&6; } if test "x$ac_cv_lib_tcmalloc_MallocExtension_GetAllocatedSize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBTCMALLOC 1 _ACEOF LIBS="-ltcmalloc $LIBS" else as_fn_error $? "cannot link google-perftools test program with -ltcmalloc" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ProfilerStart in -lprofiler" >&5 $as_echo_n "checking for ProfilerStart in -lprofiler... " >&6; } if ${ac_cv_lib_profiler_ProfilerStart+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lprofiler -lpthread $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 ProfilerStart (); int main () { return ProfilerStart (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_profiler_ProfilerStart=yes else ac_cv_lib_profiler_ProfilerStart=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_profiler_ProfilerStart" >&5 $as_echo "$ac_cv_lib_profiler_ProfilerStart" >&6; } if test "x$ac_cv_lib_profiler_ProfilerStart" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPROFILER 1 _ACEOF LIBS="-lprofiler $LIBS" else as_fn_error $? "cannot link google-perftools test program with -lprofiler" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (user didn't request it)" >&5 $as_echo "no (user didn't request it)" >&6; } fi # Java if test "$cvc4_build_java_bindings"; then if test -z "$JAVA"; then for ac_prog in java 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_JAVA+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVA"; then ac_cv_prog_JAVA="$JAVA" # 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_JAVA="$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 JAVA=$ac_cv_prog_JAVA if test -n "$JAVA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 $as_echo "$JAVA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVA" && break done test -n "$JAVA" || JAVA="java" else # Extract the first word of ""$JAVA"", so it can be a program name with args. set dummy "$JAVA"; 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_JAVA+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVA"; then ac_cv_prog_JAVA="$JAVA" # 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_JAVA=""$JAVA"" $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 JAVA=$ac_cv_prog_JAVA if test -n "$JAVA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 $as_echo "$JAVA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$JAVAC"; then for ac_prog in javac gcj 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_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # 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_JAVAC="$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 JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done test -n "$JAVAC" || JAVAC="javac" if test "$JAVAC" = gcj; then JAVAC='gcj -C'; fi else # Extract the first word of ""$JAVAC"", so it can be a program name with args. set dummy "$JAVAC"; 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_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # 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_JAVAC=""$JAVAC"" $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 JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$JAVAH"; then for ac_prog in javah gcjh 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_JAVAH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAH"; then ac_cv_prog_JAVAH="$JAVAH" # 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_JAVAH="$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 JAVAH=$ac_cv_prog_JAVAH if test -n "$JAVAH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5 $as_echo "$JAVAH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAH" && break done test -n "$JAVAH" || JAVAH="javah" else # Extract the first word of ""$JAVAH"", so it can be a program name with args. set dummy "$JAVAH"; 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_JAVAH+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAH"; then ac_cv_prog_JAVAH="$JAVAH" # 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_JAVAH=""$JAVAH"" $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 JAVAH=$ac_cv_prog_JAVAH if test -n "$JAVAH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5 $as_echo "$JAVAH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$JAR"; then for ac_prog in jar 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_JAR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAR"; then ac_cv_prog_JAR="$JAR" # 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_JAR="$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 JAR=$ac_cv_prog_JAR if test -n "$JAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5 $as_echo "$JAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAR" && break done test -n "$JAR" || JAR="jar" else # Extract the first word of ""$JAR"", so it can be a program name with args. set dummy "$JAR"; 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_JAR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAR"; then ac_cv_prog_JAR="$JAR" # 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_JAR=""$JAR"" $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 JAR=$ac_cv_prog_JAR if test -n "$JAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5 $as_echo "$JAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi # on Mac OS X, Java doesn't like the .so module extension; it wants .dylib module=no eval CVC4_JAVA_MODULE_EXT="$shrext_cmds" if test -z "$CVC4_JAVA_MODULE_EXT"; then CVC4_JAVA_MODULE_EXT=.so fi # Prepare configure output if test "$enable_shared" = yes; then BUILDING_SHARED=1; else BUILDING_SHARED=0; fi if test "$enable_static" = yes; then BUILDING_STATIC=1; else BUILDING_STATIC=0; fi if test "$enable_static_binary" = yes; then STATIC_BINARY=1; else STATIC_BINARY=0; fi if test "$enable_static_binary" = yes; then STATIC_BINARY_TRUE= STATIC_BINARY_FALSE='#' else STATIC_BINARY_TRUE='#' STATIC_BINARY_FALSE= fi if test "$enable_coverage" = yes; then COVERAGE_ENABLED_TRUE= COVERAGE_ENABLED_FALSE='#' else COVERAGE_ENABLED_TRUE='#' COVERAGE_ENABLED_FALSE= fi if test "$with_build" = debug; then CVC4_DEBUG_TRUE= CVC4_DEBUG_FALSE='#' else CVC4_DEBUG_TRUE='#' CVC4_DEBUG_FALSE= fi if test "$enable_tracing" = yes; then CVC4_TRACING_TRUE= CVC4_TRACING_FALSE='#' else CVC4_TRACING_TRUE='#' CVC4_TRACING_FALSE= fi cat >>confdefs.h <<_ACEOF #define CVC4_MAJOR ${CVC4_MAJOR} _ACEOF cat >>confdefs.h <<_ACEOF #define CVC4_MINOR ${CVC4_MINOR} _ACEOF cat >>confdefs.h <<_ACEOF #define CVC4_RELEASE ${CVC4_RELEASE} _ACEOF cat >>confdefs.h <<_ACEOF #define CVC4_EXTRAVERSION "${CVC4_EXTRAVERSION}" _ACEOF cat >>confdefs.h <<_ACEOF #define CVC4_RELEASE_STRING "${CVC4_RELEASE_STRING}" _ACEOF CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }${BOOST_CPPFLAGS:+$BOOST_CPPFLAGS }$CVC4CPPFLAGS" CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$CVC4CXXFLAGS -Wno-deprecated" CFLAGS="${CFLAGS:+$CFLAGS }$CVC4CFLAGS -Wno-deprecated -fexceptions" LDFLAGS="${LDFLAGS:+$LDFLAGS }$CVC4LDFLAGS" # visibility flag not supported for Windows builds # also increase default stack size for Windows binaries case $host_os in (*mingw*) FLAG_VISIBILITY_HIDDEN= cvc4_LDFLAGS=-Wl,--stack,134217728 pcvc4_LDFLAGS=-Wl,--stack,134217728 esac if test -z "$FLAG_VISIBILITY_HIDDEN"; then WHITE_AND_BLACK_TESTS_TRUE= WHITE_AND_BLACK_TESTS_FALSE='#' else WHITE_AND_BLACK_TESTS_TRUE='#' WHITE_AND_BLACK_TESTS_FALSE= fi # remember the command line used for configure # mk_include # # When automake scans Makefiles, it complains about non-standard make # features (including GNU extensions), and breaks GNU Make's # "if/endif" construct, replacing the "if" with AM_CONDITIONAL if # constructs. automake even follows "include" and messes with # included Makefiles. # # CVC4 assumes GNU Make and we want to use GNU Make if/endifs, so we # have to hide some included Makefiles with GNU extensions. We do # this by defining mk_include as an autoconf substitution and then # using "@mk_include@ other_makefile" in Makefile.am to include # makefiles with GNU extensions; this hides them from automake. mk_include=include # Similar trickery for "if" mk_if=if mk_empty= # CVC4_FALSE # # This is used to _always_ comment out rules in automake makefiles, but # still trigger certain automake behavior; see test/unit/Makefile.am. if false; then CVC4_FALSE_TRUE= CVC4_FALSE_FALSE='#' else CVC4_FALSE_TRUE='#' CVC4_FALSE_FALSE= fi # set up substitutions for src/util/{rational,integer}.h.in if test $cvc4_cln_or_gmp = cln; then CVC4_USE_CLN_IMP=1 CVC4_USE_GMP_IMP=0 else CVC4_USE_CLN_IMP=0 CVC4_USE_GMP_IMP=1 fi # month/year for man pages MAN_DATE=`date '+%B %Y'` ac_config_files="$ac_config_files Makefile.builds Makefile proofs/signatures/Makefile contrib/Makefile examples/Makefile examples/api/Makefile examples/api/java/Makefile examples/hashsmt/Makefile examples/nra-translate/Makefile examples/sets-translate/Makefile src/Makefile src/base/Makefile src/bindings/Makefile src/bindings/compat/Makefile src/bindings/compat/c/Makefile src/bindings/compat/java/Makefile src/compat/Makefile src/expr/Makefile src/lib/Makefile src/main/Makefile src/options/Makefile src/parser/Makefile src/parser/cvc/Makefile src/parser/smt1/Makefile src/parser/smt2/Makefile src/parser/tptp/Makefile src/prop/bvminisat/Makefile src/prop/minisat/Makefile src/smt_util/Makefile src/util/Makefile test/Makefile test/regress/Makefile test/regress/regress0/Makefile test/regress/regress0/arith/Makefile test/regress/regress0/arith/integers/Makefile test/regress/regress0/arrays/Makefile test/regress/regress0/aufbv/Makefile test/regress/regress0/auflia/Makefile test/regress/regress0/bv/Makefile test/regress/regress0/bv/core/Makefile test/regress/regress0/datatypes/Makefile test/regress/regress0/decision/Makefile test/regress/regress0/expect/Makefile test/regress/regress0/fmf/Makefile test/regress/regress0/lemmas/Makefile test/regress/regress0/nl/Makefile test/regress/regress0/parser/Makefile test/regress/regress0/precedence/Makefile test/regress/regress0/preprocess/Makefile test/regress/regress0/push-pop/Makefile test/regress/regress0/push-pop/arith/Makefile test/regress/regress0/push-pop/boolean/Makefile test/regress/regress0/quantifiers/Makefile test/regress/regress0/rels/Makefile test/regress/regress0/rewriterules/Makefile test/regress/regress0/sep/Makefile test/regress/regress0/sets/Makefile test/regress/regress0/strings/Makefile test/regress/regress0/sygus/Makefile test/regress/regress0/tptp/Makefile test/regress/regress0/uf/Makefile test/regress/regress0/uflia/Makefile test/regress/regress0/uflra/Makefile test/regress/regress0/unconstrained/Makefile test/regress/regress1/Makefile test/regress/regress1/aufbv/Makefile test/regress/regress1/auflia/Makefile test/regress/regress1/bv/Makefile test/regress/regress1/datatypes/Makefile test/regress/regress1/decision/Makefile test/regress/regress1/fmf/Makefile test/regress/regress1/lemmas/Makefile test/regress/regress1/quantifiers/Makefile test/regress/regress1/rewriterules/Makefile test/regress/regress1/sep/Makefile test/regress/regress1/sets/Makefile test/regress/regress1/strings/Makefile test/regress/regress1/sygus/Makefile test/regress/regress2/Makefile test/regress/regress2/arith/Makefile test/regress/regress3/Makefile test/regress/regress4/Makefile test/system/Makefile test/unit/Makefile" if test $cvc4_has_threads = yes; then support_multithreaded='with boost threading library' if true; then CVC4_HAS_THREADS_TRUE= CVC4_HAS_THREADS_FALSE='#' else CVC4_HAS_THREADS_TRUE='#' CVC4_HAS_THREADS_FALSE= fi CVC4_HAS_THREADS=1 else support_multithreaded='no' if false; then CVC4_HAS_THREADS_TRUE= CVC4_HAS_THREADS_FALSE='#' else CVC4_HAS_THREADS_TRUE='#' CVC4_HAS_THREADS_FALSE= fi CVC4_HAS_THREADS=0 fi # Final information to the user gpl=no licensewarn= if test "$custom_build_profile" = yes; then with_build="$with_build (customized)" fi support_unit_tests='cxxtest not found; unit tests not supported' if test -n "$CXXTEST"; then support_unit_tests='unit testing infrastructure enabled in build directory' elif test "$enable_unit_testing" = no; then support_unit_tests='unit testing disabled by user' fi if test "$enable_optimized" = yes; then optimized="yes, at level $OPTLEVEL" else optimized="no" fi if test $have_libglpk -eq 1; then gpl=yes gpllibs="${gpllibs} glpk" fi if test $have_libreadline -eq 1; then gpl=yes gpllibs="${gpllibs} readline" fi if test $cvc4_cln_or_gmp = cln; then mplibrary='cln (GPL)' gpl=yes gpllibs="${gpllibs} cln" if test $with_portfolio = yes; then as_fn_error $? "Bad configuration detected: cannot build portfolio with CLN. Please specify only one of --with-portfolio and --with-cln." "$LINENO" 5 fi else mplibrary='gmp' fi if test "$gpl" = yes; then if test "$CVC4_BSD_LICENSED_CODE_ONLY" = 1; then as_fn_error $? "Bad configuration detected: BSD-licensed code only, but also requested GPLed libraries:$gpllibs To permit GPL'ed dependences, use the configure flag --enable-gpl" "$LINENO" 5 fi licensewarn="${licensewarn}"'**************************************************************************** Please note that CVC4 will be built against the following GPLed libraries: '"$gpllibs"' As these libraries are covered under the GPLv3, so is this build of CVC4. CVC4 is also available to you under the terms of the (modified) BSD license. If you prefer to license CVC4 under those terms, please configure with the option "--bsd", which will disable all optional GPLed library dependences. **************************************************************************** ' license="GPLv3 (due to optional libraries; see below)" else licensewarn="${licensewarn}Please note that this configuration is NOT built against any GPL'ed libraries, so it is covered by the (modified) BSD license. This is, however, not the best-performing configuration of CVC4. To build against GPL'ed libraries which improve CVC4's performance, re-configure with '--best --enable-gpl'. " license="modified BSD" fi if test "$gpl" = yes; then isgpl=1; else isgpl=0; fi cat >>confdefs.h <<_ACEOF #define CVC4_GPL_DEPS $isgpl _ACEOF CVC4_COMPAT_LIBRARY_VERSION_or_nobuild="$CVC4_COMPAT_LIBRARY_VERSION" CVC4_BINDINGS_LIBRARY_VERSION_or_nobuild="$CVC4_BINDINGS_LIBRARY_VERSION" if test "$CVC4_BUILD_LIBCOMPAT" = no; then CVC4_COMPAT_LIBRARY_VERSION_or_nobuild="N/A" fi if test -z "$CVC4_LANGUAGE_BINDINGS"; then CVC4_BINDINGS_LIBRARY_VERSION_or_nobuild="N/A" fi bindings_to_be_built=none if test -n "$CVC4_LANGUAGE_BINDINGS"; then bindings_to_be_built="$CVC4_LANGUAGE_BINDINGS" if test -z "$SWIG"; then bindings_to_be_built="$bindings_to_be_built (for CVC3 compatibility layer only; SWIG not found)" fi fi ac_config_files="$ac_config_files src/base/tls.h.tmp:src/base/tls.h.in" ac_config_files="$ac_config_files src/util/integer.h.tmp:src/util/integer.h.in" ac_config_files="$ac_config_files src/util/rational.h.tmp:src/util/rational.h.in" ac_config_files="$ac_config_files doc/cvc4.1_template.tmp:doc/cvc4.1_template.in" ac_config_files="$ac_config_files doc/cvc4.5.tmp:doc/cvc4.5.in" ac_config_files="$ac_config_files doc/libcvc4.3_template.tmp:doc/libcvc4.3_template.in" ac_config_files="$ac_config_files doc/SmtEngine.3cvc_template.tmp:doc/SmtEngine.3cvc_template.in" ac_config_files="$ac_config_files doc/options.3cvc_template.tmp:doc/options.3cvc_template.in" ac_config_files="$ac_config_files doc/libcvc4parser.3.tmp:doc/libcvc4parser.3.in" ac_config_files="$ac_config_files doc/libcvc4compat.3.tmp:doc/libcvc4compat.3.in" 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 "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AUTOMAKE_1_11_TRUE}" && test -z "${AUTOMAKE_1_11_FALSE}"; then as_fn_error $? "conditional \"AUTOMAKE_1_11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi 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 -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 -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 "${CVC4_CLN_IMP_TRUE}" && test -z "${CVC4_CLN_IMP_FALSE}"; then as_fn_error $? "conditional \"CVC4_CLN_IMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_GMP_IMP_TRUE}" && test -z "${CVC4_GMP_IMP_FALSE}"; then as_fn_error $? "conditional \"CVC4_GMP_IMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_BUILD_PROFILE_PRODUCTION_TRUE}" && test -z "${CVC4_BUILD_PROFILE_PRODUCTION_FALSE}"; then as_fn_error $? "conditional \"CVC4_BUILD_PROFILE_PRODUCTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_BUILD_PROFILE_DEBUG_TRUE}" && test -z "${CVC4_BUILD_PROFILE_DEBUG_FALSE}"; then as_fn_error $? "conditional \"CVC4_BUILD_PROFILE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_BUILD_PROFILE_DEFAULT_TRUE}" && test -z "${CVC4_BUILD_PROFILE_DEFAULT_FALSE}"; then as_fn_error $? "conditional \"CVC4_BUILD_PROFILE_DEFAULT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_BUILD_PROFILE_COMPETITION_TRUE}" && test -z "${CVC4_BUILD_PROFILE_COMPETITION_FALSE}"; then as_fn_error $? "conditional \"CVC4_BUILD_PROFILE_COMPETITION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_PROOF_TRUE}" && test -z "${CVC4_PROOF_FALSE}"; then as_fn_error $? "conditional \"CVC4_PROOF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_USE_GLPK_TRUE}" && test -z "${CVC4_USE_GLPK_FALSE}"; then as_fn_error $? "conditional \"CVC4_USE_GLPK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_USE_ABC_TRUE}" && test -z "${CVC4_USE_ABC_FALSE}"; then as_fn_error $? "conditional \"CVC4_USE_ABC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_USE_CRYPTOMINISAT_TRUE}" && test -z "${CVC4_USE_CRYPTOMINISAT_FALSE}"; then as_fn_error $? "conditional \"CVC4_USE_CRYPTOMINISAT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then as_fn_error $? "conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then as_fn_error $? "conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then as_fn_error $? "conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then as_fn_error $? "conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then as_fn_error $? "conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then as_fn_error $? "conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then as_fn_error $? "conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then as_fn_error $? "conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then as_fn_error $? "conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then as_fn_error $? "conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then as_fn_error $? "conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then as_fn_error $? "conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then as_fn_error $? "conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then as_fn_error $? "conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CXXTESTGEN_TRUE}" && test -z "${HAVE_CXXTESTGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_CXXTESTGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_HAS_SWIG_TRUE}" && test -z "${CVC4_HAS_SWIG_FALSE}"; then as_fn_error $? "conditional \"CVC4_HAS_SWIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_C_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_C_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_C\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_JAVA_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_JAVA_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_JAVA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_CSHARP_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_CSHARP_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_CSHARP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_PERL_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_PERL_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_PERL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_PHP_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_PHP_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_PHP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_PYTHON_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_PYTHON_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_RUBY_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_RUBY_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_RUBY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_TCL_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_TCL_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_LANGUAGE_BINDING_OCAML_TRUE}" && test -z "${CVC4_LANGUAGE_BINDING_OCAML_FALSE}"; then as_fn_error $? "conditional \"CVC4_LANGUAGE_BINDING_OCAML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_BUILD_PCVC4_TRUE}" && test -z "${CVC4_BUILD_PCVC4_FALSE}"; then as_fn_error $? "conditional \"CVC4_BUILD_PCVC4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_BUILD_LIBCOMPAT_TRUE}" && test -z "${CVC4_BUILD_LIBCOMPAT_FALSE}"; then as_fn_error $? "conditional \"CVC4_BUILD_LIBCOMPAT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${STATIC_BINARY_TRUE}" && test -z "${STATIC_BINARY_FALSE}"; then as_fn_error $? "conditional \"STATIC_BINARY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COVERAGE_ENABLED_TRUE}" && test -z "${COVERAGE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"COVERAGE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_DEBUG_TRUE}" && test -z "${CVC4_DEBUG_FALSE}"; then as_fn_error $? "conditional \"CVC4_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_TRACING_TRUE}" && test -z "${CVC4_TRACING_FALSE}"; then as_fn_error $? "conditional \"CVC4_TRACING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WHITE_AND_BLACK_TESTS_TRUE}" && test -z "${WHITE_AND_BLACK_TESTS_FALSE}"; then as_fn_error $? "conditional \"WHITE_AND_BLACK_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_FALSE_TRUE}" && test -z "${CVC4_FALSE_FALSE}"; then as_fn_error $? "conditional \"CVC4_FALSE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_HAS_THREADS_TRUE}" && test -z "${CVC4_HAS_THREADS_FALSE}"; then as_fn_error $? "conditional \"CVC4_HAS_THREADS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CVC4_HAS_THREADS_TRUE}" && test -z "${CVC4_HAS_THREADS_FALSE}"; then as_fn_error $? "conditional \"CVC4_HAS_THREADS\" 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 cvc4 $as_me 1.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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ cvc4 config.status 1.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 # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $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"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $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_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $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"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $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"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $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"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $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_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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 \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that 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' RM='$RM' ofile='$ofile' _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 "cvc4autoconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS cvc4autoconfig.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile.builds") CONFIG_FILES="$CONFIG_FILES Makefile.builds" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "proofs/signatures/Makefile") CONFIG_FILES="$CONFIG_FILES proofs/signatures/Makefile" ;; "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/api/Makefile") CONFIG_FILES="$CONFIG_FILES examples/api/Makefile" ;; "examples/api/java/Makefile") CONFIG_FILES="$CONFIG_FILES examples/api/java/Makefile" ;; "examples/hashsmt/Makefile") CONFIG_FILES="$CONFIG_FILES examples/hashsmt/Makefile" ;; "examples/nra-translate/Makefile") CONFIG_FILES="$CONFIG_FILES examples/nra-translate/Makefile" ;; "examples/sets-translate/Makefile") CONFIG_FILES="$CONFIG_FILES examples/sets-translate/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/base/Makefile") CONFIG_FILES="$CONFIG_FILES src/base/Makefile" ;; "src/bindings/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/Makefile" ;; "src/bindings/compat/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/compat/Makefile" ;; "src/bindings/compat/c/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/compat/c/Makefile" ;; "src/bindings/compat/java/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/compat/java/Makefile" ;; "src/compat/Makefile") CONFIG_FILES="$CONFIG_FILES src/compat/Makefile" ;; "src/expr/Makefile") CONFIG_FILES="$CONFIG_FILES src/expr/Makefile" ;; "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;; "src/main/Makefile") CONFIG_FILES="$CONFIG_FILES src/main/Makefile" ;; "src/options/Makefile") CONFIG_FILES="$CONFIG_FILES src/options/Makefile" ;; "src/parser/Makefile") CONFIG_FILES="$CONFIG_FILES src/parser/Makefile" ;; "src/parser/cvc/Makefile") CONFIG_FILES="$CONFIG_FILES src/parser/cvc/Makefile" ;; "src/parser/smt1/Makefile") CONFIG_FILES="$CONFIG_FILES src/parser/smt1/Makefile" ;; "src/parser/smt2/Makefile") CONFIG_FILES="$CONFIG_FILES src/parser/smt2/Makefile" ;; "src/parser/tptp/Makefile") CONFIG_FILES="$CONFIG_FILES src/parser/tptp/Makefile" ;; "src/prop/bvminisat/Makefile") CONFIG_FILES="$CONFIG_FILES src/prop/bvminisat/Makefile" ;; "src/prop/minisat/Makefile") CONFIG_FILES="$CONFIG_FILES src/prop/minisat/Makefile" ;; "src/smt_util/Makefile") CONFIG_FILES="$CONFIG_FILES src/smt_util/Makefile" ;; "src/util/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/regress/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/Makefile" ;; "test/regress/regress0/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/Makefile" ;; "test/regress/regress0/arith/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/arith/Makefile" ;; "test/regress/regress0/arith/integers/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/arith/integers/Makefile" ;; "test/regress/regress0/arrays/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/arrays/Makefile" ;; "test/regress/regress0/aufbv/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/aufbv/Makefile" ;; "test/regress/regress0/auflia/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/auflia/Makefile" ;; "test/regress/regress0/bv/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/bv/Makefile" ;; "test/regress/regress0/bv/core/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/bv/core/Makefile" ;; "test/regress/regress0/datatypes/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/datatypes/Makefile" ;; "test/regress/regress0/decision/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/decision/Makefile" ;; "test/regress/regress0/expect/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/expect/Makefile" ;; "test/regress/regress0/fmf/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/fmf/Makefile" ;; "test/regress/regress0/lemmas/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/lemmas/Makefile" ;; "test/regress/regress0/nl/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/nl/Makefile" ;; "test/regress/regress0/parser/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/parser/Makefile" ;; "test/regress/regress0/precedence/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/precedence/Makefile" ;; "test/regress/regress0/preprocess/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/preprocess/Makefile" ;; "test/regress/regress0/push-pop/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/push-pop/Makefile" ;; "test/regress/regress0/push-pop/arith/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/push-pop/arith/Makefile" ;; "test/regress/regress0/push-pop/boolean/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/push-pop/boolean/Makefile" ;; "test/regress/regress0/quantifiers/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/quantifiers/Makefile" ;; "test/regress/regress0/rels/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/rels/Makefile" ;; "test/regress/regress0/rewriterules/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/rewriterules/Makefile" ;; "test/regress/regress0/sep/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/sep/Makefile" ;; "test/regress/regress0/sets/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/sets/Makefile" ;; "test/regress/regress0/strings/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/strings/Makefile" ;; "test/regress/regress0/sygus/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/sygus/Makefile" ;; "test/regress/regress0/tptp/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/tptp/Makefile" ;; "test/regress/regress0/uf/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/uf/Makefile" ;; "test/regress/regress0/uflia/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/uflia/Makefile" ;; "test/regress/regress0/uflra/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/uflra/Makefile" ;; "test/regress/regress0/unconstrained/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress0/unconstrained/Makefile" ;; "test/regress/regress1/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/Makefile" ;; "test/regress/regress1/aufbv/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/aufbv/Makefile" ;; "test/regress/regress1/auflia/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/auflia/Makefile" ;; "test/regress/regress1/bv/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/bv/Makefile" ;; "test/regress/regress1/datatypes/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/datatypes/Makefile" ;; "test/regress/regress1/decision/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/decision/Makefile" ;; "test/regress/regress1/fmf/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/fmf/Makefile" ;; "test/regress/regress1/lemmas/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/lemmas/Makefile" ;; "test/regress/regress1/quantifiers/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/quantifiers/Makefile" ;; "test/regress/regress1/rewriterules/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/rewriterules/Makefile" ;; "test/regress/regress1/sep/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/sep/Makefile" ;; "test/regress/regress1/sets/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/sets/Makefile" ;; "test/regress/regress1/strings/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/strings/Makefile" ;; "test/regress/regress1/sygus/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress1/sygus/Makefile" ;; "test/regress/regress2/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress2/Makefile" ;; "test/regress/regress2/arith/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress2/arith/Makefile" ;; "test/regress/regress3/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress3/Makefile" ;; "test/regress/regress4/Makefile") CONFIG_FILES="$CONFIG_FILES test/regress/regress4/Makefile" ;; "test/system/Makefile") CONFIG_FILES="$CONFIG_FILES test/system/Makefile" ;; "test/unit/Makefile") CONFIG_FILES="$CONFIG_FILES test/unit/Makefile" ;; "src/base/tls.h.tmp") CONFIG_FILES="$CONFIG_FILES src/base/tls.h.tmp:src/base/tls.h.in" ;; "src/util/integer.h.tmp") CONFIG_FILES="$CONFIG_FILES src/util/integer.h.tmp:src/util/integer.h.in" ;; "src/util/rational.h.tmp") CONFIG_FILES="$CONFIG_FILES src/util/rational.h.tmp:src/util/rational.h.in" ;; "doc/cvc4.1_template.tmp") CONFIG_FILES="$CONFIG_FILES doc/cvc4.1_template.tmp:doc/cvc4.1_template.in" ;; "doc/cvc4.5.tmp") CONFIG_FILES="$CONFIG_FILES doc/cvc4.5.tmp:doc/cvc4.5.in" ;; "doc/libcvc4.3_template.tmp") CONFIG_FILES="$CONFIG_FILES doc/libcvc4.3_template.tmp:doc/libcvc4.3_template.in" ;; "doc/SmtEngine.3cvc_template.tmp") CONFIG_FILES="$CONFIG_FILES doc/SmtEngine.3cvc_template.tmp:doc/SmtEngine.3cvc_template.in" ;; "doc/options.3cvc_template.tmp") CONFIG_FILES="$CONFIG_FILES doc/options.3cvc_template.tmp:doc/options.3cvc_template.in" ;; "doc/libcvc4parser.3.tmp") CONFIG_FILES="$CONFIG_FILES doc/libcvc4parser.3.tmp:doc/libcvc4parser.3.in" ;; "doc/libcvc4compat.3.tmp") CONFIG_FILES="$CONFIG_FILES doc/libcvc4compat.3.tmp:doc/libcvc4compat.3.in" ;; *) 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 "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf 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"` # 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'`; 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 } ;; "libtool":C) # See if we are running on zsh, and set the options that 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 # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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 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 this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # 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 into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # 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 where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # 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 # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # 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 cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _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 set != "${COLLECT_NAMES+set}"; 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) 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 ;; "src/base/tls.h.tmp":F) if diff -q "src/base/tls.h.tmp" "src/base/tls.h" >/dev/null 2>&1; then : else cp "src/base/tls.h.tmp" "src/base/tls.h" fi ;; "src/util/integer.h.tmp":F) if diff -q "src/util/integer.h.tmp" "src/util/integer.h" >/dev/null 2>&1; then : else cp "src/util/integer.h.tmp" "src/util/integer.h" fi ;; "src/util/rational.h.tmp":F) if diff -q "src/util/rational.h.tmp" "src/util/rational.h" >/dev/null 2>&1; then : else cp "src/util/rational.h.tmp" "src/util/rational.h" fi ;; "doc/cvc4.1_template.tmp":F) if diff -q "doc/cvc4.1_template.tmp" "doc/cvc4.1_template" >/dev/null 2>&1; then : else cp "doc/cvc4.1_template.tmp" "doc/cvc4.1_template" fi ;; "doc/cvc4.5.tmp":F) if diff -q "doc/cvc4.5.tmp" "doc/cvc4.5" >/dev/null 2>&1; then : else cp "doc/cvc4.5.tmp" "doc/cvc4.5" fi ;; "doc/libcvc4.3_template.tmp":F) if diff -q "doc/libcvc4.3_template.tmp" "doc/libcvc4.3_template" >/dev/null 2>&1; then : else cp "doc/libcvc4.3_template.tmp" "doc/libcvc4.3_template" fi ;; "doc/SmtEngine.3cvc_template.tmp":F) if diff -q "doc/SmtEngine.3cvc_template.tmp" "doc/SmtEngine.3cvc_template" >/dev/null 2>&1; then : else cp "doc/SmtEngine.3cvc_template.tmp" "doc/SmtEngine.3cvc_template" fi ;; "doc/options.3cvc_template.tmp":F) if diff -q "doc/options.3cvc_template.tmp" "doc/options.3cvc_template" >/dev/null 2>&1; then : else cp "doc/options.3cvc_template.tmp" "doc/options.3cvc_template" fi ;; "doc/libcvc4parser.3.tmp":F) if diff -q "doc/libcvc4parser.3.tmp" "doc/libcvc4parser.3" >/dev/null 2>&1; then : else cp "doc/libcvc4parser.3.tmp" "doc/libcvc4parser.3" fi ;; "doc/libcvc4compat.3.tmp":F) if diff -q "doc/libcvc4compat.3.tmp" "doc/libcvc4compat.3" >/dev/null 2>&1; then : else cp "doc/libcvc4compat.3.tmp" "doc/libcvc4compat.3" fi ;; 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 # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -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=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 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 cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done 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 cat <&5 $as_echo "$as_me: WARNING: " >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are electing to build unsupported language binding(s):" >&5 $as_echo "$as_me: WARNING: You are electing to build unsupported language binding(s):" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CVC4_UNSUPPORTED_LANGUAGE_BINDINGS" >&5 $as_echo "$as_me: WARNING: $CVC4_UNSUPPORTED_LANGUAGE_BINDINGS" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please be aware that these bindings may not compile, or" >&5 $as_echo "$as_me: WARNING: Please be aware that these bindings may not compile, or" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: work, and the interface to CVC4 via these bindings may" >&5 $as_echo "$as_me: WARNING: work, and the interface to CVC4 via these bindings may" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: change drastically in upcoming releases of CVC4." >&5 $as_echo "$as_me: WARNING: change drastically in upcoming releases of CVC4." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} fi if test -n "$CVC4_INTEGRITY_WARNING"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CVC4_INTEGRITY_WARNING" >&5 $as_echo "$as_me: WARNING: $CVC4_INTEGRITY_WARNING" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please run \"make check\" after building to ensure integrity of the binary and library" >&5 $as_echo "$as_me: WARNING: Please run \"make check\" after building to ensure integrity of the binary and library" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} fi cvc4-1.5/configure.ac000066400000000000000000001546321313116454100145160ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. m4_define(_CVC4_MAJOR, 1) dnl version (major) m4_define(_CVC4_MINOR, 5) dnl version (minor) m4_define(_CVC4_RELEASE, 0) dnl version (alpha) m4_define(_CVC4_EXTRAVERSION, []) dnl version (extra) m4_define(_CVC4_RELEASE_STRING, _CVC4_MAJOR[.]_CVC4_MINOR[]m4_if(_CVC4_RELEASE,[0],,[.]_CVC4_RELEASE)_CVC4_EXTRAVERSION) dnl version string dnl Preprocess CL args. Defined in config/cvc4.m4 CVC4_AC_INIT AC_PREREQ([2.61]) AC_INIT([cvc4], _CVC4_RELEASE_STRING, [cvc-bugs@cs.nyu.edu]) AC_CONFIG_SRCDIR([src/include/cvc4_public.h]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_LIBOBJ_DIR([src/lib]) AC_CONFIG_SUBDIRS([proofs/lfsc_checker]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) CVC4_MAJOR=_CVC4_MAJOR CVC4_MINOR=_CVC4_MINOR CVC4_RELEASE=_CVC4_RELEASE CVC4_EXTRAVERSION=_CVC4_EXTRAVERSION CVC4_RELEASE_STRING=_CVC4_RELEASE_STRING # Libtool version numbers for libraries # Version numbers are in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # # For more information, see: # http://www.gnu.org/software/libtool/manual/libtool.html#Versioning # For guidance on when to change the version number, refer to the # developer's guide. m4_define([library_version], [m4_esyscmd([grep -F "$(grep -v '^#' library_versions | awk '{print$][1}' | sed 's,\\,\\\\\\,g' | (while read r; do if echo "]_CVC4_RELEASE_STRING[" | grep -q "^$r\$"; then echo "$r"; exit; fi; done; echo NO_MATCH_FOUND)) " library_versions | awk 'BEGIN {FS=":";OFS=":";RS=" "} /^$1:/ {print$][2,$][3,$][4}' | head -1])]) m4_define(_CVC4_LIBRARY_VERSION, library_version([libcvc4]))dnl m4_define(_CVC4_PARSER_LIBRARY_VERSION, library_version([libcvc4parser]))dnl m4_define(_CVC4_COMPAT_LIBRARY_VERSION, library_version([libcvc4compat]))dnl m4_define(_CVC4_BINDINGS_LIBRARY_VERSION, library_version([libcvc4bindings]))dnl m4_define([fatal_error], [m4_errprint(__program__:__file__:__line__[: fatal error: $* ])m4_exit(1)])dnl m4_ifblank(_CVC4_LIBRARY_VERSION,[fatal_error([no CVC4_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl m4_ifblank(_CVC4_PARSER_LIBRARY_VERSION,[fatal_error([no CVC4_PARSER_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl m4_ifblank(_CVC4_COMPAT_LIBRARY_VERSION,[fatal_error([no CVC4_COMPAT_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl m4_ifblank(_CVC4_BINDINGS_LIBRARY_VERSION,[fatal_error([no CVC4_BINDINGS_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl CVC4_LIBRARY_VERSION=_CVC4_LIBRARY_VERSION CVC4_PARSER_LIBRARY_VERSION=_CVC4_PARSER_LIBRARY_VERSION CVC4_COMPAT_LIBRARY_VERSION=_CVC4_COMPAT_LIBRARY_VERSION CVC4_BINDINGS_LIBRARY_VERSION=_CVC4_BINDINGS_LIBRARY_VERSION # Using the AC_CANONICAL_* macros destroy the command line you get # from $@, which we want later for determining the build profile. So # we save it. (We can't do our build profile stuff here, or it's not # included in the output... autoconf overrides us on the orderings of # some things.) config_cmdline=("$@") cvc4_config_cmdline="${config_cmdline[[@]]}" # remember if the user set these explicitly (or whether autoconf does) user_specified_enable_or_disable_static=${enable_static+yes} user_specified_enable_or_disable_shared=${enable_shared+yes} if test -e src/include/cvc4_public.h; then CVC4_CONFIGURE_AT_TOP_LEVEL=yes else CVC4_CONFIGURE_AT_TOP_LEVEL=no fi # override autoconf: we don't want it giving us CFLAGS/CXXFLAGS, but we do # want to respect the user's flags if test -z "${CFLAGS+set}"; then CFLAGS=; fi if test -z "${CXXFLAGS+set}"; then CXXFLAGS=; fi # on by default AM_MAINTAINER_MODE([enable]) # turn off static lib building by default AC_ENABLE_SHARED AC_DISABLE_STATIC AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET as_me=configure if test "$enable_shared" = no -a "$user_specified_enable_or_disable_shared" = yes; then enable_static=yes fi # Features requested by the user AC_MSG_CHECKING([for requested build profile]) AC_ARG_WITH([build], [AS_HELP_STRING([--with-build=profile], [for profile in {production,debug,competition,personal}])]) if test -z "${with_build+set}"; then with_build=production fi if test -z "${enable_optimized+set}" -a -z "${enable_debug_symbols+set}" -a -z "${enable_assertions+set}" -a -z "${enable_tracing+set}" -a -z "${enable_dumping+set}" -a -z "${enable_muzzle+set}" -a -z "${enable_coverage+set}" -a -z "${enable_profiling+set}" -a -z "${enable_statistics+set}" -a -z "${enable_replay+set}" -a -z "${with_gmp+set}" -a -z "${with_cln+set}" -a -z "${with_glpk+set}" -a -z "${with_abc+set}" -a -z "${with_cryptominisat+set}"; then custom_build_profile=no else custom_build_profile=yes fi btargs= if test -n "${enable_optimized+set}"; then if test "$enable_optimized" = yes; then btargs="$btargs optimized" else btargs="$btargs nooptimized" fi fi # --enable-staticbinary is an alias for --enable-static-binary if test -n "${enable_staticbinary+set}"; then enable_static_binary="$enable_staticbinary" fi if test -n "${enable_static_binary+set}"; then if test "$enable_static_binary" = yes; then btargs="$btargs staticbinary" else btargs="$btargs nostaticbinary" fi fi if test -n "${enable_debug_symbols+set}"; then if test "$enable_debug_symbols" = yes; then btargs="$btargs debugsymbols" else btargs="$btargs nodebugsymbols" fi fi if test -n "${enable_assertions+set}"; then if test "$enable_assertions" = yes; then btargs="$btargs assertions" else btargs="$btargs noassertions" fi fi if test -n "${enable_proof+set}"; then if test "$enable_proof" = yes; then btargs="$btargs proof" else btargs="$btargs noproof" fi fi if test -n "${enable_tracing+set}"; then if test "$enable_tracing" = yes; then btargs="$btargs tracing" else btargs="$btargs notracing" fi fi if test -n "${enable_dumping+set}"; then if test "$enable_dumping" = yes; then btargs="$btargs dumping" else btargs="$btargs nodumping" fi fi if test -n "${enable_muzzle+set}"; then if test "$enable_muzzle" = yes; then btargs="$btargs muzzle" else btargs="$btargs nomuzzle" fi fi if test -n "${enable_coverage+set}"; then if test "$enable_coverage" = yes; then btargs="$btargs coverage" else btargs="$btargs nocoverage" fi fi if test -n "${enable_profiling+set}"; then if test "$enable_profiling" = yes; then btargs="$btargs profiling" else btargs="$btargs noprofiling" fi fi if test -n "${enable_statistics+set}"; then if test "$enable_statistics" = yes; then btargs="$btargs statistics" else btargs="$btargs nostatistics" fi fi if test -n "${enable_replay+set}"; then if test "$enable_replay" = yes; then btargs="$btargs replay" else btargs="$btargs noreplay" fi fi if test -n "${with_glpk+set}"; then if test "$with_glpk" = yes; then btargs="$btargs glpk" fi fi if test -n "${with_abc+set}"; then if test "$with_abc" = yes; then btargs="$btargs abc" fi fi if test -n "${with_cryptominisat+set}"; then if test "$with_cryptominisat" = yes; then btargs="$btargs cryptominisat" fi fi AC_MSG_RESULT([$with_build]) AM_INIT_AUTOMAKE([1.11 no-define tar-pax parallel-tests color-tests subdir-objects]) AC_CONFIG_HEADERS([cvc4autoconfig.h]) # automake 1.12 changes the test driver mechanism in a way that is # completely incompatible with 1.11. We figure out here which version # we're using in order to set up test makefiles correctly. # See http://lists.gnu.org/archive/html/automake/2012-04/msg00060.html if test -z "$am__api_version"; then AC_MSG_ERROR([Cannot determine automake API version ?!]) fi case "$am__api_version" in 1.11*) automake111=true ;; *) automake111=false ;; esac AM_CONDITIONAL([AUTOMAKE_1_11], [$automake111]) # Initialize libtool's configuration options. # we're not DLL-clean yet (i.e., don't properly use dllexport and dllimport) # _LT_SET_OPTION([LT_INIT],[win32-dll]) LT_INIT # Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL CVC4_GCC_VERSION if test $cross_compiling = "no"; then AC_MSG_CHECKING([whether C++ exceptions work]) AC_LANG_PUSH([C++]) AC_RUN_IFELSE( AC_LANG_PROGRAM([#include ], [[ int result = 1; try { throw std::exception(); } catch (...) { result = 0; } return result; ]]), [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([C++ exceptions do not work.])] ) AC_LANG_POP([C++]) else AC_MSG_WARN([Cross compiling, cannot check whether exceptions work]) fi cvc4_use_gmp=2 cvc4_use_cln=2 AC_ARG_WITH( [cln], AS_HELP_STRING( [--with-cln], [use CLN instead of GMP] ), [case "$withval" in y|ye|yes|Y|YE|YES) cvc4_use_cln=1 ;; n|no|N|NO) cvc4_use_cln=0 ;; esac ] ) AC_ARG_WITH( [gmp], AS_HELP_STRING( [--with-gmp], [use GMP instead of CLN] ), [case "$withval" in y|ye|yes|Y|YE|YES) cvc4_use_gmp=1 ;; n|no|N|NO) cvc4_use_gmp=0 ;; esac ] ) if test $cvc4_use_cln = 1 -a $cvc4_use_gmp = 1 || test $cvc4_use_cln = 0 -a $cvc4_use_gmp = 0; then AC_MSG_ERROR([You must use either CLN and GMP. Please pick one.]) fi if test $cvc4_use_gmp = 1; then cvc4_use_cln=0 elif test $cvc4_use_gmp = 0; then cvc4_use_cln=1 elif test $cvc4_use_cln = 1; then cvc4_use_gmp=0 elif test $cvc4_use_cln = 0; then cvc4_use_gmp=1 fi # try GMP, fail if not found; GMP is required for both CLN and for GMP # versions of CVC4 AC_CHECK_LIB(gmp, __gmpz_init, , [AC_MSG_ERROR([GNU MP (libgmp) not found, see http://gmplib.org/])]) if test $cvc4_use_cln = 2; then if test "$CVC4_BSD_LICENSED_CODE_ONLY" = 1 -o "$with_portfolio" = yes; then cvc4_use_cln=0 cvc4_use_gmp=1 fi fi if test $cvc4_use_cln != 0; then # [mdeters] The PKG_CHECK_MODULES macro isn't customizable and doesn't fail # gracefully. You can only specify it once for a given library name. That # is, even on separate if/else branches, you can't put # PKG_CHECK_MODULES([CLN], ...). That's why things are so convoluted here, # we have to have PKG_CHECK_MODULES _exactly_ once in configure.ac ! PKG_CHECK_MODULES([CLN], [cln >= 1.2.2], [AC_LANG_PUSH([C++]) save_LIBS="$LIBS" save_CXXFLAGS="$CXXFLAGS" LIBS="$CLN_LIBS $LIBS" CXXFLAGS="$CLN_CFLAGS $CXXFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[cln::cl_F pi = "3.1415926";]])], [ cvc4_use_cln=1 ], [ if test $cvc4_use_cln = 1; then # fail AC_MSG_ERROR([CLN installation missing, too old, or not functional for this architecture]) else # fall back to GMP AC_MSG_NOTICE([CLN installation missing, too old, or not functional for this architecture, will use gmp instead]) cvc4_use_cln=0 cvc4_use_gmp=1 fi ]) CXXFLAGS="$save_CXXFLAGS" LIBS="$save_LIBS" AC_LANG_POP([C++]) ], [if test $cvc4_use_cln = 1; then # fail AC_MSG_ERROR([CLN not installed (or too old) or pkgconfig missing]) else # fall back to GMP AC_MSG_NOTICE([CLN not installed (or too old) or pkgconfig missing, will use gmp]) cvc4_use_cln=0 cvc4_use_gmp=1 fi ] ) fi if test $cvc4_use_cln = 0; then # try GMPXX, fail if not found; don't need to link against it, only need its header AC_LANG_PUSH([C++]) AC_CHECK_HEADER([gmpxx.h], , [AC_MSG_ERROR([GNU MP C++ library header (gmpxx.h) required but not found, see http://gmplib.org/])]) AC_LANG_POP([C++]) cvc4_cln_or_gmp=gmp else CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }$CLN_CFLAGS" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }$CLN_CFLAGS" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }$CLN_CFLAGS" LIBS="$CLN_LIBS${LIBS:+ $LIBS}" cvc4_cln_or_gmp=cln fi if test $cvc4_cln_or_gmp = cln; then AC_DEFINE_UNQUOTED(CVC4_CLN_IMP, [], [Defined if using the CLN multi-precision arithmetic library.]) else AC_DEFINE_UNQUOTED(CVC4_GMP_IMP, [], [Defined if using the GMP multi-precision arithmetic library.]) fi AM_CONDITIONAL([CVC4_CLN_IMP], [test $cvc4_cln_or_gmp = cln]) AM_CONDITIONAL([CVC4_GMP_IMP], [test $cvc4_cln_or_gmp = gmp]) # construct the build string AC_MSG_CHECKING([for appropriate build string]) if test -z "$ac_confdir"; then ac_confdir="$srcdir" fi build_type=`$ac_confdir/config/build-type $with_build $btargs $cvc4_cln_or_gmp` AC_MSG_RESULT($build_type) # Require building in target and build-specific build directory: # # If the configure script is invoked from the top-level source # directory, it creates a suitable build directory (based on the build # architecture and build profile from $build_type), changes into it, # and reinvokes itself. CVC4_CONFIGURE_IN_BUILDS is an envariable # that breaks any possibility of infinite recursion in this process. AC_MSG_CHECKING([what dir to configure]) if test "$CVC4_CONFIGURE_IN_BUILDS" = yes; then AC_MSG_RESULT([this one (in builds/)]) elif test "$CVC4_CONFIGURE_AT_TOP_LEVEL" = yes; then AC_MSG_RESULT([builds/$target/$build_type]) $as_echo if test -z "$ac_srcdir"; then mkbuilddir=./config/mkbuilddir else mkbuilddir=$ac_srcdir/config/mkbuilddir fi $as_echo "$mkbuilddir $target $build_type" source $mkbuilddir "$target" "$build_type" $as_echo "cd builds/$target/$build_type" cd "builds/$target/$build_type" CVC4_CONFIGURE_IN_BUILDS=yes; export CVC4_CONFIGURE_IN_BUILDS # Runs the single recursive configure invocation using a relative path. # See https://lists.gnu.org/archive/html/autoconf/2011-04/msg00060.html echo "$SHELL ../../../configure ${config_cmdline[[@]]}" "$SHELL" "../../../configure" "${config_cmdline[[@]]}" exitval=$? cd ../../.. if test $exitval -eq 0; then cat >config.reconfig <&2; exit; fi current=(\`grep '^CURRENT_BUILD' builds/current | sed 's,^CURRENT_BUILD *= *\([^/]*\\)/\\(.*\\),\\1 \\2,'\`) arch=\${current[0]} build=\${current[1]} echo "reconfiguring in builds/\$arch/\$build..." cd "builds/\$arch/\$build" echo ./config.status "\$@" ./config.status "\$@"] EOF chmod +x config.reconfig fi ln -sf "$target/$build_type/config.log" "builds/config.log" exit $exitval else AC_MSG_RESULT([this one (user-specified)]) fi as_me=configure # Unpack standard build types. Any particular options can be overriden with # --enable/disable-X options # Tim: This needs to keep CVC4CPPFLAGS, CVC4CXXFLAGS, etc. set by earlier checks case "$with_build" in production) # highly optimized, no assertions, no tracing, dumping CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden' if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=3 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_replay+set}" ; then enable_replay=no ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=no ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; debug) # unoptimized, debug symbols, assertions, tracing, dumping CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_DEBUG" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-fno-inline" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-fno-inline" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN= if test -z "${enable_optimized+set}" ; then enable_optimized=no ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_replay+set}" ; then enable_replay=yes ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; default) # moderately optimized, assertions, tracing, dumping CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden' if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=2 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi if test -z "${enable_replay+set}" ; then enable_replay=yes ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi ;; competition) # maximally optimized, no assertions, no tracing, no dumping, muzzled CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_COMPETITION_MODE" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-funroll-all-loops -fexpensive-optimizations -fno-enforce-eh-specs" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-funroll-all-loops -fexpensive-optimizations -fno-enforce-eh-specs" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }" FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden' if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=9 ; fi if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=no ; fi if test -z "${enable_statistics+set}" ; then enable_statistics=no ; fi if test -z "${enable_replay+set}" ; then enable_replay=no ; fi if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi if test -z "${enable_proof+set}" ; then enable_proof=no ; fi if test -z "${enable_tracing+set}" ; then enable_tracing=no ; fi if test -z "${enable_dumping+set}" ; then enable_dumping=no ; fi if test -z "${enable_muzzle+set}" ; then enable_muzzle=yes ; fi if test -z "${user_specified_enable_or_disable_shared}"; then enable_shared=no; fi if test -z "${user_specified_enable_or_disable_static}"; then enable_static=yes; fi if test -z "${enable_static_binary+set}"; then enable_static_binary=yes ; fi ;; *) AC_MSG_FAILURE([unknown build profile: $with_build]) ;; esac if test -z "${OPTLEVEL+set}"; then OPTLEVEL=3; fi AM_CONDITIONAL([CVC4_BUILD_PROFILE_PRODUCTION], [test "$with_build" = production]) AM_CONDITIONAL([CVC4_BUILD_PROFILE_DEBUG], [test "$with_build" = debug]) AM_CONDITIONAL([CVC4_BUILD_PROFILE_DEFAULT], [test "$with_build" = default]) AM_CONDITIONAL([CVC4_BUILD_PROFILE_COMPETITION], [test "$with_build" = competition]) # permit a static binary AC_MSG_CHECKING([whether to build a static binary]) AC_ARG_ENABLE([static-binary], [AS_HELP_STRING([--enable-static-binary], [build a fully statically-linked binary [default=no]])]) if test -z "${enable_static_binary+set}"; then enable_static_binary=no fi AC_MSG_RESULT([$enable_static_binary]) if test "$enable_static_binary" = yes; then if test "$target_vendor" = apple; then if test -z "$MAC_STATIC_BINARY_MANUAL_OVERRIDE"; then AC_MSG_ERROR([[Statically-linked binaries are not supported on Mac OS. See https://developer.apple.com/library/mac/#qa/qa2001/qa1118.html . (If you ABSOLUTELY insist on this going forward and you know what you are doing, set MAC_STATIC_BINARY_MANUAL_OVERRIDE=1)]]) else AC_MSG_WARN([MAC_STATIC_BINARY_MANUAL_OVERRIDE was set!]) AC_MSG_WARN([Will make a static binary during this build. Note that it may fail!]) fi fi if test "$enable_static" != yes; then enable_static=yes AC_MSG_WARN([forcing static-library building, --enable-static-binary given]) fi fi AC_MSG_CHECKING([whether to support proofs in libcvc4]) AC_ARG_ENABLE([proof], [AS_HELP_STRING([--disable-proof], [do not support proof generation])]) if test -z "${enable_proof+set}"; then enable_proof=yes fi AC_MSG_RESULT([$enable_proof]) if test "$enable_proof" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PROOF" fi AM_CONDITIONAL([CVC4_PROOF], [test "$enable_proof" = yes]) AC_MSG_CHECKING([whether to optimize libcvc4]) AC_ARG_ENABLE([optimized], [AS_HELP_STRING([--enable-optimized], [optimize the build])]) if test -z "${enable_optimized+set}"; then enable_optimized=no fi AC_MSG_RESULT([$enable_optimized]) if test "$enable_optimized" = yes; then CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-O$OPTLEVEL" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-O$OPTLEVEL" else CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-O0" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-O0" fi AC_MSG_CHECKING([whether to include debugging symbols in libcvc4]) AC_ARG_ENABLE([debug-symbols], [AS_HELP_STRING([--disable-debug-symbols], [do not include debug symbols in libcvc4])]) if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes fi AC_MSG_RESULT([$enable_debug_symbols]) if test "$enable_debug_symbols" = yes; then CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-ggdb3" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-ggdb3" fi AC_MSG_CHECKING([whether to include statistics are turned on in libcvc4]) AC_ARG_ENABLE([statistics], [AS_HELP_STRING([--disable-statistics], [do not include statistics in libcvc4])]) if test -z "${enable_statistics+set}"; then enable_statistics=yes fi AC_MSG_RESULT([$enable_statistics]) if test "$enable_statistics" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_STATISTICS_ON" fi AC_MSG_CHECKING([whether the replay feature should be turned on in libcvc4]) AC_ARG_ENABLE([replay], [AS_HELP_STRING([--disable-replay], [turn off the replay feature in libcvc4])]) if test -z "${enable_replay+set}"; then enable_replay=yes fi AC_MSG_RESULT([$enable_replay]) if test "$enable_replay" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_REPLAY" fi AC_MSG_CHECKING([whether to include assertions in build]) AC_ARG_ENABLE([assertions], [AS_HELP_STRING([--disable-assertions], [turn off assertions in build])]) if test -z "${enable_assertions+set}"; then enable_assertions=yes fi AC_MSG_RESULT([$enable_assertions]) if test "$enable_assertions" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_ASSERTIONS" else # turn off regular C assert() also CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DNDEBUG" fi AC_MSG_CHECKING([whether to do a traceable build of CVC4]) AC_ARG_ENABLE([tracing], [AS_HELP_STRING([--disable-tracing], [remove all tracing code from CVC4])]) if test -z "${enable_tracing+set}"; then enable_tracing=yes fi AC_MSG_RESULT([$enable_tracing]) if test "$enable_tracing" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_TRACING" fi AC_MSG_CHECKING([whether to do a dump-capable build of CVC4]) AC_ARG_ENABLE([dumping], [AS_HELP_STRING([--disable-dumping], [remove all dumping code from CVC4])]) if test -z "${enable_dumping+set}"; then enable_dumping=yes fi AC_MSG_RESULT([$enable_dumping]) if test "$enable_dumping" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_DUMPING" fi AC_MSG_CHECKING([whether to do a muzzled build of CVC4]) AC_ARG_ENABLE([muzzle], [AS_HELP_STRING([--enable-muzzle], [completely silence CVC4; remove ALL non-result output from build])]) if test -z "${enable_muzzle+set}"; then enable_muzzle=no fi AC_MSG_RESULT([$enable_muzzle]) if test "$enable_muzzle" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_MUZZLE" fi AC_MSG_CHECKING([whether to do a gcov-enabled build of CVC4]) AC_ARG_ENABLE([coverage], [AS_HELP_STRING([--enable-coverage], [build with support for gcov coverage testing])]) if test -z "${enable_coverage+set}"; then enable_coverage=no # make COVERAGE_ON the empty string for makefile conditional function # $(if $(COVERAGE_ON), action1, action2) COVERAGE_ON= fi AC_MSG_RESULT([$enable_coverage]) if test "$enable_coverage" = yes; then # For coverage testing, we prefer: # --enable-static --disable-shared --disable-static-binary # If the user didn't specify these, we force them here. If the # user specified them in opposite phase, give warnings that they # shouldn't do that, or bomb out. COVERAGE_ON=yes if test "$user_specified_enable_or_disable_shared" != yes; then enable_shared=no AC_MSG_WARN([turning off shared library building due to --enable-coverage]) elif test "$enable_shared" = yes; then AC_MSG_WARN([]) AC_MSG_WARN([It is not recommended to configure with --enable-coverage --enable-shared]) AC_MSG_WARN([gcov does not support shared libraries, so only your static libraries will be coverage-testable.]) AC_MSG_WARN([Your cvc4 driver and testing binaries will not be coverage-testable.]) AC_MSG_WARN([]) fi if test "${enable_static_binary+set}" = set -a "$enable_static_binary" = yes; then AC_MSG_WARN([]) AC_MSG_WARN([It is not recommended to configure with --enable-coverage --enable-static-binary]) AC_MSG_WARN([Your cvc4 driver and testing binaries will be fully-statically linked and may not be coverage-testable.]) AC_MSG_WARN([]) fi if test "$user_specified_enable_or_disable_static" != yes; then enable_static=yes AC_MSG_WARN([turning on static library building due to --enable-coverage]) elif test "$enable_static" != yes; then AC_MSG_ERROR([--enable-coverage and --disable-static are incompatible; gcov only supports static libraries.]) fi CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_COVERAGE" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }--coverage" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }--coverage" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }--coverage" fi AC_MSG_CHECKING([whether to do a profiling-enabled build of CVC4]) AC_ARG_ENABLE([profiling], [AS_HELP_STRING([--enable-profiling], [build with support for gprof profiling])]) if test -z "${enable_profiling+set}"; then enable_profiling=no fi AC_MSG_RESULT([$enable_profiling]) if test "$enable_profiling" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PROFILING" CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-pg" CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-pg" CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }-pg" fi # Check for libglpk (defined in config/glpk.m4) AC_ARG_WITH([glpk], [AS_HELP_STRING([--with-glpk], [use GLPK simplex solver])], [], [with_glpk=]) CVC4_CHECK_FOR_GLPK if test $have_libglpk -eq 1; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_GLPK" fi AM_CONDITIONAL([CVC4_USE_GLPK], [test $have_libglpk -eq 1]) AC_SUBST([GLPK_LDFLAGS]) AC_SUBST([GLPK_LIBS]) # Build with libabc (defined in config/abc.m4) AC_ARG_WITH([abc], [AS_HELP_STRING([--with-abc], [use the ABC AIG library])], [], [with_abc=]) CVC4_CHECK_FOR_ABC if test $have_libabc -eq 1; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_ABC" fi AM_CONDITIONAL([CVC4_USE_ABC], [test $have_libabc -eq 1]) AC_SUBST([ABC_LDFLAGS]) AC_SUBST([ABC_LIBS]) # Build with libcryptominisat AC_ARG_WITH([cryptominisat], [AS_HELP_STRING([--with-cryptominisat], [use the CRYPTOMINISAT sat solver])], [], [with_cryptominisat=]) CVC4_CHECK_FOR_CRYPTOMINISAT if test $have_libcryptominisat -eq 1; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_CRYPTOMINISAT" CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-I$CRYPTOMINISAT_HOME/install/include" fi AM_CONDITIONAL([CVC4_USE_CRYPTOMINISAT], [test $have_libcryptominisat -eq 1]) AC_SUBST([CRYPTOMINISAT_LDFLAGS]) AC_SUBST([CRYPTOMINISAT_LIBS]) # Check to see if this version/architecture of GNU C++ explicitly # instantiates __gnu_cxx::hash or not. Some do, some don't. # See src/util/hash.h. AC_MSG_CHECKING([whether __gnu_cxx::hash is already specialized]) AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include #include namespace __gnu_cxx { template<> struct hash {}; }])], [AC_MSG_RESULT([no]); CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_NEED_HASH_UINT64_T"], [AC_MSG_RESULT([yes])]) AC_LANG_POP([C++]) # Check whether "long" and "int64_t" are distinct types w.r.t. overloading. # Even if they have the same size, they can be distinct, and some platforms # can have problems with ambiguous function calls when auto-converting # int64_t to long, and others will complain if you overload a function # that takes an int64_t with one that takes a long (giving a redefinition # error). So we have to keep both happy. Probably the same underlying # issue as the hash specialization above, but let's check separately # for flexibility. AC_MSG_CHECKING([for the relationship between long and int64_t]) AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include void foo(long) {} void foo(int64_t) {}])], [AC_MSG_RESULT([no relationship detected]); CVC4_NEED_INT64_T_OVERLOADS=1], [AC_MSG_RESULT([typedef or similar]); CVC4_NEED_INT64_T_OVERLOADS=0]) AC_LANG_POP([C++]) AC_SUBST([CVC4_NEED_INT64_T_OVERLOADS]) # Check for ANTLR runantlr script (defined in config/antlr.m4) AC_PROG_ANTLR CVC4_CXX_OPTION([-Werror], [WERROR]) CVC4_C_OPTION([-Werror], [C_WERROR]) CVC4_CXX_OPTION([-Wno-deprecated], [WNO_DEPRECATED]) CVC4_C_OPTION([-Wno-deprecated], [C_WNO_DEPRECATED]) CVC4_CXX_OPTION([-Wno-conversion-null], [WNO_CONVERSION_NULL]) CVC4_CXX_OPTION([-Wno-tautological-compare], [WNO_TAUTOLOGICAL_COMPARE]) CVC4_CXX_OPTION([-Wno-parentheses], [WNO_PARENTHESES]) CVC4_CXX_OPTION([-Wno-uninitialized], [WNO_UNINITIALIZED]) CVC4_CXX_OPTION([-Wno-unused-variable], [WNO_UNUSED_VARIABLE]) CVC4_CXX_OPTION([-fno-strict-aliasing], [FNO_STRICT_ALIASING]) AC_SUBST([WERROR]) AC_SUBST([WNO_CONVERSION_NULL]) AC_SUBST([WNO_TAUTOLOGICAL_COMPARE]) AC_SUBST([WNO_PARENTHESES]) AC_SUBST([WNO_UNINITIALIZED]) AC_SUBST([WNO_UNUSED_VARIABLE]) AC_SUBST([FNO_STRICT_ALIASING]) # On Mac, we have to fix the visibility of standard library symbols. # Otherwise, exported template instantiations---even though explicitly # CVC4_PUBLIC, can be generated as symbols with internal-only linkage. # Presumably, Apple is distributing a libstdc++ that is built *without* # --enable-libstdcxx-visibility (?) if test "$target_vendor" = apple; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-D_GLIBCXX_VISIBILITY_DEFAULT=\"__attribute__((__visibility__(\\\"default\\\")))\"" fi # Tell top-level Makefile to include $(top_srcdir)/personal.mk AC_ARG_ENABLE([personal-make-rules], [AS_HELP_STRING([--enable-personal-make-rules], [include top-level personal.mk (if it exists)])]) if test "$enable_personal_make_rules" = yes; then # This allows us to include a personal.mk makefile from every # generated makefile. Named zz_* in order to make sure this # comes last, so it gets other definitions (in particular top_srcdir). zz_cvc4_use_personal_make_rules='yes all:; include $(top_srcdir)/personal.mk $(top_srcdir)/personal.mk:; @touch "$@"' AC_SUBST([zz_cvc4_use_personal_make_rules]) fi # Doxygen configuration AC_ARG_ENABLE([internals-documentation], [AS_HELP_STRING([--enable-internals-documentation], [build Doxygen documentation for static and private member functions])]) if test "$enable_internals_documentation" = yes; then DOXYGEN_EXTRACT_PRIVATE=YES DOXYGEN_EXTRACT_STATIC=YES else DOXYGEN_EXTRACT_PRIVATE=NO DOXYGEN_EXTRACT_STATIC=NO fi AC_SUBST([DOXYGEN_EXTRACT_PRIVATE]) AC_SUBST([DOXYGEN_EXTRACT_STATIC]) DX_MAN_FEATURE(OFF) DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) DX_DOT_FEATURE(OFF) DX_INIT_DOXYGEN($PACKAGE_NAME, config/doxygen.cfg, $srcdir/doc/doxygen) AC_ARG_ENABLE([unit-testing], AS_HELP_STRING([--disable-unit-testing], [don't build support for unit testing, even if available]), , [enable_unit_testing=check]) AC_ARG_VAR(CXXTEST, [path to CxxTest installation]) AC_SUBST([CXXTEST]) AC_ARG_WITH([cxxtest-dir], [AS_HELP_STRING([--with-cxxtest-dir=DIR], [path to CxxTest installation])], [CXXTEST="$withval"]) # In the case of "./configure --with-cxxtest-dir=../cxxtest" (or other # relative path) and having switched the configure directory (see above), # search with respect to the top source dir, not the build dir if test "$CVC4_CONFIGURE_IN_BUILDS" = yes -a -n "$CXXTEST"; then case "$CXXTEST" in /*) ;; *) CXXTEST="$srcdir/$CXXTEST" ;; esac fi TESTS_ENVIRONMENT= RUN_REGRESSION_ARGS= if test "$enable_proof" = yes; then RUN_REGRESSION_ARGS="${RUN_REGRESSION_ARGS:+$RUN_REGRESSION_ARGS }--proof" fi AC_SUBST([TESTS_ENVIRONMENT]) AC_SUBST([RUN_REGRESSION_ARGS]) CXXTESTGEN= AC_PATH_PROG(CXXTESTGEN, cxxtestgen.pl, [], [$CXXTEST:$PATH]) if test -z "$CXXTESTGEN"; then AC_PATH_PROG(CXXTESTGEN, cxxtestgen.py, [], [$CXXTEST:$PATH]) fi if test -z "$CXXTESTGEN"; then AC_PATH_PROG(CXXTESTGEN, cxxtestgen, [], [$CXXTEST:$PATH]) fi # The latest version of cxxtest distributed from the git repository places # cxxtest under /bin/cxxtest if test -z "$CXXTESTGEN"; then AC_PATH_PROG(CXXTESTGEN, cxxtestgen, [], [$CXXTEST/bin:$PATH]) fi if test "$enable_unit_testing" = "no"; then AC_MSG_NOTICE([unit tests disabled by user request.]) CXXTESTGEN= CXXTEST= elif test -z "$CXXTESTGEN"; then AC_MSG_NOTICE([unit tests disabled, could not find cxxtestgen.pl or cxxtestgen.py or cxxtestgen]) elif test -z "$CXXTEST"; then CXXTEST=`dirname "$CXXTESTGEN"` AC_MSG_CHECKING([for location of CxxTest headers]) if test -e "$CXXTEST/cxxtest/TestRunner.h"; then AC_MSG_RESULT([$CXXTEST]) else if test -e "/usr/include/cxxtest/TestRunner.h"; then AC_MSG_RESULT([/usr/include]) else AC_MSG_RESULT([not found]) AC_MSG_WARN([unit tests disabled, CxxTest headers not found.]) CXXTESTGEN= CXXTEST= fi fi fi if test "$enable_unit_testing" = yes -a -z "$CXXTESTGEN"; then AC_MSG_ERROR([--enable-unit-testing given but cxxtest not found.]) fi AM_CONDITIONAL([HAVE_CXXTESTGEN], [test -n "$CXXTESTGEN"]) AC_ARG_VAR(TEST_CPPFLAGS, [CPPFLAGS to use when testing (default=$CPPFLAGS)]) AC_ARG_VAR(TEST_CXXFLAGS, [CXXFLAGS to use when testing (default=$CXXFLAGS)]) AC_ARG_VAR(TEST_LDFLAGS, [LDFLAGS to use when testing (default=$LDFLAGS)]) AC_ARG_VAR(PERL, [PERL interpreter (used when testing)]) if test -n "$CXXTEST"; then if test -z "$PERL"; then AC_CHECK_PROGS(PERL, perl, perl, []) else AC_CHECK_PROG(PERL, "$PERL", "$PERL", []) fi if test -z "$PERL"; then AC_MSG_WARN([unit tests disabled, perl not found.]) CXXTESTGEN= CXXTEST= fi fi AC_ARG_VAR(PYTHON, [PYTHON interpreter (used for building legacy Java library interface)]) if test -z "$PYTHON"; then AC_CHECK_PROGS(PYTHON, python, python, []) else AC_CHECK_PROG(PYTHON, "$PYTHON", "$PYTHON", []) fi if test -z "$PYTHON"; then AC_MSG_WARN([python not found, cannot build libcvc4compat_java (the legacy Java interface).]) CXXTESTGEN= CXXTEST= fi # Checks for libraries. AC_SEARCH_LIBS([clock_gettime], [rt pthread], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Defined to 1 if clock_gettime() is supported by the platform.])], [AC_LIBOBJ([clock_gettime])]) AC_CHECK_FUNC([strtok_r], [AC_DEFINE([HAVE_STRTOK_R], [1], [Defined to 1 if strtok_r() is supported by the platform.])]) AC_CHECK_FUNC([ffs], [AC_DEFINE([HAVE_FFS], [1], [Defined to 1 if ffs() is supported by the platform.])]) AC_LIBOBJ([strtok_r ffs]) # Check for sigaltstack (missing in emscripten and mingw) AC_CHECK_FUNC([sigaltstack], [AC_DEFINE([HAVE_SIGALTSTACK], [1], [Defined to 1 if sigaltstack() is supported by the platform.])]) # Check for antlr C++ runtime (defined in config/antlr.m4) AC_LIB_ANTLR # Check for user preferences for language bindings to build, and for # build support. The arg list is the default set if unspecified by # the user (the actual built set is the subset that appears to be # supported by the build host). CVC4_CHECK_BINDINGS([c java])dnl csharp perl php python ruby tcl ocaml]) # Checks for header files and their contents. AC_CHECK_HEADERS([getopt.h unistd.h ext/stdio_filebuf.h]) # Checks for typedefs, structures, and compiler characteristics. #AC_HEADER_STDBOOL # these are bad macros, they clash with system header !! #AC_TYPE_UINT16_T #AC_TYPE_UINT32_T #AC_TYPE_UINT64_T #AC_TYPE_SIZE_T # guard against double-inclusion of the autoheader AH_TOP([#ifndef __CVC4__CVC4AUTOCONFIG_H #define __CVC4__CVC4AUTOCONFIG_H]) AH_BOTTOM([#endif /* __CVC4__CVC4AUTOCONFIG_H */]) AC_CHECK_DECLS([optreset], [], [], [#include ]) # check with which standard strerror_r() complies AC_FUNC_STRERROR_R # is is_sorted() in std or __gnu_cxx? CHECK_FOR_IS_SORTED # require boost library BOOST_REQUIRE() # look for boost threading library AC_ARG_WITH([portfolio], AS_HELP_STRING([--with-portfolio], [build the multithreaded portfolio version of CVC4 (pcvc4)])) cvc4_save_LDFLAGS="$LDFLAGS" if test "$enable_static_binary" = yes; then LDFLAGS="-static $LDFLAGS" fi cvc4_has_threads=yes AC_ARG_ENABLE([thread-support], AS_HELP_STRING([--disable-thread-support], [do not support multithreaded-capable library])) if test "$enable_thread_support" = no; then cvc4_has_threads=no if test "$with_portfolio" = yes; then AC_MSG_ERROR([user gave both --with-portfolio and --disable-thread-support, which are contradictory]) fi else BOOST_THREADS([], [AC_MSG_WARN([disabling multithreaded support]) cvc4_has_threads=no]) fi LDFLAGS="$cvc4_save_LDFLAGS" if test $cvc4_has_threads = no; then if test "$enable_thread_support" = yes; then AC_MSG_ERROR([user gave --enable-thread-support but could not build with threads; maybe boost threading library is missing?]) fi if test "$with_portfolio" = yes; then AC_MSG_ERROR([user gave --with-portfolio but could not build with threads; maybe boost threading library is missing?]) fi with_portfolio=no fi if test "$with_portfolio" != yes; then with_portfolio=no fi AM_CONDITIONAL([CVC4_BUILD_PCVC4], [test "$with_portfolio" = yes]) if test "$with_portfolio" = yes; then CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PORTFOLIO" # see if Boost has thread attributes (should be any version >= 1.50.0) # non-fatal error if not, but we won't support --thread-stack option AC_MSG_CHECKING([whether Boost threads support thread attrs]) AC_LANG_PUSH([C++]) cvc4_save_CPPFLAGS="$CPPFLAGS" cvc4_save_LIBS="$LIBS" cvc4_save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" LIBS="$LIBS $BOOST_THREAD_LIBS" LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS" AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [boost::thread::attributes attrs; attrs.set_stack_size(10 * 1024 * 1024);])], [cvc4_boost_has_thread_attr=1; AC_MSG_RESULT([yes])], [cvc4_boost_has_thread_attr=0; AC_MSG_RESULT([no])]) CPPFLAGS="$cvc4_save_CPPFLAGS" LIBS="$cvc4_save_LIBS" LDFLAGS="$cvc4_save_LDFLAGS" AC_LANG_POP([C++]) else cvc4_boost_has_thread_attr=0 fi AC_DEFINE_UNQUOTED([BOOST_HAS_THREAD_ATTR], $cvc4_boost_has_thread_attr, [Define to 1 if Boost threading library has support for thread attributes]) # Check for libreadline (defined in config/readline.m4) AC_ARG_WITH([readline], [AS_HELP_STRING([--with-readline], [support the readline library])], [], [with_readline=check]) # make the flags as close as possible to the final flags, because the Boost # flags can bring in a different, incompatible readline library than we'd # get otherwise (e.g. on Mac, where there are commonly two different readlines, # one in /usr and one in /opt/local) cvc4_rlcheck_save_CPPFLAGS="$CPPFLAGS" cvc4_rlcheck_save_CXXFLAGS="$CXXFLAGS" cvc4_rlcheck_save_CFLAGS="$CFLAGS" cvc4_rlcheck_save_LDFLAGS="$LDFLAGS" CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }${BOOST_CPPFLAGS:+$BOOST_CPPFLAGS }$CVC4CPPFLAGS" CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$CVC4CXXFLAGS $WNO_DEPRECATED" CFLAGS="${CFLAGS:+$CFLAGS }$CVC4CFLAGS $C_WNO_DEPRECATED -fexceptions" LDFLAGS="${LDFLAGS:+$LDFLAGS }$CVC4LDFLAGS" CVC4_CHECK_FOR_READLINE CPPFLAGS="$cvc4_rlcheck_save_CPPFLAGS" CXXFLAGS="$cvc4_rlcheck_save_CXXFLAGS" CFLAGS="$cvc4_rlcheck_save_CFLAGS" LDFLAGS="$cvc4_rlcheck_save_LDFLAGS" AC_DEFINE_UNQUOTED([HAVE_LIBREADLINE], $have_libreadline, [Define to 1 to use libreadline]) AC_DEFINE_UNQUOTED([READLINE_COMPENTRY_FUNC_RETURNS_CHARP], $readline_compentry_func_returns_charp, [Define to 1 if rl_completion_entry_function is declared to return pointer to char]) AC_SUBST([READLINE_LIBS]) # Whether to build compatibility library CVC4_BUILD_LIBCOMPAT=yes AC_ARG_WITH([compat], AS_HELP_STRING([--with-compat], [build compatibility library (CVC3 API layer)]), [if test "$withval" = no; then CVC4_BUILD_LIBCOMPAT=no; fi]) AC_MSG_CHECKING([whether to build compatibility library (CVC3 API layer)]) if test "$CVC4_BUILD_LIBCOMPAT" = yes; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no, disabled by user]) fi AC_SUBST(CVC4_BUILD_LIBCOMPAT) AM_CONDITIONAL([CVC4_BUILD_LIBCOMPAT], [test "$CVC4_BUILD_LIBCOMPAT" = yes]) # Check for availability of TLS support (e.g. __thread storage class) AC_MSG_CHECKING([whether to use compiler-supported TLS if available]) AC_ARG_ENABLE([tls], AS_HELP_STRING([--disable-tls], [don't use compiler-native TLS])) if test $cvc4_has_threads = no; then # We disable TLS entirely by simply telling the build system that # the empty string is the __thread keyword. AC_MSG_RESULT([multithreading disabled]) CVC4_TLS_SUPPORTED=1 CVC4_TLS= CVC4_TLS_explanation='disabled (no multithreading support)' else if test -z "${enable_tls+set}" || test "$enable_tls" = "yes"; then AC_MSG_RESULT([yes]) AX_TLS([CVC4_TLS=$ac_cv_tls], [CVC4_TLS=]) else AC_MSG_RESULT([no]) CVC4_TLS= fi if test -n "$CVC4_TLS"; then CVC4_TLS_SUPPORTED=1 CVC4_TLS_explanation="$CVC4_TLS" else CVC4_TLS_explanation='pthread_getspecific()' CVC4_TLS_SUPPORTED=0 fi fi AC_SUBST([CVC4_TLS]) AC_SUBST([CVC4_TLS_SUPPORTED]) # Whether to compile with google profiling tools cvc4_use_google_perftools=0 AC_ARG_WITH( [google_perftools], AS_HELP_STRING( [--with-google-perftools], [use Google Performance Tools] ), [if test "$withval" != no; then cvc4_use_google_perftools=1 fi ] ) AC_MSG_CHECKING([whether to link in google perftools libraries]) if test $cvc4_use_google_perftools = 1; then AC_MSG_RESULT([yes]) AC_CHECK_LIB([tcmalloc], [MallocExtension_GetAllocatedSize], , [AC_MSG_ERROR([cannot link google-perftools test program with -ltcmalloc])], [-lpthread]) AC_CHECK_LIB([profiler], [ProfilerStart], , [AC_MSG_ERROR([cannot link google-perftools test program with -lprofiler])], [-lpthread]) else AC_MSG_RESULT([no (user didn't request it)]) fi # Java AC_ARG_VAR(JAVA, [Java interpreter (used when testing Java interface)]) AC_ARG_VAR(JAVAC, [Java compiler (used when building and testing Java interface)]) AC_ARG_VAR(JAVAH, [Java compiler (used when building and testing Java interface)]) AC_ARG_VAR(JAR, [Jar archiver (used when building Java interface)]) if test "$cvc4_build_java_bindings"; then dnl AM_PROG_GCJ if test -z "$JAVA"; then AC_CHECK_PROGS(JAVA, java, java, []) else AC_CHECK_PROG(JAVA, "$JAVA", "$JAVA", []) fi if test -z "$JAVAC"; then AC_CHECK_PROGS(JAVAC, javac gcj, javac, []) if test "$JAVAC" = gcj; then JAVAC='gcj -C'; fi else AC_CHECK_PROG(JAVAC, "$JAVAC", "$JAVAC", []) fi if test -z "$JAVAH"; then AC_CHECK_PROGS(JAVAH, javah gcjh, javah, []) else AC_CHECK_PROG(JAVAH, "$JAVAH", "$JAVAH", []) fi if test -z "$JAR"; then AC_CHECK_PROGS(JAR, jar, jar, []) else AC_CHECK_PROG(JAR, "$JAR", "$JAR", []) fi fi # on Mac OS X, Java doesn't like the .so module extension; it wants .dylib module=no eval CVC4_JAVA_MODULE_EXT="$shrext_cmds" if test -z "$CVC4_JAVA_MODULE_EXT"; then CVC4_JAVA_MODULE_EXT=.so fi AC_SUBST([CVC4_JAVA_MODULE_EXT]) # Prepare configure output if test "$enable_shared" = yes; then BUILDING_SHARED=1; else BUILDING_SHARED=0; fi if test "$enable_static" = yes; then BUILDING_STATIC=1; else BUILDING_STATIC=0; fi if test "$enable_static_binary" = yes; then STATIC_BINARY=1; else STATIC_BINARY=0; fi AC_SUBST(BUILDING_SHARED) AC_SUBST(BUILDING_STATIC) AC_SUBST(STATIC_BINARY) AM_CONDITIONAL([STATIC_BINARY], [test "$enable_static_binary" = yes]) AM_CONDITIONAL([COVERAGE_ENABLED], [test "$enable_coverage" = yes]) AC_SUBST([COVERAGE_ON]) AM_CONDITIONAL([CVC4_DEBUG], [test "$with_build" = debug]) AM_CONDITIONAL([CVC4_TRACING], [test "$enable_tracing" = yes]) AC_SUBST(CVC4_LIBRARY_VERSION) AC_SUBST(CVC4_PARSER_LIBRARY_VERSION) AC_SUBST(CVC4_COMPAT_LIBRARY_VERSION) AC_SUBST(CVC4_BINDINGS_LIBRARY_VERSION) AC_DEFINE_UNQUOTED(CVC4_MAJOR, ${CVC4_MAJOR}, [Major component of the version of CVC4.]) AC_DEFINE_UNQUOTED(CVC4_MINOR, ${CVC4_MINOR}, [Minor component of the version of CVC4.]) AC_DEFINE_UNQUOTED(CVC4_RELEASE, ${CVC4_RELEASE}, [Release component of the version of CVC4.]) AC_DEFINE_UNQUOTED(CVC4_EXTRAVERSION, ["${CVC4_EXTRAVERSION}"], [Extraversion component of the version of CVC4.]) AC_DEFINE_UNQUOTED(CVC4_RELEASE_STRING, ["${CVC4_RELEASE_STRING}"], [Full release string for CVC4.]) CPPFLAGS="${CPPFLAGS:+$CPPFLAGS }${BOOST_CPPFLAGS:+$BOOST_CPPFLAGS }$CVC4CPPFLAGS" CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$CVC4CXXFLAGS -Wno-deprecated" CFLAGS="${CFLAGS:+$CFLAGS }$CVC4CFLAGS -Wno-deprecated -fexceptions" LDFLAGS="${LDFLAGS:+$LDFLAGS }$CVC4LDFLAGS" # visibility flag not supported for Windows builds # also increase default stack size for Windows binaries case $host_os in (*mingw*) FLAG_VISIBILITY_HIDDEN= cvc4_LDFLAGS=-Wl,--stack,134217728 pcvc4_LDFLAGS=-Wl,--stack,134217728 esac AC_SUBST(FLAG_VISIBILITY_HIDDEN) AC_SUBST(cvc4_LDFLAGS) AC_SUBST(pcvc4_LDFLAGS) AM_CONDITIONAL(WHITE_AND_BLACK_TESTS, [test -z "$FLAG_VISIBILITY_HIDDEN"]) # remember the command line used for configure AC_SUBST(cvc4_config_cmdline) # mk_include # # When automake scans Makefiles, it complains about non-standard make # features (including GNU extensions), and breaks GNU Make's # "if/endif" construct, replacing the "if" with AM_CONDITIONAL if # constructs. automake even follows "include" and messes with # included Makefiles. # # CVC4 assumes GNU Make and we want to use GNU Make if/endifs, so we # have to hide some included Makefiles with GNU extensions. We do # this by defining mk_include as an autoconf substitution and then # using "@mk_include@ other_makefile" in Makefile.am to include # makefiles with GNU extensions; this hides them from automake. mk_include=include AC_SUBST(mk_include) # Similar trickery for "if" mk_if=if AC_SUBST(mk_if) mk_empty= AC_SUBST(mk_empty) # CVC4_FALSE # # This is used to _always_ comment out rules in automake makefiles, but # still trigger certain automake behavior; see test/unit/Makefile.am. AM_CONDITIONAL([CVC4_FALSE], [false]) # set up substitutions for src/util/{rational,integer}.h.in if test $cvc4_cln_or_gmp = cln; then CVC4_USE_CLN_IMP=1 CVC4_USE_GMP_IMP=0 else CVC4_USE_CLN_IMP=0 CVC4_USE_GMP_IMP=1 fi AC_SUBST(CVC4_USE_CLN_IMP) AC_SUBST(CVC4_USE_GMP_IMP) # month/year for man pages MAN_DATE=`date '+%B %Y'` AC_SUBST(MAN_DATE) AC_CONFIG_FILES([ Makefile.builds Makefile proofs/signatures/Makefile] m4_esyscmd([find contrib src test examples -name Makefile.am | grep -v '^contrib/theoryskel/' | grep -v '^contrib/alttheoryskel/' | sort | sed 's,\.am$,,']) ) if test $cvc4_has_threads = yes; then support_multithreaded='with boost threading library' AM_CONDITIONAL([CVC4_HAS_THREADS], [true]) AC_SUBST([CVC4_HAS_THREADS], 1) else support_multithreaded='no' AM_CONDITIONAL([CVC4_HAS_THREADS], [false]) AC_SUBST([CVC4_HAS_THREADS], 0) fi # Final information to the user gpl=no licensewarn= if test "$custom_build_profile" = yes; then with_build="$with_build (customized)" fi support_unit_tests='cxxtest not found; unit tests not supported' if test -n "$CXXTEST"; then support_unit_tests='unit testing infrastructure enabled in build directory' elif test "$enable_unit_testing" = no; then support_unit_tests='unit testing disabled by user' fi if test "$enable_optimized" = yes; then optimized="yes, at level $OPTLEVEL" else optimized="no" fi if test $have_libglpk -eq 1; then gpl=yes gpllibs="${gpllibs} glpk" fi if test $have_libreadline -eq 1; then gpl=yes gpllibs="${gpllibs} readline" fi if test $cvc4_cln_or_gmp = cln; then mplibrary='cln (GPL)' gpl=yes gpllibs="${gpllibs} cln" if test $with_portfolio = yes; then AC_ERROR([Bad configuration detected: cannot build portfolio with CLN. Please specify only one of --with-portfolio and --with-cln.]) fi else mplibrary='gmp' fi if test "$gpl" = yes; then if test "$CVC4_BSD_LICENSED_CODE_ONLY" = 1; then AC_ERROR([Bad configuration detected: BSD-licensed code only, but also requested GPLed libraries:$gpllibs To permit GPL'ed dependences, use the configure flag --enable-gpl]) fi licensewarn="${licensewarn}"'**************************************************************************** Please note that CVC4 will be built against the following GPLed libraries: '"$gpllibs"' As these libraries are covered under the GPLv3, so is this build of CVC4. CVC4 is also available to you under the terms of the (modified) BSD license. If you prefer to license CVC4 under those terms, please configure with the option "--bsd", which will disable all optional GPLed library dependences. **************************************************************************** ' license="GPLv3 (due to optional libraries; see below)" else licensewarn="${licensewarn}Please note that this configuration is NOT built against any GPL'ed libraries, so it is covered by the (modified) BSD license. This is, however, not the best-performing configuration of CVC4. To build against GPL'ed libraries which improve CVC4's performance, re-configure with '--best --enable-gpl'. " license="modified BSD" fi if test "$gpl" = yes; then isgpl=1; else isgpl=0; fi AC_DEFINE_UNQUOTED(CVC4_GPL_DEPS, $isgpl, [Whether CVC4 is built with the (optional) GPLed library dependences.]) CVC4_COMPAT_LIBRARY_VERSION_or_nobuild="$CVC4_COMPAT_LIBRARY_VERSION" CVC4_BINDINGS_LIBRARY_VERSION_or_nobuild="$CVC4_BINDINGS_LIBRARY_VERSION" if test "$CVC4_BUILD_LIBCOMPAT" = no; then CVC4_COMPAT_LIBRARY_VERSION_or_nobuild="N/A" fi if test -z "$CVC4_LANGUAGE_BINDINGS"; then CVC4_BINDINGS_LIBRARY_VERSION_or_nobuild="N/A" fi bindings_to_be_built=none if test -n "$CVC4_LANGUAGE_BINDINGS"; then bindings_to_be_built="$CVC4_LANGUAGE_BINDINGS" if test -z "$SWIG"; then bindings_to_be_built="$bindings_to_be_built (for CVC3 compatibility layer only; SWIG not found)" fi fi CVC4_CONFIG_FILE_ONLY_IF_CHANGED([src/base/tls.h]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([src/util/integer.h]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([src/util/rational.h]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([doc/cvc4.1_template]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([doc/cvc4.5]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([doc/libcvc4.3_template]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([doc/SmtEngine.3cvc_template]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([doc/options.3cvc_template]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([doc/libcvc4parser.3]) CVC4_CONFIG_FILE_ONLY_IF_CHANGED([doc/libcvc4compat.3]) AC_OUTPUT cat <&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = contrib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ EXTRA_DIST = \ README \ cvc-devel.el \ dimacs_to_smt.pl \ switch-config \ cvc-mode.el \ editing-with-emacs \ luby.c \ addsourcedir \ new-theory \ configure-in-place \ depgraph \ get-antlr-3.4 \ mac-build \ win-build \ run-script-smtcomp2014 \ run-script-cascj7-fnt \ run-script-cascj7-fof \ run-script-cascj7-tff \ theoryskel/kinds \ theoryskel/README.WHATS-NEXT \ theoryskel/theory_DIR.cpp \ theoryskel/theory_DIR.h \ theoryskel/theory_DIR_rewriter.h \ theoryskel/theory_DIR_type_rules.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu contrib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile alttheoryskel/kinds \ alttheoryskel/README.WHATS-NEXT \ alttheoryskel/theory_DIR.cpp \ alttheoryskel/theory_DIR.h # 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: cvc4-1.5/contrib/README000066400000000000000000000002431313116454100145340ustar00rootroot00000000000000This directory is for contributions to CVC4 that aren't directly part of the main project. -- Morgan Deters Mon, 09 Nov 2009 15:14:41 -0500 cvc4-1.5/contrib/addsourcedir000077500000000000000000000050151313116454100162540ustar00rootroot00000000000000#!/bin/sh # # addsourcedir # Morgan Deters for the CVC4 project # Copyright (c) 2010, 2011 The CVC4 Project # # usage: addsourcedir paths... # progname=`basename "$0"` cd `dirname "$0"`/.. if [ $# -lt 1 ]; then echo >&2 echo "usage: $progname paths..." >&2 echo >&2 echo "Each path should be relative to the top-level source directory, e.g.:" >&2 echo >&2 echo " $progname src/expr" >&2 echo >&2 exit 1 fi while [ $# -gt 0 ]; do srcdir="$1"; shift # remove trailing slashes, if any srcdir=`expr "$srcdir" : '\(.*[^/]\)/*$'` # remove redundant slashes, if any srcdir=`echo "$srcdir" | sed 's,//*,/,g'` if expr "$srcdir" : src/ >/dev/null; then :; else echo "$progname: error: Directories must be under src/" >&2 echo "$progname: error: and \`$srcdir' isn't!" >&2 echo "$progname: error: Make sure you provide source paths" >&2 echo "$progname: error: relative to the top level, e.g. \`src/expr'." >&2 exit 1 fi if [ -d "$srcdir" ]; then :; else echo "creating directory \`$srcdir'..." mkdir -p "$srcdir" fi # enough dotdots to get us back to the top-level directory # (e.g. "src/foo" yields "../.." here), used for $(topdir) in Makefile topdir=`echo "$srcdir" | sed 's,[^/][^/]*,..,g'` # one less, used for the include path in Makefile.am topsrcdir=`echo "$topdir" | sed 's,\.\./,,'` if [ -e "$srcdir/Makefile" ]; then echo "$progname: warning: not replacing extant \`$srcdir/Makefile'." >&2 else echo "generating \`$srcdir/Makefile'..." cat >"$srcdir/Makefile" <&2 else echo "generating \`$srcdir/Makefile.am'..." clibbase=`expr "$srcdir" : '.*/\([^/][^/]*\)$'` if expr "$srcdir" : src/parser >/dev/null; then definitions=" -D__BUILDING_CVC4PARSERLIB \\ " visibility=' $(FLAG_VISIBILITY_HIDDEN)' elif expr "$srcdir" : src/main >/dev/null; then definitions= visibility= else definitions=" -D__BUILDING_CVC4LIB \\ " visibility=' $(FLAG_VISIBILITY_HIDDEN)' fi clibname="lib${clibbase}.la" clibtarget="lib${clibbase}_la" cat >"$srcdir/Makefile.am" < for CVC4 # Copyright (c) 2010-2014 The CVC4 Project # # usage: configure-in-place [ arguments... ] # # This script configures CVC4 in the source directory (from where it # should be invoked). # if [ -e .git ] && ! [ x"$1" = x-f ]; then echo echo "DO NOT USE THIS IN GIT WORKING DIRECTORIES!" echo echo "You might accidentally commit Makefiles in the source directories" echo "improperly, since they exist in the source directory for" echo "another purpose." echo exit 1 fi if [ x"$1" = x-f ]; then shift fi ./configure "$@" CURRENT_BUILD="$(grep '^CURRENT_BUILD *= *' builds/current | awk 'BEGIN {FS=" *= *"} {print$2}')" builds/$CURRENT_BUILD/config.status cvc4-1.5/contrib/cvc-devel.el000066400000000000000000000120761313116454100160550ustar00rootroot00000000000000;;;; Add to your ~/.emacs the following lines: ;;;; ;;;; (load-path "/full/path/to/this/file") ;;;; (require 'cvc-devel) ;;;; ;;;; If you want to modify the key binding for inserting the comment, ;;;; add also something like this: ;;;; ;;;; (setq cvc-devel-comment-key "\M-/") ;;;; (defvar cvc-devel-comment-key "\C-c\C-h" "The hot key binding to insert an appropriate comment in C++ header in CVC code") (require 'cc-mode) (add-to-list 'c++-mode-hook '(lambda () (local-set-key cvc-devel-comment-key 'insert-comment-template))) (defun insert-comment-template () "Insert a comment template into C++ file in the CVC style. The comment is different depending on where it is inserted. For example, inserting it in the empty file will produce a file comment, a class comment will be inserted before a class definition, and so on." (interactive) ; Check for macro (cond ((catch 'not-macro (progn (set-mark (point)) (cond ((not (search-forward "#define" nil t)) (throw 'not-macro t))) (beginning-of-line) (cond ((not (= (mark) (point))) (progn (goto-char (mark)) (throw 'not-macro t)))) ; It's a macro: insert the comment template (forward-char 7) (re-search-forward "[^ ]") (backward-char) (set-mark (point)) (re-search-forward " \\|(\\|^") (backward-char) (copy-region-as-kill (mark) (point)) (beginning-of-line) (insert-string "/*****************************************************************************/ /*! *\\def ") (yank) (insert-string " * * Author: ") (insert-string (user-full-name)) (insert-string " * * Created: ") (insert-string (current-time-string)) (insert-string " * * */ /*****************************************************************************/ ") (forward-line -3) (search-forward "* ") () ) ) (cond ((catch 'not-function (progn (set-mark (point)) (cond ((not (search-forward "(" nil t)) (throw 'not-function t))) (beginning-of-line) (cond ((not (= (mark) (point))) (progn (goto-char (mark)) (throw 'not-function t)))) ; It's a function: insert the comment template (search-forward "(") (re-search-backward "[^ ] *(") (forward-char) (set-mark (point)) (re-search-backward " \\|^.") (re-search-forward "[^ ]") (backward-char) (copy-region-as-kill (mark) (point)) (beginning-of-line) (insert-string "/*****************************************************************************/ /*! * Function: ") (yank) (insert-string " * * Author: ") (insert-string (user-full-name)) (insert-string " * * Created: ") (insert-string (current-time-string)) (insert-string " * * */ /*****************************************************************************/ ") (forward-line -3) (search-forward "* ") () ) ) (cond ((catch 'not-class (progn (set-mark (point)) (cond ((not (search-forward "class" nil t)) (throw 'not-class t))) (beginning-of-line) (cond ((not (= (mark) (point))) (progn (goto-char (mark)) (throw 'not-class t)))) ; It's a class definition: insert the comment template (forward-char 5) (re-search-forward "[^ ]") (backward-char) (set-mark (point)) (re-search-forward "^\\| \\|{") (backward-char) (copy-region-as-kill (mark) (point)) (beginning-of-line) (insert-string "/*****************************************************************************/ /*! *\\class ") (yank) (insert-string " *\\brief ") (yank) (insert-string " * * Author: ") (insert-string (user-full-name)) (insert-string " * * Created: ") (insert-string (current-time-string)) (insert-string " * * */ /*****************************************************************************/ ") (forward-line -4) (search-forward "* ") () ) ) (cond ((catch 'not-bof (progn (set-mark (point)) (beginning-of-buffer) (cond ((not (= (mark) (point))) (progn (goto-char (mark)) (throw 'not-bof t)))) ; At beginning of file: insert beginning of file comment (insert-string "/*****************************************************************************/ /*! *\\file ") (insert-string (file-name-nondirectory (buffer-file-name))) (insert-string " *\\brief * * Author: ") (insert-string (user-full-name)) (insert-string " * * Created: ") (insert-string (current-time-string)) (insert-string " */ /*****************************************************************************/ ") (forward-line -7) (search-forward "brief ") () ) ) ; Insert default comment template (insert-string "/*****************************************************************************/ /* * */ /*****************************************************************************/ ") (forward-line -3) (search-forward "* ") ) ) ) ) ) ) ) ) ) (provide 'cvc-devel) cvc4-1.5/contrib/cvc-mode.el000066400000000000000000000606431313116454100157050ustar00rootroot00000000000000;;;; /*! ;;;; * \file cvc-mode.el ;;;; * \brief Emacs mode for CVC programs in presentation language ;;;; * ;;;; * Author: Sergey Berezin ;;;; * ;;;; * Created: Mon Aug 11 12:29:32 2003 ;;;; * ;;;; *
;;;; * ;;;; * License to use, copy, modify, sell and/or distribute this software ;;;; * and its documentation for any purpose is hereby granted without ;;;; * royalty, subject to the terms and conditions defined in the \ref ;;;; * LICENSE file provided with this distribution. ;;;; * ;;;; *
;;;; * ;;;; */ ;;;; To use this library, place the following lines into your ~/.emacs file: ;;;; ;;;; ;;; CVC mode ;;;; (autoload 'cvc-mode "cvc-mode" "CVC specifications editing mode." t) ;;;; (setq auto-mode-alist ;;;; (append (list '("\\.cvc$" . cvc-mode)) auto-mode-alist)) ;;;; ;;;; Of course, the file cvc-mode.el must be in one of the directories in your ;;;; `load-path'. C-h v load-path to see the list, or `cons' your own path: ;;;; (setq load-path (cons "/the/full/path/to-your/dir" load-path)) ;;;; ;;;; To turn the font-lock on by default, put in .emacs ;;;; (global-font-lock-mode t) ;; if you use gnu-emacs, or ;;;; (setq-default font-lock-auto-fontify t) ;; if you use xemacs. ;;;; ;;;; In GNU emacs faces `font-lock-preprocessor-face' and ;;;; `font-lock-variable-name-face' may not be predefined. ;;;; In this case they are defined automatically when smv-mode.el ;;;; is loaded the first time. You can also define them yourself in .emacs: ;;;; ;;;; ;;; Make faces that are not in gnu-emacs font-lock by default ;;;; (defvar font-lock-preprocessor-face 'font-lock-preprocessor-face) ;;;; (defvar font-lock-variable-name-face 'font-lock-variable-name-face) ;;;; (make-face 'font-lock-preprocessor-face) ;;;; (make-face 'font-lock-variable-name-face) (require 'font-lock) (require 'compile) (defvar cvc-font-lock-mode-on t "If not nil, turn the fontification on.") ;;;; Syntax definitions (defvar cvc-mode-syntax-table nil "Syntax table used while in CVC mode.") (if cvc-mode-syntax-table () (let ((st (syntax-table))) (unwind-protect (progn (setq cvc-mode-syntax-table (make-syntax-table)) (set-syntax-table cvc-mode-syntax-table) (modify-syntax-entry ?_ "w") (modify-syntax-entry ?- "w") (modify-syntax-entry ?\? "w") (modify-syntax-entry ?: "." ) (modify-syntax-entry ?% "<") (modify-syntax-entry ?\f ">") (modify-syntax-entry ?\n ">")) (set-syntax-table st)))) ;;;; Fontification stuff (defun cvc-keyword-match (keyword) ; "Convert a string into a regexp matching any capitalization of that string." "Convert a string into a regexp matching that string as a separate word." ; (let ((regexp "") ; (index 0) ; (len (length keyword))) ; (while (< index len) ; (let ((c (aref keyword index))) ; (setq regexp ; (concat regexp (format "[%c%c]" (downcase c) (upcase c)))) ; (setq index (+ index 1)))) (format "\\b%s\\b" keyword)) ;) (defvar cvc-font-lock-separator-face 'cvc-font-lock-separator-face) (defvar font-lock-preprocessor-face 'font-lock-preprocessor-face) (defvar font-lock-variable-name-face 'font-lock-variable-name-face) (if (facep 'font-lock-preprocessor-face) () (progn (make-face 'font-lock-preprocessor-face) (set-face-foreground 'font-lock-preprocessor-face "green4"))) (if (facep 'font-lock-variable-name-face) () (progn (make-face 'font-lock-variable-name-face) (set-face-foreground 'font-lock-variable-name-face "deeppink"))) (if (facep 'cvc-font-lock-separator-face) () (progn (make-face 'cvc-font-lock-separator-face) (set-face-foreground 'cvc-font-lock-separator-face "indianred"))) (defvar cvc-mode-hook nil "Functions to run when loading an CVC file.") (defconst cvc-keywords '("ASSERT" "QUERY" "TRACE" "UNTRACE" "OPTION" "HELP" "TRANSFORM" "PRINT" "ECHO" "INCLUDE" "DUMP_ASSUMPTIONS" "DUMP_PROOF" "DUMP_SIG" "WHERE" "COUNTEREXAMPLE" "PUSH" "POP" "POP_SCOPE" "POPTO" "RESET" "CONTEXT" "TYPE" "DATATYPE" "SUBTYPE" "REAL" "INT" "BOOLEAN" "ARRAY" "OF" "TRUE" "FALSE" "FLOOR" "IF" "THEN" "ELSIF" "ELSE" "ENDIF" "LET" "IN" "END" "LAMBDA" "WITH" "FORALL" "EXISTS" "AND" "OR" "XOR" "NOT" ) "The list of CVC keywords.") (defconst cvc-declaration-keywords '("ASSERT" "QUERY" "TRACE" "UNTRACE" "OPTION" "HELP" "TRANSFORM" "PRINT" "ECHO" "INCLUDE" "DUMP_ASSUMPTIONS" "DUMP_PROOF" "DUMP_SIG" "WHERE" "COUNTEREXAMPLE" "PUSH" "POP" "POP_SCOPE" "POPTO" "RESET" "CONTEXT") "The list of keywords that open a declaration. Used for indentation.") (defconst cvc-declaration-keywords-regexp (mapconcat 'cvc-keyword-match cvc-declaration-keywords "\\|")) (defconst cvc-openning-keywords '("case" "for" "next" "init") "The list of keywords that open a subexpression. Used for indentation.") (defconst cvc-openning-keywords-regexp (mapconcat 'cvc-keyword-match cvc-openning-keywords "\\|")) (defconst cvc-closing-keywords '("esac") "The list of keywords that close a subexpression. Used for indentation.") (defconst cvc-closing-keywords-regexp (mapconcat 'cvc-keyword-match cvc-closing-keywords "\\|")) (defconst cvc-infix-operators '("<->" "<-" "->" ":=" "<=w\\>" ">=w\\>" "" ">w\\>" "=w\\>" "+w\\>" "-w\\>" "*w\\>" "<=" ">=" "!=" "=" "\\[" "\\]" "\\b-\\b" "+" "|" "&" "<" ">") "The list of regexps that match CVC infix operators. The distinction is made primarily for indentation purposes.") (defconst cvc-infix-operators-regexp (mapconcat 'identity cvc-infix-operators "\\|")) (defconst cvc-other-operators '("!" "(#" "#)") "Non-infix CVC operators that are not listed in `cvc-infix-operators'.") (defconst cvc-other-operators-regexp (mapconcat 'identity cvc-other-operators "\\|")) (defconst cvc-operators (append cvc-infix-operators cvc-other-operators) "The list of regexps that match CVC operators. It is set to the concatenation of `cvc-infix-operators' and `cvc-other-operators'.") (defconst cvc-separator-regexp "[,.;():]" "A regexp that matches any separator in CVC mode.") (defconst cvc-font-lock-keywords-1 (purecopy (list (list (concat (cvc-keyword-match "MODULE") " *\\([-_?A-Za-z0-9]+\\)") 1 'font-lock-preprocessor-face) (list (concat "\\(" (cvc-keyword-match "init") "\\|" (cvc-keyword-match "next") "\\)(\\s-*\\([][_?.A-Za-z0-9-]+\\)\\s-*)\\s-*:=") 2 'font-lock-variable-name-face) ;;; For DEFINE and invar assignments (list "\\([][_?.A-Za-z0-9-]+\\)\\s-*:=" 1 'font-lock-variable-name-face) (list "\\<\\([Aa]\\|[Ee]\\)\\[" 1 'font-lock-keyword-face) (list (concat "\\(" (mapconcat 'identity cvc-operators "\\|") "\\)") 1 'font-lock-function-name-face 'prepend) (mapconcat 'cvc-keyword-match cvc-keywords "\\|") ;; Fix the `%' comments (list "\\(%.*$\\)" 1 'font-lock-comment-face t) )) "Additional expressions to highlight in CVC mode.") (defconst cvc-font-lock-keywords-2 (purecopy (append cvc-font-lock-keywords-1 (list (list "\\([{}]\\)" 1 'font-lock-type-face) (list (concat "\\(" cvc-separator-regexp "\\)") 1 'cvc-font-lock-separator-face 'prepend)))) "Additional expressions to highlight in CVC mode.") (defconst cvc-font-lock-keywords (if font-lock-maximum-decoration cvc-font-lock-keywords-2 cvc-font-lock-keywords-1)) (defun cvc-minimal-decoration () (interactive) (setq font-lock-keywords cvc-font-lock-keywords-1)) (defun cvc-maximal-decoration () (interactive) (setq font-lock-keywords cvc-font-lock-keywords-2)) ;;;; Running CVC (defvar cvc-command "cvc3" "The command name to run CVC. The default is usually \"cvc3\"") (defvar cvc-sat-option nil "Search Engine choice in CVC. Valid values are nil, \"default\", \"simple\", and \"fast\", or any other values reported by cvc3 -h.") (defvar cvc-trace-flags nil "List of trace flags given on the command line as +trace options") (defvar cvc-verbose-level nil "The verbose mode of CVC. Valid values are nil and \"quiet\". This value is passed to the CVC process as +/-quiet opton.") (defvar cvc-command-line-args nil "Miscellaneous CVC command line args. Must be a single string or nil.") (defvar cvc-compile-buffer nil "The buffer associated with inferior CVC process. This variable is updated automatically each time CVC process takes off.") (defvar cvc-options-changed nil) (defvar cvc-current-buffer nil "The current CVC editing buffer. This variable is buffer-local.") (make-local-variable 'cvc-current-buffer) (defun cvc-args (file &optional args) "Compiles the string of CVC command line args from various variables." (mapconcat 'identity (append (if cvc-sat-option (list "-sat" cvc-sat-option) nil) (if (eq cvc-verbose-level "quiet") (list "+quiet") nil) (mapcar '(lambda (str) (format "+trace \"%s\"" str)) cvc-trace-flags) (if cvc-command-line-args (list cvc-command-line-args)) (if args (list args) nil) (list "<" file)) " ")) (defun cvc-run () "Runs CVC on the current buffer." (interactive) (let ((buffer (current-buffer))) (if (buffer-file-name) (progn (if (buffer-modified-p) (cvc-save-buffer)) (setq cvc-compile-buffer (compile-internal (concat "time " cvc-command " " (cvc-args (buffer-file-name))) "No more errors" "CVC")) (set-buffer cvc-compile-buffer) ;;; Doesn't work??? (end-of-buffer) (set-buffer buffer) ) (error "Buffer does not seem to be associated with any file"))) ) (defun cvc-save-options () "Saves current options in *.opt file." (interactive) (let* ((buffer (current-buffer)) (opt-file-name (let ((match (string-match "\\.cvc$" (buffer-file-name)))) (if match (concat (substring (buffer-file-name) 0 match) ".opt") (concat (buffer-file-name) ".opt")))) (opt-buffer-name (let ((match (string-match "\\.cvc$" (buffer-name)))) (if match (concat (substring (buffer-name) 0 match) ".opt") (concat (buffer-name) ".opt")))) (opt-buffer-exists (get-buffer opt-buffer-name)) (opt-buffer (get-buffer-create opt-buffer-name)) (save-options-from-buffer (and opt-buffer-exists (buffer-modified-p opt-buffer) (y-or-n-p (format "buffer %s is modified. Save options from that buffer?" (buffer-name opt-buffer))))) (options (format ";;;; This file is generated automatically.\n(setq cvc-sat-option %S)\n(setq cvc-verbose-level %S)\n(setq cvc-trace-flags '%S)\n(setq cvc-command-line-args %S)\n" cvc-sat-option cvc-verbose-level cvc-trace-flags cvc-command-line-args))) (set-buffer opt-buffer) (if save-options-from-buffer (cvc-save-and-load-options) (progn (erase-buffer) (insert options) (write-file opt-file-name) (kill-buffer opt-buffer))) (set-buffer buffer) (setq cvc-options-changed nil) (message "Options are saved."))) (defun cvc-save-and-load-options () "Saves the current buffer and updates CVC options in the associated buffer. This buffer is either the value of `cvc-current-buffer', or it tries to make a few reasonable guesses. If no CVC buffer is found, only saves the current buffer. Normally is called from the *.opt file while editing options for CVC specification." (interactive) (let* ((buffer (current-buffer)) (buffer-file (buffer-file-name)) (cvc-buffer-name (let* ((match (string-match "\\.[^.]*$" (buffer-name)))) (if match (concat (substring (buffer-name) 0 match) ".cvc") (concat (buffer-name) ".cvc")))) (cvc-buffer (get-buffer cvc-buffer-name)) (cvc-buffer (cond (cvc-buffer cvc-buffer) ((and (boundp 'cvc-current-buffer) (buffer-live-p cvc-current-buffer)) cvc-current-buffer) (t nil)))) (save-buffer) (if cvc-buffer (let ((cvc-window (get-buffer-window cvc-buffer)) (window (get-buffer-window buffer))) (set-buffer cvc-buffer) (load buffer-file) (setq cvc-current-buffer cvc-buffer) (if cvc-window (select-window cvc-window) (switch-to-buffer cvc-buffer)) (if window (delete-window window)) (setq cvc-options-changed nil)))) ) (defun cvc-save-and-return () "Saves the current buffer and returns back to the associated CVC buffer. The CVC buffer is either the value of `cvc-current-buffer', or it tries to make a few reasonable guesses. If no CVC buffer is found, only saves the current buffer. Normally is called from the *.ord buffer while editing variable ordering for CVC specification. Bound to \\[cvc-save-and-return]" (interactive) (let* ((buffer (current-buffer)) (cvc-buffer-name (let* ((match (string-match "\\.[^.]*$" (buffer-name)))) (if match (concat (substring (buffer-name) 0 match) ".cvc") (concat (buffer-name) ".cvc")))) (cvc-buffer (get-buffer cvc-buffer-name)) (cvc-buffer (cond (cvc-buffer cvc-buffer) ((and (boundp 'cvc-current-buffer) (buffer-live-p cvc-current-buffer)) cvc-current-buffer) (t nil)))) (save-buffer) (if cvc-buffer (let ((cvc-window (get-buffer-window cvc-buffer))) (setq cvc-current-buffer cvc-buffer) (if cvc-window (select-window cvc-window) (switch-to-buffer cvc-buffer)) (if (get-buffer-window buffer) (delete-window (get-buffer-window buffer)))))) ) (defun cvc-edit-options () "Loads current options in a new buffer and lets the user edit it. Run \\[eval-buffer] when done." (interactive) (let* ((buffer (current-buffer)) (opt-buffer-name (let ((match (string-match "\\.cvc$" (buffer-name)))) (if match (concat (substring (buffer-name) 0 match) ".opt") (concat (buffer-name) ".opt")))) (opt-buffer (get-buffer-create opt-buffer-name)) (options (format ";;;; This file is generated automatically.\n(setq cvc-sat-option %S)\n(setq cvc-verbose-level %S)\n(setq cvc-trace-flags '%S)\n(setq cvc-command-line-args %S)\n" cvc-sat-option cvc-verbose-level cvc-trace-flags cvc-command-line-args))) (setq cvc-options-changed t) (switch-to-buffer-other-window opt-buffer) (set-visited-file-name opt-buffer-name) (erase-buffer) (insert options) (make-local-variable 'cvc-currect-buffer) (setq cvc-current-buffer buffer) (cvc-options-edit-mode))) (defun cvc-interrupt () "Kills current CVC process." (interactive) (quit-process (get-buffer-process cvc-compile-buffer) t)) (defun cvc-send-signal (sig) "Sends signal SIG to the CVC process. SIG must be an integer." (if (get-buffer-process cvc-compile-buffer) (if (file-exists-p ".cvc-pid") (save-excursion (let ((buf (get-buffer-create ".cvc-pid"))) (set-buffer buf) (erase-buffer) (insert-file-contents ".cvc-pid") (let ((pid (read buf))) (if (integerp pid) (signal-process pid sig) (error "The file .cvc-pid is screwed up: %s" pid))) (kill-buffer buf))) (error "Your CVC version does not support signal handling")) (error "CVC is not running"))) (defun cvc-send-usr1 () "Sends SIGUSR1 to the current CVC process. I have a version of CVC that uses it to toggle dynamic variable ordering." (interactive) (cvc-send-signal 10)) (defun cvc-send-usr2 () "Sends SIGUSR2 to the current CVC process. I have a version of CVC that uses it to force garbage collection." (interactive) (cvc-send-signal 12)) (defun cvc-set-verbose-level (arg) "Sets CVC verbose level to use in command line option +/-quiet. If empty line is given, use the default." (interactive (list (read-from-minibuffer "Set verbose level to: " cvc-verbose-level))) (if (stringp arg) (progn (if (string= arg "") (setq cvc-verbose-level nil) (setq cvc-verbose-level arg)) (setq cvc-options-changed t)) (error "Not a string. The value is not set."))) (defun cvc-set-command (arg) "Sets the name of the CVC executable to run." (interactive (list (read-file-name "CVC binary: " "" cvc-command nil cvc-command))) (if (stringp arg) (progn (if (string= arg "") nil (setq cvc-command arg)) (setq cvc-options-changed t)) (error "Not a string. The value is not set."))) (defun cvc-trace (arg) "Adds a CVC tracing flag to be given in the +trace command line option." (interactive (list (read-from-minibuffer "Add trace flag: " cvc-verbose-level))) (if (stringp arg) (progn (if (string= arg "") (error "Empty flag is not allowed") (setq cvc-trace-flags (add-to-list 'cvc-trace-flags arg))) (setq cvc-options-changed t) (message "%S" cvc-trace-flags)) (error "Not a string. The value is not set."))) (defun cvc-untrace (arg) "Removes a CVC tracing flag given in the +trace command line option." (interactive (list (completing-read "Remove trace flag: " (mapcar '(lambda (x) (cons x t)) cvc-trace-flags) nil t))) (if (stringp arg) (progn (if (string= arg "") nil ; don't do anything on empty input (setq cvc-trace-flags (delete arg cvc-trace-flags))) (setq cvc-options-changed t) (message "%S" cvc-trace-flags)) (error "Not a string. The value is not set."))) (defun cvc-set-command-line-args (arg) "Sets CVC command line options. Don't set -sat and +quiet options here, use corresponding special variables for that." (interactive (list (read-from-minibuffer "Other arguments: " cvc-command-line-args))) (if (stringp arg) (progn (if (string= arg "") (setq cvc-command-line-args nil) (setq cvc-command-line-args arg)) (setq cvc-options-changed t)) (error "Not a string. The value is not set."))) ;;;; Saving file (defun cvc-save-buffer () "Saves CVC file together with options. Prompts the user whether to override the *.opt file if the options have changed." (interactive) (let ((opt-file-name (let ((match (string-match "\\.cvc$" (buffer-file-name)))) (if match (concat (substring (buffer-file-name) 0 match) ".opt") (concat (buffer-file-name) ".opt"))))) (cond ((and (file-exists-p opt-file-name) cvc-options-changed) (if (y-or-n-p "Options have changed. Save them?") (progn (cvc-save-options) (setq cvc-options-changed nil)))) (cvc-options-changed (cvc-save-options) (setq cvc-options-changed nil)))) (save-buffer)) ;;;; Indentation (defun cvc-previous-line () "Moves the point to the fisrt non-comment non-blank string before the current one and positions the cursor on the first non-blank character." (interactive) (forward-line -1) (beginning-of-line) (skip-chars-forward " \t") (while (and (not (bobp)) (looking-at "$\\|%")) (forward-line -1) (beginning-of-line) (skip-chars-forward " \t"))) (defun cvc-previous-indentation () "Returns a pair (INDENT . TYPE). INDENT is the indentation of the previous string, if there is one, and TYPE is 'openning, 'declaration or 'plain, depending on whether previous string starts with an openning, declarative keyword or neither. \"Previous string\" means the last string before the current that is not an empty string or a comment." (if (bobp) '(0 . 'plain) (save-excursion (cvc-previous-line) (let ((type (cond ((looking-at cvc-openning-keywords-regexp) 'openning) ((looking-at cvc-declaration-keywords-regexp) 'declaration) (t 'plain))) (indent (current-indentation))) (cons indent type))))) (defun cvc-compute-indentation () "Computes the indentation for the current string based on the previous string. Current algorithm is too simple and needs improvement." (save-excursion (beginning-of-line) (skip-chars-forward " \t") (cond ((looking-at cvc-declaration-keywords-regexp) 0) (t (let* ((indent-data (cvc-previous-indentation)) (indent (car indent-data)) (type (cdr indent-data))) (setq indent (cond ((looking-at cvc-closing-keywords-regexp) (if (< indent 2) 0 (- indent 2))) ((or (eq type 'openning) (eq type 'declaration)) (+ indent 2)) (t indent))) indent))))) (defun cvc-indent-line () "Indent the current line relative to the previous meaningful line." (interactive) (let* ((initial (point)) (final (let ((case-fold-search nil))(cvc-compute-indentation))) (offset0 (save-excursion (beginning-of-line) (skip-chars-forward " \t") (- initial (point)))) (offset (if (< offset0 0) 0 offset0))) (indent-line-to final) (goto-char (+ (point) offset)))) ;;;; Now define the keymap (defconst cvc-mode-map nil "CVC keymap") (if cvc-mode-map () (progn (setq cvc-mode-map (make-sparse-keymap)) (define-key cvc-mode-map [delete] 'backward-delete-char-untabify) (define-key cvc-mode-map [backspace] 'backward-delete-char-untabify) (define-key cvc-mode-map "\C-x\C-s" 'cvc-save-buffer) (define-key cvc-mode-map "\C-c\C-e" 'cvc-edit-options) (define-key cvc-mode-map "\C-c\C-f" 'cvc-run) (define-key cvc-mode-map "\C-c\C-t" 'cvc-trace) (define-key cvc-mode-map "\C-c\C-u" 'cvc-untrace) (define-key cvc-mode-map "\C-c\C-r" 'cvc-set-command) (define-key cvc-mode-map "\C-c\C-c" 'cvc-interrupt) ;; (define-key cvc-mode-map "\C-c\C-r" 'cvc-send-usr1) ;; (define-key cvc-mode-map "\C-c\C-s" 'cvc-send-usr2) (define-key cvc-mode-map "\C-c;" 'comment-region) (define-key cvc-mode-map "\t" 'cvc-indent-line))) (defun cvc-make-local-vars () "Create buffer-local variables for CVC modes" (make-local-variable 'cvc-command) (make-local-variable 'cvc-sat-option) (make-local-variable 'cvc-verbose-level) (make-local-variable 'cvc-trace-flags) (make-local-variable 'cvc-command-line-args) (make-local-variable 'cvc-options-changed) (make-local-variable 'cvc-options-changed)) (defun cvc-mode () "Major mode for CVC specification files. \\{cvc-mode-map} \\[cvc-run] runs CVC on buffer, \\[cvc-interrupt] interrupts already running CVC process. \\[cvc-send-usr1] and \\[cvc-send-usr2] are used to send UNIX signals to CVC process to toggle dynamic variable ordering and force garbage collection respectively. Available only for a new (experimental) CVC version. Running CVC (\\[cvc-run]) creates a separate buffer where inferior CVC process will leave its output. Currently, each run of CVC clears the compilation buffer. If you need to save multiple runs, save them one at a time. Please report bugs to barrett@cs.nyu.edu." (interactive) (use-local-map cvc-mode-map) ;;; Disable asking for the compile command (make-local-variable 'compilation-read-command) (setq compilation-read-command nil) ;;; Make all the variables with CVC options local to the current buffer (cvc-make-local-vars) (setq cvc-options-changed nil) ;;; Change the regexp search to be case sensitive ;; (setq case-fold-search nil) ;;; Set syntax table (set-syntax-table cvc-mode-syntax-table) (make-local-variable 'comment-start) ;; fix up comment handling (setq comment-start "%") (make-local-variable 'comment-end) (setq comment-end "") (make-local-variable 'comment-start-skip) (setq comment-start-skip "%+\\s-*") (setq require-final-newline t) ;;; Define the major mode (setq major-mode 'cvc-mode) (setq mode-name "CVC") ;;; Load command line options for CVC process (let ((opt-file-name (let ((match (string-match "\\.cvc$" (buffer-file-name)))) (if match (concat (substring (buffer-file-name) 0 match) ".opt") (concat (buffer-file-name) ".opt"))))) (if (file-exists-p opt-file-name) (load opt-file-name))) ;;; Do fontification, if necessary (setq font-lock-keywords (if font-lock-maximum-decoration cvc-font-lock-keywords-2 cvc-font-lock-keywords-1)) (if running-xemacs (put 'cvc-mode 'font-lock-defaults '(cvc-font-lock-keywords nil nil nil nil)) (setq font-lock-defaults '(cvc-font-lock-keywords nil nil nil nil))) (if (and cvc-font-lock-mode-on (or running-xemacs font-lock-global-modes) window-system) (font-lock-mode 1)) (setq mode-line-process nil) ; put 'cvc-status when hooked up to inferior CVC (run-hooks 'cvc-mode-hook)) (defun cvc-options-edit-mode () "Major mode for editing CVC options. Actually, this is Emacs Lisp mode with a few changes. In particular, \\[cvc-save-and-load-options] will save the file, find the associated CVC file and updates its options accordingly. See `\\[describe-bindings]' for key bindings. " (interactive) (emacs-lisp-mode) ;;; Make all the variables with CVC options local to the current buffer ;;; to avoid accidental override of the global values (cvc-make-local-vars) (setq major-mode 'cvc-options-edit-mode) (setq mode-name "CVC Options") (if (and cvc-font-lock-mode-on (or running-xemacs font-lock-global-modes) window-system) (font-lock-mode t)) (use-local-map (copy-keymap (current-local-map))) (local-set-key "\C-c\C-c" 'cvc-save-and-load-options)) (provide 'cvc-mode) cvc4-1.5/contrib/depgraph000077500000000000000000000102111313116454100153700ustar00rootroot00000000000000#!/bin/sh # # depgraph # Morgan Deters, 27 October 2010 # # Builds a graphviz graph of dependences between source and header files in CVC4. # progname=`basename "$0"` postproc='sort -u' mode=packages target= if [ $# -gt 0 ]; then if [ "$1" = "-a" ]; then postproc=cat mode=headers shift fi if [ $# -gt 0 -a "$1" != "-h" ]; then target="$1" shift fi if [ $# -gt 0 ]; then echo "usage: $progname [-a] [target]" echo " -a ("all") produces _all_ headers in the source, with clusters for packages." echo " the default behavior produces just package dependence information." echo " with target, focus on dependences of that particular package (e.g. \"expr\")" exit 1 fi fi cd "`dirname \"$0\"`/.." if ! [ -d src -a -d test/unit ]; then echo "$progname: source directory malformed; is this CVC4 ?!" >&2 exit 1 fi echo "digraph G {" paths=`find src -name '*.c' \ -o -name '*.cc' \ -o -name '*.cpp' \ -o -name '*.C' \ -o -name '*.h' \ -o -name '*.hh' \ -o -name '*.hpp' \ -o -name '*.H' \ -o -name '*.y' \ -o -name '*.yy' \ -o -name '*.ypp' \ -o -name '*.Y' \ -o -name '*.l' \ -o -name '*.ll' \ -o -name '*.lpp' \ -o -name '*.L' \ -o -name '*.g'` if [ "$mode" = headers ]; then oldpackage= for path in $paths; do dir=`echo "$path" | sed 's,^\([^/]*\).*,\1,'` file=`echo "$path" | sed 's,^[^/]*/,,'` package=`echo "$file" | sed 's,^\(.*\)/.*,\1,'` file=`echo "$file" | sed 's,^.*/,,'` if [ -n "$target" -a "$target" != "$package" ]; then continue; fi if [ -n "$oldpackage" -a "$package" != "$oldpackage" ]; then echo ' }' fi if [ "$package" != "$oldpackage" ]; then echo " subgraph \"cluster$package\" {" echo " label=\"$package\";" oldpackage="$package" fi echo " \"$package/$file\"[label=\"$file\"];" done if [ -n "$oldpackage" ]; then echo ' }' fi fi for path in $paths; do dir=`echo "$path" | sed 's,^\([^/]*\).*,\1,'` file=`echo "$path" | sed 's,^[^/]*/,,'` package=`echo "$file" | sed 's,^\(.*\)/.*,\1,'` file=`echo "$file" | sed 's,^.*/,,'` incs=`grep '^# *include *".*"' "$path" | sed 's,^# *include *"\(.*\)".*,\1,'` if [ -n "$target" -a "$target" != "$package" ]; then continue; fi for inc in $incs; do case "$inc" in base/tls.h) inc=base/tls.h.in ;; expr/expr.h) inc=expr/expr_template.h ;; expr/expr_manager.h) inc=expr/expr_manager_template.h ;; expr/kind.h) inc=expr/kind_template.h ;; expr/metakind.h) inc=expr/metakind_template.h ;; theory/theoryof_table.h) inc=theory/theoryof_table_template.h ;; util/integer.h) inc=util/integer.h.in ;; util/rational.h) inc=util/rational.h.in ;; cvc4autoconfig.h) inc=cvc4autoconfig.h.in ;; esac incpath= dirpackageparent="$dir/`dirname "$package"`" for incdir in "$dir" "$dir/include" "$dir/$package" . "$dirpackageparent"; do if [ -e "$incdir/$inc" ]; then incpath="$incdir/$inc"; break; fi done if [ -z "$incpath" ]; then echo "$progname: error: can't find include file '$inc' from source '$path'" >&2 exit 1 fi incpath=`echo "$incpath" | sed 's,^\./,,'` incpath=`echo "$incpath" | sed "s,^$dir/,,"` incdir=`echo "$incpath" | sed 's,^\([^/]*\).*,\1,'` incpackage=`echo "$incpath" | sed 's,^\(.*\)/.*,\1,'` incfile=`echo "$incpath" | sed 's,^.*/,,'` if [ "$mode" = packages ]; then if [ "$package" != "$incpackage" ]; then if [ -n "$target" ]; then echo " \"$package\" -> \"$incpackage\"[label=\"$incfile\"];" else echo " \"$package\" -> \"$incpackage\";" fi fi else if [ -n "$target" ]; then [ "$package" != "$incpackage" ] && echo " \"$package/$file\" -> \"$incpackage\"[label=\"$incfile\"];" else echo " \"$package/$file\" -> \"$incpath\";" fi fi done done | $postproc echo "}" cvc4-1.5/contrib/dimacs_to_smt.pl000077500000000000000000000013551313116454100170460ustar00rootroot00000000000000#!/usr/bin/perl -w # DIMACS to SMT # Morgan Deters # Copyright (c) 2009, 2010, 2011 The CVC4 Project use strict; my ($nvars, $nclauses); while(<>) { next if /^c/; if(/^p cnf (\d+) (\d+)/) { ($nvars, $nclauses) = ($1, $2); print "(benchmark b\n"; print ":status unknown\n"; print ":logic QF_UF\n"; for(my $i = 1; $i <= $nvars; ++$i) { print ":extrapreds ((x$i))\n"; } print ":formula (and\n"; next; } print "(or"; chomp; @_ = split(/ /); for(my $i = 0; $i < $#_; ++$i) { if($_[$i] < 0) { print " (not x" . -$_[$i] . ")"; } else { print " x" . $_[$i]; } } print ")\n"; } print "))\n"; cvc4-1.5/contrib/editing-with-emacs000066400000000000000000000013141313116454100172610ustar00rootroot00000000000000To match the CVC4 coding style, drop the following in your ~/.emacs, replacing "/home/mdeters/cvc4.*" in the last line with a regexp describing your usual cvc4 editing location(s): ; CVC4 mode (defun cvc4-c++-editing-mode () "C++ mode with adjusted defaults for use with editing CVC4 code." (interactive) (message "CVC4 variant of C++ mode activated.") (c++-mode) (setq c-basic-offset 2) (c-set-offset 'innamespace 0) (setq indent-tabs-mode nil)) (setq auto-mode-alist (cons '("/home/mdeters/cvc4.*/.*\\.\\(cc\\|cpp\\|h\\|hh\\|hpp\\|y\\|yy\\|ypp\\|lex\\|l\\|ll\\|lpp\\)\\(\\.in\\)?$" . cvc4-c++-editing-mode) auto-mode-alist)) -- Morgan Deters Mon, 27 Sep 2010 17:35:38 -0400 cvc4-1.5/contrib/get-antlr-3.4000077500000000000000000000073211313116454100160050ustar00rootroot00000000000000#!/bin/bash # set -e cd "$(dirname "$0")/.." if ! [ -e src/parser/cvc/Cvc.g ]; then echo "$(basename $0): I expect to be in the contrib/ of a CVC4 source tree," >&2 echo "but apparently:" >&2 echo >&2 echo " $(pwd)" >&2 echo >&2 echo "is not a CVC4 source tree ?!" >&2 exit 1 fi function webget { if which curl &>/dev/null; then curl "$1" >"$2" elif which wget &>/dev/null; then wget -c -O "$2" "$1" else echo "Can't figure out how to download from web. Please install wget or curl." >&2 exit 1 fi } if [ -z "${MACHINE_TYPE}" ]; then if ! [ -e config/config.guess ]; then # Attempt to download once webget 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' config/config.guess if [ -e config/config.guess ]; then chmod +x config/config.guess else echo "$(basename $0): I need the file config/config.guess to tell MACHINE_TYPE" >&2 echo "Try running ./autogen.sh, or set the MACHINE_TYPE environment variable" >&2 echo "(e.g., \"export MACHINE_TYPE=x86_64\")." >&2 exit 1 fi fi # get first nibble from config.guess (x86_64, i686, ...) MACHINE_TYPE=`config/config.guess | sed 's,-.*,,'` fi set -x mkdir -p antlr-3.4/share/java mkdir -p antlr-3.4/bin mkdir -p antlr-3.4/src cd antlr-3.4 webget http://www.antlr3.org/download/antlr-3.4-complete.jar share/java/antlr-3.4-complete.jar webget http://www.antlr3.org/download/C/libantlr3c-3.4.tar.gz src/libantlr3c-3.4.tar.gz tee bin/antlr3 < Makefile make make install cd ../.. mv lib/libantlr3c.a lib/libantlr3c-static.a cd src/libantlr3c-3.4 make clean if [ ${MACHINE_TYPE} == 'x86_64' ]; then # 64-bit stuff here ./configure --enable-64bit --with-pic --disable-shared --disable-antlrdebug --prefix=`pwd`/../.. $ANTLR_CONFIGURE_ARGS else # 32-bit stuff here ./configure --with-pic --disable-shared --disable-antlrdebug --prefix=`pwd`/../.. $ANTLR_CONFIGURE_ARGS fi cp Makefile Makefile.orig sed 's,^\(CFLAGS = .*\),\1 -fexceptions,' Makefile.orig > Makefile make make install cd ../.. mv lib/libantlr3c.la lib/libantlr3c.la.orig awk '/^old_library=/ {print "old_library='\''libantlr3c-static.a'\''"} /^library_names=/ {print "library_names='\''libantlr3c.a'\''"} !/^old_library=/ && !/^library_names=/ {print}' < lib/libantlr3c.la.orig > lib/libantlr3c.la set +x cd .. # echo # echo Invalidating generated parsers.. # touch src/parser/*/*.g if [ ${MACHINE_TYPE} == 'x86_64' ]; then # 64-bit stuff here echo ============== WARNING ==================== echo The script guessed that this machine is 64 bit. echo If antlr should be built as 32 bit \(i.e. -m32\), echo please rerun the script as echo MACHINE_TYPE=\"x86\" ./get-antlr3.4 else # 32-bit stuff here echo ============== WARNING ==================== echo The script guessed that this machine is 32 bit. echo If antlr should be built as 64 bit \(i.e. -m64\), echo please rerun the script as echo MACHINE_TYPE=\"x86_64\" ./get-antlr3.4 fi echo echo ===================== Now configure CVC4 with ===================== echo ./configure --with-antlr-dir=`pwd`/antlr-3.4 ANTLR=`pwd`/antlr-3.4/bin/antlr3 cvc4-1.5/contrib/luby.c000066400000000000000000000034041313116454100147750ustar00rootroot00000000000000// luby.c - Luby sequence generator // Morgan Deters for the CVC4 project, 5 May 2011 // // This program enumerates the Luby-based MiniSat 2 restart sequence. // MiniSat restarts after a number of conflicts determined by: // // restart_base * luby(restart_inc, curr_restarts) // // By default, MiniSat has restart_base = 25, restart_inc = 3.0, and // curr_restarts is the number of restarts that have been done (so it // starts at 0). // // For the Luby paper, see: // http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.47.5558 // // Compile luby.c with gcc -o luby luby.c -lm // #include #include #include #include #include // luby() function copied from MiniSat 2 // Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson // Copyright (c) 2007-2010, Niklas Sorensson double luby(double y, int x){ // Find the finite subsequence that contains index 'x', and the // size of that subsequence: int size, seq; for (size = 1, seq = 0; size < x+1; seq++, size = 2*size+1); while (size-1 != x){ size = (size-1)>>1; seq--; x = x % size; } return pow(y, seq); } int main(int argc, char *argv[]) { int N; int base; double inc; int i; if(argc != 4) { fprintf(stderr, "usage: %s base inc N\n" "In MiniSat 2, base==25 and inc==3 by default.\n" "base is simply a multiplier after the sequence is computed.\n" "N is the number to produce (-1 means run until CTRL-C)\n", argv[0]); exit(1); } base = atoi(argv[1]); inc = strtod(argv[2], NULL); N = atoi(argv[3]); assert(base >= 1); assert(inc >= 1.0); for(i = 0; N < 0 || i < N; ++i) { printf("%d %f\n", i, luby(inc, i) * base); } } cvc4-1.5/contrib/mac-build000077500000000000000000000035211313116454100154410ustar00rootroot00000000000000#!/bin/bash # # mac-build script # Morgan Deters # Tue, 25 Sep 2012 15:44:27 -0400 # macports_prereq="autoconf automake boost gmp gtime libtool readline" export PATH="/opt/local/bin:$PATH" if [ $# -ne 0 ]; then echo "usage: `basename $0`" >&2 echo >&2 echo "This script attempts to set up the build requirements for CVC4 for Mac OS X." >&2 echo "MacPorts must be installed (but this script installs prerequisite port" >&2 echo "packages for CVC4). If this script is successful, it prints a configure" >&2 echo "line that you can use to configure CVC4." >&2 exit 1 fi function reporterror { echo echo ============================================================================= echo echo "There was an error setting up the prerequisites. Look above for details." echo exit 1 } echo ============================================================================= echo echo "running: sudo port install $macports_prereq" if which port &>/dev/null; then echo "You may be asked for your password to install these packages." echo sudo port install $macports_prereq || reporterror else echo echo "ERROR: You must have MacPorts installed for Mac builds of CVC4." echo "ERROR: See http://www.macports.org/" reporterror fi echo echo ============================================================================= echo contrib/get-antlr-3.4 | grep -v 'Now configure CVC4 with' | grep -v '\./configure --with-antlr-dir=' [ ${PIPESTATUS[0]} -eq 0 ] || reporterror echo echo ============================================================================= echo echo 'Now just run:' echo ' ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include --with-antlr-dir=`pwd`/antlr-3.4 ANTLR=`pwd`/antlr-3.4/bin/antlr3' echo ' make' echo echo ============================================================================= cvc4-1.5/contrib/new-theory000077500000000000000000000156771313116454100157240ustar00rootroot00000000000000#!/bin/bash # # usage: new-theory [--alternate existing-theory] new-theory-dir-name # cd "`dirname "$0"`/.." if ! perl -v &>/dev/null; then echo "ERROR: perl is required to run this script." >&2 exit 1 fi if [ ! -e src/theory/theory_engine.h ]; then echo "ERROR: This script doesn't appear to be the contrib/ subdirectory" >&2 echo "ERROR: of the CVC4 source tree." >&2 exit 1 fi if [ $# -ge 1 -a "$1" = --alternate ]; then shift alternate=true alttheory="$1" shift else alternate=false fi if [ $# -ne 1 ]; then echo "usage: new-theory [--alternate existing-theory] new-theory-dir-name" >&2 echo "e.g.: new-theory arrays" >&2 echo "e.g.: new-theory sets" >&2 echo "e.g.: new-theory rewrite_rules" >&2 echo "e.g.: new-theory --alternate arith difference-logic" >&2 echo >&2 echo "This tool will create a new src/theory/" >&2 echo "directory and fill in some infrastructural files in that directory." >&2 echo "It also will incorporate that directory into the build process." >&2 echo "Please refer to the file README.WHATS-NEXT file created in that" >&2 echo "directory for tips on what to do next." >&2 echo >&2 echo "Theories with multiple words (e.g. \"rewrite_rules\") should have" >&2 echo "directories and namespaces separated by an underscore (_). The" >&2 echo "resulting class names created by this script will be in CamelCase" >&2 echo "(e.g. RewriteRules) if that convention is followed." >&2 echo >&2 echo "With --alternate, create a new theory directory that is declared as" >&2 echo "an alternate implementation of an existing host theory. Such" >&2 echo "\"alternates\" share preprocessing, typechecking, rewriting (i.e.," >&2 echo "normal form), and expression kinds with their host theories, but" >&2 echo "differ in decision procedure implementation. They are selectable" >&2 echo "at runtime with --use-theory." >&2 exit 1 fi dir="$1" if [ -e "src/theory/$dir" ]; then echo "ERROR: Theory \"$dir\" already exists." >&2 echo "ERROR: Please choose a new directory name (or move that one aside)." >&2 echo "ERROR: Or, if you'd like to create an alternate implementation of" >&2 echo "ERROR: $dir, use this program this way:" >&2 echo "ERROR: new-theory --alternate $dir new-implementation-name" >&2 exit 1 fi if ! expr "$dir" : '[a-zA-Z][a-zA-Z0-9_]*$' &>/dev/null || expr "$dir" : '_$' &>/dev/null; then echo "ERROR: \"$dir\" is not a valid theory name." >&2 echo "ERROR:" >&2 echo "ERROR: Theory names must start with a letter and be composed of" >&2 echo "ERROR: letters, numbers, and the underscore (_) character; an" >&2 echo "ERROR: underscore cannot be the final character." >&2 exit 1 fi if $alternate; then if ! [ -d "src/theory/$alttheory" -a -f "src/theory/$alttheory/kinds" ]; then echo "ERROR: Theory \"$alttheory\" doesn't exist, or cannot read its kinds file." >&2 exit 1 fi alt_id="$( function theory() { echo $1 | sed 's,^THEORY_,,'; exit; } source "src/theory/$alttheory/kinds" )" fi id="`echo "$dir" | tr a-z A-Z`" # convoluted, but should be relatively portable and give a CamelCase # representation for a string. (e.g. "foo_bar" becomes "FooBar") camel="`echo "$dir" | awk 'BEGIN { RS="_";ORS="";OFS="" } // {print toupper(substr($1,1,1)),substr($1,2,length($1))} END {print "\n"}'`" if ! mkdir "src/theory/$dir"; then echo "ERROR: encountered an error creating directory src/theory/$dir" >&2 exit 1 fi echo "Theory of $dir" echo "Theory directory: src/theory/$dir" echo "Theory id: THEORY_$id" $alternate && echo "Alternate for theory id: THEORY_$alt_id" echo "Theory class: CVC4::theory::$dir::Theory$camel" echo function copyskel { src="$1" dest="`echo "$src" | sed "s/DIR/$dir/g"`" echo "Creating src/theory/$dir/$dest..." sed "s/\$dir/$dir/g;s/\$camel/$camel/g;s/\$id/$id/g" \ contrib/theoryskel/$src \ > "src/theory/$dir/$dest" } function copyaltskel { src="$1" dest="`echo "$src" | sed "s/DIR/$dir/g"`" echo "Creating src/theory/$dir/$dest..." sed "s/\$dir/$dir/g;s/\$camel/$camel/g;s/\$id/$id/g;s/\$alt_id/$alt_id/g" \ contrib/alttheoryskel/$src \ > "src/theory/$dir/$dest" } function copyoptions { src="$1" dest="`echo "$src" | sed "s/DIR/$dir/g"`" echo "Creating src/options/$dest..." sed "s/\$dir/$dir/g;s/\$camel/$camel/g;s/\$id/$id/g;s/\$alt_id/$alt_id/g" \ contrib/optionsskel/$src \ > "src/options/$dest" } # copy files from the skeleton, with proper replacements if $alternate; then alternate01=1 for file in `ls contrib/alttheoryskel`; do copyaltskel "$file" done else alternate01=0 for file in `ls contrib/theoryskel`; do copyskel "$file" done fi # Copy the options file independently for file in `ls contrib/optionsskel`; do copyoptions "$file" done echo echo "Adding $dir to THEORIES to src/Makefile.theories..." if grep -q '^THEORIES = .*[^a-zA-Z0-9_]'"$dir"'\([^a-zA-Z0-9_]\|$\)' src/Makefile.theories &>/dev/null; then echo "NOTE: src/Makefile.theories already lists theory $dir" else awk '/^THEORIES = / {print $0,"'"$dir"'"} !/^THEORIES = / {print$0}' src/Makefile.theories > src/Makefile.theories.new-theory if ! cp -f src/Makefile.theories src/Makefile.theories~; then echo "ERROR: cannot copy src/Makefile.theories !" >&2 exit 1 fi if ! mv -f src/Makefile.theories.new-theory src/Makefile.theories; then echo "ERROR: cannot replace src/Makefile.theories !" >&2 exit 1 fi fi echo "Adding sources to src/Makefile.am..." perl -e ' while(<>) { print; last if /^libcvc4_la_SOURCES = /; } if('$alternate01') { while(<>) { if(!/\\$/) { chomp; print "$_ \\\n\ttheory/'"$dir"'/theory_'"$dir"'.h \\\n\ttheory/'"$dir"'/theory_'"$dir"'.cpp\n"; last; } else { print; } } } else { while(<>) { if(!/\\$/) { chomp; print "$_ \\\n\ttheory/'"$dir"'/theory_'"$dir"'.h \\\n\ttheory/'"$dir"'/theory_'"$dir"'.cpp \\\n\ttheory/'"$dir"'/theory_'"$dir"'_rewriter.h \\\n\ttheory/'"$dir"'/theory_'"$dir"'_type_rules.h\n"; last; } else { print; } } } while(<>) { print; last if /^EXTRA_DIST = /; } while(<>) { if(!/\\$/) { chomp; print "$_ \\\n\ttheory/'"$dir"'/kinds\n"; last; } else { print; } } while(<>) { print; }' src/Makefile.am > src/Makefile.am.new-theory if ! mv -f src/Makefile.am.new-theory src/Makefile.am; then echo "ERROR: cannot replace src/Makefile.am !" >&2 exit 1 fi echo "Adding ${dir}_options to src/options/Makefile.am..." if grep -q '^ ${dir}_options' src/options/Makefile.am &>/dev/null; then echo "NOTE: src/options/Makefile.am already seems to link to $dir option files" else awk -v name="$dir" -f contrib/new-theory.awk src/options/Makefile.am > src/options/Makefile.am.new-theory if ! cp -f src/options/Makefile.am src/options/Makefile.am~; then echo "ERROR: cannot copy src/options/Makefile.am !" >&2 exit 1 fi if ! mv -f src/options/Makefile.am.new-theory src/options/Makefile.am; then echo "ERROR: cannot replace src/options/Makefile.am !" >&2 exit 1 fi fi echo echo "Rerunning autogen.sh..." ./autogen.sh cvc4-1.5/contrib/run-script-cascj7-fnt000077500000000000000000000027071313116454100176540ustar00rootroot00000000000000#!/bin/bash cvc4=./cvc4 bench="$1" file=${bench##*/} filename=${file%.*} echo "------- cvc4-fnt casc j7 : $bench at $2..." # use: trywith [params..] # to attempt a run. If an SZS ontology result is printed, then # the run script terminates immediately. Otherwise, this # function returns normally. function trywith { limit=$1; shift; echo "--- Run $@ at $limit..."; (ulimit -S -t "$limit";$cvc4 --lang=tptp --no-checking --no-interactive --dump-models --produce-models --force-no-limit-cpu-while-dump "$@" $bench) 2>/dev/null | (read w1 w2 w3 result w4 w5; case "$result" in Satisfiable) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;; CounterSatisfiable) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;; esac; exit 1) if [ ${PIPESTATUS[1]} -eq 0 ]; then exit 0; fi } function finishwith { echo "--- Run $@..."; $cvc4 --lang=tptp --no-checking --no-interactive --dump-models --produce-models --force-no-limit-cpu-while-dump "$@" $bench } trywith 30 --finite-model-find --sort-inference --uf-ss-fair trywith 30 --finite-model-find --mbqi=gen-ev --uf-ss-totality --decision=internal --sort-inference --uf-ss-fair trywith 15 --finite-model-find --disable-uf-ss-min-model --sort-inference --uf-ss-fair trywith 60 --finite-model-find --mbqi=abs --pre-skolem-quant --sort-inference --uf-ss-fair finishwith --finite-model-find --mbqi=abs --pre-skolem-quant --sort-inference --uf-ss-fair --mbqi-one-inst-per-round # echo "% SZS status" "GaveUp for $filename" cvc4-1.5/contrib/run-script-cascj7-fof000077500000000000000000000025611313116454100176350ustar00rootroot00000000000000#!/bin/bash cvc4=./cvc4 bench="$1" file=${bench##*/} filename=${file%.*} echo "------- cvc4-fof casc j7 : $bench at $2..." # use: trywith [params..] # to attempt a run. If an SZS ontology result is printed, then # the run script terminates immediately. Otherwise, this # function returns normally. function trywith { limit=$1; shift; echo "--- Run $@ at $limit..."; (ulimit -S -t "$limit";$cvc4 --lang=tptp --no-checking --no-interactive --dump-instantiations --inst-format=szs --force-no-limit-cpu-while-dump "$@" $bench) 2>/dev/null | (read w1 w2 w3 result w4 w5; case "$result" in Unsatisfiable) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;; Theorem) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;; esac; exit 1) if [ ${PIPESTATUS[1]} -eq 0 ]; then exit 0; fi } function finishwith { echo "--- Run $@..."; $cvc4 --lang=tptp --no-checking --no-interactive --dump-instantiations --inst-format=szs --force-no-limit-cpu-while-dump "$@" $bench } trywith 15 --quant-cf --pre-skolem-quant --full-saturate-quant trywith 30 --full-saturate-quant trywith 30 --finite-model-find --fmf-inst-engine --mbqi=gen-ev trywith 30 --relevant-triggers --full-saturate-quant trywith 15 --finite-model-find --decision=justification-stoponly trywith 30 --pre-skolem-quant --full-saturate-quant finishwith --quant-cf --full-saturate-quant # echo "% SZS status" "GaveUp for $filename" cvc4-1.5/contrib/run-script-cascj7-tff000077500000000000000000000022651313116454100176430ustar00rootroot00000000000000#!/bin/bash cvc4=./cvc4 bench="$1" file=${bench##*/} filename=${file%.*} echo "------- cvc4-tff casc j7 : $bench at $2..." # use: trywith [params..] # to attempt a run. If an SZS ontology result is printed, then # the run script terminates immediately. Otherwise, this # function returns normally. function trywith { limit=$1; shift; echo "--- Run $@ at $limit..."; (ulimit -t "$limit";$cvc4 --lang=tptp --no-checking --no-interactive "$@" $bench) 2>/dev/null | (read w1 w2 w3 result w4 w5; case "$result" in Unsatisfiable) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;; Theorem) echo "$w1 $w2 $w3 $result $w4 $w5";cat;exit 0;; esac; exit 1) if [ ${PIPESTATUS[1]} -eq 0 ]; then exit 0; fi } function finishwith { echo "--- Run $@..."; $cvc4 --lang=tptp --no-checking --no-interactive "$@" $bench } trywith 15 --cbqi-recurse --full-saturate-quant trywith 15 --decision=internal --full-saturate-quant trywith 30 --quant-cf --qcf-tconstraint --full-saturate-quant trywith 20 --finite-model-find trywith 30 --fmf-bound-int trywith 60 --quant-cf --full-saturate-quant finishwith --cbqi-recurse --full-saturate-quant --pre-skolem-quant # echo "% SZS status" "GaveUp for $filename" cvc4-1.5/contrib/run-script-smtcomp2014000077500000000000000000000074661313116454100177150ustar00rootroot00000000000000#!/bin/bash cvc4=./cvc4 bench="$1" logic=$(expr "$(grep -m1 '^[^;]*set-logic' "$bench")" : ' *(set-logic *\([A-Z_]*\) *) *$') # use: trywith [params..] # to attempt a run. Only thing printed on stdout is "sat" or "unsat", in # which case this run script terminates immediately. Otherwise, this # function returns normally. function trywith { limit=$1; shift; result="$(ulimit -S -t "$limit";$cvc4 -L smt2 --no-incremental --no-checking --no-interactive "$@" $bench)" case "$result" in sat|unsat) echo "$result"; exit 0;; esac } # use: finishwith [params..] # to run cvc4 and let it output whatever it will to stdout. function finishwith { $cvc4 -L smt2 --no-incremental --no-checking --no-interactive "$@" $bench } case "$logic" in QF_LRA) trywith 200 --enable-miplib-trick --miplib-trick-subs=4 --use-approx --lemmas-on-replay-failure --replay-early-close-depth=4 --replay-lemma-reject-cut=128 --replay-reject-cut=512 --unconstrained-simp --use-soi finishwith --no-restrict-pivots --use-soi --new-prop --unconstrained-simp ;; QF_LIA) # same as QF_LRA but add --pb-rewrites finishwith --enable-miplib-trick --miplib-trick-subs=4 --use-approx --lemmas-on-replay-failure --replay-early-close-depth=4 --replay-lemma-reject-cut=128 --replay-reject-cut=512 --unconstrained-simp --use-soi --pb-rewrites ;; ALIA|AUFLIA|AUFLIRA|AUFNIRA|BV|UF|UFBV|UFIDL|UFLIA|UFLRA|UFNIA) # the following is designed for a run time of 1500s. # initial runs trywith 20 --simplification=none --decision=internal --full-saturate-quant trywith 20 --quant-cf --pre-skolem-quant --full-saturate-quant trywith 20 --finite-model-find --mbqi=none # more runs... trywith 30 --relevant-triggers --full-saturate-quant trywith 30 --quant-cf --qcf-tconstraint --inst-when=last-call --full-saturate-quant trywith 30 --finite-model-find --mbqi=gen-ev --uf-ss-totality trywith 30 --disable-prenex-quant --full-saturate-quant trywith 20 --simplification=none --decision=internal --pre-skolem-quant --full-saturate-quant trywith 20 --quant-cf --quant-cf-mode=conflict --full-saturate-quant trywith 20 --fmf-bound-int --macros-quant # medium runs (2 min per) trywith 120 --decision=justification-stoponly --full-saturate-quant trywith 120 --quant-cf --qcf-tconstraint --full-saturate-quant trywith 120 --finite-model-find --fmf-inst-engine --sort-inference --uf-ss-fair --mbqi=gen-ev # last call runs (5 min per) trywith 300 --full-saturate-quant trywith 300 --finite-model-find --sort-inference --uf-ss-fair finishwith --quant-cf --full-saturate-quant ;; LIA|LRA|NIA|NRA) trywith 20 --enable-cbqi --full-saturate-quant trywith 20 --full-saturate-quant trywith 20 --cbqi-recurse --full-saturate-quant trywith 30 --quant-cf --full-saturate-quant trywith 60 --quant-cf --qcf-tconstraint --full-saturate-quant trywith 120 --cbqi-recurse --disable-prenex-quant --full-saturate-quant finishwith --cbqi-recurse --pre-skolem-quant --full-saturate-quant ;; QF_AUFBV) trywith 600 finishwith --decision=justification-stoponly ;; QF_ABV) finishwith --ite-simp --simp-with-care --repeat-simp ;; QF_BV) exec ./pcvc4 -L smt2 --no-incremental --no-checking --no-interactive \ --threads 2 \ --thread0 '--unconstrained-simp --bv-div-zero-const --bv-intro-pow2 --bitblast=eager --no-bv-abstraction' \ --thread1 '--unconstrained-simp --bv-div-zero-const --bv-intro-pow2 --bv-eq-slicer=auto ' \ --no-wait-to-join \ "$bench" #trywith 10 --bv-eq-slicer=auto --decision=justification #trywith 60 --decision=justification #trywith 600 --decision=internal --bitblast-eager #finishwith --decision=justification --decision-use-weight --decision-weight-internal=usr1 ;; QF_AUFLIA|QF_AX) finishwith --no-arrays-eager-index --arrays-eager-lemmas ;; *) # just run the default finishwith ;; esac cvc4-1.5/contrib/switch-config000077500000000000000000000047341313116454100163570ustar00rootroot00000000000000#!/bin/bash # # usage: switch-config [configuration] # switch-config -l # # Script to switch the "current" configuration of the CVC4 builds directory # to another one. Without an argument, it switches to the next alphabetically. # With an argument, it switches to that configuration. With -l, it lists the # available configurations. # # Only configurations in the "current" architecture (that for which the build directory is currently # configured) are considered. # # This script is useful because it's faster that re-configuring. # # Script assumes it lives under contrib/ in the root of the CVC4 source # tree. function usage { echo "usage: `basename \"$0\"` [configuration]" echo " `basename \"$0\"` -l" } if [ $# -gt 1 ]; then usage exit 1 fi cd `dirname "$0"`/.. if ! [ -d builds ]; then echo "No configurations are available (no builds/ directory)." exit fi if ! [ -e builds/current ]; then echo "Cannot get current configuration." exit 1 fi current=(`grep '^CURRENT_BUILD' builds/current | sed 's,^CURRENT_BUILD *= *\([^/]*\)/\(.*\),\1 \2,'`) arch=${current[0]} build=${current[1]} builds=(`ls "builds/$arch/"`) if ! [ -d "builds/$arch" ] || ! [ -d "builds/$arch/$build" ] || [ ${#builds[@]} -eq 0 ]; then echo "builds/ directory in malformed state." echo "You might want to blow it away and start from scratch." exit 1 fi function switchto { config/mkbuilddir "$arch" "$1" >/dev/null #perl -pi -e 's,^CURRENT_BUILD *= *.*,CURRENT_BUILD = '$arch/$1',' builds/current echo "Current build switched to \`$1'." } if [ $# -eq 0 ]; then first= last= setbuild= for d in `ls "builds/$arch/"`; do if [ -z "$first" ]; then first=$d; fi if [ "$last" = "$build" ]; then setbuild=$d; break; fi last=$d done if [ -z "$setbuild" ]; then setbuild=$first; fi if [ "$setbuild" = "$build" ]; then echo "There is only one build profile (\`$build'), and it is current." else switchto "$setbuild" fi else case $1 in -l) for config in `ls -1 "builds/$arch/"`; do if [ "$config" = "$build" ]; then echo "$config" '*' else echo "$config" fi done ;; -*) usage; exit 1 ;; *) if ! [ -d "builds/$arch/$1" ]; then echo "Build \`$1' does not exist." exit 1 else if [ "$1" = "$build" ]; then echo "Build \`$1' is already the current build profile." else switchto "$1" fi fi ;; esac fi cvc4-1.5/contrib/theoryskel/000077500000000000000000000000001313116454100160465ustar00rootroot00000000000000cvc4-1.5/contrib/theoryskel/README.WHATS-NEXT000066400000000000000000000034651313116454100203770ustar00rootroot00000000000000Congratulations, you now have a new theory of $dir ! Your next steps will likely be: * to specify theory constants, types, and operators in your \`kinds' file * to add typing rules to theory_$dir_type_rules.h for your operators and constants * to write code in theory_$dir_rewriter.h to implement a normal form for your theory's terms; in particular, you should ensure that you rewrite (= X X) to "true" for terms X of your theory's sorts, and evaluate any constant terms * for any new types that you have introduced, add "mk*Type()" functions to the NodeManager and ExprManager in src/expr/node_manager.{h,cpp} and src/expr/expr_manager_template.{h,cpp}. You may also want "is*()" testers in src/expr/type_node.h and a corresponding Type derived class in src/expr/type.h. * to write parser rules in src/parser/cvc/Cvc.g to support the CVC input language, src/parser/smt/Smt.g to support the (deprecated) SMT-LIBv1 language, and src/parser/smt2/Smt2.g to support SMT-LIBv2 * to write printer code in src/printer/*/*_printer* to support printing your theory terms and types in various output languages and finally: * to implement a decision procedure for your theory by implementing Theory$camel::check() in theory_$dir.cpp. Before writing the actual code, you will need : * to determine which data structures are context dependent and use for them context-dependent data structures (context/cd*.h) * to choose which work will be done at QUICK_CHECK, STANDARD or at FULL_EFFORT. You'll probably find the Developer's wiki useful: http://cvc4.cs.nyu.edu/wiki/ ...and in particular the Developer's Guide: http://cvc4.cs.nyu.edu/wiki/Developer%27s_Guide which contains coding guidelines for the CVC4 project. Good luck, and please contact cvc4-devel@cs.nyu.edu for assistance should you need it! cvc4-1.5/contrib/theoryskel/kinds000066400000000000000000000007561313116454100171110ustar00rootroot00000000000000# kinds -*- sh -*- # # For documentation on this file format, please refer to # src/theory/builtin/kinds. # theory THEORY_$id ::CVC4::theory::$dir::Theory$camel "theory/$dir/theory_$dir.h" typechecker "theory/$dir/theory_$dir_type_rules.h" rewriter ::CVC4::theory::$dir::Theory$camelRewriter "theory/$dir/theory_$dir_rewriter.h" properties check # Theory content goes here. # constants... # types... # operators... endtheory cvc4-1.5/contrib/theoryskel/theory_DIR.cpp000066400000000000000000000022161313116454100205630ustar00rootroot00000000000000#include "theory/$dir/theory_$dir.h" using namespace std; namespace CVC4 { namespace theory { namespace $dir { /** Constructs a new instance of Theory$camel w.r.t. the provided contexts. */ Theory$camel::Theory$camel(context::Context* c, context::UserContext* u, OutputChannel& out, Valuation valuation, const LogicInfo& logicInfo) : Theory(THEORY_$id, c, u, out, valuation, logicInfo) { }/* Theory$camel::Theory$camel() */ void Theory$camel::check(Effort level) { if (done() && !fullEffort(level)) { return; } TimerStat::CodeTimer checkTimer(d_checkTime); while(!done()) { // Get all the assertions Assertion assertion = get(); TNode fact = assertion.assertion; Debug("$dir") << "Theory$camel::check(): processing " << fact << std::endl; // Do the work switch(fact.getKind()) { /* cases for all the theory's kinds go here... */ default: Unhandled(fact.getKind()); } } }/* Theory$camel::check() */ }/* CVC4::theory::$dir namespace */ }/* CVC4::theory namespace */ }/* CVC4 namespace */ cvc4-1.5/contrib/theoryskel/theory_DIR.h000066400000000000000000000013731313116454100202330ustar00rootroot00000000000000#include "cvc4_private.h" #ifndef __CVC4__THEORY__$id__THEORY_$id_H #define __CVC4__THEORY__$id__THEORY_$id_H #include "theory/theory.h" namespace CVC4 { namespace theory { namespace $dir { class Theory$camel : public Theory { public: /** Constructs a new instance of Theory$camel w.r.t. the provided contexts. */ Theory$camel(context::Context* c, context::UserContext* u, OutputChannel& out, Valuation valuation, const LogicInfo& logicInfo); void check(Effort); std::string identify() const { return "THEORY_$id"; } };/* class Theory$camel */ }/* CVC4::theory::$dir namespace */ }/* CVC4::theory namespace */ }/* CVC4 namespace */ #endif /* __CVC4__THEORY__$id__THEORY_$id_H */ cvc4-1.5/contrib/theoryskel/theory_DIR_rewriter.h000066400000000000000000000050061313116454100221530ustar00rootroot00000000000000#include "cvc4_private.h" #ifndef __CVC4__THEORY__$id__THEORY_$id_REWRITER_H #define __CVC4__THEORY__$id__THEORY_$id_REWRITER_H #include "theory/rewriter.h" namespace CVC4 { namespace theory { namespace $dir { class Theory$camelRewriter { public: /** * Rewrite a node into the normal form for the theory of $dir. * Called in post-order (really reverse-topological order) when * traversing the expression DAG during rewriting. This is the * main function of the rewriter, and because of the ordering, * it can assume its children are all rewritten already. * * This function can return one of three rewrite response codes * along with the rewritten node: * * REWRITE_DONE indicates that no more rewriting is needed. * REWRITE_AGAIN means that the top-level expression should be * rewritten again, but that its children are in final form. * REWRITE_AGAIN_FULL means that the entire returned expression * should be rewritten again (top-down with preRewrite(), then * bottom-up with postRewrite()). * * Even if this function returns REWRITE_DONE, if the returned * expression belongs to a different theory, it will be fully * rewritten by that theory's rewriter. */ static RewriteResponse postRewrite(TNode node) { // Implement me! // This default implementation return RewriteResponse(REWRITE_DONE, node); } /** * Rewrite a node into the normal form for the theory of $dir * in pre-order (really topological order)---meaning that the * children may not be in the normal form. This is an optimization * for theories with cancelling terms (e.g., 0 * (big-nasty-expression) * in arithmetic rewrites to 0 without the need to look at the big * nasty expression). Since it's only an optimization, the * implementation here can do nothing. */ static RewriteResponse preRewrite(TNode node) { // do nothing return RewriteResponse(REWRITE_DONE, node); } /** * Rewrite an equality, in case special handling is required. */ static Node rewriteEquality(TNode equality) { // often this will suffice return postRewrite(equality).node; } /** * Initialize the rewriter. */ static inline void init() { // nothing to do } /** * Shut down the rewriter. */ static inline void shutdown() { // nothing to do } };/* class Theory$camelRewriter */ }/* CVC4::theory::$dir namespace */ }/* CVC4::theory namespace */ }/* CVC4 namespace */ #endif /* __CVC4__THEORY__$id__THEORY_$id_REWRITER_H */ cvc4-1.5/contrib/theoryskel/theory_DIR_type_rules.h000066400000000000000000000014621313116454100225050ustar00rootroot00000000000000#include "cvc4_private.h" #ifndef __CVC4__THEORY__$id__THEORY_$id_TYPE_RULES_H #define __CVC4__THEORY__$id__THEORY_$id_TYPE_RULES_H namespace CVC4 { namespace theory { namespace $dir { class $camelTypeRule { public: /** * Compute the type for (and optionally typecheck) a term belonging * to the theory of $dir. * * @param check if true, the node's type should be checked as well * as computed. */ inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) throw (TypeCheckingExceptionPrivate) { // TODO: implement me! Unimplemented(); } };/* class $camelTypeRule */ }/* CVC4::theory::$dir namespace */ }/* CVC4::theory namespace */ }/* CVC4 namespace */ #endif /* __CVC4__THEORY__$id__THEORY_$id_TYPE_RULES_H */ cvc4-1.5/contrib/win-build000077500000000000000000000067231313116454100155050ustar00rootroot00000000000000#!/bin/bash # # win32-build script # Morgan Deters # Tue, 15 Jan 2013 11:11:24 -0500 # if [ $# -ne 0 ]; then echo "usage: `basename $0`" >&2 echo >&2 echo "This script attempts to build CVC4 for Win32/64 using mingw-w64." >&2 exit 1 fi if [ -z "$HOST" ]; then HOST=i686-w64-mingw32 echo "WARNING:" echo "WARNING: Using default HOST value: $HOST" echo "WARNING: You should probably run this script like this:" echo "WARNING:" echo "WARNING: HOST=i686-w64-mingw32 win-build" echo "WARNING:" echo "WARNING: (replacing the i686-w64-mingw32 with your build host)" echo "WARNING: to ensure the script builds correctly." echo "WARNING:" fi GMPVERSION=5.1.0 BOOSTVERSION=1.55.0 BOOSTBASE=boost_1_55_0 function reporterror { echo echo ============================================================================= echo echo "There was an error setting up the prerequisites. Look above for details." echo exit 1 } function webget { if which curl &>/dev/null; then curl -L "$1" >"$2" elif which wget &>/dev/null; then wget -c -O "$2" "$1" else echo "Can't figure out how to download from web. Please install wget or curl." >&2 exit 1 fi } for dir in antlr-3.4 gmp-$GMPVERSION boost-$BOOSTVERSION; do if [ -e "$dir" ]; then echo "error: $dir directory exists; please move it out of the way." >&2 exit 1 fi done echo ============================================================================= echo echo "Setting up ANTLR 3.4..." echo MACHINE_TYPE=x86 ANTLR_CONFIGURE_ARGS=--host=$HOST contrib/get-antlr-3.4 | grep -v 'Now configure CVC4 with' | grep -v '\./configure --with-antlr-dir=' [ ${PIPESTATUS[0]} -eq 0 ] || reporterror echo echo ============================================================================= echo echo "Setting up GMP $GMPVERSION..." echo ( set -ex mkdir gmp-$GMPVERSION cd gmp-$GMPVERSION gmpprefix=`pwd` && mkdir src && cd src && webget ftp://ftp.gmplib.org/pub/gmp-$GMPVERSION/gmp-$GMPVERSION.tar.bz2 gmp-$GMPVERSION.tar.bz2 && tar xfj gmp-$GMPVERSION.tar.bz2 && cd gmp-$GMPVERSION && ./configure --host=$HOST --prefix="$gmpprefix" --enable-cxx && make && make install ) || exit 1 echo echo ============================================================================= echo echo "Setting up Boost..." echo ( mkdir boost-$BOOSTVERSION && cd boost-$BOOSTVERSION && webget http://downloads.sourceforge.net/project/boost/boost/$BOOSTVERSION/$BOOSTBASE.tar.gz $BOOSTBASE.tar.gz && tar xfz $BOOSTBASE.tar.gz && cd $BOOSTBASE && ./bootstrap.sh --with-toolset=gcc --prefix=`pwd`/.. --with-libraries=thread && echo "using gcc : mingw32 : $HOST-gcc ;" >> project-config.jam && cp tools/build/v2/tools/gcc.jam tools/build/v2/tools/gcc.jam.orig && sed 's,option = -pthread ; libs = rt ;,,' tools/build/v2/tools/gcc.jam.orig > tools/build/v2/tools/gcc.jam && ./b2 gcc-mingw32 threadapi=win32 link=static install ) || exit 1 echo echo ============================================================================= echo echo 'Now just run:' echo " ./configure --enable-static-binary --disable-shared --host=$HOST LDFLAGS=\"-L`pwd`/gmp-$GMPVERSION/lib -L`pwd`/antlr-3.4/lib -L`pwd`/boost-$BOOSTVERSION/lib\" CPPFLAGS=\"-I`pwd`/gmp-$GMPVERSION/include -I`pwd`/antlr-3.4/include -I`pwd`/boost-$BOOSTVERSION/include\" --with-antlr-dir=\"`pwd`/antlr-3.4\" ANTLR=\"`pwd`/antlr-3.4/bin/antlr3\"" echo ' make' echo echo ============================================================================= cvc4-1.5/cvc4autoconfig.h.in000066400000000000000000000101221313116454100157050ustar00rootroot00000000000000/* cvc4autoconfig.h.in. Generated from configure.ac by autoheader. */ #ifndef __CVC4__CVC4AUTOCONFIG_H #define __CVC4__CVC4AUTOCONFIG_H /* Define to 1 if Boost threading library has support for thread attributes */ #undef BOOST_HAS_THREAD_ATTR /* Defined if using the CLN multi-precision arithmetic library. */ #undef CVC4_CLN_IMP /* Extraversion component of the version of CVC4. */ #undef CVC4_EXTRAVERSION /* Defined if using the GMP multi-precision arithmetic library. */ #undef CVC4_GMP_IMP /* Whether CVC4 is built with the (optional) GPLed library dependences. */ #undef CVC4_GPL_DEPS /* Major component of the version of CVC4. */ #undef CVC4_MAJOR /* Minor component of the version of CVC4. */ #undef CVC4_MINOR /* Release component of the version of CVC4. */ #undef CVC4_RELEASE /* Full release string for CVC4. */ #undef CVC4_RELEASE_STRING /* Defined if the requested minimum BOOST version is satisfied */ #undef HAVE_BOOST /* Define to 1 if you have */ #undef HAVE_BOOST_SYSTEM_ERROR_CODE_HPP /* Define to 1 if you have */ #undef HAVE_BOOST_THREAD_HPP /* Defined to 1 if clock_gettime() is supported by the platform. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the declaration of `optreset', and to 0 if you don't. */ #undef HAVE_DECL_OPTRESET /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_EXT_STDIO_FILEBUF_H /* Defined to 1 if ffs() is supported by the platform. */ #undef HAVE_FFS /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `gmp' library (-lgmp). */ #undef HAVE_LIBGMP /* Define to 1 if you have the `profiler' library (-lprofiler). */ #undef HAVE_LIBPROFILER /* Define to 1 to use libreadline */ #undef HAVE_LIBREADLINE /* Define to 1 if you have the `tcmalloc' library (-ltcmalloc). */ #undef HAVE_LIBTCMALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Defined to 1 if sigaltstack() is supported by the platform. */ #undef HAVE_SIGALTSTACK /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* 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 /* Defined to 1 if strtok_r() is supported by the platform. */ #undef HAVE_STRTOK_R /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if __gnu_cxx::is_sorted() exists */ #undef IS_SORTED_IN_GNUCXX_NAMESPACE /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if rl_completion_entry_function is declared to return pointer to char */ #undef READLINE_COMPENTRY_FUNC_RETURNS_CHARP /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P /* If the compiler supports a TLS storage class define it to that here */ #undef TLS #endif /* __CVC4__CVC4AUTOCONFIG_H */ cvc4-1.5/doc/000077500000000000000000000000001313116454100127625ustar00rootroot00000000000000cvc4-1.5/doc/SmtEngine.3cvc000066400000000000000000001164311313116454100154410ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii SmtEngine.3cvc .\" .TH SMTENGINE 3cvc "July 2017" "CVC4 release 1.5" "CVC4 Library Interfaces" .SH NAME SmtEngine \- the primary interface to CVC4's theorem-proving capabilities .SH DESCRIPTION .B SmtEngine is the main entry point into the CVC4 theorem prover API. .SH SMTENGINE OPTIONS The SmtEngine is in charge of setting and getting information and options. Numerous options are available via the .I SmtEngine::setOption() call. .I SmtEngine::setOption() and .I SmtEngine::getOption() use the following option keys. .ad l .RS .TP 10 .I "COMMON OPTIONS" .TP .B "input-language" (InputLanguage) force input language (default is "auto"; see \-\-lang help) .TP .B "output-language" (OutputLanguage) force output language (default is "auto"; see \-\-output\-lang help) .TP .B "statistics" (bool) give statistics on exit .TP .B "version" (bool) identify this CVC4 binary .TP .B "help" (bool) full command line reference .TP .B "strict-parsing" (bool) be less tolerant of non\-conforming inputs .TP .B "dump" (std::string) dump preprocessed assertions, etc., see \-\-dump=help .TP .B "dump-to" (std::string) all dumping goes to FILE (instead of stdout) .TP .B "produce-models" (bool) support the get\-value and get\-model commands .TP .B "produce-assertions" (bool) keep an assertions list (enables get\-assertions command) .TP .B "incremental" (bool) enable incremental solving .TP .B "tlimit" (unsigned long) enable time limiting (give milliseconds) .TP .B "tlimit-per" (unsigned long) enable time limiting per query (give milliseconds) .TP .B "rlimit" (unsigned long) enable resource limiting (currently, roughly the number of SAT conflicts) .TP .B "reproducible-resource-limit" (unsigned long) enable resource limiting per query .TP .B "hard-limit" (bool) the resource limit is hard potentially leaving the smtEngine in an unsafe state (should be destroyed and rebuild after resourcing out) .TP .B "cpu-time" (bool) measures CPU time if set to true and wall time if false (default false) .TP .I "ARITHMETIC THEORY OPTIONS" .TP .B "unate-lemmas=MODE" (ArithUnateLemmaMode) determines which lemmas to add before solving (default is 'all', see \-\-unate\-lemmas=help) .TP .B "arith-prop=MODE" (ArithPropagationMode) turns on arithmetic propagation (default is 'old', see \-\-arith\-prop=help) .TP .B "heuristic-pivots=N" (int16_t) the number of times to apply the heuristic pivot rule; if N < 0, this defaults to the number of variables; if this is unset, this is tuned by the logic selection .TP .B "standard-effort-variable-order-pivots=N" (int16_t) limits the number of pivots in a single invocation of check() at a non\-full effort level using Bland's pivot rule (EXPERTS only) .TP .B "error-selection-rule=RULE" (ErrorSelectionRule) change the pivot rule for the basic variable (default is 'min', see \-\-pivot\-rule help) .TP .B "simplex-check-period=N" (uint16_t) the number of pivots to do in simplex before rechecking for a conflict on all variables .TP .B "pivot-threshold=N" (uint16_t) sets the number of pivots using \-\-pivot\-rule per basic variable per simplex instance before using variable order .TP .B "prop-row-length=N" (uint16_t) sets the maximum row length to be used in propagation .TP .B "enable-dio-solver" (bool) turns on Linear Diophantine Equation solver (Griggio, JSAT 2012) .TP .B "enable-arith-rewrite-equalities" (bool) turns on the preprocessing rewrite turning equalities into a conjunction of inequalities .TP .B "miplib-trick" (bool) turns on the preprocessing step of attempting to infer bounds on miplib problems .TP .B "miplib-trick-subs" (unsigned) do substitution for miplib 'tmp' vars if defined in <= N eliminated vars .TP .B "cut-all-bounded" (bool) turns on the integer solving step of periodically cutting all integer variables that have both upper and lower bounds .TP .B "maxCutsInContext" (unsigned) maximum cuts in a given context before signalling a restart .TP .B "revert-arith-models-on-unsat" (bool) revert the arithmetic model to a known safe model on unsat if one is cached .TP .B "fc-penalties" (bool) turns on degenerate pivot penalties .TP .B "use-fcsimplex" (bool) use focusing and converging simplex (FMCAD 2013 submission) .TP .B "use-soi" (bool) use sum of infeasibility simplex (FMCAD 2013 submission) .TP .B "restrict-pivots" (bool) have a pivot cap for simplex at effort levels below fullEffort .TP .B "collect-pivot-stats" (bool) collect the pivot history .TP .B "use-approx" (bool) attempt to use an approximate solver .TP .B "approx-branch-depth" (int16_t) maximum branch depth the approximate solver is allowed to take .TP .B "dio-decomps" (bool) let skolem variables for integer divisibility constraints leak from the dio solver .TP .B "new-prop" (bool) use the new row propagation system .TP .B "arith-prop-clauses" (uint16_t) rows shorter than this are propagated as clauses .TP .B "soi-qe" (bool) use quick explain to minimize the sum of infeasibility conflicts .TP .B "rewrite-divk" (bool) rewrite division and mod when by a constant into linear terms .TP .B "se-solve-int" (bool) attempt to use the approximate solve integer method on standard effort .TP .B "lemmas-on-replay-failure" (bool) attempt to use external lemmas if approximate solve integer failed .TP .B "dio-turns" (int) turns in a row dio solver cutting gets .TP .B "rr-turns" (int) round robin turn .TP .B "dio-repeat" (bool) handle dio solver constraints in mass or one at a time .TP .B "replay-early-close-depth" (int) multiples of the depths to try to close the approx log eagerly .TP .B "replay-failure-penalty" (int) number of solve integer attempts to skips after a numeric failure .TP .B "replay-num-err-penalty" (int) number of solve integer attempts to skips after a numeric failure .TP .B "replay-reject-cut" (unsigned) maximum complexity of any coefficient while replaying cuts .TP .B "replay-lemma-reject-cut" (unsigned) maximum complexity of any coefficient while outputting replaying cut lemmas .TP .B "replay-soi-major-threshold" (double) threshold for a major tolerance failure by the approximate solver .TP .B "replay-soi-major-threshold-pen" (int) threshold for a major tolerance failure by the approximate solver .TP .B "replay-soi-minor-threshold" (double) threshold for a minor tolerance failure by the approximate solver .TP .B "replay-soi-minor-threshold-pen" (int) threshold for a minor tolerance failure by the approximate solver .TP .B "pp-assert-max-sub-size" (unsigned) threshold for substituting an equality in ppAssert .TP .B "max-replay-tree" (int) threshold for attempting to replay a tree .TP .B "pb-rewrites" (bool) apply pseudo boolean rewrites .TP .B "pb-rewrite-threshold" (int) threshold of number of pseudoboolean variables to have before doing rewrites .TP .B "snorm-infer-eq" (bool) infer equalities based on Shostak normalization .TP .B "nl-ext" (bool) extended approach to non\-linear .TP .B "nl-ext-rbound" (bool) use resolution\-style inference for inferring new bounds .TP .B "nl-ext-tplanes" (bool) use non\-terminating tangent plane strategy for non\-linear .TP .B "nl-ext-ent-conf" (bool) check for entailed conflicts in non\-linear solver .TP .B "nl-ext-rewrite" (bool) do rewrites in non\-linear solver .TP .B "nl-ext-solve-subs" (bool) do solving for determining constant substitutions .TP .B "nl-ext-purify" (bool) purify non\-linear terms at preprocess .TP .B "nl-ext-split-zero" (bool) intial splits on zero for all variables .TP .I "ARRAYS THEORY OPTIONS" .TP .B "arrays-optimize-linear" (bool) turn on optimization for linear array terms (see de Moura FMCAD 09 arrays paper) .TP .B "arrays-lazy-rintro1" (bool) turn on optimization to only perform RIntro1 rule lazily (see Jovanovic/Barrett 2012: Being Careful with Theory Combination) .TP .B "arrays-weak-equiv" (bool) use algorithm from Christ/Hoenicke (SMT 2014) .TP .B "arrays-model-based" (bool) turn on model\-based array solver .TP .B "arrays-eager-index" (bool) turn on eager index splitting for generated array lemmas .TP .B "arrays-eager-lemmas" (bool) turn on eager lemma generation for arrays .TP .B "arrays-config" (int) set different array option configurations \- for developers only .TP .B "arrays-reduce-sharing" (bool) use model information to reduce size of care graph for arrays .TP .B "arrays-prop" (int) propagation effort for arrays: 0 is none, 1 is some, 2 is full .TP .I "BASE OPTIONS" .TP .B "verbosity" (int) the verbosity level of CVC4 .TP .B "stats-every-query" (bool) in incremental mode, print stats after every satisfiability or validity query .TP .B "stats-hide-zeros" (bool) hide statistics which are zero .TP .B "parse-only" (bool) exit after parsing input .TP .B "preprocess-only" (bool) exit after preprocessing input .TP .B "trace" (void) trace something (e.g. \-t pushpop), can repeat .TP .B "debug" (void) debug something (e.g. \-d arith), can repeat .TP .B "print-success" (bool) print the "success" output required of SMT\-LIBv2 .TP .I "BITVECTOR THEORY OPTIONS" .TP .B "bv-sat-solver" (CVC4::theory::bv::SatSolverMode) choose which sat solver to use, see \-\-bv\-sat\-solver=help (EXPERTS only) .TP .B "bitblast" (CVC4::theory::bv::BitblastMode) choose bitblasting mode, see \-\-bitblast=help .TP .B "bitblast-aig" (bool) bitblast by first converting to AIG (implies \-\-bitblast=eager) .TP .B "bv-aig-simp=COMMAND" (std::string) abc command to run AIG simplifications (implies \-\-bitblast\-aig, default is "balance;drw") (EXPERTS only) .TP .B "bv-propagate" (bool) use bit\-vector propagation in the bit\-blaster .TP .B "bv-eq-solver" (bool) use the equality engine for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bv-eq-slicer=MODE" (CVC4::theory::bv::BvSlicerMode) turn on the slicing equality solver for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bv-inequality-solver" (bool) turn on the inequality solver for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bv-algebraic-solver" (bool) turn on the algebraic solver for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bv-algebraic-budget" (unsigned) the budget allowed for the algebraic solver in number of SAT conflicts (EXPERTS only) .TP .B "bv-to-bool" (bool) lift bit\-vectors of size 1 to booleans when possible .TP .B "bool-to-bv" (bool) convert booleans to bit\-vectors of size 1 when possible .TP .B "bv-div-zero-const" (bool) always return \-1 on division by zero .TP .B "bv-extract-arith" (bool) enable rewrite pushing extract [i:0] over arithmetic operations (can blow up) (EXPERTS only) .TP .B "bv-abstraction" (bool) mcm benchmark abstraction (EXPERTS only) .TP .B "bv-skolemize" (bool) skolemize arguments for bv abstraction (only does something if \-\-bv\-abstraction is on) (EXPERTS only) .TP .B "bv-num-func=NUM" (unsigned) number of function symbols in conflicts that are generalized (EXPERTS only) .TP .B "bv-eager-explanations" (bool) compute bit\-blasting propagation explanations eagerly (EXPERTS only) .TP .B "bv-quick-xplain" (bool) minimize bv conflicts using the QuickXplain algorithm (EXPERTS only) .TP .B "bv-intro-pow2" (bool) introduce bitvector powers of two as a preprocessing pass (EXPERTS only) .TP .B "bv-lazy-rewrite-extf" (bool) lazily rewrite extended functions like bv2nat and int2bv .TP .B "bv-lazy-reduce-extf" (bool) reduce extended functions like bv2nat and int2bv at last call instead of full effort .TP .B "bv-alg-extf" (bool) algebraic inferences for extended functions .TP .I "DATATYPES THEORY OPTIONS" .TP .B "dt-rewrite-error-sel" (bool) rewrite incorrectly applied selectors to arbitrary ground term (EXPERTS only) .TP .B "dt-force-assignment" (bool) force the datatypes solver to give specific values to all datatypes terms before answering sat .TP .B "dt-binary-split" (bool) do binary splits for datatype constructor types .TP .B "dt-ref-sk-intro" (bool) introduce reference skolems for shorter explanations .TP .B "dt-use-testers" (bool) do not preprocess away tester predicates .TP .B "cdt-bisimilar" (bool) do bisimilarity check for co\-datatypes .TP .B "dt-cyclic" (bool) do cyclicity check for datatypes .TP .B "dt-infer-as-lemmas" (bool) always send lemmas out instead of making internal inferences .TP .B "dt-blast-splits" (bool) when applicable, blast splitting lemmas for all variables at once .TP .I "DECISION HEURISTICS OPTIONS" .TP .B "decision-mode" (decision::DecisionMode) choose decision mode, see \-\-decision=help .TP .B "decision-threshold=N" (decision::DecisionWeight) ignore all nodes greater than threshold in first attempt to pick decision (EXPERTS only) .TP .B "decision-use-weight" (bool) use the weight nodes (locally, by looking at children) to direct recursive search (EXPERTS only) .TP .B "decision-random-weight=N" (int) assign random weights to nodes between 0 and N\-1 (0: disable) (EXPERTS only) .TP .B "decision-weight-internal=HOW" (decision::DecisionWeightInternal) computer weights of internal nodes using children: off, max, sum, usr1 (meaning evolving) (EXPERTS only) .TP .I "EXPRESSION PACKAGE OPTIONS" .TP .B "default-expr-depth=N" (int) print exprs to depth N (0 == default, \-1 == no limit) .TP .B "default-dag-thresh" (int) dagify common subexprs appearing > N times (1 == default, 0 == don't dagify) .TP .B "print-expr-types" (bool) print types with variables when printing exprs .TP .B "eager-type-checking" (bool) type check expressions immediately on creation (debug builds only) .TP .B "type-checking" (bool) never type check expressions .TP .I "IDL OPTIONS" .TP .B "enable-idl-rewrite-equalities" (bool) enable rewriting equalities into two inequalities in IDL solver (default is disabled) .TP .I "DRIVER OPTIONS" .TP .B "early-exit" (bool) do not run destructors at exit; default on except in debug builds (EXPERTS only) .TP .B "threads=N" (unsigned) Total number of threads for portfolio .TP .B "thread-stack=N" (unsigned) stack size for worker threads in MB (0 means use Boost/thread lib default) .TP .B "filter-lemma-length=N" (int) don't share (among portfolio threads) lemmas strictly longer than N .TP .B "fallback-sequential" (bool) Switch to sequential mode (instead of printing an error) if it can't be solved in portfolio mode .TP .B "incremental-parallel" (bool) Use parallel solver even in incremental mode (may print 'unknown's at times) .TP .B "continued-execution" (bool) continue executing commands, even on error .TP .B "segv-spin" (bool) spin on segfault/other crash waiting for gdb .TP .B "wait-to-join" (bool) wait for other threads to join before quitting (EXPERTS only) .TP .I "PARSER OPTIONS" .TP .B "mmap" (bool) memory map file input .TP .B "semantic-checks" (bool) disable ALL semantic checks, including type checks .TP .B "global-declarations" (bool) force all declarations and definitions to be global .TP .I "PRINTING OPTIONS" .TP .B "model-format=MODE" (ModelFormatMode) print format mode for models, see \-\-model\-format=help .TP .B "inst-format=MODE" (InstFormatMode) print format mode for instantiations, see \-\-inst\-format=help .TP .I "PROOF OPTIONS" .TP .B "lfsc-letification" (bool) turns on global letification in LFSC proofs .TP .B "aggressive-core-min" (bool) turns on aggressive unsat core minimization (experimental) .TP .B "fewer-preprocessing-holes" (bool) try to eliminate preprocessing holes in proofs .TP .B "allow-empty-dependencies" (bool) if unable to track the dependencies of a rewritten/preprocessed assertion, fail silently .TP .I "SAT LAYER OPTIONS" .TP .B "random-frequency" (double) sets the frequency of random decisions in the sat solver (P=0.0 by default) .TP .B "random-seed" (uint32_t) sets the random seed for the sat solver .TP .B "restart-int-base=N" (unsigned) sets the base restart interval for the sat solver (N=25 by default) .TP .B "restart-int-inc=F" (double) sets the restart interval increase factor for the sat solver (F=3.0 by default) .TP .B "refine-conflicts" (bool) refine theory conflict clauses (default false) .TP .B "minisat-elimination" (bool) use Minisat elimination .TP .B "minisat-dump-dimacs" (bool) instead of solving minisat dumps the asserted clauses in Dimacs format .TP .I "QUANTIFIERS OPTIONS" .TP .B "miniscope-quant" (bool) miniscope quantifiers .TP .B "miniscope-quant-fv" (bool) miniscope quantifiers for ground subformulas .TP .B "quant-split" (bool) apply splitting to quantified formulas based on variable disjoint disjuncts .TP .B "prenex-quant=MODE" (CVC4::theory::quantifiers::PrenexQuantMode) prenex mode for quantified formulas .TP .B "prenex-quant-user" (bool) prenex quantified formulas with user patterns .TP .B "var-elim-quant" (bool) enable simple variable elimination for quantified formulas .TP .B "var-ineq-elim-quant" (bool) enable variable elimination based on infinite projection of unbound arithmetic variables .TP .B "dt-var-exp-quant" (bool) expand datatype variables bound to one constructor in quantifiers .TP .B "ite-lift-quant=MODE" (CVC4::theory::quantifiers::IteLiftQuantMode) ite lifting mode for quantified formulas .TP .B "cond-var-split-quant" (bool) split quantified formulas that lead to variable eliminations .TP .B "cond-var-split-agg-quant" (bool) aggressive split quantified formulas that lead to variable eliminations .TP .B "ite-dtt-split-quant" (bool) split ites with dt testers as conditions .TP .B "pre-skolem-quant" (bool) apply skolemization eagerly to bodies of quantified formulas .TP .B "pre-skolem-quant-nested" (bool) apply skolemization to nested quantified formulas .TP .B "pre-skolem-quant-agg" (bool) apply skolemization to quantified formulas aggressively .TP .B "ag-miniscope-quant" (bool) perform aggressive miniscoping for quantifiers .TP .B "elim-taut-quant" (bool) eliminate tautological disjuncts of quantified formulas .TP .B "elim-ext-arith-quant" (bool) eliminate extended arithmetic symbols in quantified formulas .TP .B "cond-rewrite-quant" (bool) conditional rewriting of quantified formulas .TP .B "e-matching" (bool) whether to do heuristic E\-matching .TP .B "term-db-mode" (CVC4::theory::quantifiers::TermDbMode) which ground terms to consider for instantiation .TP .B "register-quant-body-terms" (bool) consider ground terms within bodies of quantified formulas for matching .TP .B "infer-arith-trigger-eq" (bool) infer equalities for trigger terms based on solving arithmetic equalities .TP .B "infer-arith-trigger-eq-exp" (bool) record explanations for inferArithTriggerEq .TP .B "strict-triggers" (bool) only instantiate quantifiers with user patterns based on triggers .TP .B "relevant-triggers" (bool) prefer triggers that are more relevant based on SInE style analysis .TP .B "relational-triggers" (bool) choose relational triggers such as x = f(y), x >= f(y) .TP .B "purify-triggers" (bool) purify triggers, e.g. f( x+1 ) becomes f( y ), x mapsto y\-1 .TP .B "purify-dt-triggers" (bool) purify dt triggers, match all constructors of correct form instead of selectors .TP .B "pure-th-triggers" (bool) use pure theory terms as single triggers .TP .B "partial-triggers" (bool) use triggers that do not contain all free variables .TP .B "multi-trigger-when-single" (bool) select multi triggers when single triggers exist .TP .B "multi-trigger-priority" (bool) only try multi triggers if single triggers give no instantiations .TP .B "multi-trigger-cache" (bool) caching version of multi triggers .TP .B "multi-trigger-linear" (bool) implementation of multi triggers where maximum number of instantiations is linear wrt number of ground terms .TP .B "trigger-sel" (CVC4::theory::quantifiers::TriggerSelMode) selection mode for triggers .TP .B "trigger-active-sel" (CVC4::theory::quantifiers::TriggerActiveSelMode) selection mode to activate triggers .TP .B "user-pat=MODE" (CVC4::theory::quantifiers::UserPatMode) policy for handling user\-provided patterns for quantifier instantiation .TP .B "increment-triggers" (bool) generate additional triggers as needed during search .TP .B "inst-when=MODE" (CVC4::theory::quantifiers::InstWhenMode) when to apply instantiation .TP .B "inst-when-strict-interleave" (bool) ensure theory combination and standard quantifier effort strategies take turns .TP .B "inst-when-phase=N" (int) instantiation rounds quantifiers takes (>=1) before allowing theory combination to happen .TP .B "inst-when-tc-first" (bool) allow theory combination to happen once initially, before quantifier strategies are run .TP .B "quant-model-ee" (bool) use equality engine of model for last call effort .TP .B "inst-max-level=N" (int) maximum inst level of terms used to instantiate quantified formulas with (\-1 == no limit, default) .TP .B "inst-level-input-only" (bool) only input terms are assigned instantiation level zero .TP .B "quant-rep-mode=MODE" (CVC4::theory::quantifiers::QuantRepMode) selection mode for representatives in quantifiers engine .TP .B "inst-rlv-cond" (bool) add relevancy conditions for instantiations .TP .B "full-saturate-quant" (bool) when all other quantifier instantiation strategies fail, instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown .TP .B "full-saturate-quant-rd" (bool) whether to use relevant domain first for full saturation instantiation strategy .TP .B "fs-inst" (bool) interleave full saturate instantiation with other techniques .TP .B "literal-matching=MODE" (CVC4::theory::quantifiers::LiteralMatchMode) choose literal matching mode .TP .B "finite-model-find" (bool) use finite model finding heuristic for quantifier instantiation .TP .B "quant-fun-wd" (bool) assume that function defined by quantifiers are well defined .TP .B "fmf-fun" (bool) find models for recursively defined functions, assumes functions are admissible .TP .B "fmf-fun-rlv" (bool) find models for recursively defined functions, assumes functions are admissible, allows empty type when function is irrelevant .TP .B "fmf-empty-sorts" (bool) allow finite model finding to assume sorts that do not occur in ground assertions are empty .TP .B "mbqi=MODE" (CVC4::theory::quantifiers::MbqiMode) choose mode for model\-based quantifier instantiation .TP .B "mbqi-one-inst-per-round" (bool) only add one instantiation per quantifier per round for mbqi .TP .B "mbqi-one-quant-per-round" (bool) only add instantiations for one quantifier per round for mbqi .TP .B "fmf-inst-engine" (bool) use instantiation engine in conjunction with finite model finding .TP .B "fmf-inst-gen" (bool) enable Inst\-Gen instantiation techniques for finite model finding .TP .B "fmf-inst-gen-one-quant-per-round" (bool) only perform Inst\-Gen instantiation techniques on one quantifier per round .TP .B "fmf-fresh-dc" (bool) use fresh distinguished representative when applying Inst\-Gen techniques .TP .B "fmf-fmc-simple" (bool) simple models in full model check for finite model finding .TP .B "fmf-bound-int" (bool) finite model finding on bounded integer quantification .TP .B "fmf-bound" (bool) finite model finding on bounded quantification .TP .B "fmf-bound-lazy" (bool) enforce bounds for bounded quantification lazily via use of proxy variables .TP .B "fmf-bound-min-mode=MODE" (CVC4::theory::quantifiers::FmfBoundMinMode) mode for which types of bounds to minimize via first decision heuristics .TP .B "quant-cf" (bool) enable conflict find mechanism for quantifiers .TP .B "quant-cf-mode=MODE" (CVC4::theory::quantifiers::QcfMode) what effort to apply conflict find mechanism .TP .B "quant-cf-when=MODE" (CVC4::theory::quantifiers::QcfWhenMode) when to invoke conflict find mechanism for quantifiers .TP .B "qcf-tconstraint" (bool) enable entailment checks for t\-constraints in qcf algorithm .TP .B "qcf-all-conflict" (bool) add all available conflicting instances during conflict\-based instantiation .TP .B "qcf-nested-conflict" (bool) consider conflicts for nested quantifiers .TP .B "qcf-vo-exp" (bool) qcf experimental variable ordering .TP .B "inst-no-entail" (bool) do not consider instances of quantified formulas that are currently entailed .TP .B "inst-no-model-true" (bool) do not consider instances of quantified formulas that are currently true in model, if it is available .TP .B "inst-prop" (bool) internal propagation for instantiations for selecting relevant instances .TP .B "qcf-eager-test" (bool) optimization, test qcf instances eagerly .TP .B "qcf-eager-check-rd" (bool) optimization, eagerly check relevant domain of matched position .TP .B "qcf-skip-rd" (bool) optimization, skip instances based on possibly irrelevant portions of quantified formulas .TP .B "rewrite-rules" (bool) use rewrite rules module .TP .B "rr-one-inst-per-round" (bool) add one instance of rewrite rule per round .TP .B "quant-ind" (bool) use all available techniques for inductive reasoning .TP .B "dt-stc-ind" (bool) apply strengthening for existential quantification over datatypes based on structural induction .TP .B "int-wf-ind" (bool) apply strengthening for integers based on well\-founded induction .TP .B "conjecture-gen" (bool) generate candidate conjectures for inductive proofs .TP .B "conjecture-gen-per-round=N" (int) number of conjectures to generate per instantiation round .TP .B "conjecture-no-filter" (bool) do not filter conjectures .TP .B "conjecture-filter-active-terms" (bool) filter based on active terms .TP .B "conjecture-filter-canonical" (bool) filter based on canonicity .TP .B "conjecture-filter-model" (bool) filter based on model .TP .B "conjecture-gen-gt-enum=N" (int) number of ground terms to generate for model filtering .TP .B "conjecture-gen-uee-intro" (bool) more aggressive merging for universal equality engine, introduces terms .TP .B "conjecture-gen-max-depth=N" (int) maximum depth of terms to consider for conjectures .TP .B "cegqi" (bool) counterexample\-guided quantifier instantiation .TP .B "cegqi-fair=MODE" (CVC4::theory::quantifiers::CegqiFairMode) if and how to apply fairness for cegqi .TP .B "cegqi-si=MODE" (CVC4::theory::quantifiers::CegqiSingleInvMode) mode for processing single invocation synthesis conjectures .TP .B "cegqi-si-partial" (bool) combined techniques for synthesis conjectures that are partially single invocation .TP .B "cegqi-si-reconstruct" (bool) reconstruct solutions for single invocation conjectures in original grammar .TP .B "cegqi-si-sol-min-core" (bool) minimize solutions for single invocation conjectures based on unsat core .TP .B "cegqi-si-sol-min-inst" (bool) minimize individual instantiations for single invocation conjectures based on unsat core .TP .B "cegqi-si-reconstruct-const" (bool) include constants when reconstruct solutions for single invocation conjectures in original grammar .TP .B "cegqi-si-abort" (bool) abort if synthesis conjecture is not single invocation .TP .B "sygus-nf" (bool) only search for sygus builtin terms that are in normal form .TP .B "sygus-nf-arg" (bool) account for relationship between arguments of operations in sygus normal form .TP .B "sygus-nf-sym" (bool) narrow sygus search space based on global state of current candidate program .TP .B "sygus-nf-sym-gen" (bool) generalize lemmas for global search space narrowing .TP .B "sygus-nf-sym-arg" (bool) generalize based on arguments in global search space narrowing .TP .B "sygus-nf-sym-content" (bool) generalize based on content in global search space narrowing .TP .B "sygus-inv-templ=MODE" (CVC4::theory::quantifiers::SygusInvTemplMode) template mode for sygus invariant synthesis .TP .B "sygus-unif-csol" (bool) enable approach which unifies conditional solutions .TP .B "sygus-direct-eval" (bool) direct unfolding of evaluation functions .TP .B "sygus-cref-eval" (bool) direct evaluation of refinement lemmas for conflict analysis .TP .B "cbqi" (bool) turns on counterexample\-based quantifier instantiation .TP .B "cbqi-recurse" (bool) turns on recursive counterexample\-based quantifier instantiation .TP .B "cbqi-sat" (bool) answer sat when quantifiers are asserted with counterexample\-based quantifier instantiation .TP .B "cbqi-model" (bool) guide instantiations by model values for counterexample\-based quantifier instantiation .TP .B "cbqi-all" (bool) apply counterexample\-based instantiation to all quantified formulas .TP .B "cbqi-use-inf-int" (bool) use integer infinity for vts in counterexample\-based quantifier instantiation .TP .B "cbqi-use-inf-real" (bool) use real infinity for vts in counterexample\-based quantifier instantiation .TP .B "cbqi-prereg-inst" (bool) preregister ground instantiations in counterexample\-based quantifier instantiation .TP .B "cbqi-min-bounds" (bool) use minimally constrained lower/upper bound for counterexample\-based quantifier instantiation .TP .B "cbqi-round-up-lia" (bool) round up integer lower bounds in substitutions for counterexample\-based quantifier instantiation .TP .B "cbqi-midpoint" (bool) choose substitutions based on midpoints of lower and upper bounds for counterexample\-based quantifier instantiation .TP .B "cbqi-nopt" (bool) non\-optimal bounds for counterexample\-based quantifier instantiation .TP .B "cbqi-lit-dep" (bool) dependency lemmas for quantifier alternation in counterexample\-based quantifier instantiation .TP .B "cbqi-innermost" (bool) only process innermost quantified formulas in counterexample\-based quantifier instantiation .TP .B "cbqi-nested-qe" (bool) process nested quantified formulas with quantifier elimination in counterexample\-based quantifier instantiation .TP .B "quant-epr" (bool) infer whether in effectively propositional fragment, use for cbqi .TP .B "quant-epr-match" (bool) use matching heuristics for EPR instantiation .TP .B "local-t-ext" (bool) do instantiation based on local theory extensions .TP .B "lte-partial-inst" (bool) partially instantiate local theory quantifiers .TP .B "lte-restrict-inst-closure" (bool) treat arguments of inst closure as restricted terms for instantiation .TP .B "quant-alpha-equiv" (bool) infer alpha equivalence between quantified formulas .TP .B "macros-quant" (bool) perform quantifiers macro expansion .TP .B "macros-quant-mode=MODE" (CVC4::theory::quantifiers::MacrosQuantMode) mode for quantifiers macro expansion .TP .B "quant-dsplit-mode=MODE" (CVC4::theory::quantifiers::QuantDSplitMode) mode for dynamic quantifiers splitting .TP .B "quant-anti-skolem" (bool) perform anti\-skolemization for quantified formulas .TP .B "quant-ee" (bool) maintain congrunce closure over universal equalities .TP .B "track-inst-lemmas" (bool) track instantiation lemmas (for proofs, unsat cores, qe and synthesis minimization) .TP .I "SEP OPTIONS" .TP .B "sep-check-neg" (bool) check negated spatial assertions .TP .B "sep-exp" (bool) experimental flag for sep .TP .B "sep-min-refine" (bool) only add refinement lemmas for minimal (innermost) assertions .TP .B "sep-deq-c" (bool) assume cardinality elements are distinct .TP .B "sep-pre-skolem-emp" (bool) eliminate emp constraint at preprocess time .TP .B "sep-child-refine" (bool) child\-specific refinements of negated star, positive wand .TP .I "SETS OPTIONS" .TP .B "sets-proxy-lemmas" (bool) introduce proxy variables eagerly to shorten lemmas .TP .B "sets-infer-as-lemmas" (bool) send inferences as lemmas .TP .B "sets-rel-eager" (bool) standard effort checks for relations .TP .B "sets-ext" (bool) enable extended symbols such as complement and universe in theory of sets .TP .I "SMT LAYER OPTIONS" .TP .B "force-logic" (std::string) set the logic, and override all further user attempts to change it (EXPERTS only) .TP .B "simplification-mode" (SimplificationMode) choose simplification mode, see \-\-simplification=help .TP .B "static-learning" (bool) use static learning (on by default) .TP .B "expand-definitions" (bool) always expand symbol definitions in output .TP .B "check-models" (bool) after SAT/INVALID/UNKNOWN, check that the generated model satisfies user assertions .TP .B "dump-models" (bool) output models after every SAT/INVALID/UNKNOWN response .TP .B "omit-dont-cares" (bool) When producing a model, omit variables whose value does not matter .TP .B "produce-proofs" (bool) turn on proof generation .TP .B "check-proofs" (bool) after UNSAT/VALID, machine\-check the generated proof .TP .B "dump-proofs" (bool) output proofs after every UNSAT/VALID response .TP .B "dump-instantiations" (bool) output instantiations of quantified formulas after every UNSAT/VALID response .TP .B "dump-synth" (bool) output solution for synthesis conjectures after every UNSAT/VALID response .TP .B "produce-unsat-cores" (bool) turn on unsat core generation .TP .B "check-unsat-cores" (bool) after UNSAT/VALID, produce and check an unsat core (expensive) .TP .B "dump-unsat-cores" (bool) output unsat cores after every UNSAT/VALID response .TP .B "dump-unsat-cores-full" (bool) dump the full unsat core, including unlabeled assertions .TP .B "produce-assignments" (bool) support the get\-assignment command .TP .B "ite-simp" (bool) turn on ite simplification (Kim (and Somenzi) et al., SAT 2009) .TP .B "on-repeat-ite-simp" (bool) do the ite simplification pass again if repeating simplification .TP .B "simp-with-care" (bool) enables simplifyWithCare in ite simplificiation .TP .B "simp-ite-compress" (bool) enables compressing ites after ite simplification .TP .B "unconstrained-simp" (bool) turn on unconstrained simplification (see Bruttomesso/Brummayer PhD thesis) .TP .B "repeat-simp" (bool) make multiple passes with nonclausal simplifier .TP .B "simp-ite-hunt-zombies" (uint32_t) post ite compression enables zombie removal while the number of nodes is above this threshold .TP .B "sort-inference" (bool) calculate sort inference of input problem, convert the input based on monotonic sorts .TP .B "abstract-values" (bool) in models, output arrays (and in future, maybe others) using abstract values, as required by the SMT\-LIB standard .TP .B "model-u-dt-enum" (bool) in models, output uninterpreted sorts as datatype enumerations .TP .B "regular-output-channel" (std::string) set the regular output channel of the solver .TP .B "diagnostic-output-channel" (std::string) set the diagnostic output channel of the solver .TP .B "rewrite-step" (unsigned) amount of resources spent for each rewrite step (EXPERTS only) .TP .B "theory-check-step" (unsigned) amount of resources spent for each theory check call (EXPERTS only) .TP .B "decision-step" (unsigned) amount of getNext decision calls in the decision engine (EXPERTS only) .TP .B "bitblast-step" (unsigned) amount of resources spent for each bitblast step (EXPERTS only) .TP .B "parse-step" (unsigned) amount of resources spent for each command/expression parsing (EXPERTS only) .TP .B "lemma-step" (unsigned) amount of resources spent when adding lemmas (EXPERTS only) .TP .B "restart-step" (unsigned) amount of resources spent for each theory restart (EXPERTS only) .TP .B "cnf-step" (unsigned) amount of resources spent for each call to cnf conversion (EXPERTS only) .TP .B "preprocess-step" (unsigned) amount of resources spent for each preprocessing step in SmtEngine (EXPERTS only) .TP .B "quantifier-step" (unsigned) amount of resources spent for quantifier instantiations (EXPERTS only) .TP .B "sat-conflict-step" (unsigned) amount of resources spent for each sat conflict (main sat solver) (EXPERTS only) .TP .B "bv-sat-conflict-step" (unsigned) amount of resources spent for each sat conflict (bitvectors) (EXPERTS only) .TP .B "rewrite-apply-to-const" (bool) eliminate function applications, rewriting e.g. f(5) to a new symbol f_5 (EXPERTS only) .TP .B "force-no-limit-cpu-while-dump" (bool) Force no CPU limit when dumping models and proofs .TP .I "STRINGS THEORY OPTIONS" .TP .B "strings-exp" (bool) experimental features in the theory of strings .TP .B "strings-lb" (unsigned) the strategy of LB rule application: 0\-lazy, 1\-eager, 2\-no .TP .B "strings-std-ascii" (bool) the alphabet contains only characters from the standard ASCII or the extended one .TP .B "strings-fmf" (bool) the finite model finding used by the theory of strings .TP .B "strings-eager" (bool) strings eager check .TP .B "strings-eit" (bool) the eager intersection used by the theory of strings .TP .B "strings-opt1" (bool) internal option1 for strings: normal form .TP .B "strings-opt2" (bool) internal option2 for strings: constant regexp splitting .TP .B "strings-inm" (bool) internal for strings: ignore negative membership constraints (fragment checking is needed, left to users for now) .TP .B "strings-lazy-pp" (bool) perform string preprocessing lazily .TP .B "strings-len-geqz" (bool) strings length greater than zero lemmas .TP .B "strings-len-norm" (bool) strings length normalization lemma .TP .B "strings-sp-emp" (bool) strings split on empty string .TP .B "strings-infer-sym" (bool) strings split on empty string .TP .B "strings-eager-len" (bool) strings eager length lemmas .TP .B "strings-check-entail-len" (bool) check entailment between length terms to reduce splitting .TP .B "strings-process-loop" (bool) reduce looping word equations to regular expressions .TP .B "strings-abort-loop" (bool) abort when a looping word equation is encountered .TP .B "strings-infer-as-lemmas" (bool) always send lemmas out instead of making internal inferences .TP .B "strings-rexplain-lemmas" (bool) regression explanations for string lemmas .TP .B "strings-min-prefix-explain" (bool) minimize explanations for prefix of normal forms in strings .TP .B "strings-guess-model" (bool) use model guessing to avoid string extended function reductions .TP .B "strings-uf-reduct" (bool) use uninterpreted functions when applying extended function reductions .TP .B "strings-binary-csp" (bool) use binary search when splitting strings .TP .B "strings-lprop-csp" (bool) do length propagation based on constant splits .TP .I "THEORY LAYER OPTIONS" .TP .B "theoryof-mode" (CVC4::theory::TheoryOfMode) mode for Theory::theoryof() (EXPERTS only) .TP .B "use-theory" (std::string) use alternate theory implementation NAME (\-\-use\-theory=help for a list). This option may be repeated or a comma separated list. .TP .I "UNINTERPRETED FUNCTIONS THEORY OPTIONS" .TP .B "uf-symmetry-breaker" (bool) use UF symmetry breaker (Deharbe et al., CADE 2011) .TP .B "condense-function-values" (bool) condense models for functions rather than explicitly representing them .TP .B "uf-ss-regions" (bool) disable region\-based method for discovering cliques and splits in uf strong solver .TP .B "uf-ss-eager-split" (bool) add splits eagerly for uf strong solver .TP .B "uf-ss-totality" (bool) always use totality axioms for enforcing cardinality constraints .TP .B "uf-ss-totality-limited=N" (int) apply totality axioms, but only up to cardinality N (\-1 == do not apply totality axioms, default) .TP .B "uf-ss-totality-sym-break" (bool) apply symmetry breaking for totality axioms .TP .B "uf-ss-abort-card=N" (int) tells the uf strong solver a cardinality to abort at (\-1 == no limit, default) .TP .B "uf-ss-explained-cliques" (bool) use explained clique lemmas for uf strong solver .TP .B "uf-ss-simple-cliques" (bool) always use simple clique lemmas for uf strong solver .TP .B "uf-ss-deq-prop" (bool) eagerly propagate disequalities for uf strong solver .TP .B "uf-ss=MODE" (CVC4::theory::uf::UfssMode) mode of operation for uf strong solver. .TP .B "uf-ss-clique-splits" (bool) use cliques instead of splitting on demand to shrink model .TP .B "uf-ss-sym-break" (bool) finite model finding symmetry breaking techniques .TP .B "uf-ss-fair" (bool) use fair strategy for finite model finding multiple sorts .TP .B "uf-ss-fair-monotone" (bool) group monotone sorts when enforcing fairness for finite model finding .PD .RE .ad b .SH VERSION This manual page refers to .B CVC4 version 1.5. .SH BUGS A Bugzilla for the CVC4 project is maintained at .BR http://cvc4.cs.nyu.edu/bugzilla3/ . .SH AUTHORS .B CVC4 is developed by a team of researchers at New York University and the University of Iowa. See the AUTHORS file in the distribution for a full list of contributors. .SH "SEE ALSO" .BR libcvc4 (3), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/SmtEngine.3cvc_template.in000066400000000000000000000024071313116454100177360ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii SmtEngine.3cvc .\" .TH SMTENGINE 3cvc "@MAN_DATE@" "CVC4 release @VERSION@" "CVC4 Library Interfaces" .SH NAME SmtEngine \- the primary interface to CVC4's theorem-proving capabilities .SH DESCRIPTION .B SmtEngine is the main entry point into the CVC4 theorem prover API. .SH SMTENGINE OPTIONS The SmtEngine is in charge of setting and getting information and options. Numerous options are available via the .I SmtEngine::setOption() call. .I SmtEngine::setOption() and .I SmtEngine::getOption() use the following option keys. .ad l .RS .TP 10 .I "COMMON OPTIONS" ${common_manpage_smt_documentation} ${remaining_manpage_smt_documentation} .PD .RE .ad b .SH VERSION This manual page refers to .B CVC4 version @VERSION@. .SH BUGS A Bugzilla for the CVC4 project is maintained at .BR http://cvc4.cs.nyu.edu/bugzilla3/ . .SH AUTHORS .B CVC4 is developed by a team of researchers at New York University and the University of Iowa. See the AUTHORS file in the distribution for a full list of contributors. .SH "SEE ALSO" .BR libcvc4 (3), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/cvc4.1000066400000000000000000001232311313116454100137050ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii cvc4.1 .\" .TH CVC4 1 "July 2017" "CVC4 release 1.5" "User Manuals" .SH NAME cvc4, pcvc4 \- an automated theorem prover .SH SYNOPSIS .B cvc4 [ .I options .B ] [ .I file .B ] .P .B pcvc4 [ .I options .B ] [ .I file .B ] .SH DESCRIPTION .B cvc4 is an automated theorem prover for first-order formulas with respect to background theories of interest. .B pcvc4 is CVC4's "portfolio" variant, which is capable of running multiple CVC4 instances in parallel, configured differently. With .I file , commands are read from .I file and executed. CVC4 supports the SMT-LIB (versions 1.2 and 2.0) input format, as well as its own native \(lqpresentation language\(rq (see .BR cvc4 (5) ), which is similar in many respects to CVC3's presentation language, but not identical. If .I file is unspecified, standard input is read (and the .B CVC4 presentation language is assumed). If .I file is unspecified and .B CVC4 is connected to a terminal, interactive mode is assumed. .SH COMMON OPTIONS .IP "Each option marked with [*] has a \-\-no\-OPTIONNAME variant, which reverses the sense of the option." .IP "\-\-lang=LANG | \-L LANG" force input language (default is "auto"; see \-\-lang help) .IP "\-\-output\-lang=LANG" force output language (default is "auto"; see \-\-output\-lang help) .IP "\-\-verbose | \-v" increase verbosity (may be repeated) .IP "\-\-quiet | \-q" decrease verbosity (may be repeated) .IP "\-\-stats" give statistics on exit [*] .IP "\-\-version | \-V" identify this CVC4 binary .IP "\-\-help | \-h" full command line reference .IP "\-\-show\-config" show CVC4 static configuration .IP "\-\-strict\-parsing" be less tolerant of non\-conforming inputs [*] .IP "\-\-dump=MODE" dump preprocessed assertions, etc., see \-\-dump=help .IP "\-\-dump\-to=FILE" all dumping goes to FILE (instead of stdout) .IP "\-\-produce\-models | \-m" support the get\-value and get\-model commands [*] .IP "\-\-produce\-assertions" keep an assertions list (enables get\-assertions command) [*] .IP "\-\-incremental | \-i" enable incremental solving [*] .IP "\-\-tlimit=MS" enable time limiting (give milliseconds) .IP "\-\-tlimit\-per=MS" enable time limiting per query (give milliseconds) .IP "\-\-rlimit=N" enable resource limiting (currently, roughly the number of SAT conflicts) .IP "\-\-rlimit\-per=N" enable resource limiting per query .IP "\-\-hard\-limit" the resource limit is hard potentially leaving the smtEngine in an unsafe state (should be destroyed and rebuild after resourcing out) [*] .IP "\-\-cpu\-time" measures CPU time if set to true and wall time if false (default false) [*] .SH ARITHMETIC THEORY OPTIONS .IP "\-\-unate\-lemmas=MODE" determines which lemmas to add before solving (default is 'all', see \-\-unate\-lemmas=help) .IP "\-\-arith\-prop=MODE" turns on arithmetic propagation (default is 'old', see \-\-arith\-prop=help) .IP "\-\-heuristic\-pivots=N" the number of times to apply the heuristic pivot rule; if N < 0, this defaults to the number of variables; if this is unset, this is tuned by the logic selection .IP "\-\-standard\-effort\-variable\-order\-pivots=N" limits the number of pivots in a single invocation of check() at a non\-full effort level using Bland's pivot rule (EXPERTS only) .IP "\-\-error\-selection\-rule=RULE" change the pivot rule for the basic variable (default is 'min', see \-\-pivot\-rule help) .IP "\-\-simplex\-check\-period=N" the number of pivots to do in simplex before rechecking for a conflict on all variables .IP "\-\-pivot\-threshold=N" sets the number of pivots using \-\-pivot\-rule per basic variable per simplex instance before using variable order .IP "\-\-prop\-row\-length=N" sets the maximum row length to be used in propagation .IP "\-\-enable\-dio\-solver" turns on Linear Diophantine Equation solver (Griggio, JSAT 2012) .IP "\-\-disable\-dio\-solver" turns off Linear Diophantine Equation solver (Griggio, JSAT 2012) .IP "\-\-enable\-arith\-rewrite\-equalities" turns on the preprocessing rewrite turning equalities into a conjunction of inequalities .IP "\-\-disable\-arith\-rewrite\-equalities" turns off the preprocessing rewrite turning equalities into a conjunction of inequalities .IP "\-\-enable\-miplib\-trick" turns on the preprocessing step of attempting to infer bounds on miplib problems .IP "\-\-disable\-miplib\-trick" turns off the preprocessing step of attempting to infer bounds on miplib problems .IP "\-\-miplib\-trick\-subs=N" do substitution for miplib 'tmp' vars if defined in <= N eliminated vars .IP "\-\-cut\-all\-bounded" turns on the integer solving step of periodically cutting all integer variables that have both upper and lower bounds [*] .IP "\-\-no\-cut\-all\-bounded" turns off the integer solving step of periodically cutting all integer variables that have both upper and lower bounds .IP "\-\-maxCutsInContext" maximum cuts in a given context before signalling a restart .IP "\-\-revert\-arith\-models\-on\-unsat" revert the arithmetic model to a known safe model on unsat if one is cached [*] .IP "\-\-fc\-penalties" turns on degenerate pivot penalties [*] .IP "\-\-no\-fc\-penalties" turns off degenerate pivot penalties .IP "\-\-use\-fcsimplex" use focusing and converging simplex (FMCAD 2013 submission) [*] .IP "\-\-use\-soi" use sum of infeasibility simplex (FMCAD 2013 submission) [*] .IP "\-\-restrict\-pivots" have a pivot cap for simplex at effort levels below fullEffort [*] .IP "\-\-collect\-pivot\-stats" collect the pivot history [*] .IP "\-\-use\-approx" attempt to use an approximate solver [*] .IP "\-\-approx\-branch\-depth" maximum branch depth the approximate solver is allowed to take .IP "\-\-dio\-decomps" let skolem variables for integer divisibility constraints leak from the dio solver [*] .IP "\-\-new\-prop" use the new row propagation system [*] .IP "\-\-arith\-prop\-clauses" rows shorter than this are propagated as clauses .IP "\-\-soi\-qe" use quick explain to minimize the sum of infeasibility conflicts [*] .IP "\-\-rewrite\-divk" rewrite division and mod when by a constant into linear terms [*] .IP "\-\-se\-solve\-int" attempt to use the approximate solve integer method on standard effort [*] .IP "\-\-lemmas\-on\-replay\-failure" attempt to use external lemmas if approximate solve integer failed [*] .IP "\-\-dio\-turns" turns in a row dio solver cutting gets .IP "\-\-rr\-turns" round robin turn .IP "\-\-dio\-repeat" handle dio solver constraints in mass or one at a time [*] .IP "\-\-replay\-early\-close\-depth" multiples of the depths to try to close the approx log eagerly .IP "\-\-replay\-failure\-penalty" number of solve integer attempts to skips after a numeric failure .IP "\-\-replay\-num\-err\-penalty" number of solve integer attempts to skips after a numeric failure .IP "\-\-replay\-reject\-cut" maximum complexity of any coefficient while replaying cuts .IP "\-\-replay\-lemma\-reject\-cut" maximum complexity of any coefficient while outputting replaying cut lemmas .IP "\-\-replay\-soi\-major\-threshold" threshold for a major tolerance failure by the approximate solver .IP "\-\-replay\-soi\-major\-threshold\-pen" threshold for a major tolerance failure by the approximate solver .IP "\-\-replay\-soi\-minor\-threshold" threshold for a minor tolerance failure by the approximate solver .IP "\-\-replay\-soi\-minor\-threshold\-pen" threshold for a minor tolerance failure by the approximate solver .IP "\-\-pp\-assert\-max\-sub\-size" threshold for substituting an equality in ppAssert .IP "\-\-max\-replay\-tree" threshold for attempting to replay a tree .IP "\-\-pb\-rewrites" apply pseudo boolean rewrites [*] .IP "\-\-pb\-rewrite\-threshold" threshold of number of pseudoboolean variables to have before doing rewrites .IP "\-\-snorm\-infer\-eq" infer equalities based on Shostak normalization [*] .IP "\-\-nl\-ext" extended approach to non\-linear [*] .IP "\-\-nl\-ext\-rbound" use resolution\-style inference for inferring new bounds [*] .IP "\-\-nl\-ext\-tplanes" use non\-terminating tangent plane strategy for non\-linear [*] .IP "\-\-nl\-ext\-ent\-conf" check for entailed conflicts in non\-linear solver [*] .IP "\-\-nl\-ext\-rewrite" do rewrites in non\-linear solver [*] .IP "\-\-nl\-ext\-solve\-subs" do solving for determining constant substitutions [*] .IP "\-\-nl\-ext\-purify" purify non\-linear terms at preprocess [*] .IP "\-\-nl\-ext\-split\-zero" intial splits on zero for all variables [*] .SH ARRAYS THEORY OPTIONS .IP "\-\-arrays\-optimize\-linear" turn on optimization for linear array terms (see de Moura FMCAD 09 arrays paper) [*] .IP "\-\-arrays\-lazy\-rintro1" turn on optimization to only perform RIntro1 rule lazily (see Jovanovic/Barrett 2012: Being Careful with Theory Combination) [*] .IP "\-\-arrays\-weak\-equiv" use algorithm from Christ/Hoenicke (SMT 2014) [*] .IP "\-\-arrays\-model\-based" turn on model\-based array solver [*] .IP "\-\-arrays\-eager\-index" turn on eager index splitting for generated array lemmas [*] .IP "\-\-arrays\-eager\-lemmas" turn on eager lemma generation for arrays [*] .IP "\-\-arrays\-config" set different array option configurations \- for developers only .IP "\-\-arrays\-reduce\-sharing" use model information to reduce size of care graph for arrays [*] .IP "\-\-arrays\-prop" propagation effort for arrays: 0 is none, 1 is some, 2 is full .SH BASE OPTIONS .IP "\-\-stats\-every\-query" in incremental mode, print stats after every satisfiability or validity query [*] .IP "\-\-stats\-hide\-zeros" hide statistics which are zero .IP "\-\-stats\-show\-zeros" show statistics even when they are zero (default) .IP "\-\-parse\-only" exit after parsing input [*] .IP "\-\-preprocess\-only" exit after preprocessing input [*] .IP "\-\-trace=TAG | \-t TAG" trace something (e.g. \-t pushpop), can repeat .IP "\-\-debug=TAG | \-d TAG" debug something (e.g. \-d arith), can repeat .IP "\-\-print\-success" print the "success" output required of SMT\-LIBv2 [*] .IP "\-\-smtlib\-strict" SMT\-LIBv2 compliance mode (implies other options) .SH BITVECTOR THEORY OPTIONS .IP "\-\-bv\-sat\-solver=MODE" choose which sat solver to use, see \-\-bv\-sat\-solver=help (EXPERTS only) .IP "\-\-bitblast=MODE" choose bitblasting mode, see \-\-bitblast=help .IP "\-\-bitblast\-aig" bitblast by first converting to AIG (implies \-\-bitblast=eager) [*] .IP "\-\-bv\-aig\-simp=COMMAND" abc command to run AIG simplifications (implies \-\-bitblast\-aig, default is "balance;drw") (EXPERTS only) .IP "\-\-bv\-propagate" use bit\-vector propagation in the bit\-blaster [*] .IP "\-\-bv\-eq\-solver" use the equality engine for the bit\-vector theory (only if \-\-bitblast=lazy) [*] .IP "\-\-bv\-eq\-slicer=MODE" turn on the slicing equality solver for the bit\-vector theory (only if \-\-bitblast=lazy) .IP "\-\-bv\-inequality\-solver" turn on the inequality solver for the bit\-vector theory (only if \-\-bitblast=lazy) [*] .IP "\-\-bv\-algebraic\-solver" turn on the algebraic solver for the bit\-vector theory (only if \-\-bitblast=lazy) [*] .IP "\-\-bv\-algebraic\-budget" the budget allowed for the algebraic solver in number of SAT conflicts (EXPERTS only) .IP "\-\-bv\-to\-bool" lift bit\-vectors of size 1 to booleans when possible [*] .IP "\-\-bool\-to\-bv" convert booleans to bit\-vectors of size 1 when possible [*] .IP "\-\-bv\-div\-zero\-const" always return \-1 on division by zero [*] .IP "\-\-bv\-extract\-arith" enable rewrite pushing extract [i:0] over arithmetic operations (can blow up) (EXPERTS only) [*] .IP "\-\-bv\-abstraction" mcm benchmark abstraction (EXPERTS only) [*] .IP "\-\-bv\-skolemize" skolemize arguments for bv abstraction (only does something if \-\-bv\-abstraction is on) (EXPERTS only) [*] .IP "\-\-bv\-num\-func=NUM" number of function symbols in conflicts that are generalized (EXPERTS only) .IP "\-\-bv\-eager\-explanations" compute bit\-blasting propagation explanations eagerly (EXPERTS only) [*] .IP "\-\-bv\-quick\-xplain" minimize bv conflicts using the QuickXplain algorithm (EXPERTS only) [*] .IP "\-\-bv\-intro\-pow2" introduce bitvector powers of two as a preprocessing pass (EXPERTS only) [*] .IP "\-\-bv\-lazy\-rewrite\-extf" lazily rewrite extended functions like bv2nat and int2bv [*] .IP "\-\-bv\-lazy\-reduce\-extf" reduce extended functions like bv2nat and int2bv at last call instead of full effort [*] .IP "\-\-bv\-alg\-extf" algebraic inferences for extended functions [*] .SH DATATYPES THEORY OPTIONS .IP "\-\-dt\-rewrite\-error\-sel" rewrite incorrectly applied selectors to arbitrary ground term (EXPERTS only) [*] .IP "\-\-dt\-force\-assignment" force the datatypes solver to give specific values to all datatypes terms before answering sat [*] .IP "\-\-dt\-binary\-split" do binary splits for datatype constructor types [*] .IP "\-\-dt\-ref\-sk\-intro" introduce reference skolems for shorter explanations [*] .IP "\-\-dt\-use\-testers" do not preprocess away tester predicates [*] .IP "\-\-cdt\-bisimilar" do bisimilarity check for co\-datatypes [*] .IP "\-\-dt\-cyclic" do cyclicity check for datatypes [*] .IP "\-\-dt\-infer\-as\-lemmas" always send lemmas out instead of making internal inferences [*] .IP "\-\-dt\-blast\-splits" when applicable, blast splitting lemmas for all variables at once [*] .SH DECISION HEURISTICS OPTIONS .IP "\-\-decision=MODE" choose decision mode, see \-\-decision=help .IP "\-\-decision\-threshold=N" ignore all nodes greater than threshold in first attempt to pick decision (EXPERTS only) .IP "\-\-decision\-use\-weight" use the weight nodes (locally, by looking at children) to direct recursive search (EXPERTS only) [*] .IP "\-\-decision\-random\-weight=N" assign random weights to nodes between 0 and N\-1 (0: disable) (EXPERTS only) .IP "\-\-decision\-weight\-internal=HOW" computer weights of internal nodes using children: off, max, sum, usr1 (meaning evolving) (EXPERTS only) .SH EXPRESSION PACKAGE OPTIONS .IP "\-\-default\-expr\-depth=N" print exprs to depth N (0 == default, \-1 == no limit) .IP "\-\-default\-dag\-thresh=N" dagify common subexprs appearing > N times (1 == default, 0 == don't dagify) .IP "\-\-print\-expr\-types" print types with variables when printing exprs [*] .IP "\-\-eager\-type\-checking" type check expressions immediately on creation (debug builds only) .IP "\-\-lazy\-type\-checking" type check expressions only when necessary (default) .SH IDL OPTIONS .IP "\-\-enable\-idl\-rewrite\-equalities" enable rewriting equalities into two inequalities in IDL solver (default is disabled) .IP "\-\-disable\-idl\-rewrite\-equalities" disable rewriting equalities into two inequalities in IDL solver (default is disabled) .SH DRIVER OPTIONS .IP "\-\-show\-debug\-tags" show all available tags for debugging .IP "\-\-show\-trace\-tags" show all available tags for tracing .IP "\-\-early\-exit" do not run destructors at exit; default on except in debug builds (EXPERTS only) [*] .IP "\-\-threads=N" Total number of threads for portfolio .IP "\-\-threadN=string" configures portfolio thread N (0..#threads\-1) .IP "\-\-thread\-stack=N" stack size for worker threads in MB (0 means use Boost/thread lib default) .IP "\-\-filter\-lemma\-length=N" don't share (among portfolio threads) lemmas strictly longer than N .IP "\-\-fallback\-sequential" Switch to sequential mode (instead of printing an error) if it can't be solved in portfolio mode [*] .IP "\-\-incremental\-parallel" Use parallel solver even in incremental mode (may print 'unknown's at times) [*] .IP "\-\-interactive" force interactive/non\-interactive mode [*] .IP "\-\-continued\-execution" continue executing commands, even on error .IP "\-\-segv\-spin" spin on segfault/other crash waiting for gdb [*] .IP "\-\-tear\-down\-incremental=N" implement PUSH/POP/multi\-query by destroying and recreating SmtEngine every N queries (EXPERTS only) .IP "\-\-wait\-to\-join" wait for other threads to join before quitting (EXPERTS only) [*] .SH PARSER OPTIONS .IP "\-\-mmap" memory map file input [*] .SH PRINTING OPTIONS .IP "\-\-model\-format=MODE" print format mode for models, see \-\-model\-format=help .IP "\-\-inst\-format=MODE" print format mode for instantiations, see \-\-inst\-format=help .SH PROOF OPTIONS .IP "\-\-lfsc\-letification" turns on global letification in LFSC proofs [*] .IP "\-\-aggressive\-core\-min" turns on aggressive unsat core minimization (experimental) [*] .IP "\-\-fewer\-preprocessing\-holes" try to eliminate preprocessing holes in proofs [*] .IP "\-\-allow\-empty\-dependencies" if unable to track the dependencies of a rewritten/preprocessed assertion, fail silently [*] .SH SAT LAYER OPTIONS .IP "\-\-random\-freq=P" sets the frequency of random decisions in the sat solver (P=0.0 by default) .IP "\-\-random\-seed=S" sets the random seed for the sat solver .IP "\-\-restart\-int\-base=N" sets the base restart interval for the sat solver (N=25 by default) .IP "\-\-restart\-int\-inc=F" sets the restart interval increase factor for the sat solver (F=3.0 by default) .IP "\-\-refine\-conflicts" refine theory conflict clauses (default false) [*] .IP "\-\-minisat\-elimination" use Minisat elimination [*] .IP "\-\-minisat\-dump\-dimacs" instead of solving minisat dumps the asserted clauses in Dimacs format [*] .SH QUANTIFIERS OPTIONS .IP "\-\-miniscope\-quant" miniscope quantifiers [*] .IP "\-\-miniscope\-quant\-fv" miniscope quantifiers for ground subformulas [*] .IP "\-\-quant\-split" apply splitting to quantified formulas based on variable disjoint disjuncts [*] .IP "\-\-prenex\-quant=MODE" prenex mode for quantified formulas .IP "\-\-prenex\-quant\-user" prenex quantified formulas with user patterns [*] .IP "\-\-var\-elim\-quant" enable simple variable elimination for quantified formulas [*] .IP "\-\-var\-ineq\-elim\-quant" enable variable elimination based on infinite projection of unbound arithmetic variables [*] .IP "\-\-dt\-var\-exp\-quant" expand datatype variables bound to one constructor in quantifiers [*] .IP "\-\-ite\-lift\-quant=MODE" ite lifting mode for quantified formulas .IP "\-\-cond\-var\-split\-quant" split quantified formulas that lead to variable eliminations [*] .IP "\-\-cond\-var\-split\-agg\-quant" aggressive split quantified formulas that lead to variable eliminations [*] .IP "\-\-ite\-dtt\-split\-quant" split ites with dt testers as conditions [*] .IP "\-\-pre\-skolem\-quant" apply skolemization eagerly to bodies of quantified formulas [*] .IP "\-\-pre\-skolem\-quant\-nested" apply skolemization to nested quantified formulas [*] .IP "\-\-pre\-skolem\-quant\-agg" apply skolemization to quantified formulas aggressively [*] .IP "\-\-ag\-miniscope\-quant" perform aggressive miniscoping for quantifiers [*] .IP "\-\-elim\-taut\-quant" eliminate tautological disjuncts of quantified formulas [*] .IP "\-\-elim\-ext\-arith\-quant" eliminate extended arithmetic symbols in quantified formulas [*] .IP "\-\-cond\-rewrite\-quant" conditional rewriting of quantified formulas [*] .IP "\-\-e\-matching" whether to do heuristic E\-matching [*] .IP "\-\-term\-db\-mode" which ground terms to consider for instantiation .IP "\-\-register\-quant\-body\-terms" consider ground terms within bodies of quantified formulas for matching [*] .IP "\-\-infer\-arith\-trigger\-eq" infer equalities for trigger terms based on solving arithmetic equalities [*] .IP "\-\-infer\-arith\-trigger\-eq\-exp" record explanations for inferArithTriggerEq [*] .IP "\-\-strict\-triggers" only instantiate quantifiers with user patterns based on triggers [*] .IP "\-\-relevant\-triggers" prefer triggers that are more relevant based on SInE style analysis [*] .IP "\-\-relational\-triggers" choose relational triggers such as x = f(y), x >= f(y) [*] .IP "\-\-purify\-triggers" purify triggers, e.g. f( x+1 ) becomes f( y ), x mapsto y\-1 [*] .IP "\-\-purify\-dt\-triggers" purify dt triggers, match all constructors of correct form instead of selectors [*] .IP "\-\-pure\-th\-triggers" use pure theory terms as single triggers [*] .IP "\-\-partial\-triggers" use triggers that do not contain all free variables [*] .IP "\-\-multi\-trigger\-when\-single" select multi triggers when single triggers exist [*] .IP "\-\-multi\-trigger\-priority" only try multi triggers if single triggers give no instantiations [*] .IP "\-\-multi\-trigger\-cache" caching version of multi triggers [*] .IP "\-\-multi\-trigger\-linear" implementation of multi triggers where maximum number of instantiations is linear wrt number of ground terms [*] .IP "\-\-trigger\-sel" selection mode for triggers .IP "\-\-trigger\-active\-sel" selection mode to activate triggers .IP "\-\-user\-pat=MODE" policy for handling user\-provided patterns for quantifier instantiation .IP "\-\-increment\-triggers" generate additional triggers as needed during search [*] .IP "\-\-inst\-when=MODE" when to apply instantiation .IP "\-\-inst\-when\-strict\-interleave" ensure theory combination and standard quantifier effort strategies take turns [*] .IP "\-\-inst\-when\-phase=N" instantiation rounds quantifiers takes (>=1) before allowing theory combination to happen .IP "\-\-inst\-when\-tc\-first" allow theory combination to happen once initially, before quantifier strategies are run [*] .IP "\-\-quant\-model\-ee" use equality engine of model for last call effort [*] .IP "\-\-inst\-max\-level=N" maximum inst level of terms used to instantiate quantified formulas with (\-1 == no limit, default) .IP "\-\-inst\-level\-input\-only" only input terms are assigned instantiation level zero [*] .IP "\-\-quant\-rep\-mode=MODE" selection mode for representatives in quantifiers engine .IP "\-\-inst\-rlv\-cond" add relevancy conditions for instantiations [*] .IP "\-\-full\-saturate\-quant" when all other quantifier instantiation strategies fail, instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown [*] .IP "\-\-full\-saturate\-quant\-rd" whether to use relevant domain first for full saturation instantiation strategy [*] .IP "\-\-fs\-inst" interleave full saturate instantiation with other techniques [*] .IP "\-\-literal\-matching=MODE" choose literal matching mode .IP "\-\-finite\-model\-find" use finite model finding heuristic for quantifier instantiation [*] .IP "\-\-quant\-fun\-wd" assume that function defined by quantifiers are well defined [*] .IP "\-\-fmf\-fun" find models for recursively defined functions, assumes functions are admissible [*] .IP "\-\-fmf\-fun\-rlv" find models for recursively defined functions, assumes functions are admissible, allows empty type when function is irrelevant [*] .IP "\-\-fmf\-empty\-sorts" allow finite model finding to assume sorts that do not occur in ground assertions are empty [*] .IP "\-\-mbqi=MODE" choose mode for model\-based quantifier instantiation .IP "\-\-mbqi\-one\-inst\-per\-round" only add one instantiation per quantifier per round for mbqi [*] .IP "\-\-mbqi\-one\-quant\-per\-round" only add instantiations for one quantifier per round for mbqi [*] .IP "\-\-fmf\-inst\-engine" use instantiation engine in conjunction with finite model finding [*] .IP "\-\-fmf\-inst\-gen" enable Inst\-Gen instantiation techniques for finite model finding [*] .IP "\-\-fmf\-inst\-gen\-one\-quant\-per\-round" only perform Inst\-Gen instantiation techniques on one quantifier per round [*] .IP "\-\-fmf\-fresh\-dc" use fresh distinguished representative when applying Inst\-Gen techniques [*] .IP "\-\-fmf\-fmc\-simple" simple models in full model check for finite model finding [*] .IP "\-\-fmf\-bound\-int" finite model finding on bounded integer quantification [*] .IP "\-\-fmf\-bound" finite model finding on bounded quantification [*] .IP "\-\-fmf\-bound\-lazy" enforce bounds for bounded quantification lazily via use of proxy variables [*] .IP "\-\-fmf\-bound\-min\-mode=MODE" mode for which types of bounds to minimize via first decision heuristics .IP "\-\-quant\-cf" enable conflict find mechanism for quantifiers [*] .IP "\-\-quant\-cf\-mode=MODE" what effort to apply conflict find mechanism .IP "\-\-quant\-cf\-when=MODE" when to invoke conflict find mechanism for quantifiers .IP "\-\-qcf\-tconstraint" enable entailment checks for t\-constraints in qcf algorithm [*] .IP "\-\-qcf\-all\-conflict" add all available conflicting instances during conflict\-based instantiation [*] .IP "\-\-qcf\-nested\-conflict" consider conflicts for nested quantifiers [*] .IP "\-\-qcf\-vo\-exp" qcf experimental variable ordering [*] .IP "\-\-inst\-no\-entail" do not consider instances of quantified formulas that are currently entailed [*] .IP "\-\-inst\-no\-model\-true" do not consider instances of quantified formulas that are currently true in model, if it is available [*] .IP "\-\-inst\-prop" internal propagation for instantiations for selecting relevant instances [*] .IP "\-\-qcf\-eager\-test" optimization, test qcf instances eagerly [*] .IP "\-\-qcf\-eager\-check\-rd" optimization, eagerly check relevant domain of matched position [*] .IP "\-\-qcf\-skip\-rd" optimization, skip instances based on possibly irrelevant portions of quantified formulas [*] .IP "\-\-rewrite\-rules" use rewrite rules module [*] .IP "\-\-rr\-one\-inst\-per\-round" add one instance of rewrite rule per round [*] .IP "\-\-quant\-ind" use all available techniques for inductive reasoning [*] .IP "\-\-dt\-stc\-ind" apply strengthening for existential quantification over datatypes based on structural induction [*] .IP "\-\-int\-wf\-ind" apply strengthening for integers based on well\-founded induction [*] .IP "\-\-conjecture\-gen" generate candidate conjectures for inductive proofs [*] .IP "\-\-conjecture\-gen\-per\-round=N" number of conjectures to generate per instantiation round .IP "\-\-conjecture\-no\-filter" do not filter conjectures [*] .IP "\-\-conjecture\-filter\-active\-terms" filter based on active terms [*] .IP "\-\-conjecture\-filter\-canonical" filter based on canonicity [*] .IP "\-\-conjecture\-filter\-model" filter based on model [*] .IP "\-\-conjecture\-gen\-gt\-enum=N" number of ground terms to generate for model filtering .IP "\-\-conjecture\-gen\-uee\-intro" more aggressive merging for universal equality engine, introduces terms [*] .IP "\-\-conjecture\-gen\-max\-depth=N" maximum depth of terms to consider for conjectures .IP "\-\-cegqi" counterexample\-guided quantifier instantiation [*] .IP "\-\-cegqi\-fair=MODE" if and how to apply fairness for cegqi .IP "\-\-cegqi\-si=MODE" mode for processing single invocation synthesis conjectures .IP "\-\-cegqi\-si\-partial" combined techniques for synthesis conjectures that are partially single invocation [*] .IP "\-\-cegqi\-si\-reconstruct" reconstruct solutions for single invocation conjectures in original grammar [*] .IP "\-\-cegqi\-si\-sol\-min\-core" minimize solutions for single invocation conjectures based on unsat core [*] .IP "\-\-cegqi\-si\-sol\-min\-inst" minimize individual instantiations for single invocation conjectures based on unsat core [*] .IP "\-\-cegqi\-si\-reconstruct\-const" include constants when reconstruct solutions for single invocation conjectures in original grammar [*] .IP "\-\-cegqi\-si\-abort" abort if synthesis conjecture is not single invocation [*] .IP "\-\-sygus\-nf" only search for sygus builtin terms that are in normal form [*] .IP "\-\-sygus\-nf\-arg" account for relationship between arguments of operations in sygus normal form [*] .IP "\-\-sygus\-nf\-sym" narrow sygus search space based on global state of current candidate program [*] .IP "\-\-sygus\-nf\-sym\-gen" generalize lemmas for global search space narrowing [*] .IP "\-\-sygus\-nf\-sym\-arg" generalize based on arguments in global search space narrowing [*] .IP "\-\-sygus\-nf\-sym\-content" generalize based on content in global search space narrowing [*] .IP "\-\-sygus\-inv\-templ=MODE" template mode for sygus invariant synthesis .IP "\-\-sygus\-unif\-csol" enable approach which unifies conditional solutions [*] .IP "\-\-sygus\-direct\-eval" direct unfolding of evaluation functions [*] .IP "\-\-sygus\-cref\-eval" direct evaluation of refinement lemmas for conflict analysis [*] .IP "\-\-cbqi" turns on counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-recurse" turns on recursive counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-sat" answer sat when quantifiers are asserted with counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-model" guide instantiations by model values for counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-all" apply counterexample\-based instantiation to all quantified formulas [*] .IP "\-\-cbqi\-use\-inf\-int" use integer infinity for vts in counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-use\-inf\-real" use real infinity for vts in counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-prereg\-inst" preregister ground instantiations in counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-min\-bounds" use minimally constrained lower/upper bound for counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-round\-up\-lia" round up integer lower bounds in substitutions for counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-midpoint" choose substitutions based on midpoints of lower and upper bounds for counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-nopt" non\-optimal bounds for counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-lit\-dep" dependency lemmas for quantifier alternation in counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-innermost" only process innermost quantified formulas in counterexample\-based quantifier instantiation [*] .IP "\-\-cbqi\-nested\-qe" process nested quantified formulas with quantifier elimination in counterexample\-based quantifier instantiation [*] .IP "\-\-quant\-epr" infer whether in effectively propositional fragment, use for cbqi [*] .IP "\-\-quant\-epr\-match" use matching heuristics for EPR instantiation [*] .IP "\-\-local\-t\-ext" do instantiation based on local theory extensions [*] .IP "\-\-lte\-partial\-inst" partially instantiate local theory quantifiers [*] .IP "\-\-lte\-restrict\-inst\-closure" treat arguments of inst closure as restricted terms for instantiation [*] .IP "\-\-quant\-alpha\-equiv" infer alpha equivalence between quantified formulas [*] .IP "\-\-macros\-quant" perform quantifiers macro expansion [*] .IP "\-\-macros\-quant\-mode=MODE" mode for quantifiers macro expansion .IP "\-\-quant\-dsplit\-mode=MODE" mode for dynamic quantifiers splitting .IP "\-\-quant\-anti\-skolem" perform anti\-skolemization for quantified formulas [*] .IP "\-\-quant\-ee" maintain congrunce closure over universal equalities [*] .IP "\-\-track\-inst\-lemmas" track instantiation lemmas (for proofs, unsat cores, qe and synthesis minimization) [*] .SH SEP OPTIONS .IP "\-\-sep\-check\-neg" check negated spatial assertions [*] .IP "\-\-sep\-exp" experimental flag for sep [*] .IP "\-\-sep\-min\-refine" only add refinement lemmas for minimal (innermost) assertions [*] .IP "\-\-sep\-deq\-c" assume cardinality elements are distinct [*] .IP "\-\-sep\-pre\-skolem\-emp" eliminate emp constraint at preprocess time [*] .IP "\-\-sep\-child\-refine" child\-specific refinements of negated star, positive wand [*] .SH SETS OPTIONS .IP "\-\-sets\-proxy\-lemmas" introduce proxy variables eagerly to shorten lemmas [*] .IP "\-\-sets\-infer\-as\-lemmas" send inferences as lemmas [*] .IP "\-\-sets\-rel\-eager" standard effort checks for relations [*] .IP "\-\-sets\-ext" enable extended symbols such as complement and universe in theory of sets [*] .SH SMT LAYER OPTIONS .IP "\-\-force\-logic=LOGIC" set the logic, and override all further user attempts to change it (EXPERTS only) .IP "\-\-simplification=MODE" choose simplification mode, see \-\-simplification=help .IP "\-\-no\-simplification" turn off all simplification (same as \-\-simplification=none) .IP "\-\-static\-learning" use static learning (on by default) [*] .IP "\-\-check\-models" after SAT/INVALID/UNKNOWN, check that the generated model satisfies user assertions [*] .IP "\-\-dump\-models" output models after every SAT/INVALID/UNKNOWN response [*] .IP "\-\-omit\-dont\-cares" When producing a model, omit variables whose value does not matter [*] .IP "\-\-proof" turn on proof generation [*] .IP "\-\-check\-proofs" after UNSAT/VALID, machine\-check the generated proof [*] .IP "\-\-dump\-proofs" output proofs after every UNSAT/VALID response [*] .IP "\-\-dump\-instantiations" output instantiations of quantified formulas after every UNSAT/VALID response [*] .IP "\-\-dump\-synth" output solution for synthesis conjectures after every UNSAT/VALID response [*] .IP "\-\-produce\-unsat\-cores" turn on unsat core generation [*] .IP "\-\-check\-unsat\-cores" after UNSAT/VALID, produce and check an unsat core (expensive) [*] .IP "\-\-dump\-unsat\-cores" output unsat cores after every UNSAT/VALID response [*] .IP "\-\-dump\-unsat\-cores\-full" dump the full unsat core, including unlabeled assertions [*] .IP "\-\-produce\-assignments" support the get\-assignment command [*] .IP "\-\-ite\-simp" turn on ite simplification (Kim (and Somenzi) et al., SAT 2009) [*] .IP "\-\-on\-repeat\-ite\-simp" do the ite simplification pass again if repeating simplification [*] .IP "\-\-simp\-with\-care" enables simplifyWithCare in ite simplificiation [*] .IP "\-\-simp\-ite\-compress" enables compressing ites after ite simplification [*] .IP "\-\-unconstrained\-simp" turn on unconstrained simplification (see Bruttomesso/Brummayer PhD thesis) [*] .IP "\-\-repeat\-simp" make multiple passes with nonclausal simplifier [*] .IP "\-\-simp\-ite\-hunt\-zombies" post ite compression enables zombie removal while the number of nodes is above this threshold .IP "\-\-sort\-inference" calculate sort inference of input problem, convert the input based on monotonic sorts [*] .IP "\-\-abstract\-values" in models, output arrays (and in future, maybe others) using abstract values, as required by the SMT\-LIB standard [*] .IP "\-\-model\-u\-dt\-enum" in models, output uninterpreted sorts as datatype enumerations [*] .IP "\-\-rewrite\-step" amount of resources spent for each rewrite step (EXPERTS only) .IP "\-\-theory\-check\-step" amount of resources spent for each theory check call (EXPERTS only) .IP "\-\-decision\-step" amount of getNext decision calls in the decision engine (EXPERTS only) .IP "\-\-bitblast\-step" amount of resources spent for each bitblast step (EXPERTS only) .IP "\-\-parse\-step" amount of resources spent for each command/expression parsing (EXPERTS only) .IP "\-\-lemma\-step" amount of resources spent when adding lemmas (EXPERTS only) .IP "\-\-restart\-step" amount of resources spent for each theory restart (EXPERTS only) .IP "\-\-cnf\-step" amount of resources spent for each call to cnf conversion (EXPERTS only) .IP "\-\-preprocess\-step" amount of resources spent for each preprocessing step in SmtEngine (EXPERTS only) .IP "\-\-quantifier\-step" amount of resources spent for quantifier instantiations (EXPERTS only) .IP "\-\-sat\-conflict\-step" amount of resources spent for each sat conflict (main sat solver) (EXPERTS only) .IP "\-\-bv\-sat\-conflict\-step" amount of resources spent for each sat conflict (bitvectors) (EXPERTS only) .IP "\-\-rewrite\-apply\-to\-const" eliminate function applications, rewriting e.g. f(5) to a new symbol f_5 (EXPERTS only) [*] .IP "\-\-force\-no\-limit\-cpu\-while\-dump" Force no CPU limit when dumping models and proofs [*] .SH STRINGS THEORY OPTIONS .IP "\-\-strings\-exp" experimental features in the theory of strings [*] .IP "\-\-strings\-lb=N" the strategy of LB rule application: 0\-lazy, 1\-eager, 2\-no .IP "\-\-strings\-std\-ascii" the alphabet contains only characters from the standard ASCII or the extended one [*] .IP "\-\-strings\-fmf" the finite model finding used by the theory of strings [*] .IP "\-\-strings\-eager" strings eager check [*] .IP "\-\-strings\-eit" the eager intersection used by the theory of strings [*] .IP "\-\-strings\-opt1" internal option1 for strings: normal form [*] .IP "\-\-strings\-opt2" internal option2 for strings: constant regexp splitting [*] .IP "\-\-strings\-inm" internal for strings: ignore negative membership constraints (fragment checking is needed, left to users for now) [*] .IP "\-\-strings\-lazy\-pp" perform string preprocessing lazily [*] .IP "\-\-strings\-len\-geqz" strings length greater than zero lemmas [*] .IP "\-\-strings\-len\-norm" strings length normalization lemma [*] .IP "\-\-strings\-sp\-emp" strings split on empty string [*] .IP "\-\-strings\-infer\-sym" strings split on empty string [*] .IP "\-\-strings\-eager\-len" strings eager length lemmas [*] .IP "\-\-strings\-check\-entail\-len" check entailment between length terms to reduce splitting [*] .IP "\-\-strings\-process\-loop" reduce looping word equations to regular expressions [*] .IP "\-\-strings\-abort\-loop" abort when a looping word equation is encountered [*] .IP "\-\-strings\-infer\-as\-lemmas" always send lemmas out instead of making internal inferences [*] .IP "\-\-strings\-rexplain\-lemmas" regression explanations for string lemmas [*] .IP "\-\-strings\-min\-prefix\-explain" minimize explanations for prefix of normal forms in strings [*] .IP "\-\-strings\-guess\-model" use model guessing to avoid string extended function reductions [*] .IP "\-\-strings\-uf\-reduct" use uninterpreted functions when applying extended function reductions [*] .IP "\-\-strings\-binary\-csp" use binary search when splitting strings [*] .IP "\-\-strings\-lprop\-csp" do length propagation based on constant splits [*] .SH THEORY LAYER OPTIONS .IP "\-\-theoryof\-mode=MODE" mode for Theory::theoryof() (EXPERTS only) .IP "\-\-use\-theory=NAME" use alternate theory implementation NAME (\-\-use\-theory=help for a list). This option may be repeated or a comma separated list. .SH UNINTERPRETED FUNCTIONS THEORY OPTIONS .IP "\-\-symmetry\-breaker" use UF symmetry breaker (Deharbe et al., CADE 2011) [*] .IP "\-\-condense\-function\-values" condense models for functions rather than explicitly representing them [*] .IP "\-\-uf\-ss\-regions" disable region\-based method for discovering cliques and splits in uf strong solver [*] .IP "\-\-uf\-ss\-eager\-split" add splits eagerly for uf strong solver [*] .IP "\-\-uf\-ss\-totality" always use totality axioms for enforcing cardinality constraints [*] .IP "\-\-uf\-ss\-totality\-limited=N" apply totality axioms, but only up to cardinality N (\-1 == do not apply totality axioms, default) .IP "\-\-uf\-ss\-totality\-sym\-break" apply symmetry breaking for totality axioms [*] .IP "\-\-uf\-ss\-abort\-card=N" tells the uf strong solver a cardinality to abort at (\-1 == no limit, default) .IP "\-\-uf\-ss\-explained\-cliques" use explained clique lemmas for uf strong solver [*] .IP "\-\-uf\-ss\-simple\-cliques" always use simple clique lemmas for uf strong solver [*] .IP "\-\-uf\-ss\-deq\-prop" eagerly propagate disequalities for uf strong solver [*] .IP "\-\-uf\-ss=MODE" mode of operation for uf strong solver. .IP "\-\-uf\-ss\-clique\-splits" use cliques instead of splitting on demand to shrink model [*] .IP "\-\-uf\-ss\-sym\-break" finite model finding symmetry breaking techniques [*] .IP "\-\-uf\-ss\-fair" use fair strategy for finite model finding multiple sorts [*] .IP "\-\-uf\-ss\-fair\-monotone" group monotone sorts when enforcing fairness for finite model finding [*] .IP "Each option marked with [*] has a \-\-no\-OPTIONNAME variant, which reverses the sense of the option." .\".SH FILES .\".SH ENVIRONMENT .SH DIAGNOSTICS .B CVC4 reports all syntactic and semantic errors on standard error. .SH HISTORY The .B CVC4 effort is the culmination of fifteen years of theorem proving research, starting with the .I Stanford Validity Checker (SVC) in 1996. SVC's successor, the .I Cooperating Validity Checker (CVC), had a more optimized internal design, produced proofs, used the .I Chaff SAT solver, and featured a number of usability enhancements. Its name comes from the cooperative nature of decision procedures in Nelson-Oppen theory combination, which share amongst each other equalities between shared terms. CVC Lite, first made available in 2003, was a rewrite of CVC that attempted to make CVC more flexible (hence the \(lqlite\(rq) while extending the feature set: CVCLite supported quantifiers where its predecessors did not. CVC3 was a major overhaul of portions of CVC Lite: it added better decision procedure implementations, added support for using MiniSat in the core, and had generally better performance. CVC4 is the new version, the fifth generation of this validity checker line that is now celebrating fifteen years of heritage. It represents a complete re-evaluation of the core architecture to be both performant and to serve as a cutting-edge research vehicle for the next several years. Rather than taking CVC3 and redesigning problem parts, we've taken a clean-room approach, starting from scratch. Before using any designs from CVC3, we have thoroughly scrutinized, vetted, and updated them. Many parts of CVC4 bear only a superficial resemblance, if any, to their correspondent in CVC3. However, CVC4 is fundamentally similar to CVC3 and many other modern SMT solvers: it is a DPLL( .I T ) solver, with a SAT solver at its core and a delegation path to different decision procedure implementations, each in charge of solving formulas in some background theory. The re-evaluation and ground-up rewrite was necessitated, we felt, by the performance characteristics of CVC3. CVC3 has many useful features, but some core aspects of the design led to high memory use, and the use of heavyweight computation (where more nimble engineering approaches could suffice) makes CVC3 a much slower prover than other tools. As these designs are central to CVC3, a new version was preferable to a selective re-engineering, which would have ballooned in short order. .SH VERSION This manual page refers to .B CVC4 version 1.5. .SH BUGS A Bugzilla for the CVC4 project is maintained at .BR http://cvc4.cs.nyu.edu/bugzilla3/ . .SH AUTHORS .B CVC4 is developed by a team of researchers at New York University and the University of Iowa. See the AUTHORS file in the distribution for a full list of contributors. .SH "SEE ALSO" .BR libcvc4 (3), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/cvc4.1_template.in000066400000000000000000000103321313116454100162020ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii cvc4.1 .\" .TH CVC4 1 "@MAN_DATE@" "CVC4 release @VERSION@" "User Manuals" .SH NAME cvc4, pcvc4 \- an automated theorem prover .SH SYNOPSIS .B cvc4 [ .I options .B ] [ .I file .B ] .P .B pcvc4 [ .I options .B ] [ .I file .B ] .SH DESCRIPTION .B cvc4 is an automated theorem prover for first-order formulas with respect to background theories of interest. .B pcvc4 is CVC4's "portfolio" variant, which is capable of running multiple CVC4 instances in parallel, configured differently. With .I file , commands are read from .I file and executed. CVC4 supports the SMT-LIB (versions 1.2 and 2.0) input format, as well as its own native \(lqpresentation language\(rq (see .BR cvc4 (5) ), which is similar in many respects to CVC3's presentation language, but not identical. If .I file is unspecified, standard input is read (and the .B CVC4 presentation language is assumed). If .I file is unspecified and .B CVC4 is connected to a terminal, interactive mode is assumed. .SH COMMON OPTIONS .IP "Each option marked with [*] has a \-\-no\-OPTIONNAME variant, which reverses the sense of the option." ${common_manpage_documentation} ${remaining_manpage_documentation} .IP "Each option marked with [*] has a \-\-no\-OPTIONNAME variant, which reverses the sense of the option." .\".SH FILES .\".SH ENVIRONMENT .SH DIAGNOSTICS .B CVC4 reports all syntactic and semantic errors on standard error. .SH HISTORY The .B CVC4 effort is the culmination of fifteen years of theorem proving research, starting with the .I Stanford Validity Checker (SVC) in 1996. SVC's successor, the .I Cooperating Validity Checker (CVC), had a more optimized internal design, produced proofs, used the .I Chaff SAT solver, and featured a number of usability enhancements. Its name comes from the cooperative nature of decision procedures in Nelson-Oppen theory combination, which share amongst each other equalities between shared terms. CVC Lite, first made available in 2003, was a rewrite of CVC that attempted to make CVC more flexible (hence the \(lqlite\(rq) while extending the feature set: CVCLite supported quantifiers where its predecessors did not. CVC3 was a major overhaul of portions of CVC Lite: it added better decision procedure implementations, added support for using MiniSat in the core, and had generally better performance. CVC4 is the new version, the fifth generation of this validity checker line that is now celebrating fifteen years of heritage. It represents a complete re-evaluation of the core architecture to be both performant and to serve as a cutting-edge research vehicle for the next several years. Rather than taking CVC3 and redesigning problem parts, we've taken a clean-room approach, starting from scratch. Before using any designs from CVC3, we have thoroughly scrutinized, vetted, and updated them. Many parts of CVC4 bear only a superficial resemblance, if any, to their correspondent in CVC3. However, CVC4 is fundamentally similar to CVC3 and many other modern SMT solvers: it is a DPLL( .I T ) solver, with a SAT solver at its core and a delegation path to different decision procedure implementations, each in charge of solving formulas in some background theory. The re-evaluation and ground-up rewrite was necessitated, we felt, by the performance characteristics of CVC3. CVC3 has many useful features, but some core aspects of the design led to high memory use, and the use of heavyweight computation (where more nimble engineering approaches could suffice) makes CVC3 a much slower prover than other tools. As these designs are central to CVC3, a new version was preferable to a selective re-engineering, which would have ballooned in short order. .SH VERSION This manual page refers to .B CVC4 version @VERSION@. .SH BUGS A Bugzilla for the CVC4 project is maintained at .BR http://cvc4.cs.nyu.edu/bugzilla3/ . .SH AUTHORS .B CVC4 is developed by a team of researchers at New York University and the University of Iowa. See the AUTHORS file in the distribution for a full list of contributors. .SH "SEE ALSO" .BR libcvc4 (3), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/cvc4.5.in000066400000000000000000000010761313116454100143200ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii cvc4.5 .\" .TH CVC4 5 "@MAN_DATE@" "CVC4 release @VERSION@" "Languages documentation" .SH NAME cvc4 \- the native input language for CVC4 .SH DESCRIPTION .B cvc4 is an automated theorem prover for first-order formulas with respect to background theories of interest. .SH HISTORY .SH "SEE ALSO" .BR cvc4 (1), .BR libcvc4 (3), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/find_public_interface.sh000077500000000000000000000010331313116454100176140ustar00rootroot00000000000000#!/bin/bash # # Enumerates public interface headers, so that public-only documentation # can be produced. # cd "$(dirname "$0")" echo -n "\"$srcdir/src/include/cvc4.h\" " echo -n "\"$srcdir/src/include/cvc4_public.h\" " ( (find "$builddir" -name '*.h' | xargs grep -l '^# *include *"cvc4.*_public\.h"'); \ (find "$srcdir" -name '*.h' | xargs grep -l '^# *include *"cvc4.*_public\.h"'); \ ) | \ while read f; do if expr "$f" : ".*_\(template\|private\|test_utils\)\.h$" &>/dev/null; then continue fi echo -n "\"$f\" " done cvc4-1.5/doc/libcvc4.3000066400000000000000000000025651313116454100144040ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii libcvc4.3 .\" .TH LIBCVC4 3 "July 2017" "CVC4 release 1.5" "CVC4 Library Interfaces" .SH NAME libcvc4 \- a library interface for the CVC4 theorem prover .SH SYNOPSIS A small program like: .RS .nf #include #include "expr/expr_manager.h" #include "smt/smt_engine.h" using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); Expr onePlusTwo = em.mkExpr(kind::PLUS, em.mkConst(Rational(1)), em.mkConst(Rational(2))); std::cout << language::SetLanguage(language::output::LANG_CVC4) << smt.getInfo("name") << " says that 1 + 2 = " << smt.simplify(onePlusTwo) << std::endl; return 0; } .fi .RE gives the output: .RS "cvc4" says that 1 + 2 = 3 .RE .SH DESCRIPTION The main classes of interest in CVC4's API are .I ExprManager, .I SmtEngine, and a few related ones like .I Expr and .I Type. The .I ExprManager is used to build up expressions and types, and the .I SmtEngine is used primarily to make assertions, check satisfiability/validity, and extract models and proofs. .SH "SEE ALSO" .BR cvc4 (1), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://goedel.cs.nyu.edu/wiki/ . cvc4-1.5/doc/libcvc4.3_template.in000066400000000000000000000025741313116454100167040ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii libcvc4.3 .\" .TH LIBCVC4 3 "@MAN_DATE@" "CVC4 release @VERSION@" "CVC4 Library Interfaces" .SH NAME libcvc4 \- a library interface for the CVC4 theorem prover .SH SYNOPSIS A small program like: .RS .nf #include #include "expr/expr_manager.h" #include "smt/smt_engine.h" using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); Expr onePlusTwo = em.mkExpr(kind::PLUS, em.mkConst(Rational(1)), em.mkConst(Rational(2))); std::cout << language::SetLanguage(language::output::LANG_CVC4) << smt.getInfo("name") << " says that 1 + 2 = " << smt.simplify(onePlusTwo) << std::endl; return 0; } .fi .RE gives the output: .RS "cvc4" says that 1 + 2 = 3 .RE .SH DESCRIPTION The main classes of interest in CVC4's API are .I ExprManager, .I SmtEngine, and a few related ones like .I Expr and .I Type. The .I ExprManager is used to build up expressions and types, and the .I SmtEngine is used primarily to make assertions, check satisfiability/validity, and extract models and proofs. .SH "SEE ALSO" .BR cvc4 (1), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://goedel.cs.nyu.edu/wiki/ . cvc4-1.5/doc/libcvc4compat.3.in000066400000000000000000000007441313116454100162120ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii libcvc4compat.3 .\" .TH LIBCVC4COMPAT 3 "@MAN_DATE@" "CVC4 release @VERSION@" "CVC4 Library Interfaces" .SH NAME libcvc4compat \- a CVC3 compatibility library interface for the CVC4 theorem prover .SH DESCRIPTION .SH "SEE ALSO" .BR cvc4 (1), .BR libcvc4 (3), .BR libcvc4parser (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/libcvc4parser.3.in000066400000000000000000000007301313116454100162160ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii libcvc4parser.3 .\" .TH LIBCVC4PARSER 3 "@MAN_DATE@" "CVC4 release @VERSION@" "CVC4 Library Interfaces" .SH NAME libcvc4parser \- a parser library interface for the CVC4 theorem prover .SH DESCRIPTION .SH "SEE ALSO" .BR cvc4 (1), .BR libcvc4 (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/options.3cvc000066400000000000000000001412731313116454100152450ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii options.3cvc .\" .TH OPTIONS 3cvc "July 2017" "CVC4 release 1.5" "CVC4 Internals Documentation" .SH NAME options \- the options infrastructure .SH AVAILABLE INTERNAL OPTIONS .ad l .RS .TP 10 .I "COMMON OPTIONS" .TP .B "inputLanguage" (InputLanguage, default = language::input::LANG_AUTO) .br force input language (default is "auto"; see \-\-lang help) .TP .B "outputLanguage" (OutputLanguage, default = language::output::LANG_AUTO) .br force output language (default is "auto"; see \-\-output\-lang help) .TP .B "statistics" (bool) .br give statistics on exit .TP .B "version" (bool) .br identify this CVC4 binary .TP .B "help" (bool) .br full command line reference .TP .B "strictParsing" (bool) .br be less tolerant of non\-conforming inputs .TP .B "dumpModeString" (std::string) .br dump preprocessed assertions, etc., see \-\-dump=help .TP .B "dumpToFileName" (std::string) .br all dumping goes to FILE (instead of stdout) .TP .B "produceModels" (bool, default = false) .br support the get\-value and get\-model commands .TP .B "produceAssertions" (bool) .br keep an assertions list (enables get\-assertions command) .TP .B "incrementalSolving" (bool, default = true) .br enable incremental solving .TP .B "cumulativeMillisecondLimit" (unsigned long) .br enable time limiting (give milliseconds) .TP .B "perCallMillisecondLimit" (unsigned long) .br enable time limiting per query (give milliseconds) .TP .B "cumulativeResourceLimit" (unsigned long) .br enable resource limiting (currently, roughly the number of SAT conflicts) .TP .B "perCallResourceLimit" (unsigned long) .br enable resource limiting per query .TP .B "hardLimit" (bool, default = false) .br the resource limit is hard potentially leaving the smtEngine in an unsafe state (should be destroyed and rebuild after resourcing out) .TP .B "cpuTime" (bool, default = false) .br measures CPU time if set to true and wall time if false (default false) .TP .I "ARITHMETIC THEORY OPTIONS" .TP .B "arithUnateLemmaMode" (ArithUnateLemmaMode, default = ALL_PRESOLVE_LEMMAS) .br determines which lemmas to add before solving (default is 'all', see \-\-unate\-lemmas=help) .TP .B "arithPropagationMode" (ArithPropagationMode, default = BOTH_PROP) .br turns on arithmetic propagation (default is 'old', see \-\-arith\-prop=help) .TP .B "arithHeuristicPivots" (int16_t, default = 0) .br the number of times to apply the heuristic pivot rule; if N < 0, this defaults to the number of variables; if this is unset, this is tuned by the logic selection .TP .B "arithStandardCheckVarOrderPivots" (int16_t, default = \-1) .br limits the number of pivots in a single invocation of check() at a non\-full effort level using Bland's pivot rule (EXPERTS only) .TP .B "arithErrorSelectionRule" (ErrorSelectionRule, default = MINIMUM_AMOUNT) .br change the pivot rule for the basic variable (default is 'min', see \-\-pivot\-rule help) .TP .B "arithSimplexCheckPeriod" (uint16_t, default = 200) .br the number of pivots to do in simplex before rechecking for a conflict on all variables .TP .B "arithPivotThreshold" (uint16_t, default = 2) .br sets the number of pivots using \-\-pivot\-rule per basic variable per simplex instance before using variable order .TP .B "arithPropagateMaxLength" (uint16_t, default = 16) .br sets the maximum row length to be used in propagation .TP .B "arithDioSolver" (bool, default = true) .br turns on Linear Diophantine Equation solver (Griggio, JSAT 2012) .TP .B "arithRewriteEq" (bool, default = false) .br turns on the preprocessing rewrite turning equalities into a conjunction of inequalities .TP .B "arithMLTrick" (bool, default = false) .br turns on the preprocessing step of attempting to infer bounds on miplib problems .TP .B "arithMLTrickSubstitutions" (unsigned, default = 1) .br do substitution for miplib 'tmp' vars if defined in <= N eliminated vars .TP .B "doCutAllBounded" (bool, default = false) .br turns on the integer solving step of periodically cutting all integer variables that have both upper and lower bounds .TP .B "maxCutsInContext" (unsigned, default = 65535) .br maximum cuts in a given context before signalling a restart .TP .B "revertArithModels" (bool, default = false) .br revert the arithmetic model to a known safe model on unsat if one is cached .TP .B "havePenalties" (bool, default = false) .br turns on degenerate pivot penalties .TP .B "useFC" (bool, default = false) .br use focusing and converging simplex (FMCAD 2013 submission) .TP .B "useSOI" (bool, default = false) .br use sum of infeasibility simplex (FMCAD 2013 submission) .TP .B "restrictedPivots" (bool, default = true) .br have a pivot cap for simplex at effort levels below fullEffort .TP .B "collectPivots" (bool, default = false) .br collect the pivot history .TP .B "useApprox" (bool, default = false) .br attempt to use an approximate solver .TP .B "maxApproxDepth" (int16_t, default = 200) .br maximum branch depth the approximate solver is allowed to take .TP .B "exportDioDecompositions" (bool, default = false) .br let skolem variables for integer divisibility constraints leak from the dio solver .TP .B "newProp" (bool, default = false) .br use the new row propagation system .TP .B "arithPropAsLemmaLength" (uint16_t, default = 8) .br rows shorter than this are propagated as clauses .TP .B "soiQuickExplain" (bool, default = false) .br use quick explain to minimize the sum of infeasibility conflicts .TP .B "rewriteDivk" (bool, default = false) .br rewrite division and mod when by a constant into linear terms .TP .B "trySolveIntStandardEffort" (bool, default = false) .br attempt to use the approximate solve integer method on standard effort .TP .B "replayFailureLemma" (bool, default = false) .br attempt to use external lemmas if approximate solve integer failed .TP .B "dioSolverTurns" (int, default = 10) .br turns in a row dio solver cutting gets .TP .B "rrTurns" (int, default = 3) .br round robin turn .TP .B "dioRepeat" (bool, default = false) .br handle dio solver constraints in mass or one at a time .TP .B "replayEarlyCloseDepths" (int, default = 1) .br multiples of the depths to try to close the approx log eagerly .TP .B "replayFailurePenalty" (int, default = 100) .br number of solve integer attempts to skips after a numeric failure .TP .B "replayNumericFailurePenalty" (int, default = 4194304) .br number of solve integer attempts to skips after a numeric failure .TP .B "replayRejectCutSize" (unsigned, default = 25500) .br maximum complexity of any coefficient while replaying cuts .TP .B "lemmaRejectCutSize" (unsigned, default = 25500) .br maximum complexity of any coefficient while outputting replaying cut lemmas .TP .B "soiApproxMajorFailure" (double, default = .01) .br threshold for a major tolerance failure by the approximate solver .TP .B "soiApproxMajorFailurePen" (int, default = 50) .br threshold for a major tolerance failure by the approximate solver .TP .B "soiApproxMinorFailure" (double, default = .0001) .br threshold for a minor tolerance failure by the approximate solver .TP .B "soiApproxMinorFailurePen" (int, default = 10) .br threshold for a minor tolerance failure by the approximate solver .TP .B "ppAssertMaxSubSize" (unsigned, default = 2) .br threshold for substituting an equality in ppAssert .TP .B "maxReplayTree" (int, default = 512) .br threshold for attempting to replay a tree .TP .B "pbRewrites" (bool, default = false) .br apply pseudo boolean rewrites .TP .B "pbRewriteThreshold" (int, default = 256) .br threshold of number of pseudoboolean variables to have before doing rewrites .TP .B "sNormInferEq" (bool, default = false) .br infer equalities based on Shostak normalization .TP .B "nlExt" (bool, default = true) .br extended approach to non\-linear .TP .B "nlExtResBound" (bool, default = false) .br use resolution\-style inference for inferring new bounds .TP .B "nlExtTangentPlanes" (bool, default = false) .br use non\-terminating tangent plane strategy for non\-linear .TP .B "nlExtEntailConflicts" (bool, default = false) .br check for entailed conflicts in non\-linear solver .TP .B "nlExtRewrites" (bool, default = true) .br do rewrites in non\-linear solver .TP .B "nlExtSolveSubs" (bool, default = false) .br do solving for determining constant substitutions .TP .B "nlExtPurify" (bool, default = false) .br purify non\-linear terms at preprocess .TP .B "nlExtSplitZero" (bool, default = false) .br intial splits on zero for all variables .TP .I "ARRAYS THEORY OPTIONS" .TP .B "arraysOptimizeLinear" (bool, default = true) .br turn on optimization for linear array terms (see de Moura FMCAD 09 arrays paper) .TP .B "arraysLazyRIntro1" (bool, default = true) .br turn on optimization to only perform RIntro1 rule lazily (see Jovanovic/Barrett 2012: Being Careful with Theory Combination) .TP .B "arraysWeakEquivalence" (bool, default = false) .br use algorithm from Christ/Hoenicke (SMT 2014) .TP .B "arraysModelBased" (bool, default = false) .br turn on model\-based array solver .TP .B "arraysEagerIndexSplitting" (bool, default = true) .br turn on eager index splitting for generated array lemmas .TP .B "arraysEagerLemmas" (bool, default = false) .br turn on eager lemma generation for arrays .TP .B "arraysConfig" (int, default = 0) .br set different array option configurations \- for developers only .TP .B "arraysReduceSharing" (bool, default = false) .br use model information to reduce size of care graph for arrays .TP .B "arraysPropagate" (int, default = 2) .br propagation effort for arrays: 0 is none, 1 is some, 2 is full .TP .I "BASE OPTIONS" .TP .B "binary_name" (std::string) .br [undocumented] .TP .B "in" (std::istream*, default = &std::cin) .br [undocumented] .TP .B "out" (std::ostream*, default = &std::cout) .br [undocumented] .TP .B "err" (std::ostream*, default = &std::cerr) .br [undocumented] .TP .B "languageHelp" (bool) .br [undocumented] .TP .B "verbosity" (int, default = 0) .br the verbosity level of CVC4 .TP .B "statsEveryQuery" (bool, default = false) .br in incremental mode, print stats after every satisfiability or validity query .TP .B "statsHideZeros" (bool, default = false) .br hide statistics which are zero .TP .B "parseOnly" (bool) .br exit after parsing input .TP .B "preprocessOnly" (bool) .br exit after preprocessing input .TP .B "printSuccess" (bool) .br print the "success" output required of SMT\-LIBv2 .TP .I "BITVECTOR THEORY OPTIONS" .TP .B "bvSatSolver" (CVC4::theory::bv::SatSolverMode, default = CVC4::theory::bv::SAT_SOLVER_MINISAT) .br choose which sat solver to use, see \-\-bv\-sat\-solver=help (EXPERTS only) .TP .B "bitblastMode" (CVC4::theory::bv::BitblastMode, default = CVC4::theory::bv::BITBLAST_MODE_LAZY) .br choose bitblasting mode, see \-\-bitblast=help .TP .B "bitvectorAig" (bool, default = false) .br bitblast by first converting to AIG (implies \-\-bitblast=eager) .TP .B "bitvectorAigSimplifications" (std::string) .br abc command to run AIG simplifications (implies \-\-bitblast\-aig, default is "balance;drw") (EXPERTS only) .TP .B "bitvectorPropagate" (bool, default = true) .br use bit\-vector propagation in the bit\-blaster .TP .B "bitvectorEqualitySolver" (bool, default = true) .br use the equality engine for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bitvectorEqualitySlicer" (CVC4::theory::bv::BvSlicerMode, default = CVC4::theory::bv::BITVECTOR_SLICER_OFF) .br turn on the slicing equality solver for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bitvectorInequalitySolver" (bool, default = true) .br turn on the inequality solver for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bitvectorAlgebraicSolver" (bool, default = true) .br turn on the algebraic solver for the bit\-vector theory (only if \-\-bitblast=lazy) .TP .B "bitvectorAlgebraicBudget" (unsigned, default = 1500) .br the budget allowed for the algebraic solver in number of SAT conflicts (EXPERTS only) .TP .B "bitvectorToBool" (bool, default = false) .br lift bit\-vectors of size 1 to booleans when possible .TP .B "boolToBitvector" (bool, default = false) .br convert booleans to bit\-vectors of size 1 when possible .TP .B "bitvectorDivByZeroConst" (bool, default = false) .br always return \-1 on division by zero .TP .B "bvExtractArithRewrite" (bool, default = false) .br enable rewrite pushing extract [i:0] over arithmetic operations (can blow up) (EXPERTS only) .TP .B "bvAbstraction" (bool, default = false) .br mcm benchmark abstraction (EXPERTS only) .TP .B "skolemizeArguments" (bool, default = false) .br skolemize arguments for bv abstraction (only does something if \-\-bv\-abstraction is on) (EXPERTS only) .TP .B "bvNumFunc" (unsigned, default = 1) .br number of function symbols in conflicts that are generalized (EXPERTS only) .TP .B "bvEagerExplanations" (bool, default = false) .br compute bit\-blasting propagation explanations eagerly (EXPERTS only) .TP .B "bitvectorQuickXplain" (bool, default = false) .br minimize bv conflicts using the QuickXplain algorithm (EXPERTS only) .TP .B "bvIntroducePow2" (bool, default = false) .br introduce bitvector powers of two as a preprocessing pass (EXPERTS only) .TP .B "bvLazyRewriteExtf" (bool, default = true) .br lazily rewrite extended functions like bv2nat and int2bv .TP .B "bvLazyReduceExtf" (bool, default = false) .br reduce extended functions like bv2nat and int2bv at last call instead of full effort .TP .B "bvAlgExtf" (bool, default = true) .br algebraic inferences for extended functions .TP .I "DATATYPES THEORY OPTIONS" .TP .B "dtRewriteErrorSel" (bool, default = false) .br rewrite incorrectly applied selectors to arbitrary ground term (EXPERTS only) .TP .B "dtForceAssignment" (bool, default = false) .br force the datatypes solver to give specific values to all datatypes terms before answering sat .TP .B "dtBinarySplit" (bool, default = false) .br do binary splits for datatype constructor types .TP .B "dtRefIntro" (bool, default = false) .br introduce reference skolems for shorter explanations .TP .B "dtUseTesters" (bool, default = true) .br do not preprocess away tester predicates .TP .B "cdtBisimilar" (bool, default = true) .br do bisimilarity check for co\-datatypes .TP .B "dtCyclic" (bool, default = true) .br do cyclicity check for datatypes .TP .B "dtInferAsLemmas" (bool, default = false) .br always send lemmas out instead of making internal inferences .TP .B "dtBlastSplits" (bool, default = false) .br when applicable, blast splitting lemmas for all variables at once .TP .I "DECISION HEURISTICS OPTIONS" .TP .B "decisionMode" (decision::DecisionMode, default = decision::DECISION_STRATEGY_INTERNAL) .br choose decision mode, see \-\-decision=help .TP .B "decisionStopOnly" (bool) .br [undocumented] .TP .B "decisionThreshold" (decision::DecisionWeight, default = 0) .br ignore all nodes greater than threshold in first attempt to pick decision (EXPERTS only) .TP .B "decisionUseWeight" (bool, default = false) .br use the weight nodes (locally, by looking at children) to direct recursive search (EXPERTS only) .TP .B "decisionRandomWeight" (int, default = 0) .br assign random weights to nodes between 0 and N\-1 (0: disable) (EXPERTS only) .TP .B "decisionWeightInternal" (decision::DecisionWeightInternal, default = decision::DECISION_WEIGHT_INTERNAL_OFF) .br computer weights of internal nodes using children: off, max, sum, usr1 (meaning evolving) (EXPERTS only) .TP .I "EXPRESSION PACKAGE OPTIONS" .TP .B "defaultExprDepth" (int, default = 0) .br print exprs to depth N (0 == default, \-1 == no limit) .TP .B "defaultDagThresh" (int, default = 1) .br dagify common subexprs appearing > N times (1 == default, 0 == don't dagify) .TP .B "printExprTypes" (bool, default = false) .br print types with variables when printing exprs .TP .B "earlyTypeChecking" (bool, default = USE_EARLY_TYPE_CHECKING_BY_DEFAULT) .br type check expressions immediately on creation (debug builds only) .TP .B "typeChecking" (bool, default = DO_SEMANTIC_CHECKS_BY_DEFAULT) .br never type check expressions .TP .I "IDL OPTIONS" .TP .B "idlRewriteEq" (bool, default = false) .br enable rewriting equalities into two inequalities in IDL solver (default is disabled) .TP .I "DRIVER OPTIONS" .TP .B "earlyExit" (bool, default = true) .br do not run destructors at exit; default on except in debug builds (EXPERTS only) .TP .B "threads" (unsigned, default = 2) .br Total number of threads for portfolio .TP .B "threadStackSize" (unsigned, default = 0) .br stack size for worker threads in MB (0 means use Boost/thread lib default) .TP .B "threadArgv" (std::vector) .br Thread configuration (a string to be passed to parseOptions) .TP .B "thread_id" (int, default = \-1) .br Thread ID, for internal use in case of multi\-threaded run .TP .B "sharingFilterByLength" (int, default = \-1) .br don't share (among portfolio threads) lemmas strictly longer than N .TP .B "fallbackSequential" (bool, default = false) .br Switch to sequential mode (instead of printing an error) if it can't be solved in portfolio mode .TP .B "incrementalParallel" (bool, default = false) .br Use parallel solver even in incremental mode (may print 'unknown's at times) .TP .B "interactive" (bool) .br force interactive/non\-interactive mode .TP .B "interactivePrompt" (bool, default = true) .br interactive prompting while in interactive mode .TP .B "continuedExecution" (bool, default = false) .br continue executing commands, even on error .TP .B "segvSpin" (bool, default = false) .br spin on segfault/other crash waiting for gdb .TP .B "tearDownIncremental" (int, default = 0) .br implement PUSH/POP/multi\-query by destroying and recreating SmtEngine every N queries (EXPERTS only) .TP .B "waitToJoin" (bool, default = true) .br wait for other threads to join before quitting (EXPERTS only) .TP .I "PARSER OPTIONS" .TP .B "memoryMap" (bool) .br memory map file input .TP .B "semanticChecks" (bool, default = DO_SEMANTIC_CHECKS_BY_DEFAULT) .br disable ALL semantic checks, including type checks .TP .B "globalDeclarations" (bool, default = false) .br force all declarations and definitions to be global .TP .B "filesystemAccess" (bool, default = true) .br [undocumented] .TP .I "PRINTING OPTIONS" .TP .B "modelFormatMode" (ModelFormatMode, default = MODEL_FORMAT_MODE_DEFAULT) .br print format mode for models, see \-\-model\-format=help .TP .B "instFormatMode" (InstFormatMode, default = INST_FORMAT_MODE_DEFAULT) .br print format mode for instantiations, see \-\-inst\-format=help .TP .I "PROOF OPTIONS" .TP .B "lfscLetification" (bool, default = true) .br turns on global letification in LFSC proofs .TP .B "aggressiveCoreMin" (bool, default = false) .br turns on aggressive unsat core minimization (experimental) .TP .B "fewerPreprocessingHoles" (bool, default = false) .br try to eliminate preprocessing holes in proofs .TP .B "allowEmptyDependencies" (bool, default = false) .br if unable to track the dependencies of a rewritten/preprocessed assertion, fail silently .TP .I "SAT LAYER OPTIONS" .TP .B "satRandomFreq" (double, default = 0.0) .br sets the frequency of random decisions in the sat solver (P=0.0 by default) .TP .B "satRandomSeed" (uint32_t, default = 0) .br sets the random seed for the sat solver .TP .B "satVarDecay" (double, default = 0.95) .br variable activity decay factor for Minisat .TP .B "satClauseDecay" (double, default = 0.999) .br clause activity decay factor for Minisat .TP .B "satRestartFirst" (unsigned, default = 25) .br sets the base restart interval for the sat solver (N=25 by default) .TP .B "satRestartInc" (double, default = 3.0) .br sets the restart interval increase factor for the sat solver (F=3.0 by default) .TP .B "sat_refine_conflicts" (bool, default = false) .br refine theory conflict clauses (default false) .TP .B "minisatUseElim" (bool, default = true) .br use Minisat elimination .TP .B "minisatDumpDimacs" (bool, default = false) .br instead of solving minisat dumps the asserted clauses in Dimacs format .TP .I "QUANTIFIERS OPTIONS" .TP .B "miniscopeQuant" (bool, default = true) .br miniscope quantifiers .TP .B "miniscopeQuantFreeVar" (bool, default = true) .br miniscope quantifiers for ground subformulas .TP .B "quantSplit" (bool, default = true) .br apply splitting to quantified formulas based on variable disjoint disjuncts .TP .B "prenexQuant" (CVC4::theory::quantifiers::PrenexQuantMode, default = CVC4::theory::quantifiers::PRENEX_QUANT_SIMPLE) .br prenex mode for quantified formulas .TP .B "prenexQuantUser" (bool, default = false) .br prenex quantified formulas with user patterns .TP .B "varElimQuant" (bool, default = true) .br enable simple variable elimination for quantified formulas .TP .B "varIneqElimQuant" (bool, default = true) .br enable variable elimination based on infinite projection of unbound arithmetic variables .TP .B "dtVarExpandQuant" (bool, default = true) .br expand datatype variables bound to one constructor in quantifiers .TP .B "iteLiftQuant" (CVC4::theory::quantifiers::IteLiftQuantMode, default = CVC4::theory::quantifiers::ITE_LIFT_QUANT_MODE_SIMPLE) .br ite lifting mode for quantified formulas .TP .B "condVarSplitQuant" (bool, default = true) .br split quantified formulas that lead to variable eliminations .TP .B "condVarSplitQuantAgg" (bool, default = false) .br aggressive split quantified formulas that lead to variable eliminations .TP .B "iteDtTesterSplitQuant" (bool, default = false) .br split ites with dt testers as conditions .TP .B "preSkolemQuant" (bool, default = false) .br apply skolemization eagerly to bodies of quantified formulas .TP .B "preSkolemQuantNested" (bool, default = true) .br apply skolemization to nested quantified formulas .TP .B "preSkolemQuantAgg" (bool, default = true) .br apply skolemization to quantified formulas aggressively .TP .B "aggressiveMiniscopeQuant" (bool, default = false) .br perform aggressive miniscoping for quantifiers .TP .B "elimTautQuant" (bool, default = true) .br eliminate tautological disjuncts of quantified formulas .TP .B "elimExtArithQuant" (bool, default = true) .br eliminate extended arithmetic symbols in quantified formulas .TP .B "condRewriteQuant" (bool, default = true) .br conditional rewriting of quantified formulas .TP .B "eMatching" (bool, default = true) .br whether to do heuristic E\-matching .TP .B "termDbMode" (CVC4::theory::quantifiers::TermDbMode, default = CVC4::theory::quantifiers::TERM_DB_ALL) .br which ground terms to consider for instantiation .TP .B "registerQuantBodyTerms" (bool, default = false) .br consider ground terms within bodies of quantified formulas for matching .TP .B "inferArithTriggerEq" (bool, default = false) .br infer equalities for trigger terms based on solving arithmetic equalities .TP .B "inferArithTriggerEqExp" (bool, default = false) .br record explanations for inferArithTriggerEq .TP .B "strictTriggers" (bool, default = false) .br only instantiate quantifiers with user patterns based on triggers .TP .B "relevantTriggers" (bool, default = false) .br prefer triggers that are more relevant based on SInE style analysis .TP .B "relationalTriggers" (bool, default = false) .br choose relational triggers such as x = f(y), x >= f(y) .TP .B "purifyTriggers" (bool, default = false) .br purify triggers, e.g. f( x+1 ) becomes f( y ), x mapsto y\-1 .TP .B "purifyDtTriggers" (bool, default = false) .br purify dt triggers, match all constructors of correct form instead of selectors .TP .B "pureThTriggers" (bool, default = false) .br use pure theory terms as single triggers .TP .B "partialTriggers" (bool, default = false) .br use triggers that do not contain all free variables .TP .B "multiTriggerWhenSingle" (bool, default = false) .br select multi triggers when single triggers exist .TP .B "multiTriggerPriority" (bool, default = false) .br only try multi triggers if single triggers give no instantiations .TP .B "multiTriggerCache" (bool, default = false) .br caching version of multi triggers .TP .B "multiTriggerLinear" (bool, default = true) .br implementation of multi triggers where maximum number of instantiations is linear wrt number of ground terms .TP .B "triggerSelMode" (CVC4::theory::quantifiers::TriggerSelMode, default = CVC4::theory::quantifiers::TRIGGER_SEL_MIN) .br selection mode for triggers .TP .B "triggerActiveSelMode" (CVC4::theory::quantifiers::TriggerActiveSelMode, default = CVC4::theory::quantifiers::TRIGGER_ACTIVE_SEL_ALL) .br selection mode to activate triggers .TP .B "userPatternsQuant" (CVC4::theory::quantifiers::UserPatMode, default = CVC4::theory::quantifiers::USER_PAT_MODE_TRUST) .br policy for handling user\-provided patterns for quantifier instantiation .TP .B "incrementTriggers" (bool, default = true) .br generate additional triggers as needed during search .TP .B "instWhenMode" (CVC4::theory::quantifiers::InstWhenMode, default = CVC4::theory::quantifiers::INST_WHEN_FULL_LAST_CALL) .br when to apply instantiation .TP .B "instWhenStrictInterleave" (bool, default = true) .br ensure theory combination and standard quantifier effort strategies take turns .TP .B "instWhenPhase" (int, default = 2) .br instantiation rounds quantifiers takes (>=1) before allowing theory combination to happen .TP .B "instWhenTcFirst" (bool, default = true) .br allow theory combination to happen once initially, before quantifier strategies are run .TP .B "quantModelEe" (bool, default = false) .br use equality engine of model for last call effort .TP .B "instMaxLevel" (int, default = \-1) .br maximum inst level of terms used to instantiate quantified formulas with (\-1 == no limit, default) .TP .B "instLevelInputOnly" (bool, default = true) .br only input terms are assigned instantiation level zero .TP .B "quantRepMode" (CVC4::theory::quantifiers::QuantRepMode, default = CVC4::theory::quantifiers::QUANT_REP_MODE_FIRST) .br selection mode for representatives in quantifiers engine .TP .B "instRelevantCond" (bool, default = false) .br add relevancy conditions for instantiations .TP .B "fullSaturateQuant" (bool, default = false) .br when all other quantifier instantiation strategies fail, instantiate with ground terms from relevant domain, then arbitrary ground terms before answering unknown .TP .B "fullSaturateQuantRd" (bool, default = true) .br whether to use relevant domain first for full saturation instantiation strategy .TP .B "fullSaturateInst" (bool, default = false) .br interleave full saturate instantiation with other techniques .TP .B "literalMatchMode" (CVC4::theory::quantifiers::LiteralMatchMode, default = CVC4::theory::quantifiers::LITERAL_MATCH_USE) .br choose literal matching mode .TP .B "finiteModelFind" (bool, default = false) .br use finite model finding heuristic for quantifier instantiation .TP .B "quantFunWellDefined" (bool, default = false) .br assume that function defined by quantifiers are well defined .TP .B "fmfFunWellDefined" (bool, default = false) .br find models for recursively defined functions, assumes functions are admissible .TP .B "fmfFunWellDefinedRelevant" (bool, default = false) .br find models for recursively defined functions, assumes functions are admissible, allows empty type when function is irrelevant .TP .B "fmfEmptySorts" (bool, default = false) .br allow finite model finding to assume sorts that do not occur in ground assertions are empty .TP .B "mbqiMode" (CVC4::theory::quantifiers::MbqiMode, default = CVC4::theory::quantifiers::MBQI_FMC) .br choose mode for model\-based quantifier instantiation .TP .B "fmfOneInstPerRound" (bool, default = false) .br only add one instantiation per quantifier per round for mbqi .TP .B "fmfOneQuantPerRound" (bool, default = false) .br only add instantiations for one quantifier per round for mbqi .TP .B "fmfInstEngine" (bool, default = false) .br use instantiation engine in conjunction with finite model finding .TP .B "fmfInstGen" (bool, default = true) .br enable Inst\-Gen instantiation techniques for finite model finding .TP .B "fmfInstGenOneQuantPerRound" (bool, default = false) .br only perform Inst\-Gen instantiation techniques on one quantifier per round .TP .B "fmfFreshDistConst" (bool, default = false) .br use fresh distinguished representative when applying Inst\-Gen techniques .TP .B "fmfFmcSimple" (bool, default = true) .br simple models in full model check for finite model finding .TP .B "fmfBoundInt" (bool, default = false) .br finite model finding on bounded integer quantification .TP .B "fmfBound" (bool, default = false) .br finite model finding on bounded quantification .TP .B "fmfBoundLazy" (bool, default = false) .br enforce bounds for bounded quantification lazily via use of proxy variables .TP .B "fmfBoundMinMode" (CVC4::theory::quantifiers::FmfBoundMinMode, default = CVC4::theory::quantifiers::FMF_BOUND_MIN_INT_RANGE) .br mode for which types of bounds to minimize via first decision heuristics .TP .B "quantConflictFind" (bool, default = true) .br enable conflict find mechanism for quantifiers .TP .B "qcfMode" (CVC4::theory::quantifiers::QcfMode, default = CVC4::theory::quantifiers::QCF_PROP_EQ) .br what effort to apply conflict find mechanism .TP .B "qcfWhenMode" (CVC4::theory::quantifiers::QcfWhenMode, default = CVC4::theory::quantifiers::QCF_WHEN_MODE_DEFAULT) .br when to invoke conflict find mechanism for quantifiers .TP .B "qcfTConstraint" (bool, default = false) .br enable entailment checks for t\-constraints in qcf algorithm .TP .B "qcfAllConflict" (bool, default = false) .br add all available conflicting instances during conflict\-based instantiation .TP .B "qcfNestedConflict" (bool, default = false) .br consider conflicts for nested quantifiers .TP .B "qcfVoExp" (bool, default = false) .br qcf experimental variable ordering .TP .B "instNoEntail" (bool, default = true) .br do not consider instances of quantified formulas that are currently entailed .TP .B "instNoModelTrue" (bool, default = false) .br do not consider instances of quantified formulas that are currently true in model, if it is available .TP .B "instPropagate" (bool, default = false) .br internal propagation for instantiations for selecting relevant instances .TP .B "qcfEagerTest" (bool, default = true) .br optimization, test qcf instances eagerly .TP .B "qcfEagerCheckRd" (bool, default = true) .br optimization, eagerly check relevant domain of matched position .TP .B "qcfSkipRd" (bool, default = false) .br optimization, skip instances based on possibly irrelevant portions of quantified formulas .TP .B "quantRewriteRules" (bool, default = false) .br use rewrite rules module .TP .B "rrOneInstPerRound" (bool, default = false) .br add one instance of rewrite rule per round .TP .B "quantInduction" (bool, default = false) .br use all available techniques for inductive reasoning .TP .B "dtStcInduction" (bool, default = false) .br apply strengthening for existential quantification over datatypes based on structural induction .TP .B "intWfInduction" (bool, default = false) .br apply strengthening for integers based on well\-founded induction .TP .B "conjectureGen" (bool, default = false) .br generate candidate conjectures for inductive proofs .TP .B "conjectureGenPerRound" (int, default = 1) .br number of conjectures to generate per instantiation round .TP .B "conjectureNoFilter" (bool, default = false) .br do not filter conjectures .TP .B "conjectureFilterActiveTerms" (bool, default = true) .br filter based on active terms .TP .B "conjectureFilterCanonical" (bool, default = true) .br filter based on canonicity .TP .B "conjectureFilterModel" (bool, default = true) .br filter based on model .TP .B "conjectureGenGtEnum" (int, default = 50) .br number of ground terms to generate for model filtering .TP .B "conjectureUeeIntro" (bool, default = false) .br more aggressive merging for universal equality engine, introduces terms .TP .B "conjectureGenMaxDepth" (int, default = 3) .br maximum depth of terms to consider for conjectures .TP .B "ceGuidedInst" (bool, default = false) .br counterexample\-guided quantifier instantiation .TP .B "ceGuidedInstFair" (CVC4::theory::quantifiers::CegqiFairMode, default = CVC4::theory::quantifiers::CEGQI_FAIR_DT_SIZE) .br if and how to apply fairness for cegqi .TP .B "cegqiSingleInvMode" (CVC4::theory::quantifiers::CegqiSingleInvMode, default = CVC4::theory::quantifiers::CEGQI_SI_MODE_NONE) .br mode for processing single invocation synthesis conjectures .TP .B "cegqiSingleInvPartial" (bool, default = false) .br combined techniques for synthesis conjectures that are partially single invocation .TP .B "cegqiSingleInvReconstruct" (bool, default = true) .br reconstruct solutions for single invocation conjectures in original grammar .TP .B "cegqiSolMinCore" (bool, default = false) .br minimize solutions for single invocation conjectures based on unsat core .TP .B "cegqiSolMinInst" (bool, default = true) .br minimize individual instantiations for single invocation conjectures based on unsat core .TP .B "cegqiSingleInvReconstructConst" (bool, default = true) .br include constants when reconstruct solutions for single invocation conjectures in original grammar .TP .B "cegqiSingleInvAbort" (bool, default = false) .br abort if synthesis conjecture is not single invocation .TP .B "sygusNormalForm" (bool, default = true) .br only search for sygus builtin terms that are in normal form .TP .B "sygusNormalFormArg" (bool, default = true) .br account for relationship between arguments of operations in sygus normal form .TP .B "sygusNormalFormGlobal" (bool, default = true) .br narrow sygus search space based on global state of current candidate program .TP .B "sygusNormalFormGlobalGen" (bool, default = true) .br generalize lemmas for global search space narrowing .TP .B "sygusNormalFormGlobalArg" (bool, default = true) .br generalize based on arguments in global search space narrowing .TP .B "sygusNormalFormGlobalContent" (bool, default = true) .br generalize based on content in global search space narrowing .TP .B "sygusInvTemplMode" (CVC4::theory::quantifiers::SygusInvTemplMode, default = CVC4::theory::quantifiers::SYGUS_INV_TEMPL_MODE_NONE) .br template mode for sygus invariant synthesis .TP .B "sygusUnifCondSol" (bool, default = false) .br enable approach which unifies conditional solutions .TP .B "sygusDirectEval" (bool, default = true) .br direct unfolding of evaluation functions .TP .B "sygusCRefEval" (bool, default = false) .br direct evaluation of refinement lemmas for conflict analysis .TP .B "cbqi" (bool, default = false) .br turns on counterexample\-based quantifier instantiation .TP .B "recurseCbqi" (bool, default = true) .br turns on recursive counterexample\-based quantifier instantiation .TP .B "cbqiSat" (bool, default = true) .br answer sat when quantifiers are asserted with counterexample\-based quantifier instantiation .TP .B "cbqiModel" (bool, default = true) .br guide instantiations by model values for counterexample\-based quantifier instantiation .TP .B "cbqiAll" (bool, default = false) .br apply counterexample\-based instantiation to all quantified formulas .TP .B "cbqiUseInfInt" (bool, default = false) .br use integer infinity for vts in counterexample\-based quantifier instantiation .TP .B "cbqiUseInfReal" (bool, default = false) .br use real infinity for vts in counterexample\-based quantifier instantiation .TP .B "cbqiPreRegInst" (bool, default = false) .br preregister ground instantiations in counterexample\-based quantifier instantiation .TP .B "cbqiMinBounds" (bool, default = false) .br use minimally constrained lower/upper bound for counterexample\-based quantifier instantiation .TP .B "cbqiRoundUpLowerLia" (bool, default = false) .br round up integer lower bounds in substitutions for counterexample\-based quantifier instantiation .TP .B "cbqiMidpoint" (bool, default = false) .br choose substitutions based on midpoints of lower and upper bounds for counterexample\-based quantifier instantiation .TP .B "cbqiNopt" (bool, default = true) .br non\-optimal bounds for counterexample\-based quantifier instantiation .TP .B "cbqiLitDepend" (bool, default = true) .br dependency lemmas for quantifier alternation in counterexample\-based quantifier instantiation .TP .B "cbqiInnermost" (bool, default = true) .br only process innermost quantified formulas in counterexample\-based quantifier instantiation .TP .B "cbqiNestedQE" (bool, default = false) .br process nested quantified formulas with quantifier elimination in counterexample\-based quantifier instantiation .TP .B "quantEpr" (bool, default = false) .br infer whether in effectively propositional fragment, use for cbqi .TP .B "quantEprMatching" (bool, default = true) .br use matching heuristics for EPR instantiation .TP .B "localTheoryExt" (bool, default = false) .br do instantiation based on local theory extensions .TP .B "ltePartialInst" (bool, default = false) .br partially instantiate local theory quantifiers .TP .B "lteRestrictInstClosure" (bool, default = false) .br treat arguments of inst closure as restricted terms for instantiation .TP .B "quantAlphaEquiv" (bool, default = true) .br infer alpha equivalence between quantified formulas .TP .B "macrosQuant" (bool, default = false) .br perform quantifiers macro expansion .TP .B "macrosQuantMode" (CVC4::theory::quantifiers::MacrosQuantMode, default = CVC4::theory::quantifiers::MACROS_QUANT_MODE_GROUND_UF) .br mode for quantifiers macro expansion .TP .B "quantDynamicSplit" (CVC4::theory::quantifiers::QuantDSplitMode, default = CVC4::theory::quantifiers::QUANT_DSPLIT_MODE_NONE) .br mode for dynamic quantifiers splitting .TP .B "quantAntiSkolem" (bool, default = false) .br perform anti\-skolemization for quantified formulas .TP .B "quantEqualityEngine" (bool, default = false) .br maintain congrunce closure over universal equalities .TP .B "trackInstLemmas" (bool, default = false) .br track instantiation lemmas (for proofs, unsat cores, qe and synthesis minimization) .TP .I "SEP OPTIONS" .TP .B "sepCheckNeg" (bool, default = true) .br check negated spatial assertions .TP .B "sepExp" (bool, default = false) .br experimental flag for sep .TP .B "sepMinimalRefine" (bool, default = false) .br only add refinement lemmas for minimal (innermost) assertions .TP .B "sepDisequalC" (bool, default = true) .br assume cardinality elements are distinct .TP .B "sepPreSkolemEmp" (bool, default = false) .br eliminate emp constraint at preprocess time .TP .B "sepChildRefine" (bool, default = false) .br child\-specific refinements of negated star, positive wand .TP .I "SETS OPTIONS" .TP .B "setsProxyLemmas" (bool, default = false) .br introduce proxy variables eagerly to shorten lemmas .TP .B "setsInferAsLemmas" (bool, default = true) .br send inferences as lemmas .TP .B "setsRelEager" (bool, default = true) .br standard effort checks for relations .TP .B "setsExt" (bool, default = false) .br enable extended symbols such as complement and universe in theory of sets .TP .I "SMT LAYER OPTIONS" .TP .B "forceLogicString" (std::string) .br set the logic, and override all further user attempts to change it (EXPERTS only) .TP .B "simplificationMode" (SimplificationMode, default = SIMPLIFICATION_MODE_BATCH) .br choose simplification mode, see \-\-simplification=help .TP .B "doStaticLearning" (bool, default = true) .br use static learning (on by default) .TP .B "expandDefinitions" (bool, default = false) .br always expand symbol definitions in output .TP .B "checkModels" (bool) .br after SAT/INVALID/UNKNOWN, check that the generated model satisfies user assertions .TP .B "dumpModels" (bool, default = false) .br output models after every SAT/INVALID/UNKNOWN response .TP .B "omitDontCares" (bool, default = false) .br When producing a model, omit variables whose value does not matter .TP .B "proof" (bool, default = false) .br turn on proof generation .TP .B "checkProofs" (bool) .br after UNSAT/VALID, machine\-check the generated proof .TP .B "dumpProofs" (bool, default = false) .br output proofs after every UNSAT/VALID response .TP .B "dumpInstantiations" (bool, default = false) .br output instantiations of quantified formulas after every UNSAT/VALID response .TP .B "dumpSynth" (bool, default = false) .br output solution for synthesis conjectures after every UNSAT/VALID response .TP .B "unsatCores" (bool) .br turn on unsat core generation .TP .B "checkUnsatCores" (bool) .br after UNSAT/VALID, produce and check an unsat core (expensive) .TP .B "dumpUnsatCores" (bool, default = false) .br output unsat cores after every UNSAT/VALID response .TP .B "dumpUnsatCoresFull" (bool, default = false) .br dump the full unsat core, including unlabeled assertions .TP .B "produceAssignments" (bool, default = false) .br support the get\-assignment command .TP .B "interactiveMode" (bool) .br deprecated name for produce\-assertions .TP .B "doITESimp" (bool) .br turn on ite simplification (Kim (and Somenzi) et al., SAT 2009) .TP .B "doITESimpOnRepeat" (bool, default = false) .br do the ite simplification pass again if repeating simplification .TP .B "simplifyWithCareEnabled" (bool, default = false) .br enables simplifyWithCare in ite simplificiation .TP .B "compressItes" (bool, default = false) .br enables compressing ites after ite simplification .TP .B "unconstrainedSimp" (bool, default = false) .br turn on unconstrained simplification (see Bruttomesso/Brummayer PhD thesis) .TP .B "repeatSimp" (bool) .br make multiple passes with nonclausal simplifier .TP .B "zombieHuntThreshold" (uint32_t, default = 524288) .br post ite compression enables zombie removal while the number of nodes is above this threshold .TP .B "sortInference" (bool, default = false) .br calculate sort inference of input problem, convert the input based on monotonic sorts .TP .B "abstractValues" (bool, default = false) .br in models, output arrays (and in future, maybe others) using abstract values, as required by the SMT\-LIB standard .TP .B "modelUninterpDtEnum" (bool, default = false) .br in models, output uninterpreted sorts as datatype enumerations .TP .B "regularChannelName" (std::string) .br set the regular output channel of the solver .TP .B "diagnosticChannelName" (std::string) .br set the diagnostic output channel of the solver .TP .B "rewriteStep" (unsigned, default = 1) .br amount of resources spent for each rewrite step (EXPERTS only) .TP .B "theoryCheckStep" (unsigned, default = 1) .br amount of resources spent for each theory check call (EXPERTS only) .TP .B "decisionStep" (unsigned, default = 1) .br amount of getNext decision calls in the decision engine (EXPERTS only) .TP .B "bitblastStep" (unsigned, default = 1) .br amount of resources spent for each bitblast step (EXPERTS only) .TP .B "parseStep" (unsigned, default = 1) .br amount of resources spent for each command/expression parsing (EXPERTS only) .TP .B "lemmaStep" (unsigned, default = 1) .br amount of resources spent when adding lemmas (EXPERTS only) .TP .B "restartStep" (unsigned, default = 1) .br amount of resources spent for each theory restart (EXPERTS only) .TP .B "cnfStep" (unsigned, default = 1) .br amount of resources spent for each call to cnf conversion (EXPERTS only) .TP .B "preprocessStep" (unsigned, default = 1) .br amount of resources spent for each preprocessing step in SmtEngine (EXPERTS only) .TP .B "quantifierStep" (unsigned, default = 1) .br amount of resources spent for quantifier instantiations (EXPERTS only) .TP .B "satConflictStep" (unsigned, default = 1) .br amount of resources spent for each sat conflict (main sat solver) (EXPERTS only) .TP .B "bvSatConflictStep" (unsigned, default = 1) .br amount of resources spent for each sat conflict (bitvectors) (EXPERTS only) .TP .B "rewriteApplyToConst" (bool, default = false) .br eliminate function applications, rewriting e.g. f(5) to a new symbol f_5 (EXPERTS only) .TP .B "replayInputFilename" (std::string) .br replay decisions from file .TP .B "replayLogFilename" (std::string) .br replay decisions from file .TP .B "forceNoLimitCpuWhileDump" (bool, default = false) .br Force no CPU limit when dumping models and proofs .TP .B "solveIntAsBV" (uint32_t, default = 0) .br attempt to solve a pure integer satisfiable problem by bitblasting in sufficient bitwidth (experimental) .TP .B "solveRealAsInt" (bool, default = false) .br attempt to solve a pure real satisfiable problem as a integer problem (for non\-linear) .TP .I "STRINGS THEORY OPTIONS" .TP .B "stringExp" (bool, default = false) .br experimental features in the theory of strings .TP .B "stringLB" (unsigned, default = 0) .br the strategy of LB rule application: 0\-lazy, 1\-eager, 2\-no .TP .B "stdASCII" (bool, default = true) .br the alphabet contains only characters from the standard ASCII or the extended one .TP .B "stringFMF" (bool, default = false) .br the finite model finding used by the theory of strings .TP .B "stringEager" (bool, default = false) .br strings eager check .TP .B "stringEIT" (bool, default = false) .br the eager intersection used by the theory of strings .TP .B "stringOpt1" (bool, default = true) .br internal option1 for strings: normal form .TP .B "stringOpt2" (bool, default = false) .br internal option2 for strings: constant regexp splitting .TP .B "stringIgnNegMembership" (bool, default = false) .br internal for strings: ignore negative membership constraints (fragment checking is needed, left to users for now) .TP .B "stringLazyPreproc" (bool, default = true) .br perform string preprocessing lazily .TP .B "stringLenGeqZ" (bool, default = false) .br strings length greater than zero lemmas .TP .B "stringLenNorm" (bool, default = true) .br strings length normalization lemma .TP .B "stringSplitEmp" (bool, default = true) .br strings split on empty string .TP .B "stringInferSym" (bool, default = true) .br strings split on empty string .TP .B "stringEagerLen" (bool, default = true) .br strings eager length lemmas .TP .B "stringCheckEntailLen" (bool, default = true) .br check entailment between length terms to reduce splitting .TP .B "stringProcessLoop" (bool, default = true) .br reduce looping word equations to regular expressions .TP .B "stringAbortLoop" (bool, default = false) .br abort when a looping word equation is encountered .TP .B "stringInferAsLemmas" (bool, default = false) .br always send lemmas out instead of making internal inferences .TP .B "stringRExplainLemmas" (bool, default = true) .br regression explanations for string lemmas .TP .B "stringMinPrefixExplain" (bool, default = true) .br minimize explanations for prefix of normal forms in strings .TP .B "stringGuessModel" (bool, default = false) .br use model guessing to avoid string extended function reductions .TP .B "stringUfReduct" (bool, default = false) .br use uninterpreted functions when applying extended function reductions .TP .B "stringBinaryCsp" (bool, default = false) .br use binary search when splitting strings .TP .B "stringLenPropCsp" (bool, default = false) .br do length propagation based on constant splits .TP .I "THEORY LAYER OPTIONS" .TP .B "theoryOfMode" (CVC4::theory::TheoryOfMode, default = CVC4::theory::THEORY_OF_TYPE_BASED) .br mode for Theory::theoryof() (EXPERTS only) .TP .B "useTheoryList" (std::string) .br use alternate theory implementation NAME (\-\-use\-theory=help for a list). This option may be repeated or a comma separated list. .TP .I "UNINTERPRETED FUNCTIONS THEORY OPTIONS" .TP .B "ufSymmetryBreaker" (bool, default = true) .br use UF symmetry breaker (Deharbe et al., CADE 2011) .TP .B "condenseFunctionValues" (bool, default = true) .br condense models for functions rather than explicitly representing them .TP .B "ufssRegions" (bool, default = true) .br disable region\-based method for discovering cliques and splits in uf strong solver .TP .B "ufssEagerSplits" (bool, default = false) .br add splits eagerly for uf strong solver .TP .B "ufssTotality" (bool, default = false) .br always use totality axioms for enforcing cardinality constraints .TP .B "ufssTotalityLimited" (int, default = \-1) .br apply totality axioms, but only up to cardinality N (\-1 == do not apply totality axioms, default) .TP .B "ufssTotalitySymBreak" (bool, default = false) .br apply symmetry breaking for totality axioms .TP .B "ufssAbortCardinality" (int, default = \-1) .br tells the uf strong solver a cardinality to abort at (\-1 == no limit, default) .TP .B "ufssExplainedCliques" (bool, default = false) .br use explained clique lemmas for uf strong solver .TP .B "ufssSimpleCliques" (bool, default = true) .br always use simple clique lemmas for uf strong solver .TP .B "ufssDiseqPropagation" (bool, default = false) .br eagerly propagate disequalities for uf strong solver .TP .B "ufssMode" (CVC4::theory::uf::UfssMode, default = CVC4::theory::uf::UF_SS_FULL) .br mode of operation for uf strong solver. .TP .B "ufssCliqueSplits" (bool, default = false) .br use cliques instead of splitting on demand to shrink model .TP .B "ufssSymBreak" (bool, default = false) .br finite model finding symmetry breaking techniques .TP .B "ufssFairness" (bool, default = true) .br use fair strategy for finite model finding multiple sorts .TP .B "ufssFairnessMonotone" (bool, default = false) .br group monotone sorts when enforcing fairness for finite model finding .PD .RE .ad b .SH VERSION This manual page refers to .B CVC4 version 1.5. .SH BUGS A Bugzilla for the CVC4 project is maintained at .BR http://cvc4.cs.nyu.edu/bugzilla3/ . .SH AUTHORS .B CVC4 is developed by a team of researchers at New York University and the University of Iowa. See the AUTHORS file in the distribution for a full list of contributors. .SH "SEE ALSO" .BR libcvc4 (3), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/doc/options.3cvc_template.in000066400000000000000000000016701313116454100175410ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii options.3cvc .\" .TH OPTIONS 3cvc "@MAN_DATE@" "CVC4 release @VERSION@" "CVC4 Internals Documentation" .SH NAME options \- the options infrastructure .SH AVAILABLE INTERNAL OPTIONS .ad l .RS .TP 10 .I "COMMON OPTIONS" ${common_manpage_internals_documentation} ${remaining_manpage_internals_documentation} .PD .RE .ad b .SH VERSION This manual page refers to .B CVC4 version @VERSION@. .SH BUGS A Bugzilla for the CVC4 project is maintained at .BR http://cvc4.cs.nyu.edu/bugzilla3/ . .SH AUTHORS .B CVC4 is developed by a team of researchers at New York University and the University of Iowa. See the AUTHORS file in the distribution for a full list of contributors. .SH "SEE ALSO" .BR libcvc4 (3), .BR libcvc4parser (3), .BR libcvc4compat (3) Additionally, the CVC4 wiki contains useful information about the design and internals of CVC4. It is maintained at .BR http://cvc4.cs.nyu.edu/wiki/ . cvc4-1.5/examples/000077500000000000000000000000001313116454100140335ustar00rootroot00000000000000cvc4-1.5/examples/Makefile.am000066400000000000000000000042031313116454100160660ustar00rootroot00000000000000SUBDIRS = nra-translate sets-translate hashsmt api . AM_CPPFLAGS = \ -I@srcdir@/../src/include -I@srcdir@/../src -I@builddir@/../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_PROGRAMS = \ simple_vc_cxx \ translator if CVC4_BUILD_LIBCOMPAT noinst_PROGRAMS += \ simple_vc_compat_cxx if CVC4_LANGUAGE_BINDING_C noinst_PROGRAMS += \ simple_vc_compat_c endif endif noinst_DATA = if CVC4_LANGUAGE_BINDING_JAVA noinst_DATA += \ SimpleVC.class if CVC4_BUILD_LIBCOMPAT noinst_DATA += \ SimpleVCCompat.class endif endif simple_vc_cxx_SOURCES = \ simple_vc_cxx.cpp simple_vc_cxx_LDADD = \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la simple_vc_compat_cxx_SOURCES = \ simple_vc_compat_cxx.cpp simple_vc_compat_cxx_LDADD = \ @builddir@/../src/compat/libcvc4compat.la \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la simple_vc_compat_c_SOURCES = \ simple_vc_compat_c.c simple_vc_compat_c_LDADD = \ @builddir@/../src/bindings/compat/c/libcvc4bindings_c_compat.la translator_SOURCES = \ translator.cpp translator_LDADD = \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la SimpleVC.class: SimpleVC.java $(AM_V_JAVAC)$(JAVAC) -classpath "@builddir@/../src/bindings/CVC4.jar" -d "@builddir@" $< SimpleVCCompat.class: SimpleVCCompat.java $(AM_V_JAVAC)$(JAVAC) -classpath "@builddir@/../src/bindings/compat/java/CVC4compat.jar" -d "@builddir@" $< EXTRA_DIST = \ SimpleVC.java \ SimpleVCCompat.java \ SimpleVC.ml \ SimpleVC.php \ SimpleVC.pl \ SimpleVC.py \ SimpleVC.rb \ SimpleVC.tcl \ README if STATIC_BINARY simple_vc_cxx_LINK = $(CXXLINK) -all-static simple_vc_compat_cxx_LINK = $(CXXLINK) -all-static simple_vc_compat_c_LINK = $(LINK) -all-static else simple_vc_cxx_LINK = $(CXXLINK) simple_vc_compat_cxx_LINK = $(CXXLINK) simple_vc_compat_c_LINK = $(LINK) endif # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) MOSTLYCLEANFILES = $(noinst_DATA) # for silent automake rules AM_V_JAVAC = $(am__v_JAVAC_$(V)) am__v_JAVAC_ = $(am__v_JAVAC_$(AM_DEFAULT_VERBOSITY)) am__v_JAVAC_0 = @echo " JAVAC " $@; cvc4-1.5/examples/Makefile.in000066400000000000000000001067271313116454100161150ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ noinst_PROGRAMS = simple_vc_cxx$(EXEEXT) translator$(EXEEXT) \ $(am__EXEEXT_1) $(am__EXEEXT_2) @CVC4_BUILD_LIBCOMPAT_TRUE@am__append_1 = \ @CVC4_BUILD_LIBCOMPAT_TRUE@ simple_vc_compat_cxx @CVC4_BUILD_LIBCOMPAT_TRUE@@CVC4_LANGUAGE_BINDING_C_TRUE@am__append_2 = \ @CVC4_BUILD_LIBCOMPAT_TRUE@@CVC4_LANGUAGE_BINDING_C_TRUE@ simple_vc_compat_c @CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_3 = \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ SimpleVC.class @CVC4_BUILD_LIBCOMPAT_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_4 = \ @CVC4_BUILD_LIBCOMPAT_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ SimpleVCCompat.class subdir = examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @CVC4_BUILD_LIBCOMPAT_TRUE@am__EXEEXT_1 = \ @CVC4_BUILD_LIBCOMPAT_TRUE@ simple_vc_compat_cxx$(EXEEXT) @CVC4_BUILD_LIBCOMPAT_TRUE@@CVC4_LANGUAGE_BINDING_C_TRUE@am__EXEEXT_2 = simple_vc_compat_c$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_simple_vc_compat_c_OBJECTS = simple_vc_compat_c.$(OBJEXT) simple_vc_compat_c_OBJECTS = $(am_simple_vc_compat_c_OBJECTS) simple_vc_compat_c_DEPENDENCIES = @builddir@/../src/bindings/compat/c/libcvc4bindings_c_compat.la am_simple_vc_compat_cxx_OBJECTS = simple_vc_compat_cxx.$(OBJEXT) simple_vc_compat_cxx_OBJECTS = $(am_simple_vc_compat_cxx_OBJECTS) simple_vc_compat_cxx_DEPENDENCIES = \ @builddir@/../src/compat/libcvc4compat.la \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la am_simple_vc_cxx_OBJECTS = simple_vc_cxx.$(OBJEXT) simple_vc_cxx_OBJECTS = $(am_simple_vc_cxx_OBJECTS) simple_vc_cxx_DEPENDENCIES = \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la am_translator_OBJECTS = translator.$(OBJEXT) translator_OBJECTS = $(am_translator_OBJECTS) translator_DEPENDENCIES = @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(simple_vc_compat_c_SOURCES) \ $(simple_vc_compat_cxx_SOURCES) $(simple_vc_cxx_SOURCES) \ $(translator_SOURCES) DIST_SOURCES = $(simple_vc_compat_c_SOURCES) \ $(simple_vc_compat_cxx_SOURCES) $(simple_vc_cxx_SOURCES) \ $(translator_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) $(noinst_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ SUBDIRS = nra-translate sets-translate hashsmt api . AM_CPPFLAGS = \ -I@srcdir@/../src/include -I@srcdir@/../src -I@builddir@/../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_DATA = $(am__append_3) $(am__append_4) simple_vc_cxx_SOURCES = \ simple_vc_cxx.cpp simple_vc_cxx_LDADD = \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la simple_vc_compat_cxx_SOURCES = \ simple_vc_compat_cxx.cpp simple_vc_compat_cxx_LDADD = \ @builddir@/../src/compat/libcvc4compat.la \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la simple_vc_compat_c_SOURCES = \ simple_vc_compat_c.c simple_vc_compat_c_LDADD = \ @builddir@/../src/bindings/compat/c/libcvc4bindings_c_compat.la translator_SOURCES = \ translator.cpp translator_LDADD = \ @builddir@/../src/parser/libcvc4parser.la \ @builddir@/../src/libcvc4.la EXTRA_DIST = \ SimpleVC.java \ SimpleVCCompat.java \ SimpleVC.ml \ SimpleVC.php \ SimpleVC.pl \ SimpleVC.py \ SimpleVC.rb \ SimpleVC.tcl \ README @STATIC_BINARY_FALSE@simple_vc_cxx_LINK = $(CXXLINK) @STATIC_BINARY_TRUE@simple_vc_cxx_LINK = $(CXXLINK) -all-static @STATIC_BINARY_FALSE@simple_vc_compat_cxx_LINK = $(CXXLINK) @STATIC_BINARY_TRUE@simple_vc_compat_cxx_LINK = $(CXXLINK) -all-static @STATIC_BINARY_FALSE@simple_vc_compat_c_LINK = $(LINK) @STATIC_BINARY_TRUE@simple_vc_compat_c_LINK = $(LINK) -all-static # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) MOSTLYCLEANFILES = $(noinst_DATA) # for silent automake rules AM_V_JAVAC = $(am__v_JAVAC_$(V)) am__v_JAVAC_ = $(am__v_JAVAC_$(AM_DEFAULT_VERBOSITY)) am__v_JAVAC_0 = @echo " JAVAC " $@; all: all-recursive .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_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 simple_vc_compat_c$(EXEEXT): $(simple_vc_compat_c_OBJECTS) $(simple_vc_compat_c_DEPENDENCIES) $(EXTRA_simple_vc_compat_c_DEPENDENCIES) @rm -f simple_vc_compat_c$(EXEEXT) $(AM_V_GEN)$(simple_vc_compat_c_LINK) $(simple_vc_compat_c_OBJECTS) $(simple_vc_compat_c_LDADD) $(LIBS) simple_vc_compat_cxx$(EXEEXT): $(simple_vc_compat_cxx_OBJECTS) $(simple_vc_compat_cxx_DEPENDENCIES) $(EXTRA_simple_vc_compat_cxx_DEPENDENCIES) @rm -f simple_vc_compat_cxx$(EXEEXT) $(AM_V_GEN)$(simple_vc_compat_cxx_LINK) $(simple_vc_compat_cxx_OBJECTS) $(simple_vc_compat_cxx_LDADD) $(LIBS) simple_vc_cxx$(EXEEXT): $(simple_vc_cxx_OBJECTS) $(simple_vc_cxx_DEPENDENCIES) $(EXTRA_simple_vc_cxx_DEPENDENCIES) @rm -f simple_vc_cxx$(EXEEXT) $(AM_V_GEN)$(simple_vc_cxx_LINK) $(simple_vc_cxx_OBJECTS) $(simple_vc_cxx_LDADD) $(LIBS) translator$(EXEEXT): $(translator_OBJECTS) $(translator_DEPENDENCIES) $(EXTRA_translator_DEPENDENCIES) @rm -f translator$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(translator_OBJECTS) $(translator_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_vc_compat_c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_vc_compat_cxx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple_vc_cxx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/translator.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)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@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || 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)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(examplesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-examplesDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-examplesDATA .PRECIOUS: Makefile SimpleVC.class: SimpleVC.java $(AM_V_JAVAC)$(JAVAC) -classpath "@builddir@/../src/bindings/CVC4.jar" -d "@builddir@" $< SimpleVCCompat.class: SimpleVCCompat.java $(AM_V_JAVAC)$(JAVAC) -classpath "@builddir@/../src/bindings/compat/java/CVC4compat.jar" -d "@builddir@" $< # 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: cvc4-1.5/examples/README000066400000000000000000000026241313116454100147170ustar00rootroot00000000000000This directory contains usage examples of CVC4's different language bindings, library APIs, and also tutorial examples from the tutorials available at http://cvc4.cs.nyu.edu/wiki/Tutorials *** Files named SimpleVC*, simple_vc* These are examples of how to use CVC4 with each of its library interfaces (APIs) and language bindings. They are essentially "hello world" examples, and do not fully demonstrate the interfaces, but function as a starting point to using simple expressions and solving functionality through each library. *** Targeted examples The "api" directory contains some more specifically-targeted examples (for bitvectors, for arithmetic, etc.). The "api/java" directory contains the same examples in Java. *** Installing example source code Examples are not automatically installed by "make install". If you wish to install them, use "make install-examples" after you configure your CVC4 source tree. They'll appear in your documentation directory, under the "examples" subdirectory (so, by default, in /usr/local/share/doc/cvc4/examples). *** Building examples Examples can be built as a separate step, after building CVC4 from source. After building CVC4, you can run "make examples". You'll find the built binaries in builds/examples (or just in "examples" if you configured a build directory outside of the source tree). -- Morgan Deters Tue, 24 Dec 2013 09:12:59 -0500 cvc4-1.5/examples/SimpleVC.java000066400000000000000000000045161313116454100163660ustar00rootroot00000000000000/********************* */ /*! \file SimpleVC.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the Java interface ** ** A simple demonstration of the Java interface. ** ** To run the resulting class file, you need to do something like the ** following: ** ** java \ ** -classpath path/to/CVC4.jar \ ** -Djava.library.path=/dir/containing/java/CVC4.so \ ** SimpleVC ** ** For example, if you are building CVC4 without specifying your own ** build directory, the build process puts everything in builds/, and ** you can run this example (after building it with "make") like this: ** ** java \ ** -classpath builds/examples:builds/src/bindings/CVC4.jar \ ** -Djava.library.path=builds/src/bindings/java/.libs \ ** SimpleVC **/ import edu.nyu.acsys.CVC4.*; public class SimpleVC { public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); // Prove that for integers x and y: // x > 0 AND y > 0 => 2x + y >= 3 Type integer = em.integerType(); Expr x = em.mkVar("x", integer); Expr y = em.mkVar("y", integer); Expr zero = em.mkConst(new Rational(0)); Expr x_positive = em.mkExpr(Kind.GT, x, zero); Expr y_positive = em.mkExpr(Kind.GT, y, zero); Expr two = em.mkConst(new Rational(2)); Expr twox = em.mkExpr(Kind.MULT, two, x); Expr twox_plus_y = em.mkExpr(Kind.PLUS, twox, y); Expr three = em.mkConst(new Rational(3)); Expr twox_plus_y_geq_3 = em.mkExpr(Kind.GEQ, twox_plus_y, three); Expr formula = new Expr(em.mkExpr(Kind.AND, x_positive, y_positive)). impExpr(new Expr(twox_plus_y_geq_3)); System.out.println("Checking validity of formula " + formula + " with CVC4."); System.out.println("CVC4 should report VALID."); System.out.println("Result from CVC4 is: " + smt.query(formula)); } } cvc4-1.5/examples/SimpleVC.ml000066400000000000000000000063501313116454100160530ustar00rootroot00000000000000(********************* ** **! \file SimpleVC.ml *** \verbatim *** Original author: mdeters *** Major contributors: none *** Minor contributors (to current version): none *** This file is part of the CVC4 prototype. *** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) *** Courant Institute of Mathematical Sciences *** New York University *** See the file COPYING in the top-level source directory for licensing *** information.\endverbatim *** *** \brief A simple demonstration of the OCaml interface *** *** A simple demonstration of the OCaml interface. Compare to the *** C++ interface in simple_vc_cxx.cpp; they are quite similar. *** *** To run, use something like: *** *** LD_LIBRARY_PATH=../builds/src/bindings/ocaml/.libs \ *** ../builds/src/bindings/cvc4_ocaml_top -I ../builds/src/bindings/ocaml \ *** SimpleVC.ml *** *** After you "make install" CVC4, it's much easier; the cvc4_ocaml_top goes in *** $prefix/bin, and it's automatically set up the load the .cmo and .cmi files *** from $prefix/lib/ocaml/cvc4, in which they get installed. Then you just *** have to: cvc4_ocaml_top -I $prefix/lib/ocaml/cvc4 ***) open Swig open CVC4 let em = new_ExprManager '() let smt = new_SmtEngine(em) (* Prove that for integers x and y: * x > 0 AND y > 0 => 2x + y >= 3 *) let integer = em->integerType() let x = em->mkVar(integer) (* em->mkVar("x", integer) *) let y = em->mkVar(integer) (* em->mkVar("y", integer) *) let integerZero = new_Integer '("0", 10) let zero = em->mkConst(integerZero) (* OK, this is really strange. We can call mkExpr(36, ...) for * example, with the int value of the operator Kind we want, * or we can compute it. But if we compute it, we have to rip * it out of its C_int, then wrap it again a C_int, in order * for the parser to make it go through. *) let geq = C_int (get_int (enum_to_int `Kind_t (``GEQ))) let gt = C_int (get_int (enum_to_int `Kind_t (``GT))) let mult = C_int (get_int (enum_to_int `Kind_t (``MULT))) let plus = C_int (get_int (enum_to_int `Kind_t (``PLUS))) let and_kind = C_int (get_int (enum_to_int `Kind_t (``AND))) let implies = C_int (get_int (enum_to_int `Kind_t (``IMPLIES))) (* gt = 35, but the parser screws up if we put "geq" what follows *) let x_positive = em->mkExpr(gt, x, zero) let y_positive = em->mkExpr(gt, y, zero) let integerTwo = new_Integer '("2", 10) let two = em->mkConst(integerTwo) let twox = em->mkExpr(mult, two, x) let twox_plus_y = em->mkExpr(plus, twox, y) let integerThree = new_Integer '("3", 10) let three = em->mkConst(integerThree) let twox_plus_y_geq_3 = em->mkExpr(geq, twox_plus_y, three) let lhs = em->mkExpr(and_kind, x_positive, y_positive) (* This fails for some reason. *) (* let rhs = new_Expr(twox_plus_y_geq_3) let formula = new_Expr(lhs)->impExpr(rhs) *) let formula = em->mkExpr(implies, lhs, twox_plus_y_geq_3) let bformula = new_Expr(formula) in print_string "Checking validity of formula " ; print_string (get_string (formula->toString ())) ; print_string " with CVC4." ; print_newline () ; print_string "CVC4 should report VALID." ; print_newline () ; print_string "Result from CVC4 is: " ; print_string (get_string (smt->query(bformula)->toString ())) ; print_newline () ;; cvc4-1.5/examples/SimpleVC.php000077500000000000000000000034741313116454100162410ustar00rootroot00000000000000#! /usr/bin/php ##! \file SimpleVC.php ### \verbatim ### Original author: mdeters ### Major contributors: none ### Minor contributors (to current version): none ### This file is part of the CVC4 prototype. ### Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) ### Courant Institute of Mathematical Sciences ### New York University ### See the file COPYING in the top-level source directory for licensing ### information.\endverbatim ### ### \brief A simple demonstration of the PHP interface ### ### A simple demonstration of the PHP interface. Compare to the ### C++ interface in simple_vc_cxx.cpp; they are quite similar. ### ### To run, use something like: ### ### ln -s ../builds/src/bindings/php/.libs/CVC4.so CVC4.so ### ln -s ../builds/src/bindings/php/CVC4.php CVC4.php ### ./SimpleVC.php #### use strict; use CVC4; my $em = new CVC4::ExprManager(); my $smt = new CVC4::SmtEngine($em); # Prove that for integers x and y: # x > 0 AND y > 0 => 2x + y >= 3 my $integer = $em->integerType(); my $x = $em->mkVar("x", $integer); my $y = $em->mkVar("y", $integer); my $zero = $em->mkConst(new CVC4::Integer(0)); my $x_positive = $em->mkExpr($CVC4::GT, $x, $zero); my $y_positive = $em->mkExpr($CVC4::GT, $y, $zero); my $two = $em->mkConst(new CVC4::Integer(2)); my $twox = $em->mkExpr($CVC4::MULT, $two, $x); my $twox_plus_y = $em->mkExpr($CVC4::PLUS, $twox, $y); my $three = $em->mkConst(new CVC4::Integer(3)); my $twox_plus_y_geq_3 = $em->mkExpr($CVC4::GEQ, $twox_plus_y, $three); my $formula = new CVC4::Expr($em->mkExpr($CVC4::AND, $x_positive, $y_positive))->impExpr(new CVC4::Expr($twox_plus_y_geq_3)); print "Checking validity of formula " . $formula->toString() . " with CVC4.\n"; print "CVC4 should report VALID.\n"; print "Result from CVC4 is: " . $smt->query($formula)->toString() . "\n"; cvc4-1.5/examples/SimpleVC.pl000077500000000000000000000035001313116454100160530ustar00rootroot00000000000000#! /usr/bin/perl -w ##! \file SimpleVC.pl ### \verbatim ### Original author: mdeters ### Major contributors: none ### Minor contributors (to current version): none ### This file is part of the CVC4 prototype. ### Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) ### Courant Institute of Mathematical Sciences ### New York University ### See the file COPYING in the top-level source directory for licensing ### information.\endverbatim ### ### \brief A simple demonstration of the Perl interface ### ### A simple demonstration of the Perl interface. Compare to the ### C++ interface in simple_vc_cxx.cpp; they are quite similar. ### ### To run, use something like: ### ### ln -s ../builds/src/bindings/perl/.libs/CVC4.so CVC4.so ### ln -s ../builds/src/bindings/perl/CVC4.pm CVC4.pm ### ./SimpleVC.pl #### use strict; use CVC4; my $em = new CVC4::ExprManager(); my $smt = new CVC4::SmtEngine($em); # Prove that for integers x and y: # x > 0 AND y > 0 => 2x + y >= 3 my $integer = $em->integerType(); my $x = $em->mkVar("x", $integer); my $y = $em->mkVar("y", $integer); my $zero = $em->mkConst(new CVC4::Integer(0)); my $x_positive = $em->mkExpr($CVC4::GT, $x, $zero); my $y_positive = $em->mkExpr($CVC4::GT, $y, $zero); my $two = $em->mkConst(new CVC4::Integer(2)); my $twox = $em->mkExpr($CVC4::MULT, $two, $x); my $twox_plus_y = $em->mkExpr($CVC4::PLUS, $twox, $y); my $three = $em->mkConst(new CVC4::Integer(3)); my $twox_plus_y_geq_3 = $em->mkExpr($CVC4::GEQ, $twox_plus_y, $three); my $formula = new CVC4::Expr($em->mkExpr($CVC4::AND, $x_positive, $y_positive))->impExpr(new CVC4::Expr($twox_plus_y_geq_3)); print "Checking validity of formula " . $formula->toString() . " with CVC4.\n"; print "CVC4 should report VALID.\n"; print "Result from CVC4 is: " . $smt->query($formula)->toString() . "\n"; cvc4-1.5/examples/SimpleVC.py000077500000000000000000000034351313116454100160770ustar00rootroot00000000000000#! /usr/bin/python ##! \file SimpleVC.py ### \verbatim ### Original author: mdeters ### Major contributors: none ### Minor contributors (to current version): none ### This file is part of the CVC4 prototype. ### Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) ### Courant Institute of Mathematical Sciences ### New York University ### See the file COPYING in the top-level source directory for licensing ### information.\endverbatim ### ### \brief A simple demonstration of the Python interface ### ### A simple demonstration of the Python interface. Compare to the ### C++ interface in simple_vc_cxx.cpp; they are quite similar. ### ### To run, use something like: ### ### ln -s ../builds/src/bindings/python/CVC4.py CVC4.py ### ln -s ../builds/src/bindings/python/.libs/CVC4.so _CVC4.so ### ./SimpleVC.py #### import CVC4 from CVC4 import ExprManager, SmtEngine, Rational, Expr import sys def main(): em = ExprManager() smt = SmtEngine(em) # Prove that for integers x and y: # x > 0 AND y > 0 => 2x + y >= 3 integer = em.integerType() x = em.mkVar("x", integer) y = em.mkVar("y", integer) zero = em.mkConst(Rational(0)) x_positive = em.mkExpr(CVC4.GT, x, zero) y_positive = em.mkExpr(CVC4.GT, y, zero) two = em.mkConst(Rational(2)) twox = em.mkExpr(CVC4.MULT, two, x) twox_plus_y = em.mkExpr(CVC4.PLUS, twox, y) three = em.mkConst(Rational(3)) twox_plus_y_geq_3 = em.mkExpr(CVC4.GEQ, twox_plus_y, three) formula = Expr(em.mkExpr(CVC4.AND, x_positive, y_positive)).impExpr(Expr(twox_plus_y_geq_3)) print "Checking validity of formula " + formula.toString() + " with CVC4." print "CVC4 should report VALID." print "Result from CVC4 is: " + smt.query(formula).toString() return 0 if __name__ == '__main__': sys.exit(main()) cvc4-1.5/examples/SimpleVC.rb000077500000000000000000000031531313116454100160470ustar00rootroot00000000000000#! /usr/bin/ruby ##! \file SimpleVC.rb ### \verbatim ### Original author: mdeters ### Major contributors: none ### Minor contributors (to current version): none ### This file is part of the CVC4 prototype. ### Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) ### Courant Institute of Mathematical Sciences ### New York University ### See the file COPYING in the top-level source directory for licensing ### information.\endverbatim ### ### \brief A simple demonstration of the Ruby interface ### ### A simple demonstration of the Ruby interface. Compare to the ### C++ interface in simple_vc_cxx.cpp; they are quite similar. ### ### To run, use something like: ### ### ln -s ../builds/src/bindings/ruby/.libs/CVC4.so CVC4.so ### ./SimpleVC.rb #### require 'CVC4' include CVC4 # CVC4::Integer still has to be qualified em = ExprManager.new smt = SmtEngine.new(em) # Prove that for integers x and y: # x > 0 AND y > 0 => 2x + y >= 3 integer = em.integerType x = em.mkVar("x", integer) y = em.mkVar("y", integer) zero = em.mkConst(CVC4::Integer.new(0)) x_positive = em.mkExpr(GT, x, zero) y_positive = em.mkExpr(GT, y, zero) two = em.mkConst(CVC4::Integer.new(2)) twox = em.mkExpr(MULT, two, x) twox_plus_y = em.mkExpr(PLUS, twox, y) three = em.mkConst(CVC4::Integer.new(3)) twox_plus_y_geq_3 = em.mkExpr(GEQ, twox_plus_y, three) formula = Expr.new(em.mkExpr(AND, x_positive, y_positive)).impExpr(Expr.new(twox_plus_y_geq_3)) puts "Checking validity of formula " + formula.toString + " with CVC4." puts "CVC4 should report VALID." puts "Result from CVC4 is: " + smt.query(formula).toString exit cvc4-1.5/examples/SimpleVC.tcl000077500000000000000000000033431313116454100162270ustar00rootroot00000000000000#! /usr/bin/tclsh ##! \file SimpleVC.tcl ### \verbatim ### Original author: mdeters ### Major contributors: none ### Minor contributors (to current version): none ### This file is part of the CVC4 prototype. ### Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys) ### Courant Institute of Mathematical Sciences ### New York University ### See the file COPYING in the top-level source directory for licensing ### information.\endverbatim ### ### \brief A simple demonstration of the Tcl interface ### ### A simple demonstration of the Tcl interface. Compare to the ### C++ interface in simple_vc_cxx.cpp; they are quite similar. ### ### To run, use something like: ### ### ln -s ../builds/src/bindings/tcl/.libs/CVC4.so CVC4.so ### ./SimpleVC.tcl #### load CVC4.so CVC4 ExprManager em SmtEngine smt em # Prove that for integers x and y: # x > 0 AND y > 0 => 2x + y >= 3 set integer [ExprManager_integerType em] set x [ExprManager_mkVar em "x" $integer] set y [ExprManager_mkVar em "y" $integer] set zero [ExprManager_mkConst em [Integer _ 0]] set x_positive [ExprManager_mkExpr em $GT $x $zero] set y_positive [ExprManager_mkExpr em $GT $y $zero] set two [ExprManager_mkConst em [Integer _ 2]] set twox [ExprManager_mkExpr em $MULT $two $x] set twox_plus_y [ExprManager_mkExpr em $PLUS $twox $y] set three [ExprManager_mkConst em [Integer _ 3]] set twox_plus_y_geq_3 [ExprManager_mkExpr em $GEQ $twox_plus_y $three] set formula [Expr_impExpr [Expr _1 [ExprManager_mkExpr em $AND $x_positive $y_positive]] [Expr _2 $twox_plus_y_geq_3]] puts "Checking validity of formula [Expr_toString $formula] with CVC4." puts "CVC4 should report VALID." puts "Result from CVC4 is: [Result_toString [SmtEngine_query smt $formula]]" cvc4-1.5/examples/SimpleVCCompat.java000066400000000000000000000045621313116454100175330ustar00rootroot00000000000000/********************* */ /*! \file SimpleVCCompat.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the Java compatibility interface ** (quite similar to the old CVC3 Java interface) ** ** A simple demonstration of the Java compatibility interface ** (quite similar to the old CVC3 Java interface). ** ** To run the resulting class file, you need to do something like the ** following: ** ** java \ ** -classpath path/to/CVC4compat.jar \ ** -Djava.library.path=/dir/containing/libcvc4bindings_java_compat.so \ ** SimpleVCCompat ** ** For example, if you are building CVC4 without specifying your own ** build directory, the build process puts everything in builds/, and ** you can run this example (after building it with "make") like this: ** ** java \ ** -classpath builds/examples:builds/src/bindings/compat/java/CVC4compat.jar \ ** -Djava.library.path=builds/src/bindings/compat/java/.libs \ ** SimpleVCCompat **/ import cvc3.*; public class SimpleVCCompat { public static void main(String[] args) { ValidityChecker vc = ValidityChecker.create(); // Prove that for integers x and y: // x > 0 AND y > 0 => 2x + y >= 3 Type integer = vc.intType(); Expr x = vc.varExpr("x", integer); Expr y = vc.varExpr("y", integer); Expr zero = vc.ratExpr(0); Expr x_positive = vc.gtExpr(x, zero); Expr y_positive = vc.gtExpr(y, zero); Expr two = vc.ratExpr(2); Expr twox = vc.multExpr(two, x); Expr twox_plus_y = vc.plusExpr(twox, y); Expr three = vc.ratExpr(3); Expr twox_plus_y_geq_3 = vc.geExpr(twox_plus_y, three); Expr formula = vc.impliesExpr(vc.andExpr(x_positive, y_positive), twox_plus_y_geq_3); System.out.println("Checking validity of formula " + formula + " with CVC4."); System.out.println("CVC4 should report VALID."); System.out.println("Result from CVC4 is: " + vc.query(formula)); } } cvc4-1.5/examples/api/000077500000000000000000000000001313116454100146045ustar00rootroot00000000000000cvc4-1.5/examples/api/Makefile.am000066400000000000000000000024571313116454100166500ustar00rootroot00000000000000SUBDIRS = . java AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_PROGRAMS = \ bitvectors \ bitvectors_and_arrays \ combination \ datatypes \ extract \ helloworld \ linear_arith \ sets \ strings noinst_DATA = bitvectors_SOURCES = \ bitvectors.cpp bitvectors_LDADD = \ @builddir@/../../src/libcvc4.la bitvectors_and_arrays_SOURCES = \ bitvectors_and_arrays.cpp bitvectors_and_arrays_LDADD = \ @builddir@/../../src/libcvc4.la combination_SOURCES = \ combination.cpp combination_LDADD = \ @builddir@/../../src/libcvc4.la datatypes_SOURCES = \ datatypes.cpp datatypes_LDADD = \ @builddir@/../../src/libcvc4.la extract_SOURCES = \ extract.cpp extract_LDADD = \ @builddir@/../../src/libcvc4.la helloworld_SOURCES = \ helloworld.cpp helloworld_CXXFLAGS = \ -DCVC4_MAKE_EXAMPLES helloworld_LDADD = \ @builddir@/../../src/libcvc4.la linear_arith_SOURCES = \ linear_arith.cpp linear_arith_LDADD = \ @builddir@/../../src/libcvc4.la sets_SOURCES = \ sets.cpp sets_LDADD = \ @builddir@/../../src/libcvc4.la strings_SOURCES = \ strings.cpp strings_LDADD = \ @builddir@/../../src/libcvc4.la # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) cvc4-1.5/examples/api/Makefile.in000066400000000000000000001074561313116454100166660ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ noinst_PROGRAMS = bitvectors$(EXEEXT) bitvectors_and_arrays$(EXEEXT) \ combination$(EXEEXT) datatypes$(EXEEXT) extract$(EXEEXT) \ helloworld$(EXEEXT) linear_arith$(EXEEXT) sets$(EXEEXT) \ strings$(EXEEXT) subdir = examples/api ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_bitvectors_OBJECTS = bitvectors.$(OBJEXT) bitvectors_OBJECTS = $(am_bitvectors_OBJECTS) bitvectors_DEPENDENCIES = @builddir@/../../src/libcvc4.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_bitvectors_and_arrays_OBJECTS = bitvectors_and_arrays.$(OBJEXT) bitvectors_and_arrays_OBJECTS = $(am_bitvectors_and_arrays_OBJECTS) bitvectors_and_arrays_DEPENDENCIES = @builddir@/../../src/libcvc4.la am_combination_OBJECTS = combination.$(OBJEXT) combination_OBJECTS = $(am_combination_OBJECTS) combination_DEPENDENCIES = @builddir@/../../src/libcvc4.la am_datatypes_OBJECTS = datatypes.$(OBJEXT) datatypes_OBJECTS = $(am_datatypes_OBJECTS) datatypes_DEPENDENCIES = @builddir@/../../src/libcvc4.la am_extract_OBJECTS = extract.$(OBJEXT) extract_OBJECTS = $(am_extract_OBJECTS) extract_DEPENDENCIES = @builddir@/../../src/libcvc4.la am_helloworld_OBJECTS = helloworld-helloworld.$(OBJEXT) helloworld_OBJECTS = $(am_helloworld_OBJECTS) helloworld_DEPENDENCIES = @builddir@/../../src/libcvc4.la helloworld_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(helloworld_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_linear_arith_OBJECTS = linear_arith.$(OBJEXT) linear_arith_OBJECTS = $(am_linear_arith_OBJECTS) linear_arith_DEPENDENCIES = @builddir@/../../src/libcvc4.la am_sets_OBJECTS = sets.$(OBJEXT) sets_OBJECTS = $(am_sets_OBJECTS) sets_DEPENDENCIES = @builddir@/../../src/libcvc4.la am_strings_OBJECTS = strings.$(OBJEXT) strings_OBJECTS = $(am_strings_OBJECTS) strings_DEPENDENCIES = @builddir@/../../src/libcvc4.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(bitvectors_SOURCES) $(bitvectors_and_arrays_SOURCES) \ $(combination_SOURCES) $(datatypes_SOURCES) $(extract_SOURCES) \ $(helloworld_SOURCES) $(linear_arith_SOURCES) $(sets_SOURCES) \ $(strings_SOURCES) DIST_SOURCES = $(bitvectors_SOURCES) $(bitvectors_and_arrays_SOURCES) \ $(combination_SOURCES) $(datatypes_SOURCES) $(extract_SOURCES) \ $(helloworld_SOURCES) $(linear_arith_SOURCES) $(sets_SOURCES) \ $(strings_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) $(noinst_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ SUBDIRS = . java AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_DATA = bitvectors_SOURCES = \ bitvectors.cpp bitvectors_LDADD = \ @builddir@/../../src/libcvc4.la bitvectors_and_arrays_SOURCES = \ bitvectors_and_arrays.cpp bitvectors_and_arrays_LDADD = \ @builddir@/../../src/libcvc4.la combination_SOURCES = \ combination.cpp combination_LDADD = \ @builddir@/../../src/libcvc4.la datatypes_SOURCES = \ datatypes.cpp datatypes_LDADD = \ @builddir@/../../src/libcvc4.la extract_SOURCES = \ extract.cpp extract_LDADD = \ @builddir@/../../src/libcvc4.la helloworld_SOURCES = \ helloworld.cpp helloworld_CXXFLAGS = \ -DCVC4_MAKE_EXAMPLES helloworld_LDADD = \ @builddir@/../../src/libcvc4.la linear_arith_SOURCES = \ linear_arith.cpp linear_arith_LDADD = \ @builddir@/../../src/libcvc4.la sets_SOURCES = \ sets.cpp sets_LDADD = \ @builddir@/../../src/libcvc4.la strings_SOURCES = \ strings.cpp strings_LDADD = \ @builddir@/../../src/libcvc4.la # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/api/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/api/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_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 bitvectors$(EXEEXT): $(bitvectors_OBJECTS) $(bitvectors_DEPENDENCIES) $(EXTRA_bitvectors_DEPENDENCIES) @rm -f bitvectors$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(bitvectors_OBJECTS) $(bitvectors_LDADD) $(LIBS) bitvectors_and_arrays$(EXEEXT): $(bitvectors_and_arrays_OBJECTS) $(bitvectors_and_arrays_DEPENDENCIES) $(EXTRA_bitvectors_and_arrays_DEPENDENCIES) @rm -f bitvectors_and_arrays$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(bitvectors_and_arrays_OBJECTS) $(bitvectors_and_arrays_LDADD) $(LIBS) combination$(EXEEXT): $(combination_OBJECTS) $(combination_DEPENDENCIES) $(EXTRA_combination_DEPENDENCIES) @rm -f combination$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(combination_OBJECTS) $(combination_LDADD) $(LIBS) datatypes$(EXEEXT): $(datatypes_OBJECTS) $(datatypes_DEPENDENCIES) $(EXTRA_datatypes_DEPENDENCIES) @rm -f datatypes$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(datatypes_OBJECTS) $(datatypes_LDADD) $(LIBS) extract$(EXEEXT): $(extract_OBJECTS) $(extract_DEPENDENCIES) $(EXTRA_extract_DEPENDENCIES) @rm -f extract$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(extract_OBJECTS) $(extract_LDADD) $(LIBS) helloworld$(EXEEXT): $(helloworld_OBJECTS) $(helloworld_DEPENDENCIES) $(EXTRA_helloworld_DEPENDENCIES) @rm -f helloworld$(EXEEXT) $(AM_V_CXXLD)$(helloworld_LINK) $(helloworld_OBJECTS) $(helloworld_LDADD) $(LIBS) linear_arith$(EXEEXT): $(linear_arith_OBJECTS) $(linear_arith_DEPENDENCIES) $(EXTRA_linear_arith_DEPENDENCIES) @rm -f linear_arith$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(linear_arith_OBJECTS) $(linear_arith_LDADD) $(LIBS) sets$(EXEEXT): $(sets_OBJECTS) $(sets_DEPENDENCIES) $(EXTRA_sets_DEPENDENCIES) @rm -f sets$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(sets_OBJECTS) $(sets_LDADD) $(LIBS) strings$(EXEEXT): $(strings_OBJECTS) $(strings_DEPENDENCIES) $(EXTRA_strings_DEPENDENCIES) @rm -f strings$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(strings_OBJECTS) $(strings_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitvectors.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitvectors_and_arrays.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/combination.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datatypes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helloworld-helloworld.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linear_arith.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strings.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< helloworld-helloworld.o: helloworld.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(helloworld_CXXFLAGS) $(CXXFLAGS) -MT helloworld-helloworld.o -MD -MP -MF $(DEPDIR)/helloworld-helloworld.Tpo -c -o helloworld-helloworld.o `test -f 'helloworld.cpp' || echo '$(srcdir)/'`helloworld.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/helloworld-helloworld.Tpo $(DEPDIR)/helloworld-helloworld.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='helloworld.cpp' object='helloworld-helloworld.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(helloworld_CXXFLAGS) $(CXXFLAGS) -c -o helloworld-helloworld.o `test -f 'helloworld.cpp' || echo '$(srcdir)/'`helloworld.cpp helloworld-helloworld.obj: helloworld.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(helloworld_CXXFLAGS) $(CXXFLAGS) -MT helloworld-helloworld.obj -MD -MP -MF $(DEPDIR)/helloworld-helloworld.Tpo -c -o helloworld-helloworld.obj `if test -f 'helloworld.cpp'; then $(CYGPATH_W) 'helloworld.cpp'; else $(CYGPATH_W) '$(srcdir)/helloworld.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/helloworld-helloworld.Tpo $(DEPDIR)/helloworld-helloworld.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='helloworld.cpp' object='helloworld-helloworld.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(helloworld_CXXFLAGS) $(CXXFLAGS) -c -o helloworld-helloworld.obj `if test -f 'helloworld.cpp'; then $(CYGPATH_W) 'helloworld.cpp'; else $(CYGPATH_W) '$(srcdir)/helloworld.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || 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)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(examplesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-examplesDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-examplesDATA .PRECIOUS: Makefile # 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: cvc4-1.5/examples/api/bitvectors.cpp000066400000000000000000000072171313116454100175030ustar00rootroot00000000000000/********************* */ /*! \file bitvectors.cpp ** \verbatim ** Top contributors (to current version): ** Liana Hadarean, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the solving capabilities of the CVC4 ** bit-vector solver. ** **/ #include //#include // use this after CVC4 is properly installed #include "smt/smt_engine.h" using namespace std; using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); smt.setLogic("QF_BV"); // Set the logic // The following example has been adapted from the book A Hacker's Delight by // Henry S. Warren. // // Given a variable x that can only have two values, a or b. We want to // assign to x a value other than the current one. The straightforward code // to do that is: // //(0) if (x == a ) x = b; // else x = a; // // Two more efficient yet equivalent methods are: // //(1) x = a ⊕ b ⊕ x; // //(2) x = a + b - x; // // We will use CVC4 to prove that the three pieces of code above are all // equivalent by encoding the problem in the bit-vector theory. // Creating a bit-vector type of width 32 Type bitvector32 = em.mkBitVectorType(32); // Variables Expr x = em.mkVar("x", bitvector32); Expr a = em.mkVar("a", bitvector32); Expr b = em.mkVar("b", bitvector32); // First encode the assumption that x must be equal to a or b Expr x_eq_a = em.mkExpr(kind::EQUAL, x, a); Expr x_eq_b = em.mkExpr(kind::EQUAL, x, b); Expr assumption = em.mkExpr(kind::OR, x_eq_a, x_eq_b); // Assert the assumption smt.assertFormula(assumption); // Introduce a new variable for the new value of x after assignment. Expr new_x = em.mkVar("new_x", bitvector32); // x after executing code (0) Expr new_x_ = em.mkVar("new_x_", bitvector32); // x after executing code (1) or (2) // Encoding code (0) // new_x = x == a ? b : a; Expr ite = em.mkExpr(kind::ITE, x_eq_a, b, a); Expr assignment0 = em.mkExpr(kind::EQUAL, new_x, ite); // Assert the encoding of code (0) cout << "Asserting " << assignment0 << " to CVC4 " << endl; smt.assertFormula(assignment0); cout << "Pushing a new context." << endl; smt.push(); // Encoding code (1) // new_x_ = a xor b xor x Expr a_xor_b_xor_x = em.mkExpr(kind::BITVECTOR_XOR, a, b, x); Expr assignment1 = em.mkExpr(kind::EQUAL, new_x_, a_xor_b_xor_x); // Assert encoding to CVC4 in current context; cout << "Asserting " << assignment1 << " to CVC4 " << endl; smt.assertFormula(assignment1); Expr new_x_eq_new_x_ = em.mkExpr(kind::EQUAL, new_x, new_x_); cout << " Querying: " << new_x_eq_new_x_ << endl; cout << " Expect valid. " << endl; cout << " CVC4: " << smt.query(new_x_eq_new_x_) << endl; cout << " Popping context. " << endl; smt.pop(); // Encoding code (2) // new_x_ = a + b - x Expr a_plus_b = em.mkExpr(kind::BITVECTOR_PLUS, a, b); Expr a_plus_b_minus_x = em.mkExpr(kind::BITVECTOR_SUB, a_plus_b, x); Expr assignment2 = em.mkExpr(kind::EQUAL, new_x_, a_plus_b_minus_x); // Assert encoding to CVC4 in current context; cout << "Asserting " << assignment2 << " to CVC4 " << endl; smt.assertFormula(assignment2); cout << " Querying: " << new_x_eq_new_x_ << endl; cout << " Expect valid. " << endl; cout << " CVC4: " << smt.query(new_x_eq_new_x_) << endl; return 0; } cvc4-1.5/examples/api/bitvectors_and_arrays.cpp000066400000000000000000000067101313116454100217030ustar00rootroot00000000000000/********************* */ /*! \file bitvectors_and_arrays.cpp ** \verbatim ** Top contributors (to current version): ** Liana Hadarean, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the solving capabilities of the CVC4 ** bit-vector and array solvers. ** **/ #include #include // #include // use this after CVC4 is properly installed #include "smt/smt_engine.h" using namespace std; using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); smt.setOption("produce-models", true); // Produce Models smt.setOption("output-language", "smtlib"); // output-language smt.setLogic("QF_AUFBV"); // Set the logic // Consider the following code (where size is some previously defined constant): // // // Assert (current_array[0] > 0); // for (unsigned i = 1; i < k; ++i) { // current_array[i] = 2 * current_array[i - 1]; // Assert (current_array[i-1] < current_array[i]); // } // // We want to check whether the assertion in the body of the for loop holds // throughout the loop. // Setting up the problem parameters unsigned k = 4; // number of unrollings (should be a power of 2) unsigned index_size = log2(k); // size of the index // Types Type elementType = em.mkBitVectorType(32); Type indexType = em.mkBitVectorType(index_size); Type arrayType = em.mkArrayType(indexType, elementType); // Variables Expr current_array = em.mkVar("current_array", arrayType); // Making a bit-vector constant Expr zero = em.mkConst(BitVector(index_size, 0u)); // Asserting that current_array[0] > 0 Expr current_array0 = em.mkExpr(kind::SELECT, current_array, zero); Expr current_array0_gt_0 = em.mkExpr(kind::BITVECTOR_SGT, current_array0, em.mkConst(BitVector(32, 0u))); smt.assertFormula(current_array0_gt_0); // Building the assertions in the loop unrolling Expr index = em.mkConst(BitVector(index_size, 0u)); Expr old_current = em.mkExpr(kind::SELECT, current_array, index); Expr two = em.mkConst(BitVector(32, 2u)); std::vector assertions; for (unsigned i = 1; i < k; ++i) { index = em.mkConst(BitVector(index_size, Integer(i))); Expr new_current = em.mkExpr(kind::BITVECTOR_MULT, two, old_current); // current[i] = 2 * current[i-1] current_array = em.mkExpr(kind::STORE, current_array, index, new_current); // current[i-1] < current [i] Expr current_slt_new_current = em.mkExpr(kind::BITVECTOR_SLT, old_current, new_current); assertions.push_back(current_slt_new_current); old_current = em.mkExpr(kind::SELECT, current_array, index); } Expr query = em.mkExpr(kind::NOT, em.mkExpr(kind::AND, assertions)); cout << "Asserting " << query << " to CVC4 " << endl; smt.assertFormula(query); cout << "Expect sat. " << endl; cout << "CVC4: " << smt.checkSat(em.mkConst(true)) << endl; // Getting the model cout << "The satisfying model is: " << endl; cout << " current_array = " << smt.getValue(current_array) << endl; cout << " current_array[0] = " << smt.getValue(current_array0) << endl; return 0; } cvc4-1.5/examples/api/combination.cpp000066400000000000000000000067001313116454100176150ustar00rootroot00000000000000/********************* */ /*! \file combination.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng, makaimann ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the capabilities of CVC4 ** ** A simple demonstration of how to use uninterpreted functions, combining this ** with arithmetic, and extracting a model at the end of a satisfiable query. ** The model is displayed using getValue(). **/ #include //#include // use this after CVC4 is properly installed #include "smt/smt_engine.h" using namespace std; using namespace CVC4; void prefixPrintGetValue(SmtEngine& smt, Expr e, int level = 0){ for(int i = 0; i < level; ++i){ cout << '-'; } cout << "smt.getValue(" << e << ") -> " << smt.getValue(e) << endl; if(e.hasOperator() && e.getOperator().getKind() != kind::BUILTIN){ prefixPrintGetValue(smt, e.getOperator(), level + 1); } for(Expr::const_iterator term_i = e.begin(), term_end = e.end(); term_i != term_end; ++term_i) { Expr curr = *term_i; prefixPrintGetValue(smt, curr, level + 1); } } int main() { ExprManager em; SmtEngine smt(&em); smt.setOption("produce-models", true); // Produce Models smt.setOption("output-language", "cvc4"); // Set the output-language to CVC's smt.setOption("default-dag-thresh", 0); //Disable dagifying the output smt.setLogic(string("QF_UFLIRA")); // Sorts SortType u = em.mkSort("u"); Type integer = em.integerType(); Type boolean = em.booleanType(); Type uToInt = em.mkFunctionType(u, integer); Type intPred = em.mkFunctionType(integer, boolean); // Variables Expr x = em.mkVar("x", u); Expr y = em.mkVar("y", u); // Functions Expr f = em.mkVar("f", uToInt); Expr p = em.mkVar("p", intPred); // Constants Expr zero = em.mkConst(Rational(0)); Expr one = em.mkConst(Rational(1)); // Terms Expr f_x = em.mkExpr(kind::APPLY_UF, f, x); Expr f_y = em.mkExpr(kind::APPLY_UF, f, y); Expr sum = em.mkExpr(kind::PLUS, f_x, f_y); Expr p_0 = em.mkExpr(kind::APPLY_UF, p, zero); Expr p_f_y = em.mkExpr(kind::APPLY_UF, p, f_y); // Construct the assumptions Expr assumptions = em.mkExpr(kind::AND, em.mkExpr(kind::LEQ, zero, f_x), // 0 <= f(x) em.mkExpr(kind::LEQ, zero, f_y), // 0 <= f(y) em.mkExpr(kind::LEQ, sum, one), // f(x) + f(y) <= 1 p_0.notExpr(), // not p(0) p_f_y); // p(f(y)) smt.assertFormula(assumptions); cout << "Given the following assumptions:" << endl << assumptions << endl << "Prove x /= y is valid. " << "CVC4 says: " << smt.query(em.mkExpr(kind::DISTINCT, x, y)) << "." << endl; cout << "Now we call checksat on a trivial query to show that" << endl << "the assumptions are satisfiable: " << smt.checkSat(em.mkConst(true)) << "."<< endl; cout << "Finally, after a SAT call, we recursively call smt.getValue(...) on " << "all of the assumptions to see what the satisfying model looks like." << endl; prefixPrintGetValue(smt, assumptions); return 0; } cvc4-1.5/examples/api/datatypes.cpp000066400000000000000000000077671313116454100173270ustar00rootroot00000000000000/********************* */ /*! \file datatypes.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An example of using inductive datatypes in CVC4 ** ** An example of using inductive datatypes in CVC4. **/ #include #include "options/language.h" // for use with make examples #include "smt/smt_engine.h" // for use with make examples //#include // To follow the wiki using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); // This example builds a simple "cons list" of integers, with // two constructors, "cons" and "nil." // Building a datatype consists of two steps. First, the datatype // is specified. Second, it is "resolved"---at which point function // symbols are assigned to its constructors, selectors, and testers. Datatype consListSpec("list"); // give the datatype a name DatatypeConstructor cons("cons"); cons.addArg("head", em.integerType()); cons.addArg("tail", DatatypeSelfType()); // a list consListSpec.addConstructor(cons); DatatypeConstructor nil("nil"); consListSpec.addConstructor(nil); std::cout << "spec is:" << std::endl << consListSpec << std::endl; // Keep in mind that "Datatype" is the specification class for // datatypes---"Datatype" is not itself a CVC4 Type. Now that // our Datatype is fully specified, we can get a Type for it. // This step resolves the "SelfType" reference and creates // symbols for all the constructors, etc. DatatypeType consListType = em.mkDatatypeType(consListSpec); // Now our old "consListSpec" is useless--the relevant information // has been copied out, so we can throw that spec away. We can get // the complete spec for the datatype from the DatatypeType, and // this Datatype object has constructor symbols (and others) filled in. const Datatype& consList = consListType.getDatatype(); // e = cons 0 nil // // Here, consList["cons"] gives you the DatatypeConstructor. To get // the constructor symbol for application, use .getConstructor("cons"), // which is equivalent to consList["cons"].getConstructor(). Note that // "nil" is a constructor too, so it needs to be applied with // APPLY_CONSTRUCTOR, even though it has no arguments. Expr e = em.mkExpr(kind::APPLY_CONSTRUCTOR, consList.getConstructor("cons"), em.mkConst(Rational(0)), em.mkExpr(kind::APPLY_CONSTRUCTOR, consList.getConstructor("nil"))); std::cout << "e is " << e << std::endl << "type of cons is " << consList.getConstructor("cons").getType() << std::endl << "type of nil is " << consList.getConstructor("nil").getType() << std::endl; // e2 = head(cons 0 nil), and of course this can be evaluated // // Here we first get the DatatypeConstructor for cons (with // consList["cons"]) in order to get the "head" selector symbol // to apply. Expr e2 = em.mkExpr(kind::APPLY_SELECTOR, consList["cons"].getSelector("head"), e); std::cout << "e2 is " << e2 << std::endl << "simplify(e2) is " << smt.simplify(e2) << std::endl << std::endl; // You can also iterate over a Datatype to get all its constructors, // and over a DatatypeConstructor to get all its "args" (selectors) for(Datatype::iterator i = consList.begin(); i != consList.end(); ++i) { std::cout << "ctor: " << *i << std::endl; for(DatatypeConstructor::iterator j = (*i).begin(); j != (*i).end(); ++j) { std::cout << " + arg: " << *j << std::endl; } } return 0; } cvc4-1.5/examples/api/extract.cpp000066400000000000000000000032141313116454100167620ustar00rootroot00000000000000/********************* */ /*! \file extract.cpp ** \verbatim ** Top contributors (to current version): ** Clark Barrett, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the solving capabilities of the CVC4 ** bit-vector solver. ** **/ #include //#include // use this after CVC4 is properly installed #include "smt/smt_engine.h" using namespace std; using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); smt.setLogic("QF_BV"); // Set the logic Type bitvector32 = em.mkBitVectorType(32); Expr x = em.mkVar("a", bitvector32); Expr ext_31_1 = em.mkConst(CVC4::BitVectorExtract(31,1)); Expr x_31_1 = em.mkExpr(ext_31_1, x); Expr ext_30_0 = em.mkConst(CVC4::BitVectorExtract(30,0)); Expr x_30_0 = em.mkExpr(ext_30_0, x); Expr ext_31_31 = em.mkConst(CVC4::BitVectorExtract(31,31)); Expr x_31_31 = em.mkExpr(ext_31_31, x); Expr ext_0_0 = em.mkConst(CVC4::BitVectorExtract(0,0)); Expr x_0_0 = em.mkExpr(ext_0_0, x); Expr eq = em.mkExpr(kind::EQUAL, x_31_1, x_30_0); cout << " Asserting: " << eq << endl; smt.assertFormula(eq); Expr eq2 = em.mkExpr(kind::EQUAL, x_31_31, x_0_0); cout << " Querying: " << eq2 << endl; cout << " Expect valid. " << endl; cout << " CVC4: " << smt.query(eq2) << endl; return 0; } cvc4-1.5/examples/api/helloworld.cpp000066400000000000000000000020121313116454100174560ustar00rootroot00000000000000/********************* */ /*! \file helloworld.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng, Kshitij Bansal ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A very simple CVC4 example ** ** A very simple CVC4 tutorial example. **/ #include #ifdef CVC4_MAKE_EXAMPLES #include "smt/smt_engine.h" // for use with make examples #else #include // To follow the wiki #endif /* CVC4_MAKE_EXAMPLES */ using namespace CVC4; int main() { ExprManager em; Expr helloworld = em.mkVar("Hello World!", em.booleanType()); SmtEngine smt(&em); std::cout << helloworld << " is " << smt.query(helloworld) << std::endl; return 0; } cvc4-1.5/examples/api/java/000077500000000000000000000000001313116454100155255ustar00rootroot00000000000000cvc4-1.5/examples/api/java/BitVectors.java000066400000000000000000000074221313116454100204610ustar00rootroot00000000000000/********************* */ /*! \file BitVectors.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the solving capabilities of the CVC4 ** bit-vector solver. ** **/ import edu.nyu.acsys.CVC4.*; public class BitVectors { public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); smt.setLogic("QF_BV"); // Set the logic // The following example has been adapted from the book A Hacker's Delight by // Henry S. Warren. // // Given a variable x that can only have two values, a or b. We want to // assign to x a value other than the current one. The straightforward code // to do that is: // //(0) if (x == a ) x = b; // else x = a; // // Two more efficient yet equivalent methods are: // //(1) x = a ⊕ b ⊕ x; // //(2) x = a + b - x; // // We will use CVC4 to prove that the three pieces of code above are all // equivalent by encoding the problem in the bit-vector theory. // Creating a bit-vector type of width 32 Type bitvector32 = em.mkBitVectorType(32); // Variables Expr x = em.mkVar("x", bitvector32); Expr a = em.mkVar("a", bitvector32); Expr b = em.mkVar("b", bitvector32); // First encode the assumption that x must be equal to a or b Expr x_eq_a = em.mkExpr(Kind.EQUAL, x, a); Expr x_eq_b = em.mkExpr(Kind.EQUAL, x, b); Expr assumption = em.mkExpr(Kind.OR, x_eq_a, x_eq_b); // Assert the assumption smt.assertFormula(assumption); // Introduce a new variable for the new value of x after assignment. Expr new_x = em.mkVar("new_x", bitvector32); // x after executing code (0) Expr new_x_ = em.mkVar("new_x_", bitvector32); // x after executing code (1) or (2) // Encoding code (0) // new_x = x == a ? b : a; Expr ite = em.mkExpr(Kind.ITE, x_eq_a, b, a); Expr assignment0 = em.mkExpr(Kind.EQUAL, new_x, ite); // Assert the encoding of code (0) System.out.println("Asserting " + assignment0 + " to CVC4 "); smt.assertFormula(assignment0); System.out.println("Pushing a new context."); smt.push(); // Encoding code (1) // new_x_ = a xor b xor x Expr a_xor_b_xor_x = em.mkExpr(Kind.BITVECTOR_XOR, a, b, x); Expr assignment1 = em.mkExpr(Kind.EQUAL, new_x_, a_xor_b_xor_x); // Assert encoding to CVC4 in current context; System.out.println("Asserting " + assignment1 + " to CVC4 "); smt.assertFormula(assignment1); Expr new_x_eq_new_x_ = em.mkExpr(Kind.EQUAL, new_x, new_x_); System.out.println(" Querying: " + new_x_eq_new_x_); System.out.println(" Expect valid. "); System.out.println(" CVC4: " + smt.query(new_x_eq_new_x_)); System.out.println(" Popping context. "); smt.pop(); // Encoding code (2) // new_x_ = a + b - x Expr a_plus_b = em.mkExpr(Kind.BITVECTOR_PLUS, a, b); Expr a_plus_b_minus_x = em.mkExpr(Kind.BITVECTOR_SUB, a_plus_b, x); Expr assignment2 = em.mkExpr(Kind.EQUAL, new_x_, a_plus_b_minus_x); // Assert encoding to CVC4 in current context; System.out.println("Asserting " + assignment2 + " to CVC4 "); smt.assertFormula(assignment2); System.out.println(" Querying: " + new_x_eq_new_x_); System.out.println(" Expect valid. "); System.out.println(" CVC4: " + smt.query(new_x_eq_new_x_)); } } cvc4-1.5/examples/api/java/BitVectorsAndArrays.java000066400000000000000000000073131313116454100222650ustar00rootroot00000000000000/********************* */ /*! \file BitVectorsAndArrays.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the solving capabilities of the CVC4 ** bit-vector and array solvers. ** **/ import edu.nyu.acsys.CVC4.*; import java.util.*; public class BitVectorsAndArrays { private static int log2(int n) { return (int) Math.round(Math.log(n) / Math.log(2)); } public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); smt.setOption("produce-models", new SExpr(true)); // Produce Models smt.setOption("output-language", new SExpr("smtlib")); // output-language smt.setLogic("QF_AUFBV"); // Set the logic // Consider the following code (where size is some previously defined constant): // // // Assert (current_array[0] > 0); // for (unsigned i = 1; i < k; ++i) { // current_array[i] = 2 * current_array[i - 1]; // Assert (current_array[i-1] < current_array[i]); // } // // We want to check whether the assertion in the body of the for loop holds // throughout the loop. // Setting up the problem parameters int k = 4; // number of unrollings (should be a power of 2) int index_size = log2(k); // size of the index // Types Type elementType = em.mkBitVectorType(32); Type indexType = em.mkBitVectorType(index_size); Type arrayType = em.mkArrayType(indexType, elementType); // Variables Expr current_array = em.mkVar("current_array", arrayType); // Making a bit-vector constant Expr zero = em.mkConst(new BitVector(index_size, 0)); // Asserting that current_array[0] > 0 Expr current_array0 = em.mkExpr(Kind.SELECT, current_array, zero); Expr current_array0_gt_0 = em.mkExpr(Kind.BITVECTOR_SGT, current_array0, em.mkConst(new BitVector(32, 0))); smt.assertFormula(current_array0_gt_0); // Building the assertions in the loop unrolling Expr index = em.mkConst(new BitVector(index_size, 0)); Expr old_current = em.mkExpr(Kind.SELECT, current_array, index); Expr two = em.mkConst(new BitVector(32, 2)); vectorExpr assertions = new vectorExpr(); for (int i = 1; i < k; ++i) { index = em.mkConst(new BitVector(index_size, new edu.nyu.acsys.CVC4.Integer(i))); Expr new_current = em.mkExpr(Kind.BITVECTOR_MULT, two, old_current); // current[i] = 2 * current[i-1] current_array = em.mkExpr(Kind.STORE, current_array, index, new_current); // current[i-1] < current [i] Expr current_slt_new_current = em.mkExpr(Kind.BITVECTOR_SLT, old_current, new_current); assertions.add(current_slt_new_current); old_current = em.mkExpr(Kind.SELECT, current_array, index); } Expr query = em.mkExpr(Kind.NOT, em.mkExpr(Kind.AND, assertions)); System.out.println("Asserting " + query + " to CVC4 "); smt.assertFormula(query); System.out.println("Expect sat. "); System.out.println("CVC4: " + smt.checkSat(em.mkConst(true))); // Getting the model System.out.println("The satisfying model is: "); System.out.println(" current_array = " + smt.getValue(current_array)); System.out.println(" current_array[0] = " + smt.getValue(current_array0)); } } cvc4-1.5/examples/api/java/CVC4Streams.java000066400000000000000000000036441313116454100204350ustar00rootroot00000000000000/********************* */ /*! \file CVC4Streams.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Example of driving CVC4 parsing from Java streams ** ** This example shows how CVC4 can be driven from Java streams. **/ import java.io.*; import edu.nyu.acsys.CVC4.*; public class CVC4Streams { public static void main(String[] args) throws IOException { System.loadLibrary("cvc4jni"); ExprManager exprMgr = new ExprManager(); SmtEngine smt = new SmtEngine(exprMgr); smt.setOption("output-language", new SExpr("smt2")); PipedOutputStream solverPipe = new PipedOutputStream(); PrintWriter toSolver = new PrintWriter(solverPipe); PipedInputStream stream = new PipedInputStream(solverPipe); toSolver.println("(set-logic QF_LIA)"); toSolver.println("(declare-fun x () Int)"); toSolver.println("(assert (= x 5))"); toSolver.println("(check-sat)"); toSolver.flush(); ParserBuilder pbuilder = new ParserBuilder(exprMgr, "") .withInputLanguage(InputLanguage.INPUT_LANG_SMTLIB_V2) .withLineBufferedStreamInput((java.io.InputStream)stream); Parser parser = pbuilder.build(); Command cmd; while((cmd = parser.nextCommand()) != null) { System.out.println(cmd); cmd.invoke(smt, System.out); } toSolver.println("(assert (= x 10))"); toSolver.println("(check-sat)"); toSolver.flush(); while((cmd = parser.nextCommand()) != null) { System.out.println(cmd); cmd.invoke(smt, System.out); } } } cvc4-1.5/examples/api/java/Combination.java000066400000000000000000000071311313116454100206340ustar00rootroot00000000000000/********************* */ /*! \file Combination.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the capabilities of CVC4 ** ** A simple demonstration of how to use uninterpreted functions, combining this ** with arithmetic, and extracting a model at the end of a satisfiable query. ** The model is displayed using getValue(). **/ import edu.nyu.acsys.CVC4.*; public class Combination { private static void prefixPrintGetValue(SmtEngine smt, Expr e, int level) { for(int i = 0; i < level; ++i) { System.out.print('-'); } System.out.println("smt.getValue(" + e + ") -> " + smt.getValue(e)); if(e.hasOperator()) { prefixPrintGetValue(smt, e.getOperator(), level + 1); } for(int i = 0; i < e.getNumChildren(); ++i) { Expr curr = e.getChild(i); prefixPrintGetValue(smt, curr, level + 1); } } public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); smt.setOption("tlimit", new SExpr(100)); smt.setOption("produce-models", new SExpr(true)); // Produce Models smt.setOption("output-language", new SExpr("cvc4")); // output-language smt.setOption("default-dag-thresh", new SExpr(0)); //Disable dagifying the output smt.setLogic("QF_UFLIRA"); // Sorts SortType u = em.mkSort("u"); Type integer = em.integerType(); Type booleanType = em.booleanType(); Type uToInt = em.mkFunctionType(u, integer); Type intPred = em.mkFunctionType(integer, booleanType); // Variables Expr x = em.mkVar("x", u); Expr y = em.mkVar("y", u); // Functions Expr f = em.mkVar("f", uToInt); Expr p = em.mkVar("p", intPred); // Constants Expr zero = em.mkConst(new Rational(0)); Expr one = em.mkConst(new Rational(1)); // Terms Expr f_x = em.mkExpr(Kind.APPLY_UF, f, x); Expr f_y = em.mkExpr(Kind.APPLY_UF, f, y); Expr sum = em.mkExpr(Kind.PLUS, f_x, f_y); Expr p_0 = em.mkExpr(Kind.APPLY_UF, p, zero); Expr p_f_y = em.mkExpr(Kind.APPLY_UF, p, f_y); // Construct the assumptions Expr assumptions = em.mkExpr(Kind.AND, em.mkExpr(Kind.LEQ, zero, f_x), // 0 <= f(x) em.mkExpr(Kind.LEQ, zero, f_y), // 0 <= f(y) em.mkExpr(Kind.LEQ, sum, one), // f(x) + f(y) <= 1 p_0.notExpr(), // not p(0) p_f_y); // p(f(y)) smt.assertFormula(assumptions); System.out.println("Given the following assumptions:"); System.out.println(assumptions); System.out.println("Prove x /= y is valid. " + "CVC4 says: " + smt.query(em.mkExpr(Kind.DISTINCT, x, y)) + "."); System.out.println("Now we call checksat on a trivial query to show that"); System.out.println("the assumptions are satisfiable: " + smt.checkSat(em.mkConst(true)) + "."); System.out.println("Finally, after a SAT call, we recursively call smt.getValue(...) on " + "all of the assumptions to see what the satisfying model looks like."); prefixPrintGetValue(smt, assumptions, 0); } } cvc4-1.5/examples/api/java/Datatypes.java000066400000000000000000000103301313116454100203230ustar00rootroot00000000000000/********************* */ /*! \file Datatypes.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An example of using inductive datatypes in CVC4 (Java version) ** ** An example of using inductive datatypes in CVC4 (Java version). **/ import edu.nyu.acsys.CVC4.*; import java.util.Iterator; public class Datatypes { public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); // This example builds a simple "cons list" of integers, with // two constructors, "cons" and "nil." // Building a datatype consists of two steps. First, the datatype // is specified. Second, it is "resolved"---at which point function // symbols are assigned to its constructors, selectors, and testers. Datatype consListSpec = new Datatype("list"); // give the datatype a name DatatypeConstructor cons = new DatatypeConstructor("cons"); cons.addArg("head", em.integerType()); cons.addArg("tail", new DatatypeSelfType()); // a list consListSpec.addConstructor(cons); DatatypeConstructor nil = new DatatypeConstructor("nil"); consListSpec.addConstructor(nil); System.out.println("spec is:"); System.out.println(consListSpec); // Keep in mind that "Datatype" is the specification class for // datatypes---"Datatype" is not itself a CVC4 Type. Now that // our Datatype is fully specified, we can get a Type for it. // This step resolves the "SelfType" reference and creates // symbols for all the constructors, etc. DatatypeType consListType = em.mkDatatypeType(consListSpec); // Now our old "consListSpec" is useless--the relevant information // has been copied out, so we can throw that spec away. We can get // the complete spec for the datatype from the DatatypeType, and // this Datatype object has constructor symbols (and others) filled in. Datatype consList = consListType.getDatatype(); // e = cons 0 nil // // Here, consList.get("cons") gives you the DatatypeConstructor // (just as consList["cons"] does in C++). To get the constructor // symbol for application, use .getConstructor("cons"), which is // equivalent to consList.get("cons").getConstructor(). Note that // "nil" is a constructor too, so it needs to be applied with // APPLY_CONSTRUCTOR, even though it has no arguments. Expr e = em.mkExpr(Kind.APPLY_CONSTRUCTOR, consList.getConstructor("cons"), em.mkConst(new Rational(0)), em.mkExpr(Kind.APPLY_CONSTRUCTOR, consList.getConstructor("nil"))); System.out.println("e is " + e); System.out.println("type of cons is " + consList.getConstructor("cons").getType()); System.out.println("type of nil is " + consList.getConstructor("nil").getType()); // e2 = head(cons 0 nil), and of course this can be evaluated // // Here we first get the DatatypeConstructor for cons (with // consList.get("cons") in order to get the "head" selector // symbol to apply. Expr e2 = em.mkExpr(Kind.APPLY_SELECTOR, consList.get("cons").getSelector("head"), e); System.out.println("e2 is " + e2); System.out.println("simplify(e2) is " + smt.simplify(e2)); System.out.println(); // You can also iterate over a Datatype to get all its constructors, // and over a DatatypeConstructor to get all its "args" (selectors) for(Iterator i = consList.iterator(); i.hasNext();) { DatatypeConstructor ctor = i.next(); System.out.println("ctor: " + ctor); for(Iterator j = ctor.iterator(); j.hasNext();) { System.out.println(" + arg: " + j.next()); } } } } cvc4-1.5/examples/api/java/HelloWorld.java000066400000000000000000000016761313116454100204550ustar00rootroot00000000000000/********************* */ /*! \file HelloWorld.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A very simple CVC4 example ** ** A very simple CVC4 tutorial example. **/ import edu.nyu.acsys.CVC4.*; public class HelloWorld { public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); Expr helloworld = em.mkVar("Hello World!", em.booleanType()); SmtEngine smt = new SmtEngine(em); System.out.println(helloworld + " is " + smt.query(helloworld)); } } cvc4-1.5/examples/api/java/LinearArith.java000066400000000000000000000052421313116454100205750ustar00rootroot00000000000000/********************* */ /*! \file LinearArith.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the linear arithmetic capabilities of CVC4 ** ** A simple demonstration of the linear arithmetic solving capabilities and ** the push pop of CVC4. This also gives an example option. **/ import edu.nyu.acsys.CVC4.*; public class LinearArith { public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); smt.setLogic("QF_LIRA"); // Set the logic // Prove that if given x (Integer) and y (Real) then // the maximum value of y - x is 2/3 // Types Type real = em.realType(); Type integer = em.integerType(); // Variables Expr x = em.mkVar("x", integer); Expr y = em.mkVar("y", real); // Constants Expr three = em.mkConst(new Rational(3)); Expr neg2 = em.mkConst(new Rational(-2)); Expr two_thirds = em.mkConst(new Rational(2,3)); // Terms Expr three_y = em.mkExpr(Kind.MULT, three, y); Expr diff = em.mkExpr(Kind.MINUS, y, x); // Formulas Expr x_geq_3y = em.mkExpr(Kind.GEQ, x, three_y); Expr x_leq_y = em.mkExpr(Kind.LEQ, x, y); Expr neg2_lt_x = em.mkExpr(Kind.LT, neg2, x); Expr assumptions = em.mkExpr(Kind.AND, x_geq_3y, x_leq_y, neg2_lt_x); System.out.println("Given the assumptions " + assumptions); smt.assertFormula(assumptions); smt.push(); Expr diff_leq_two_thirds = em.mkExpr(Kind.LEQ, diff, two_thirds); System.out.println("Prove that " + diff_leq_two_thirds + " with CVC4."); System.out.println("CVC4 should report VALID."); System.out.println("Result from CVC4 is: " + smt.query(diff_leq_two_thirds)); smt.pop(); System.out.println(); smt.push(); Expr diff_is_two_thirds = em.mkExpr(Kind.EQUAL, diff, two_thirds); smt.assertFormula(diff_is_two_thirds); System.out.println("Show that the asserts are consistent with "); System.out.println(diff_is_two_thirds + " with CVC4."); System.out.println("CVC4 should report SAT."); System.out.println("Result from CVC4 is: " + smt.checkSat(em.mkConst(true))); smt.pop(); System.out.println("Thus the maximum value of (y - x) is 2/3."); } } cvc4-1.5/examples/api/java/Makefile.am000066400000000000000000000015211313116454100175600ustar00rootroot00000000000000noinst_DATA = if CVC4_LANGUAGE_BINDING_JAVA noinst_DATA += \ CVC4Streams.class \ BitVectors.class \ BitVectorsAndArrays.class \ Combination.class \ HelloWorld.class \ LinearArith.class \ Datatypes.class \ PipedInput.class \ Strings.class endif %.class: %.java $(AM_V_JAVAC)$(JAVAC) -classpath "@builddir@/../../../src/bindings/CVC4.jar" -d "@builddir@" $< EXTRA_DIST = \ CVC4Streams.java \ BitVectors.java \ BitVectorsAndArrays.java \ Combination.java \ HelloWorld.java \ LinearArith.java \ Datatypes.java \ PipedInput.java \ Strings.java # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) MOSTLYCLEANFILES = $(noinst_DATA) # for silent automake rules AM_V_JAVAC = $(am__v_JAVAC_$(V)) am__v_JAVAC_ = $(am__v_JAVAC_$(AM_DEFAULT_VERBOSITY)) am__v_JAVAC_0 = @echo " JAVAC " $@; cvc4-1.5/examples/api/java/Makefile.in000066400000000000000000000476521313116454100176100ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_1 = \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ CVC4Streams.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ BitVectors.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ BitVectorsAndArrays.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ Combination.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ HelloWorld.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ LinearArith.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ Datatypes.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ PipedInput.class \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ Strings.class subdir = examples/api/java ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ noinst_DATA = $(am__append_1) EXTRA_DIST = \ CVC4Streams.java \ BitVectors.java \ BitVectorsAndArrays.java \ Combination.java \ HelloWorld.java \ LinearArith.java \ Datatypes.java \ PipedInput.java \ Strings.java # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) MOSTLYCLEANFILES = $(noinst_DATA) # for silent automake rules AM_V_JAVAC = $(am__v_JAVAC_$(V)) am__v_JAVAC_ = $(am__v_JAVAC_$(AM_DEFAULT_VERBOSITY)) am__v_JAVAC_0 = @echo " JAVAC " $@; all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/api/java/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/api/java/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || 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)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: 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 Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-examplesDATA .PRECIOUS: Makefile %.class: %.java $(AM_V_JAVAC)$(JAVAC) -classpath "@builddir@/../../../src/bindings/CVC4.jar" -d "@builddir@" $< # 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: cvc4-1.5/examples/api/java/PipedInput.java000066400000000000000000000044671313116454100204640ustar00rootroot00000000000000/********************* */ /*! \file PipedInput.java ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the input parsing capabilities of CVC4 ** when used from Java ** ** A simple demonstration of the input parsing capabilities of CVC4 when ** used from Java. **/ import edu.nyu.acsys.CVC4.*; import java.io.*; public class PipedInput { public static void main(String[] args) throws IOException { System.loadLibrary("cvc4jni"); // Boilerplate setup for CVC4 ExprManager exprMgr = new ExprManager(); SmtEngine smt = new SmtEngine(exprMgr); smt.setOption("output-language", new SExpr("smt2")); // Set up a pair of connected Java streams PipedOutputStream solverPipe = new PipedOutputStream(); PrintWriter toSolver = new PrintWriter(solverPipe); PipedInputStream stream = new PipedInputStream(solverPipe); // Write some things to CVC4's input stream, making sure to flush() toSolver.println("(set-logic QF_LIA)"); toSolver.println("(declare-fun x () Int)"); toSolver.println("(assert (= x 5))"); toSolver.println("(check-sat)"); toSolver.flush(); // Set up the CVC4 parser ParserBuilder pbuilder = new ParserBuilder(exprMgr, "") .withInputLanguage(InputLanguage.INPUT_LANG_SMTLIB_V2) .withLineBufferedStreamInput((java.io.InputStream)stream); Parser parser = pbuilder.build(); // Read all the commands thus far Command cmd; while((cmd = parser.nextCommand()) != null) { System.out.println(cmd); cmd.invoke(smt, System.out); } // Write some more things to CVC4's input stream, making sure to flush() toSolver.println("(assert (= x 10))"); toSolver.println("(check-sat)"); toSolver.flush(); // Read all the commands thus far while((cmd = parser.nextCommand()) != null) { System.out.println(cmd); cmd.invoke(smt, System.out); } } } cvc4-1.5/examples/api/java/Strings.java000066400000000000000000000060061313116454100200230ustar00rootroot00000000000000/********************* */ /*! \file Strings.java ** \verbatim ** Top contributors (to current version): ** Clark Barrett, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Reasoning about strings with CVC4 via Java API. ** ** A simple demonstration of reasoning about strings with CVC4 via Jave API. **/ import edu.nyu.acsys.CVC4.*; public class Strings { public static void main(String[] args) { System.loadLibrary("cvc4jni"); ExprManager em = new ExprManager(); SmtEngine smt = new SmtEngine(em); // Set the logic smt.setLogic("S"); // Produce models smt.setOption("produce-models", new SExpr(true)); // The option strings-exp is needed smt.setOption("strings-exp", new SExpr(true)); // output-language smt.setOption("output-language", new SExpr("smt2")); // String type Type string = em.stringType(); // String constants Expr ab = em.mkConst(new CVC4String("ab")); Expr abc = em.mkConst(new CVC4String("abc")); // Variables Expr x = em.mkVar("x", string); Expr y = em.mkVar("y", string); Expr z = em.mkVar("z", string); // String concatenation: x.ab.y Expr lhs = em.mkExpr(Kind.STRING_CONCAT, x, ab, y); // String concatenation: abc.z Expr rhs = em.mkExpr(Kind.STRING_CONCAT, abc, z);; // x.ab.y = abc.z Expr formula1 = em.mkExpr(Kind.EQUAL, lhs, rhs); // Length of y: |y| Expr leny = em.mkExpr(Kind.STRING_LENGTH, y); // |y| >= 0 Expr formula2 = em.mkExpr(Kind.GEQ, leny, em.mkConst(new Rational(0))); // Regular expression: (ab[c-e]*f)|g|h Expr r = em.mkExpr(Kind.REGEXP_UNION, em.mkExpr(Kind.REGEXP_CONCAT, em.mkExpr(Kind.STRING_TO_REGEXP, em.mkConst(new CVC4String("ab"))), em.mkExpr(Kind.REGEXP_STAR, em.mkExpr(Kind.REGEXP_RANGE, em.mkConst(new CVC4String("c")), em.mkConst(new CVC4String("e")))), em.mkExpr(Kind.STRING_TO_REGEXP, em.mkConst(new CVC4String("f")))), em.mkExpr(Kind.STRING_TO_REGEXP, em.mkConst(new CVC4String("g"))), em.mkExpr(Kind.STRING_TO_REGEXP, em.mkConst(new CVC4String("h")))); // String variables Expr s1 = em.mkVar("s1", string); Expr s2 = em.mkVar("s2", string); // String concatenation: s1.s2 Expr s = em.mkExpr(Kind.STRING_CONCAT, s1, s2); // s1.s2 in (ab[c-e]*f)|g|h Expr formula3 = em.mkExpr(Kind.STRING_IN_REGEXP, s, r); // Make a query Expr q = em.mkExpr(Kind.AND, formula1, formula2, formula3); // check sat Result result = smt.checkSat(q); System.out.println("CVC4 reports: " + q + " is " + result + "."); System.out.println(" x = " + smt.getValue(x)); System.out.println(" s1.s2 = " + smt.getValue(s)); } } cvc4-1.5/examples/api/linear_arith.cpp000066400000000000000000000050731313116454100177560ustar00rootroot00000000000000/********************* */ /*! \file linear_arith.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the linear arithmetic capabilities of CVC4 ** ** A simple demonstration of the linear arithmetic solving capabilities and ** the push pop of CVC4. This also gives an example option. **/ #include //#include // use this after CVC4 is properly installed #include "smt/smt_engine.h" using namespace std; using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); smt.setLogic("QF_LIRA"); // Set the logic // Prove that if given x (Integer) and y (Real) then // the maximum value of y - x is 2/3 // Types Type real = em.realType(); Type integer = em.integerType(); // Variables Expr x = em.mkVar("x", integer); Expr y = em.mkVar("y", real); // Constants Expr three = em.mkConst(Rational(3)); Expr neg2 = em.mkConst(Rational(-2)); Expr two_thirds = em.mkConst(Rational(2,3)); // Terms Expr three_y = em.mkExpr(kind::MULT, three, y); Expr diff = em.mkExpr(kind::MINUS, y, x); // Formulas Expr x_geq_3y = em.mkExpr(kind::GEQ, x, three_y); Expr x_leq_y = em.mkExpr(kind::LEQ, x, y); Expr neg2_lt_x = em.mkExpr(kind::LT, neg2, x); Expr assumptions = em.mkExpr(kind::AND, x_geq_3y, x_leq_y, neg2_lt_x); cout << "Given the assumptions " << assumptions << endl; smt.assertFormula(assumptions); smt.push(); Expr diff_leq_two_thirds = em.mkExpr(kind::LEQ, diff, two_thirds); cout << "Prove that " << diff_leq_two_thirds << " with CVC4." << endl; cout << "CVC4 should report VALID." << endl; cout << "Result from CVC4 is: " << smt.query(diff_leq_two_thirds) << endl; smt.pop(); cout << endl; smt.push(); Expr diff_is_two_thirds = em.mkExpr(kind::EQUAL, diff, two_thirds); smt.assertFormula(diff_is_two_thirds); cout << "Show that the asserts are consistent with " << endl; cout << diff_is_two_thirds << " with CVC4." << endl; cout << "CVC4 should report SAT." << endl; cout << "Result from CVC4 is: " << smt.checkSat(em.mkConst(true)) << endl; smt.pop(); cout << "Thus the maximum value of (y - x) is 2/3."<< endl; return 0; } cvc4-1.5/examples/api/sets.cpp000066400000000000000000000061231313116454100162700ustar00rootroot00000000000000/********************* */ /*! \file sets.cpp ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Reasoning about sets with CVC4. ** ** A simple demonstration of reasoning about sets with CVC4. **/ #include //#include // use this after CVC4 is properly installed #include "smt/smt_engine.h" #include "options/set_language.h" using namespace std; using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); // Optionally, set the logic. We need at least UF for equality predicate, // integers (LIA) and sets (FS). smt.setLogic("QF_UFLIAFS"); // Produce models smt.setOption("produce-models", true); // Set output language to SMTLIB2 cout << language::SetLanguage(language::output::LANG_SMTLIB_V2); Type integer = em.integerType(); Type set = em.mkSetType(integer); // Verify union distributions over intersection // (A union B) intersection C = (A intersection C) union (B intersection C) { Expr A = em.mkVar("A", set); Expr B = em.mkVar("B", set); Expr C = em.mkVar("C", set); Expr unionAB = em.mkExpr(kind::UNION, A, B); Expr lhs = em.mkExpr(kind::INTERSECTION, unionAB, C); Expr intersectionAC = em.mkExpr(kind::INTERSECTION, A, C); Expr intersectionBC = em.mkExpr(kind::INTERSECTION, B, C); Expr rhs = em.mkExpr(kind::UNION, intersectionAC, intersectionBC); Expr theorem = em.mkExpr(kind::EQUAL, lhs, rhs); cout << "CVC4 reports: " << theorem << " is " << smt.query(theorem) << "." << endl; } // Verify emptset is a subset of any set { Expr A = em.mkVar("A", set); Expr emptyset = em.mkConst(EmptySet(set)); Expr theorem = em.mkExpr(kind::SUBSET, emptyset, A); cout << "CVC4 reports: " << theorem << " is " << smt.query(theorem) << "." << endl; } // Find me an element in {1, 2} intersection {2, 3}, if there is one. { Expr one = em.mkConst(Rational(1)); Expr two = em.mkConst(Rational(2)); Expr three = em.mkConst(Rational(3)); Expr singleton_one = em.mkExpr(kind::SINGLETON, one); Expr singleton_two = em.mkExpr(kind::SINGLETON, two); Expr singleton_three = em.mkExpr(kind::SINGLETON, three); Expr one_two = em.mkExpr(kind::UNION, singleton_one, singleton_two); Expr two_three = em.mkExpr(kind::UNION, singleton_two, singleton_three); Expr intersection = em.mkExpr(kind::INTERSECTION, one_two, two_three); Expr x = em.mkVar("x", integer); Expr e = em.mkExpr(kind::MEMBER, x, intersection); Result result = smt.checkSat(e); cout << "CVC4 reports: " << e << " is " << result << "." << endl; if(result == Result::SAT) { cout << "For instance, " << smt.getValue(x) << " is a member." << endl; } } } cvc4-1.5/examples/api/strings.cpp000066400000000000000000000061431313116454100170050ustar00rootroot00000000000000/********************* */ /*! \file strings.cpp ** \verbatim ** Top contributors (to current version): ** Clark Barrett, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Reasoning about strings with CVC4 via C++ API. ** ** A simple demonstration of reasoning about strings with CVC4 via C++ API. **/ #include //#include // use this after CVC4 is properly installed #include "smt/smt_engine.h" #include "options/set_language.h" using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); // Set the logic smt.setLogic("S"); // Produce models smt.setOption("produce-models", true); // The option strings-exp is needed smt.setOption("strings-exp", true); // Set output language to SMTLIB2 std::cout << language::SetLanguage(language::output::LANG_SMTLIB_V2); // String type Type string = em.stringType(); // std::string std::string std_str_ab("ab"); // CVC4::String CVC4::String cvc4_str_ab(std_str_ab); CVC4::String cvc4_str_abc("abc"); // String constants Expr ab = em.mkConst(cvc4_str_ab); Expr abc = em.mkConst(CVC4::String("abc")); // String variables Expr x = em.mkVar("x", string); Expr y = em.mkVar("y", string); Expr z = em.mkVar("z", string); // String concatenation: x.ab.y Expr lhs = em.mkExpr(kind::STRING_CONCAT, x, ab, y); // String concatenation: abc.z Expr rhs = em.mkExpr(kind::STRING_CONCAT, abc, z); // x.ab.y = abc.z Expr formula1 = em.mkExpr(kind::EQUAL, lhs, rhs); // Length of y: |y| Expr leny = em.mkExpr(kind::STRING_LENGTH, y); // |y| >= 0 Expr formula2 = em.mkExpr(kind::GEQ, leny, em.mkConst(Rational(0))); // Regular expression: (ab[c-e]*f)|g|h Expr r = em.mkExpr(kind::REGEXP_UNION, em.mkExpr(kind::REGEXP_CONCAT, em.mkExpr(kind::STRING_TO_REGEXP, em.mkConst(String("ab"))), em.mkExpr(kind::REGEXP_STAR, em.mkExpr(kind::REGEXP_RANGE, em.mkConst(String("c")), em.mkConst(String("e")))), em.mkExpr(kind::STRING_TO_REGEXP, em.mkConst(String("f")))), em.mkExpr(kind::STRING_TO_REGEXP, em.mkConst(String("g"))), em.mkExpr(kind::STRING_TO_REGEXP, em.mkConst(String("h")))); // String variables Expr s1 = em.mkVar("s1", string); Expr s2 = em.mkVar("s2", string); // String concatenation: s1.s2 Expr s = em.mkExpr(kind::STRING_CONCAT, s1, s2); // s1.s2 in (ab[c-e]*f)|g|h Expr formula3 = em.mkExpr(kind::STRING_IN_REGEXP, s, r); // Make a query Expr q = em.mkExpr(kind::AND, formula1, formula2, formula3); // check sat Result result = smt.checkSat(q); std::cout << "CVC4 reports: " << q << " is " << result << "." << std::endl; if(result == Result::SAT) { std::cout << " x = " << smt.getValue(x) << std::endl; std::cout << " s1.s2 = " << smt.getValue(s) << std::endl; } } cvc4-1.5/examples/hashsmt/000077500000000000000000000000001313116454100155025ustar00rootroot00000000000000cvc4-1.5/examples/hashsmt/Makefile.am000066400000000000000000000012051313116454100175340ustar00rootroot00000000000000AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_PROGRAMS = \ sha1_inversion \ sha1_collision noinst_DATA = sha1_inversion_SOURCES = \ sha1_inversion.cpp \ word.h \ word.cpp \ sha1.hpp sha1_inversion_LDADD = \ @builddir@/../../src/libcvc4.la sha1_collision_SOURCES = \ sha1_collision.cpp \ word.h \ word.cpp \ sha1.hpp sha1_collision_LDADD = \ @builddir@/../../src/libcvc4.la # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = \ sha1_inversion.cpp \ sha1_collision.cpp \ word.h \ word.cpp \ sha1.hpp cvc4-1.5/examples/hashsmt/Makefile.in000066400000000000000000000645561313116454100175670ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ noinst_PROGRAMS = sha1_inversion$(EXEEXT) sha1_collision$(EXEEXT) subdir = examples/hashsmt ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_sha1_collision_OBJECTS = sha1_collision.$(OBJEXT) word.$(OBJEXT) sha1_collision_OBJECTS = $(am_sha1_collision_OBJECTS) sha1_collision_DEPENDENCIES = @builddir@/../../src/libcvc4.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_sha1_inversion_OBJECTS = sha1_inversion.$(OBJEXT) word.$(OBJEXT) sha1_inversion_OBJECTS = $(am_sha1_inversion_OBJECTS) sha1_inversion_DEPENDENCIES = @builddir@/../../src/libcvc4.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(sha1_collision_SOURCES) $(sha1_inversion_SOURCES) DIST_SOURCES = $(sha1_collision_SOURCES) $(sha1_inversion_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_DATA = sha1_inversion_SOURCES = \ sha1_inversion.cpp \ word.h \ word.cpp \ sha1.hpp sha1_inversion_LDADD = \ @builddir@/../../src/libcvc4.la sha1_collision_SOURCES = \ sha1_collision.cpp \ word.h \ word.cpp \ sha1.hpp sha1_collision_LDADD = \ @builddir@/../../src/libcvc4.la # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = \ sha1_inversion.cpp \ sha1_collision.cpp \ word.h \ word.cpp \ sha1.hpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/hashsmt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/hashsmt/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_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 sha1_collision$(EXEEXT): $(sha1_collision_OBJECTS) $(sha1_collision_DEPENDENCIES) $(EXTRA_sha1_collision_DEPENDENCIES) @rm -f sha1_collision$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(sha1_collision_OBJECTS) $(sha1_collision_LDADD) $(LIBS) sha1_inversion$(EXEEXT): $(sha1_inversion_OBJECTS) $(sha1_inversion_DEPENDENCIES) $(EXTRA_sha1_inversion_DEPENDENCIES) @rm -f sha1_inversion$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(sha1_inversion_OBJECTS) $(sha1_inversion_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1_collision.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1_inversion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/word.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || 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)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am \ install-examplesDATA install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-examplesDATA .PRECIOUS: Makefile # 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: cvc4-1.5/examples/hashsmt/sha1.hpp000066400000000000000000000130021313116454100170430ustar00rootroot00000000000000/********************* */ /*! \file sha1.hpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ // boost/uuid/sha1.hpp header file ----------------------------------------------// // Copyright 2007 Andy Tompkins. // 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) // Revision History // 29 May 2007 - Initial Revision // 25 Feb 2008 - moved to namespace boost::uuids::detail // This is a byte oriented implementation // Note: this implementation does not handle message longer than // 2^32 bytes. #pragma once #include #include #include "word.h" #ifdef BOOST_NO_STDC_NAMESPACE namespace std { using ::size_t; } // namespace std #endif namespace hashsmt { BOOST_STATIC_ASSERT(sizeof(unsigned char)*8 == 8); BOOST_STATIC_ASSERT(sizeof(unsigned int)*8 == 32); inline cvc4_uint32 left_rotate(cvc4_uint32 x, std::size_t n) { return (x<> (32-n)); } class sha1 { public: typedef cvc4_uint32(&digest_type)[5]; public: sha1(unsigned rounds = 80); void reset(); void process_byte(cvc4_uchar8 byte); void process_block(void const* bytes_begin, void const* bytes_end); void process_bytes(void const* buffer, std::size_t byte_count); void get_digest(digest_type digest); private: void process_block(); private: cvc4_uint32 h_[5]; cvc4_uchar8 block_[64]; std::size_t block_byte_index_; std::size_t byte_count_; unsigned rounds_; }; inline sha1::sha1(unsigned rounds) : rounds_(rounds) { reset(); } inline void sha1::reset() { h_[0] = 0x67452301; h_[1] = 0xEFCDAB89; h_[2] = 0x98BADCFE; h_[3] = 0x10325476; h_[4] = 0xC3D2E1F0; block_byte_index_ = 0; byte_count_ = 0; } inline void sha1::process_byte(cvc4_uchar8 byte) { block_[block_byte_index_++] = byte; ++byte_count_; if (block_byte_index_ == 64) { block_byte_index_ = 0; process_block(); } } inline void sha1::process_block(void const* bytes_begin, void const* bytes_end) { cvc4_uchar8 const* begin = static_cast(bytes_begin); cvc4_uchar8 const* end = static_cast(bytes_end); for(; begin != end; ++begin) { process_byte(*begin); } } inline void sha1::process_bytes(void const* buffer, std::size_t byte_count) { cvc4_uchar8 const* b = static_cast(buffer); process_block(b, b+byte_count); } inline void sha1::process_block() { cvc4_uint32 w[80]; for (std::size_t i=0; i<16; ++i) { w[i] = (block_[i*4 + 0] << 24); w[i] |= (block_[i*4 + 1] << 16); w[i] |= (block_[i*4 + 2] << 8); w[i] |= (block_[i*4 + 3]); } for (std::size_t i=16; i<80; ++i) { w[i] = left_rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1); } cvc4_uint32 a = h_[0]; cvc4_uint32 b = h_[1]; cvc4_uint32 c = h_[2]; cvc4_uint32 d = h_[3]; cvc4_uint32 e = h_[4]; for (std::size_t i=0; i= 0 // such that the resulting message length is congruent to 56 (mod 64) // check if there is enough space for padding and bit_count if (block_byte_index_ > 56) { // finish this block while (block_byte_index_ != 0) { process_byte(0); } // one more block while (block_byte_index_ < 56) { process_byte(0); } } else { while (block_byte_index_ < 56) { process_byte(0); } } // append length of message (before pre-processing) // as a 64-bit big-endian integer process_byte(0); process_byte(0); process_byte(0); process_byte(0); process_byte( static_cast((bit_count>>24) & 0xFF)); process_byte( static_cast((bit_count>>16) & 0xFF)); process_byte( static_cast((bit_count>>8 ) & 0xFF)); process_byte( static_cast((bit_count) & 0xFF)); // get final digest digest[0] = h_[0]; digest[1] = h_[1]; digest[2] = h_[2]; digest[3] = h_[3]; digest[4] = h_[4]; } } // namespace hashsmt cvc4-1.5/examples/hashsmt/sha1_collision.cpp000066400000000000000000000063601313116454100211220ustar00rootroot00000000000000/********************* */ /*! \file sha1_collision.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ /* * sha1smt.cpp * * Created on: Jul 13, 2012 * Author: dejan */ #include #include #include #include #include #include "expr/expr_iomanip.h" #include "options/language.h" #include "options/set_language.h" #include "sha1.hpp" #include "smt/command.h" #include "word.h" using namespace std; using namespace CVC4; hashsmt::cvc4_uchar8 *createInput(unsigned size, std::string prefix, std::ostream& output) { hashsmt::cvc4_uchar8 *input = new hashsmt::cvc4_uchar8[size]; for(unsigned i = 0; i < size; ++i) { stringstream ss; ss << prefix << i; input[i] = hashsmt::cvc4_uchar8(ss.str()); output << DeclareFunctionCommand(ss.str(), input[i].getExpr(), input[i].getExpr().getType()) << endl; } return input; } int main(int argc, char* argv[]) { try { // Check the arguments if (argc != 4) { cerr << "usage: sha1smt size rounds (1..80) output-file" << std::endl; return 1; } // Get the input size to encode unsigned msgSize; istringstream msgSize_is(argv[1]); msgSize_is >> msgSize; // Get the number of rounds to use unsigned rounds; istringstream rounds_is(argv[2]); rounds_is >> rounds; // The output ofstream output(argv[3]); output << expr::ExprSetDepth(-1) << language::SetLanguage(language::output::LANG_SMTLIB_V2); output << SetBenchmarkLogicCommand("QF_BV") << endl; output << SetBenchmarkStatusCommand(SMT_UNSATISFIABLE) << endl; // Make the variables the size of the string hashsmt::cvc4_uchar8 *cvc4input1 = createInput(msgSize, "x", output); hashsmt::cvc4_uchar8 *cvc4input2 = createInput(msgSize, "y", output); // Do the cvc4 encoding for first message hashsmt::sha1 cvc4encoder1(rounds); cvc4encoder1.process_bytes(cvc4input1, msgSize); hashsmt::cvc4_uint32 cvc4digest1[5]; cvc4encoder1.get_digest(cvc4digest1); // Do the cvc4 encoding for second message hashsmt::sha1 cvc4encoder2(rounds); cvc4encoder2.process_bytes(cvc4input2, msgSize); hashsmt::cvc4_uint32 cvc4digest2[5]; cvc4encoder2.get_digest(cvc4digest2); // Create the assertion Expr inputEqual = (hashsmt::Word::concat(cvc4input1, msgSize) == hashsmt::Word::concat(cvc4input2, msgSize)); Expr digestEqual = (hashsmt::Word::concat(cvc4digest1, 5) == hashsmt::Word::concat(cvc4digest2, 5)); Expr assertion = inputEqual.notExpr().andExpr(digestEqual); output << AssertCommand(assertion) << endl; // Checksat command output << CheckSatCommand() << endl; } catch (CVC4::Exception& e) { cerr << e << endl; } } cvc4-1.5/examples/hashsmt/sha1_inversion.cpp000066400000000000000000000060071313116454100211410ustar00rootroot00000000000000/********************* */ /*! \file sha1_inversion.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Morgan Deters, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ /* * sha1smt.cpp * * Created on: Jul 13, 2012 * Author: dejan */ #include #include #include #include #include #include "expr/expr_iomanip.h" #include "options/language.h" #include "options/set_language.h" #include "sha1.hpp" #include "smt/command.h" #include "word.h" using namespace std; using namespace CVC4; int main(int argc, char* argv[]) { try { // Check the arguments if (argc != 3) { cerr << "usage: sha1smt message output-file" << std::endl; return 1; } // Get the message to encode and the output file string msg = argv[1]; unsigned msgSize = msg.size(); ofstream output(argv[2]); output << expr::ExprSetDepth(-1) << language::SetLanguage(language::output::LANG_SMTLIB_V2); output << SetBenchmarkLogicCommand("QF_BV") << endl; output << SetBenchmarkStatusCommand(SMT_SATISFIABLE) << endl; // Make the variables the size of the string hashsmt::cvc4_uchar8 *cvc4input = new hashsmt::cvc4_uchar8[msgSize]; for (unsigned i = 0; i < msgSize; ++ i) { stringstream ss; ss << "x" << i; cvc4input[i] = hashsmt::cvc4_uchar8(ss.str()); output << DeclareFunctionCommand(ss.str(), cvc4input[i].getExpr(), cvc4input[i].getExpr().getType()) << endl; // Ouput the solution also Expr solution = (cvc4input[i] == hashsmt::cvc4_uchar8(msg.c_str()[i])); output << "; " << AssertCommand(solution) << endl; } // Do the cvc4 encoding hashsmt::sha1 cvc4encoder; cvc4encoder.process_bytes(cvc4input, msgSize); // Get the digest as bitvectors hashsmt::cvc4_uint32 cvc4digest[5]; cvc4encoder.get_digest(cvc4digest); // Do the actual sha1 encoding boost::uuids::detail::sha1 sha1encoder; sha1encoder.process_bytes(msg.c_str(), msgSize); unsigned sha1digest[5]; sha1encoder.get_digest(sha1digest); // Create the assertion Expr assertion; for (unsigned i = 0; i < 5; ++ i) { Expr conjunct = (cvc4digest[i] == hashsmt::cvc4_uint32(sha1digest[i])); if (i > 0) { assertion = assertion.andExpr(conjunct); } else { assertion = conjunct; } } output << AssertCommand(assertion) << endl; // Checksat command output << CheckSatCommand() << endl; delete cvc4input; } catch (CVC4::Exception& e) { cerr << e << endl; } } cvc4-1.5/examples/hashsmt/word.cpp000066400000000000000000000113151313116454100171620ustar00rootroot00000000000000/********************* */ /*! \file word.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ /* * word.cpp * * Created on: Jul 13, 2012 * Author: dejan */ #include "word.h" #include #include "expr/expr.h" #include "expr/expr_iomanip.h" #include "options/language.h" #include "options/options.h" using namespace std; using namespace hashsmt; using namespace CVC4; using namespace CVC4::options; Expr Word::extendToSize(unsigned newSize) const { if (newSize <= size()) { return d_expr; } else { // 0-extend to size Expr extendOp = em()->mkConst(BitVectorZeroExtend(newSize - size())); return em()->mkExpr(extendOp, d_expr); } } ExprManager* Word::s_manager = 0; ExprManager* Word::em() { if (s_manager == 0) { CVC4::Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); options.setOutputLanguage(language::output::LANG_SMTLIB_V2); s_manager = new CVC4::ExprManager(options); } return s_manager; } Expr Word::operator == (const Word& b) const { return em()->mkExpr(kind::EQUAL, d_expr, b.getExpr()); } Word Word::concat(const Word words[], unsigned size) { Expr concat = words[0].d_expr; for(unsigned i = 1; i < size; ++i) { concat = em()->mkExpr(kind::BITVECTOR_CONCAT, concat, words[i].d_expr); } return Word(concat); } void Word::print(ostream& out) const { out << CVC4::expr::ExprSetDepth(-1) << d_expr; } Word::Word(unsigned newSize, unsigned value) { d_expr = em()->mkConst(BitVector(newSize, value)); }; Word::Word(unsigned newSize, string name) { d_expr = em()->mkVar(name, em()->mkBitVectorType(newSize)); }; Word& Word::operator = (const Word& b) { d_expr = b.d_expr; return *this; } Word Word::operator + (const Word& b) const { unsigned newSize = std::max(size(), b.size()); Expr lhs = extendToSize(newSize); Expr rhs = b.extendToSize(newSize); return em()->mkExpr(kind::BITVECTOR_PLUS, lhs, rhs); } Word& Word::operator += (const Word& b) { (*this) = (*this) + b; return (*this); } Word Word::operator ~ () const { return em()->mkExpr(kind::BITVECTOR_NOT, d_expr); } Word Word::operator & (const Word& b) const { unsigned newSize = std::max(size(), b.size()); Expr lhs = extendToSize(newSize); Expr rhs = b.extendToSize(newSize); return em()->mkExpr(kind::BITVECTOR_AND, lhs, rhs); } Word Word::operator | (const Word& b) const { unsigned newSize = std::max(size(), b.size()); Expr lhs = extendToSize(newSize); Expr rhs = b.extendToSize(newSize); return em()->mkExpr(kind::BITVECTOR_OR, lhs, rhs); } Word& Word::operator |= (const Word& b) { (*this) = (*this) | b; return (*this); } Word Word::operator ^ (const Word& b) const { unsigned newSize = std::max(size(), b.size()); Expr lhs = extendToSize(newSize); Expr rhs = b.extendToSize(newSize); return em()->mkExpr(kind::BITVECTOR_XOR, lhs, rhs); } Word Word::operator << (unsigned amount) const { // Instead of shifting we just add zeroes, to ensure that ((char)x << 24) return 32 bits Word padding(amount, 0); return em()->mkExpr(kind::BITVECTOR_CONCAT, d_expr, padding.d_expr); } Word Word::operator >> (unsigned amount) const { Word shiftAmount(size(), amount); return em()->mkExpr(kind::BITVECTOR_LSHR, d_expr, shiftAmount.d_expr); } unsigned Word::size() const { BitVectorType type = d_expr.getType(); return type.getSize(); } cvc4_uint32::cvc4_uint32(const Word& b) { if (b.size() > 32) { // Extract the first 32 bits Expr extractOp = em()->mkConst(BitVectorExtract(31, 0)); d_expr = em()->mkExpr(extractOp, b.getExpr()); } else if (b.size() < 32) { // 0-extend to 32 bits Expr extendOp = em()->mkConst(BitVectorZeroExtend(32 - b.size())); d_expr = em()->mkExpr(extendOp, b.getExpr()); } else { d_expr = b.getExpr(); } } cvc4_uchar8::cvc4_uchar8(const Word& b) { if (b.size() > 8) { // Extract the first 8 bits Expr extractOp = em()->mkConst(BitVectorExtract(7, 0)); d_expr = em()->mkExpr(extractOp, b.getExpr()); } else if (b.size() < 8) { // 0-extend to 8 bits Expr extendOp = em()->mkConst(BitVectorZeroExtend(8 - b.size())); d_expr = em()->mkExpr(extendOp, b.getExpr()); } else { d_expr = b.getExpr(); } } cvc4-1.5/examples/hashsmt/word.h000066400000000000000000000060651313116454100166350ustar00rootroot00000000000000/********************* */ /*! \file word.h ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ /* * word.h * * Created on: Jul 13, 2012 * Author: dejan */ #ifndef WORD_H_ #define WORD_H_ #include #include #include "expr/expr.h" #include "expr/expr_manager.h" #include "options/options.h" namespace hashsmt { class Word { /** Expression managaer we're using for all word expressions */ static CVC4::ExprManager* s_manager; protected: /** The expression of this word */ CVC4::Expr d_expr; /** Get the expression manager words are using */ static CVC4::ExprManager* em(); Word(CVC4::Expr expr = CVC4::Expr()) : d_expr(expr) {} /** Extend the representing expression to the given size >= size() */ CVC4::Expr extendToSize(unsigned size) const; public: Word(unsigned size, unsigned value = 0); Word(unsigned size, std::string name); Word& operator = (const Word& b); Word operator + (const Word& b) const; Word& operator += (const Word& b); Word operator ~ () const; Word operator & (const Word& b) const; Word operator | (const Word& b) const; Word& operator |= (const Word& b); Word operator ^ (const Word& b) const; Word operator << (unsigned amount) const; Word operator >> (unsigned amount) const; unsigned size() const; void print(std::ostream& out) const; CVC4::Expr getExpr() const { return d_expr; } /** Returns the comparison expression */ CVC4::Expr operator == (const Word& b) const; /** Concatenate the given words */ static Word concat(const Word words[], unsigned size); }; inline std::ostream& operator << (std::ostream& out, const Word& word) { word.print(out); return out; } /** Symbolic 32-bit unsigned integer as a CVC4 bitvector expression */ class cvc4_uint32 : public Word { public: /** Construction from constants of the right size */ cvc4_uint32(unsigned value = 0) : Word(32, value) {} /** Construction of variables of the right size */ cvc4_uint32(std::string name) : Word(32, name) {} /** Automatic extend/cut to uint32 */ cvc4_uint32(const Word& word); }; /** Symbolic 8-bit unsigned char as a CVC4 bitvector expression */ class cvc4_uchar8 : public Word { public: /** Construction from constants of the right size */ cvc4_uchar8(unsigned value = 0) : Word(8, value) {} /** Construction of variables of the right size */ cvc4_uchar8(std::string name) : Word(8, name) {} /** Automatic extend/cut to uchar8 */ cvc4_uchar8(const Word& word); }; } #endif /* WORD_H_ */ cvc4-1.5/examples/nra-translate/000077500000000000000000000000001313116454100166065ustar00rootroot00000000000000cvc4-1.5/examples/nra-translate/Makefile.am000066400000000000000000000026011313116454100206410ustar00rootroot00000000000000AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_PROGRAMS = \ smt2toqepcad \ smt2tomathematica \ smt2toisat \ smt2toredlog \ smt2todreal \ normalize \ smt2info noinst_DATA = smt2toqepcad_SOURCES = \ smt2toqepcad.cpp smt2toqepcad_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2tomathematica_SOURCES = \ smt2tomathematica.cpp smt2tomathematica_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2toisat_SOURCES = \ smt2toisat.cpp smt2toisat_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2toredlog_SOURCES = \ smt2toredlog.cpp smt2toredlog_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2todreal_SOURCES = \ smt2todreal.cpp smt2todreal_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2info_SOURCES = \ smt2info.cpp smt2info_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la normalize_SOURCES = \ normalize.cpp normalize_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) cvc4-1.5/examples/nra-translate/Makefile.in000066400000000000000000000720751313116454100206660ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ noinst_PROGRAMS = smt2toqepcad$(EXEEXT) smt2tomathematica$(EXEEXT) \ smt2toisat$(EXEEXT) smt2toredlog$(EXEEXT) smt2todreal$(EXEEXT) \ normalize$(EXEEXT) smt2info$(EXEEXT) subdir = examples/nra-translate ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_normalize_OBJECTS = normalize.$(OBJEXT) normalize_OBJECTS = $(am_normalize_OBJECTS) normalize_DEPENDENCIES = @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_smt2info_OBJECTS = smt2info.$(OBJEXT) smt2info_OBJECTS = $(am_smt2info_OBJECTS) smt2info_DEPENDENCIES = @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la am_smt2todreal_OBJECTS = smt2todreal.$(OBJEXT) smt2todreal_OBJECTS = $(am_smt2todreal_OBJECTS) smt2todreal_DEPENDENCIES = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la am_smt2toisat_OBJECTS = smt2toisat.$(OBJEXT) smt2toisat_OBJECTS = $(am_smt2toisat_OBJECTS) smt2toisat_DEPENDENCIES = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la am_smt2tomathematica_OBJECTS = smt2tomathematica.$(OBJEXT) smt2tomathematica_OBJECTS = $(am_smt2tomathematica_OBJECTS) smt2tomathematica_DEPENDENCIES = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la am_smt2toqepcad_OBJECTS = smt2toqepcad.$(OBJEXT) smt2toqepcad_OBJECTS = $(am_smt2toqepcad_OBJECTS) smt2toqepcad_DEPENDENCIES = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la am_smt2toredlog_OBJECTS = smt2toredlog.$(OBJEXT) smt2toredlog_OBJECTS = $(am_smt2toredlog_OBJECTS) smt2toredlog_DEPENDENCIES = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(normalize_SOURCES) $(smt2info_SOURCES) \ $(smt2todreal_SOURCES) $(smt2toisat_SOURCES) \ $(smt2tomathematica_SOURCES) $(smt2toqepcad_SOURCES) \ $(smt2toredlog_SOURCES) DIST_SOURCES = $(normalize_SOURCES) $(smt2info_SOURCES) \ $(smt2todreal_SOURCES) $(smt2toisat_SOURCES) \ $(smt2tomathematica_SOURCES) $(smt2toqepcad_SOURCES) \ $(smt2toredlog_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_DATA = smt2toqepcad_SOURCES = \ smt2toqepcad.cpp smt2toqepcad_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2tomathematica_SOURCES = \ smt2tomathematica.cpp smt2tomathematica_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2toisat_SOURCES = \ smt2toisat.cpp smt2toisat_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2toredlog_SOURCES = \ smt2toredlog.cpp smt2toredlog_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2todreal_SOURCES = \ smt2todreal.cpp smt2todreal_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la smt2info_SOURCES = \ smt2info.cpp smt2info_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la normalize_SOURCES = \ normalize.cpp normalize_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/nra-translate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/nra-translate/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_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 normalize$(EXEEXT): $(normalize_OBJECTS) $(normalize_DEPENDENCIES) $(EXTRA_normalize_DEPENDENCIES) @rm -f normalize$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(normalize_OBJECTS) $(normalize_LDADD) $(LIBS) smt2info$(EXEEXT): $(smt2info_OBJECTS) $(smt2info_DEPENDENCIES) $(EXTRA_smt2info_DEPENDENCIES) @rm -f smt2info$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(smt2info_OBJECTS) $(smt2info_LDADD) $(LIBS) smt2todreal$(EXEEXT): $(smt2todreal_OBJECTS) $(smt2todreal_DEPENDENCIES) $(EXTRA_smt2todreal_DEPENDENCIES) @rm -f smt2todreal$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(smt2todreal_OBJECTS) $(smt2todreal_LDADD) $(LIBS) smt2toisat$(EXEEXT): $(smt2toisat_OBJECTS) $(smt2toisat_DEPENDENCIES) $(EXTRA_smt2toisat_DEPENDENCIES) @rm -f smt2toisat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(smt2toisat_OBJECTS) $(smt2toisat_LDADD) $(LIBS) smt2tomathematica$(EXEEXT): $(smt2tomathematica_OBJECTS) $(smt2tomathematica_DEPENDENCIES) $(EXTRA_smt2tomathematica_DEPENDENCIES) @rm -f smt2tomathematica$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(smt2tomathematica_OBJECTS) $(smt2tomathematica_LDADD) $(LIBS) smt2toqepcad$(EXEEXT): $(smt2toqepcad_OBJECTS) $(smt2toqepcad_DEPENDENCIES) $(EXTRA_smt2toqepcad_DEPENDENCIES) @rm -f smt2toqepcad$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(smt2toqepcad_OBJECTS) $(smt2toqepcad_LDADD) $(LIBS) smt2toredlog$(EXEEXT): $(smt2toredlog_OBJECTS) $(smt2toredlog_DEPENDENCIES) $(EXTRA_smt2toredlog_DEPENDENCIES) @rm -f smt2toredlog$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(smt2toredlog_OBJECTS) $(smt2toredlog_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/normalize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smt2info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smt2todreal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smt2toisat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smt2tomathematica.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smt2toqepcad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smt2toredlog.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || 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)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am \ install-examplesDATA install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-examplesDATA .PRECIOUS: Makefile # 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: cvc4-1.5/examples/nra-translate/normalize.cpp000066400000000000000000000043551313116454100213210ustar00rootroot00000000000000/********************* */ /*! \file normalize.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include #include #include #include #include #include #include "expr/expr.h" #include "expr/expr_iomanip.h" #include "options/language.h" #include "options/options.h" #include "options/set_language.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/smt_engine.h" #include "smt/command.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; using namespace CVC4::theory; int main(int argc, char* argv[]) { // Get the filename string input(argv[1]); // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); ExprManager exprManager(options); cout << language::SetLanguage(language::output::LANG_SMTLIB_V2) << expr::ExprSetDepth(-1); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); Parser* parser = parserBuilder.build(); // Smt manager for simplifications SmtEngine engine(&exprManager); // Variables and assertions vector assertions; Command* cmd; while ((cmd = parser->nextCommand())) { AssertCommand* assert = dynamic_cast(cmd); if (assert) { Expr normalized = engine.simplify(assert->getExpr()); cout << "(assert " << normalized << ")" << endl; delete cmd; continue; } CheckSatCommand* checksat = dynamic_cast(cmd); if (checksat) { delete cmd; continue; } cout << *cmd << endl; delete cmd; } cout << "(check-sat)" << endl; // Get rid of the parser delete parser; } cvc4-1.5/examples/nra-translate/smt2info.cpp000066400000000000000000000067221313116454100210620ustar00rootroot00000000000000/********************* */ /*! \file smt2info.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Morgan Deters, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include #include #include #include #include #include "expr/expr.h" #include "options/options.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; using namespace CVC4::options; unsigned compute_degree(ExprManager& exprManager, const Expr& term) { unsigned n = term.getNumChildren(); unsigned degree = 0; // boolean stuff if (term.getType() == exprManager.booleanType()) { for (unsigned i = 0; i < n; ++ i) { degree = std::max(degree, compute_degree(exprManager, term[i])); } return degree; } // terms if (n == 0) { if (term.getKind() == kind::CONST_RATIONAL) { return 0; } else { return 1; } } else { unsigned degree = 0; if (term.getKind() == kind::MULT) { for (unsigned i = 0; i < n; ++ i) { degree += std::max(degree, compute_degree(exprManager, term[i])); } } else { for (unsigned i = 0; i < n; ++ i) { degree = std::max(degree, compute_degree(exprManager, term[i])); } } return degree; } } int main(int argc, char* argv[]) { try { // Get the filename string input(argv[1]); // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); ExprManager exprManager(options); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); Parser* parser = parserBuilder.build(); // Variables and assertions vector variables; vector info_tags; vector info_data; vector assertions; Command* cmd; while ((cmd = parser->nextCommand())) { SetInfoCommand* setinfo = dynamic_cast(cmd); if (setinfo) { info_tags.push_back(setinfo->getFlag()); info_data.push_back(setinfo->getSExpr().getValue()); delete cmd; continue; } DeclareFunctionCommand* declare = dynamic_cast(cmd); if (declare) { variables.push_back(declare->getSymbol()); delete cmd; continue; } AssertCommand* assert = dynamic_cast(cmd); if (assert) { assertions.push_back(assert->getExpr()); delete cmd; continue; } delete cmd; } cout << "variables: " << variables.size() << endl; unsigned total_degree = 0; for (unsigned i = 0; i < assertions.size(); ++ i) { total_degree = std::max(total_degree, compute_degree(exprManager, assertions[i])); } cout << "degree: " << total_degree << endl; // Get rid of the parser delete parser; } catch (Exception& e) { cerr << e << endl; } } cvc4-1.5/examples/nra-translate/smt2todreal.cpp000066400000000000000000000042701313116454100215550ustar00rootroot00000000000000/********************* */ /*! \file smt2todreal.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include #include #include #include #include #include #include "expr/expr.h" #include "expr/expr_iomanip.h" #include "options/options.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/smt_engine.h" #include "smt/command.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; using namespace CVC4::options; int main(int argc, char* argv[]) { // Get the filename string input(argv[1]); // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); options.setOutputLanguage(language::output::LANG_SMTLIB_V2); ExprManager exprManager(options); cout << expr::ExprDag(0) << expr::ExprSetDepth(-1); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); Parser* parser = parserBuilder.build(); // Smt manager for simplifications SmtEngine engine(&exprManager); // Variables and assertions std::map variables; vector info_tags; vector info_data; vector assertions; Command* cmd; while ((cmd = parser->nextCommand())) { DeclareFunctionCommand* declare = dynamic_cast(cmd); if (declare) { cout << "[-10000, 10000] " << declare->getSymbol() << ";" << endl; } AssertCommand* assert = dynamic_cast(cmd); if (assert) { cout << assert->getExpr() << ";" << endl; } delete cmd; } // Get rid of the parser delete parser; } cvc4-1.5/examples/nra-translate/smt2toisat.cpp000066400000000000000000000170651313116454100214340ustar00rootroot00000000000000/********************* */ /*! \file smt2toisat.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Andrew Reynolds, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include #include #include #include #include #include #include "expr/expr.h" #include "options/options.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" #include "smt/smt_engine.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; using namespace CVC4::options; void translate_to_isat( string input, const vector& info_tags, const vector& info_data, const map& variables, const vector& assertions); int main(int argc, char* argv[]) { // Get the filename string input(argv[1]); // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); ExprManager exprManager(options); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); Parser* parser = parserBuilder.build(); // Smt manager for simplifications SmtEngine engine(&exprManager); // Variables and assertions std::map variables; vector info_tags; vector info_data; vector assertions; Command* cmd; while ((cmd = parser->nextCommand())) { SetInfoCommand* setinfo = dynamic_cast(cmd); if (setinfo) { info_tags.push_back(setinfo->getFlag()); info_data.push_back(setinfo->getSExpr().getValue()); delete cmd; continue; } DeclareFunctionCommand* declare = dynamic_cast(cmd); if (declare) { string name = declare->getSymbol(); Expr var = parser->getVariable(name); unsigned n = variables.size(); variables[var] = n; delete cmd; continue; } AssertCommand* assert = dynamic_cast(cmd); if (assert) { assertions.push_back(engine.simplify(assert->getExpr())); delete cmd; continue; } delete cmd; } // Do the translation translate_to_isat(input, info_tags, info_data, variables, assertions); // Get rid of the parser delete parser; } void translate_to_isat_term(const map& variables, const Expr& term) { bool first; unsigned n = term.getNumChildren(); if (n == 0) { if (term.getKind() == kind::CONST_RATIONAL) { cout << term.getConst(); } else { assert(variables.find(term) != variables.end()); cout << "x" << variables.find(term)->second; } } else { switch (term.getKind()) { case kind::PLUS: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " + "; } first = false; translate_to_isat_term(variables, term[i]); } cout << ")"; break; case kind::MULT: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " * "; } first = false; translate_to_isat_term(variables, term[i]); } cout << ")"; break; case kind::MINUS: cout << "("; translate_to_isat_term(variables, term[0]); cout << " - "; translate_to_isat_term(variables, term[1]); cout << ")"; break; case kind::DIVISION: assert(false); break; case kind::UMINUS: cout << "(-("; translate_to_isat_term(variables, term[0]); cout << "))"; break; default: assert(false); break; } } } void translate_to_isat(const map& variables, const Expr& assertion) { bool first; unsigned n = assertion.getNumChildren(); if (n == 0) { if (assertion.isConst()) { if (assertion.getConst()) { cout << "(1 > 0)"; } else { cout << "(1 < 0)"; } } else { assert(false); } } else { std::string op; bool binary = false; bool theory = false; switch (assertion.getKind()) { case kind::NOT: cout << "!"; translate_to_isat(variables, assertion[0]); break; case kind::OR: first = true; cout << "("; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " or "; } first = false; translate_to_isat(variables, assertion[i]); } cout << ")"; break; case kind::AND: first = true; cout << "("; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " and "; } first = false; translate_to_isat(variables, assertion[i]); } cout << ")"; break; case kind::IMPLIES: cout << "("; translate_to_isat(variables, assertion[0]); cout << " -> "; translate_to_isat(variables, assertion[1]); cout << ")"; break; case kind::EQUAL: if( assertion[0].getType().isBoolean() ){ cout << "("; translate_to_isat(variables, assertion[0]); cout << " <-> "; translate_to_isat(variables, assertion[1]); cout << ")"; }else{ op = "="; theory = true; } break; case kind::LT: op = "<"; theory = true; break; case kind::LEQ: op = "<="; theory = true; break; case kind::GT: op = ">"; theory = true; break; case kind::GEQ: op = ">="; theory = true; break; default: assert(false); break; } if (binary) { cout << "("; translate_to_isat(variables, assertion[0]); cout << " " << op << " "; translate_to_isat(variables, assertion[1]); cout << ")"; } if (theory) { cout << "("; translate_to_isat_term(variables, assertion[0]); cout << " " << op << " "; translate_to_isat_term(variables, assertion[1]); cout << ")"; } } } void translate_to_isat( string input, const vector& info_tags, const vector& info_data, const std::map& variables, const vector& assertions) { bool first; // Dump out the information cout << "-- translated from " << input << endl; // Dump the variables cout << "DECL" << endl; cout << " -- the variables" << endl; cout << " float [-1000, 1000]"; first = true; for (unsigned i = 0; i < variables.size(); ++ i) { if (!first) { cout << ","; } cout << " x" << i; if (first) { first = false; } } cout << ";" << endl; // The assertions cout << "EXPR" << endl; cout << " -- the constraints to be solved" << endl; for (unsigned i = 0; i < assertions.size(); ++ i) { cout << " "; translate_to_isat(variables, assertions[i]); cout << ";" << endl; } } cvc4-1.5/examples/nra-translate/smt2tomathematica.cpp000066400000000000000000000177261313116454100227550ustar00rootroot00000000000000/********************* */ /*! \file smt2tomathematica.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include #include #include #include #include #include #include "expr/expr.h" #include "options/options.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; void translate_to_mathematica( string input, const vector& info_tags, const vector& info_data, const map& variables, const vector& assertions); int main(int argc, char* argv[]) { // Get the filename string input(argv[1]); // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); ExprManager exprManager(options); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); Parser* parser = parserBuilder.build(); // Variables and assertions std::map variables; vector info_tags; vector info_data; vector assertions; Command* cmd; while ((cmd = parser->nextCommand())) { SetInfoCommand* setinfo = dynamic_cast(cmd); if (setinfo) { info_tags.push_back(setinfo->getFlag()); info_data.push_back(setinfo->getSExpr().getValue()); delete cmd; continue; } DeclareFunctionCommand* declare = dynamic_cast(cmd); if (declare) { string name = declare->getSymbol(); Expr var = parser->getVariable(name); unsigned n = variables.size(); variables[var] = n; delete cmd; continue; } AssertCommand* assert = dynamic_cast(cmd); if (assert) { assertions.push_back(assert->getExpr()); delete cmd; continue; } delete cmd; } // Do the translation translate_to_mathematica(input, info_tags, info_data, variables, assertions); // Get rid of the parser delete parser; } void translate_to_mathematica_term(const map& variables, const Expr& term) { bool first; unsigned n = term.getNumChildren(); if (n == 0) { if (term.getKind() == kind::CONST_RATIONAL) { cout << term.getConst(); } else { assert(variables.find(term) != variables.end()); cout << "x" << variables.find(term)->second; } } else { switch (term.getKind()) { case kind::PLUS: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " + "; } first = false; translate_to_mathematica_term(variables, term[i]); } cout << ")"; break; case kind::MULT: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " * "; } first = false; translate_to_mathematica_term(variables, term[i]); } cout << ")"; break; case kind::MINUS: cout << "("; translate_to_mathematica_term(variables, term[0]); cout << " - "; translate_to_mathematica_term(variables, term[1]); cout << ")"; break; case kind::DIVISION: // we only allow division by constant assert(term[1].getKind() == kind::CONST_RATIONAL); cout << "("; translate_to_mathematica_term(variables, term[0]); cout << " / "; translate_to_mathematica_term(variables, term[1]); cout << ")"; break; case kind::UMINUS: cout << "(-("; translate_to_mathematica_term(variables, term[0]); cout << "))"; break; default: assert(false); break; } } } void translate_to_mathematica(const map& variables, const Expr& assertion) { bool first; unsigned n = assertion.getNumChildren(); if (n == 0) { assert(false); } else { std::string op; bool binary = false; bool theory = false; switch (assertion.getKind()) { case kind::NOT: cout << "!"; translate_to_mathematica(variables, assertion[0]); break; case kind::OR: first = true; cout << "("; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " || "; } first = false; translate_to_mathematica(variables, assertion[i]); } cout << ")"; break; case kind::AND: first = true; cout << "("; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " && "; } first = false; translate_to_mathematica(variables, assertion[i]); } cout << ")"; break; case kind::IMPLIES: cout << "Implies["; translate_to_mathematica(variables, assertion[0]); cout << ","; translate_to_mathematica(variables, assertion[1]); cout << "]"; break; case kind::EQUAL: if( assertion[0].getType().isBoolean() ){ cout << "Equivalent["; translate_to_mathematica(variables, assertion[0]); cout << ","; translate_to_mathematica(variables, assertion[1]); cout << "]"; }else{ op = "=="; theory = true; } break; case kind::LT: op = "<"; theory = true; break; case kind::LEQ: op = "<="; theory = true; break; case kind::GT: op = ">"; theory = true; break; case kind::GEQ: op = ">="; theory = true; break; default: assert(false); break; } if (binary) { cout << "("; translate_to_mathematica(variables, assertion[0]); cout << " " << op << " "; translate_to_mathematica(variables, assertion[1]); cout << ")"; } if (theory) { cout << "("; translate_to_mathematica_term(variables, assertion[0]); cout << " " << op << " "; translate_to_mathematica_term(variables, assertion[1]); cout << ")"; } } } void translate_to_mathematica( string input, const vector& info_tags, const vector& info_data, const std::map& variables, const vector& assertions) { bool first; // Dump out the information cout << "(* translated from " << input << " "; bool dump_tags = false; if (dump_tags) { first = true; for (unsigned i = 0; i < info_tags.size(); ++ i) { if (!first) { cout << ", "; } first = false; cout << info_tags[i] << " = " << info_data[i]; } } cout << "*)" << endl; cout << "Resolve["; // Formula cout << "Exists[{"; first = true; for (unsigned i = 0; i < variables.size(); ++ i) { if (!first) { cout << ","; } first = false; cout << "x" << i; } cout << "}, "; if (assertions.size() > 1) { first = true; for (unsigned i = 0; i < assertions.size(); ++ i) { if (!first) { cout << " && "; } first = false; translate_to_mathematica(variables, assertions[i]); } } else { translate_to_mathematica(variables, assertions[0]); } cout << "]"; // End resolve cout << ", Reals]" << endl; } cvc4-1.5/examples/nra-translate/smt2toqepcad.cpp000066400000000000000000000202651313116454100217250ustar00rootroot00000000000000/********************* */ /*! \file smt2toqepcad.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include #include #include #include #include #include #include "expr/expr.h" #include "options/options.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; void translate_to_qepcad( string input, const vector& info_tags, const vector& info_data, const map& variables, const vector& assertions); int main(int argc, char* argv[]) { std::map vars2id; // Get the filename string input(argv[1]); // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); ExprManager exprManager(options); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); Parser* parser = parserBuilder.build(); // Variables and assertions std::map variables; vector info_tags; vector info_data; vector assertions; Command* cmd; while ((cmd = parser->nextCommand())) { SetInfoCommand* setinfo = dynamic_cast(cmd); if (setinfo) { info_tags.push_back(setinfo->getFlag()); info_data.push_back(setinfo->getSExpr().getValue()); delete cmd; continue; } DeclareFunctionCommand* declare = dynamic_cast(cmd); if (declare) { string name = declare->getSymbol(); Expr var = parser->getVariable(name); unsigned n = variables.size(); variables[var] = n; delete cmd; continue; } AssertCommand* assert = dynamic_cast(cmd); if (assert) { assertions.push_back(assert->getExpr()); delete cmd; continue; } delete cmd; } // Do the translation translate_to_qepcad(input, info_tags, info_data, variables, assertions); // Get rid of the parser delete parser; } void translate_to_qepcad_term(const std::map& variables, const Expr& term) { bool first; unsigned n = term.getNumChildren(); if (n == 0) { if (term.getKind() == kind::CONST_RATIONAL) { cout << term.getConst(); } else { assert(variables.find(term) != variables.end()); cout << "x" << variables.find(term)->second; } } else { switch (term.getKind()) { case kind::PLUS: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " + "; } first = false; translate_to_qepcad_term(variables, term[i]); } cout << ")"; break; case kind::MULT: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " "; } first = false; translate_to_qepcad_term(variables, term[i]); } cout << ")"; break; case kind::MINUS: cout << "("; translate_to_qepcad_term(variables, term[0]); cout << " - "; translate_to_qepcad_term(variables, term[1]); cout << ")"; break; case kind::UMINUS: cout << "(-("; translate_to_qepcad_term(variables, term[0]); cout << "))"; break; case kind::DIVISION: // we only allow division by constant assert(term[1].getKind() == kind::CONST_RATIONAL); cout << "("; cout << "(1/"; translate_to_qepcad_term(variables, term[1]); cout << ") "; translate_to_qepcad_term(variables, term[0]); cout << ")"; break; default: assert(false); break; } } } void translate_to_qepcad(const std::map& variables, const Expr& assertion) { bool first; unsigned n = assertion.getNumChildren(); if (n == 0) { assert(false); } else { std::string op; bool theory = false; bool binary = false; switch (assertion.getKind()) { case kind::NOT: cout << "[~"; translate_to_qepcad(variables, assertion[0]); cout << "]"; break; case kind::OR: first = true; cout << "["; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " \\/ "; } first = false; translate_to_qepcad(variables, assertion[i]); } cout << "]"; break; case kind::AND: first = true; cout << "["; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " /\\ "; } first = false; translate_to_qepcad(variables, assertion[i]); } cout << "]"; break; case kind::IMPLIES: op = "==>"; binary = true; break; case kind::EQUAL: if( assertion[0].getType().isBoolean() ){ op = "<==>"; binary = true; }else{ op = "="; theory = true; } break; case kind::LT: op = "<"; theory = true; break; case kind::LEQ: op = "<="; theory = true; break; case kind::GT: op = ">"; theory = true; break; case kind::GEQ: op = ">="; theory = true; break; default: assert(false); break; } if (theory) { cout << "["; translate_to_qepcad_term(variables, assertion[0]); cout << " " << op << " "; translate_to_qepcad_term(variables, assertion[1]); cout << "]"; } if (binary) { cout << "["; translate_to_qepcad(variables, assertion[0]); cout << " " << op << " "; translate_to_qepcad(variables, assertion[1]); cout << "]"; } } } void translate_to_qepcad( string input, const vector& info_tags, const vector& info_data, const std::map& variables, const vector& assertions) { bool first; // Dump out the information cout << "[ translated from " << input << " "; bool dump_tags = false; if (dump_tags) { first = true; for (unsigned i = 0; i < info_tags.size(); ++ i) { if (!first) { cout << ", "; } first = false; cout << info_tags[i] << " = " << info_data[i]; } } cout << "]" << endl; // Declare the variables cout << "("; first = true; for (unsigned i = 0; i < variables.size(); ++ i) { if (!first) { cout << ","; } first = false; cout << "x" << i;; } cout << ")" << endl; // Number of free variables cout << "0" << endl; // The quantifiers first for (unsigned i = 0; i < variables.size(); ++ i) { cout << "(Ex" << i << ")"; } // Now the formula cout << "["; if (assertions.size() > 1) { first = true; for (unsigned i = 0; i < assertions.size(); ++ i) { if (!first) { cout << " /\\ "; } first = false; translate_to_qepcad(variables, assertions[i]); } } else { translate_to_qepcad(variables, assertions[0]); } cout << "]." << endl; // Before normalization cout << "go" << endl; // Before projection if (variables.size() > 3) { cout << "proj-op (m,m"; for (unsigned i = 3; i < variables.size(); ++ i) { cout << ",h"; } cout << ")" << endl; } cout << "go" << endl; // Before choice cout << "d-stat" << endl; // Before solution cout << "go" << endl; // Finish up cout << "finish" << endl; } cvc4-1.5/examples/nra-translate/smt2toredlog.cpp000066400000000000000000000176221313116454100217470ustar00rootroot00000000000000/********************* */ /*! \file smt2toredlog.cpp ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Tim King, Andrew Reynolds ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include #include #include #include #include #include #include "expr/expr.h" #include "options/options.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" #include "smt/smt_engine.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; using namespace CVC4::options; void translate_to_redlog( string input, string command, const vector& info_tags, const vector& info_data, const map& variables, const vector& assertions); int main(int argc, char* argv[]) { // Get the filename string input(argv[1]); // Get the redlog command string command(argv[2]); // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); ExprManager exprManager(options); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); Parser* parser = parserBuilder.build(); // Smt manager for simplifications SmtEngine engine(&exprManager); // Variables and assertions std::map variables; vector info_tags; vector info_data; vector assertions; Command* cmd; while ((cmd = parser->nextCommand())) { SetInfoCommand* setinfo = dynamic_cast(cmd); if (setinfo) { info_tags.push_back(setinfo->getFlag()); info_data.push_back(setinfo->getSExpr().getValue()); delete cmd; continue; } DeclareFunctionCommand* declare = dynamic_cast(cmd); if (declare) { string name = declare->getSymbol(); Expr var = parser->getVariable(name); unsigned n = variables.size(); variables[var] = n; delete cmd; continue; } AssertCommand* assert = dynamic_cast(cmd); if (assert) { assertions.push_back(engine.simplify(assert->getExpr())); delete cmd; continue; } delete cmd; } // Do the translation translate_to_redlog(input, command, info_tags, info_data, variables, assertions); // Get rid of the parser delete parser; } void translate_to_redlog_term(const map& variables, const Expr& term) { bool first; unsigned n = term.getNumChildren(); if (n == 0) { if (term.getKind() == kind::CONST_RATIONAL) { cout << term.getConst(); } else { assert(variables.find(term) != variables.end()); cout << "x" << variables.find(term)->second; } } else { switch (term.getKind()) { case kind::PLUS: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " + "; } first = false; translate_to_redlog_term(variables, term[i]); } cout << ")"; break; case kind::MULT: cout << "("; first = true; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " * "; } first = false; translate_to_redlog_term(variables, term[i]); } cout << ")"; break; case kind::MINUS: cout << "("; translate_to_redlog_term(variables, term[0]); cout << " - "; translate_to_redlog_term(variables, term[1]); cout << ")"; break; case kind::DIVISION: cout << "("; translate_to_redlog_term(variables, term[0]); cout << " / "; translate_to_redlog_term(variables, term[1]); cout << ")"; break; case kind::UMINUS: cout << "(-("; translate_to_redlog_term(variables, term[0]); cout << "))"; break; default: assert(false); break; } } } void translate_to_redlog(const map& variables, const Expr& assertion) { bool first; unsigned n = assertion.getNumChildren(); if (n == 0) { if (assertion.isConst()) { if (assertion.getConst()) { cout << "(1 > 0)"; } else { cout << "(1 < 0)"; } } else { assert(false); } } else { std::string op; bool binary = false; bool theory = false; switch (assertion.getKind()) { case kind::NOT: cout << "(not "; translate_to_redlog(variables, assertion[0]); cout << ")"; break; case kind::OR: first = true; cout << "("; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " or "; } first = false; translate_to_redlog(variables, assertion[i]); } cout << ")"; break; case kind::AND: first = true; cout << "("; for (unsigned i = 0; i < n; ++ i) { if (!first) { cout << " and "; } first = false; translate_to_redlog(variables, assertion[i]); } cout << ")"; break; case kind::IMPLIES: cout << "("; translate_to_redlog(variables, assertion[0]); cout << " impl "; translate_to_redlog(variables, assertion[1]); cout << ")"; break; case kind::EQUAL: if( assertion[0].getType().isBoolean() ){ cout << "("; translate_to_redlog(variables, assertion[0]); cout << " equiv "; translate_to_redlog(variables, assertion[1]); cout << ")"; }else{ op = "="; theory = true; } break; case kind::LT: op = "<"; theory = true; break; case kind::LEQ: op = "<="; theory = true; break; case kind::GT: op = ">"; theory = true; break; case kind::GEQ: op = ">="; theory = true; break; default: assert(false); break; } if (binary) { cout << "("; translate_to_redlog(variables, assertion[0]); cout << " " << op << " "; translate_to_redlog(variables, assertion[1]); cout << ")"; } if (theory) { cout << "("; translate_to_redlog_term(variables, assertion[0]); cout << " " << op << " "; translate_to_redlog_term(variables, assertion[1]); cout << ")"; } } } void translate_to_redlog( string input, string command, const vector& info_tags, const vector& info_data, const std::map& variables, const vector& assertions) { bool first; // Dump out the information cout << "load redlog;" << endl; cout << "rlset ofsf;" << endl; // Dump the variables cout << "phi := ex({"; first = true; for (unsigned i = 0; i < variables.size(); ++ i) { if (!first) { cout << ","; } cout << " x" << i; if (first) { first = false; } } cout << "},"; // The assertions first = true; for (unsigned i = 0; i < assertions.size(); ++ i) { if (first == false) { cout << " and "; } first = false; translate_to_redlog(variables, assertions[i]); } cout << ");" << endl; cout << "result := " << command << " phi;" << endl; cout << "result;" << endl; cout << "quit;" << endl; } cvc4-1.5/examples/sets-translate/000077500000000000000000000000001313116454100170045ustar00rootroot00000000000000cvc4-1.5/examples/sets-translate/Makefile.am000066400000000000000000000012741313116454100210440ustar00rootroot00000000000000AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_PROGRAMS = \ sets2arrays \ sets2axioms noinst_DATA = sets2arrays_SOURCES = \ sets_translate.cpp sets2arrays_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la # give nodist_: only distribute/install once nodist_sets2axioms_SOURCES = \ sets_translate.cpp sets2axioms_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la sets2axioms_CXXFLAGS = \ -DENABLE_AXIOMS # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) cvc4-1.5/examples/sets-translate/Makefile.in000066400000000000000000000677001313116454100210630ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ noinst_PROGRAMS = sets2arrays$(EXEEXT) sets2axioms$(EXEEXT) subdir = examples/sets-translate ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_sets2arrays_OBJECTS = sets_translate.$(OBJEXT) sets2arrays_OBJECTS = $(am_sets2arrays_OBJECTS) sets2arrays_DEPENDENCIES = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = nodist_sets2axioms_OBJECTS = sets2axioms-sets_translate.$(OBJEXT) sets2axioms_OBJECTS = $(nodist_sets2axioms_OBJECTS) sets2axioms_DEPENDENCIES = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la sets2axioms_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(sets2axioms_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(sets2arrays_SOURCES) $(nodist_sets2axioms_SOURCES) DIST_SOURCES = $(sets2arrays_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -I@srcdir@/../../src/include -I@srcdir@/../../src -I@builddir@/../../src $(ANTLR_INCLUDES) AM_CXXFLAGS = -Wall AM_CFLAGS = -Wall noinst_DATA = sets2arrays_SOURCES = \ sets_translate.cpp sets2arrays_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la # give nodist_: only distribute/install once nodist_sets2axioms_SOURCES = \ sets_translate.cpp sets2axioms_LDADD = \ @builddir@/../../src/parser/libcvc4parser.la \ @builddir@/../../src/libcvc4.la sets2axioms_CXXFLAGS = \ -DENABLE_AXIOMS # for installation examplesdir = $(docdir)/$(subdir) examples_DATA = $(DIST_SOURCES) $(EXTRA_DIST) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/sets-translate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/sets-translate/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_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 sets2arrays$(EXEEXT): $(sets2arrays_OBJECTS) $(sets2arrays_DEPENDENCIES) $(EXTRA_sets2arrays_DEPENDENCIES) @rm -f sets2arrays$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(sets2arrays_OBJECTS) $(sets2arrays_LDADD) $(LIBS) sets2axioms$(EXEEXT): $(sets2axioms_OBJECTS) $(sets2axioms_DEPENDENCIES) $(EXTRA_sets2axioms_DEPENDENCIES) @rm -f sets2axioms$(EXEEXT) $(AM_V_CXXLD)$(sets2axioms_LINK) $(sets2axioms_OBJECTS) $(sets2axioms_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sets2axioms-sets_translate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sets_translate.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< sets2axioms-sets_translate.o: sets_translate.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sets2axioms_CXXFLAGS) $(CXXFLAGS) -MT sets2axioms-sets_translate.o -MD -MP -MF $(DEPDIR)/sets2axioms-sets_translate.Tpo -c -o sets2axioms-sets_translate.o `test -f 'sets_translate.cpp' || echo '$(srcdir)/'`sets_translate.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sets2axioms-sets_translate.Tpo $(DEPDIR)/sets2axioms-sets_translate.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sets_translate.cpp' object='sets2axioms-sets_translate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sets2axioms_CXXFLAGS) $(CXXFLAGS) -c -o sets2axioms-sets_translate.o `test -f 'sets_translate.cpp' || echo '$(srcdir)/'`sets_translate.cpp sets2axioms-sets_translate.obj: sets_translate.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sets2axioms_CXXFLAGS) $(CXXFLAGS) -MT sets2axioms-sets_translate.obj -MD -MP -MF $(DEPDIR)/sets2axioms-sets_translate.Tpo -c -o sets2axioms-sets_translate.obj `if test -f 'sets_translate.cpp'; then $(CYGPATH_W) 'sets_translate.cpp'; else $(CYGPATH_W) '$(srcdir)/sets_translate.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sets2axioms-sets_translate.Tpo $(DEPDIR)/sets2axioms-sets_translate.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sets_translate.cpp' object='sets2axioms-sets_translate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sets2axioms_CXXFLAGS) $(CXXFLAGS) -c -o sets2axioms-sets_translate.obj `if test -f 'sets_translate.cpp'; then $(CYGPATH_W) 'sets_translate.cpp'; else $(CYGPATH_W) '$(srcdir)/sets_translate.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || 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)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am \ install-examplesDATA install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-examplesDATA .PRECIOUS: Makefile # 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: cvc4-1.5/examples/sets-translate/sets_translate.cpp000066400000000000000000000310441313116454100225450ustar00rootroot00000000000000/********************* */ /*! \file sets_translate.cpp ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include // include Boost, a C++ library #include #include #include #include #include #include "expr/expr.h" #include "options/language.h" #include "options/options.h" #include "options/set_language.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" #include "theory/logic_info.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; using namespace CVC4::options; bool nonsense(char c) { return !isalnum(c); } #ifdef ENABLE_AXIOMS const bool enableAxioms = true; #else const bool enableAxioms = false; #endif string setaxioms[] = { "(declare-fun memberHOLDA (HOLDB (Set HOLDB)) Bool)", "", "(declare-fun unionHOLDA ((Set HOLDB) (Set HOLDB)) (Set HOLDB))", "(assert (forall ((?X (Set HOLDB)) (?Y (Set HOLDB)) (?x HOLDB))", " (= (memberHOLDA ?x (unionHOLDA ?X ?Y))", " (or (memberHOLDA ?x ?X) (memberHOLDA ?x ?Y))", " ) ) )", "", "", "(declare-fun intersectionHOLDA ((Set HOLDB) (Set HOLDB)) (Set HOLDB))", "(assert (forall ((?X (Set HOLDB)) (?Y (Set HOLDB)) (?x HOLDB))", " (= (memberHOLDA ?x (intersectionHOLDA ?X ?Y))", " (and (memberHOLDA ?x ?X) (memberHOLDA ?x ?Y))", " ) ) )", "", "(declare-fun setminusHOLDA ((Set HOLDB) (Set HOLDB)) (Set HOLDB))", "(assert (forall ((?X (Set HOLDB)) (?Y (Set HOLDB)) (?x HOLDB))", " (= (memberHOLDA ?x (setminusHOLDA ?X ?Y))", " (and (memberHOLDA ?x ?X) (not (memberHOLDA ?x ?Y)))", " ) ) )", "", "(declare-fun singletonHOLDA (HOLDB) (Set HOLDB))", "(assert (forall ((?x HOLDB) (?y HOLDB))", " (= (memberHOLDA ?x (singletonHOLDA ?y))", " (= ?x ?y)", " ) ) )", "", "(declare-fun emptysetHOLDA () (Set HOLDB))", "(assert (forall ((?x HOLDB)) (not (memberHOLDA ?x emptysetHOLDA)) ) )", "", "(define-fun subsetHOLDA ((X (Set HOLDB)) (Y (Set HOLDB))) Bool (= (unionHOLDA X Y) Y))", "" }; class Mapper { set< Type > setTypes; map< Type, Type > mapTypes; map< pair, Expr > setoperators; hash_map< Expr, Expr, ExprHashFunction > substitutions; ostringstream sout; ExprManager* em; int depth; Expr add(SetType t, Expr e) { if(setTypes.find(t) == setTypes.end() ) { // mark as processed setTypes.insert(t); Type elementType = t.getElementType(); ostringstream oss_type; oss_type << language::SetLanguage(language::output::LANG_SMTLIB_V2) << elementType; string elementTypeAsString = oss_type.str(); elementTypeAsString.erase( remove_if(elementTypeAsString.begin(), elementTypeAsString.end(), nonsense), elementTypeAsString.end()); // define-sort ostringstream oss_name; oss_name << language::SetLanguage(language::output::LANG_SMTLIB_V2) << "(Set " << elementType << ")"; string name = oss_name.str(); Type newt = em->mkArrayType(t.getElementType(), em->booleanType()); mapTypes[t] = newt; // diffent types vector t_t; t_t.push_back(t); t_t.push_back(t); vector elet_t; elet_t.push_back(elementType); elet_t.push_back(t); if(!enableAxioms) sout << "(define-fun emptyset" << elementTypeAsString << " " << " ()" << " " << name << " ( (as const " << name << ") false ) )" << endl; setoperators[ make_pair(t, kind::EMPTYSET) ] = em->mkVar( std::string("emptyset") + elementTypeAsString, t); if(!enableAxioms) sout << "(define-fun singleton" << elementTypeAsString << " " << " ( (x " << elementType << ") )" << " " << name << "" << " (store emptyset" << elementTypeAsString << " x true) )" << endl; setoperators[ make_pair(t, kind::SINGLETON) ] = em->mkVar( std::string("singleton") + elementTypeAsString, em->mkFunctionType( elementType, t ) ); if(!enableAxioms) sout << "(define-fun union" << elementTypeAsString << " " << " ( (s1 " << name << ") (s2 " << name << ") )" << " " << name << "" << " ((_ map or) s1 s2))" << endl; setoperators[ make_pair(t, kind::UNION) ] = em->mkVar( std::string("union") + elementTypeAsString, em->mkFunctionType( t_t, t ) ); if(!enableAxioms) sout << "(define-fun intersection" << elementTypeAsString << "" << " ( (s1 " << name << ") (s2 " << name << ") )" << " " << name << "" << " ((_ map and) s1 s2))" << endl; setoperators[ make_pair(t, kind::INTERSECTION) ] = em->mkVar( std::string("intersection") + elementTypeAsString, em->mkFunctionType( t_t, t ) ); if(!enableAxioms) sout << "(define-fun setminus" << elementTypeAsString << " " << " ( (s1 " << name << ") (s2 " << name << ") )" << " " << name << "" << " (intersection" << elementTypeAsString << " s1 ((_ map not) s2)))" << endl; setoperators[ make_pair(t, kind::SETMINUS) ] = em->mkVar( std::string("setminus") + elementTypeAsString, em->mkFunctionType( t_t, t ) ); if(!enableAxioms) sout << "(define-fun member" << elementTypeAsString << " " << " ( (x " << elementType << ")" << " (s " << name << "))" << " Bool" << " (select s x) )" << endl; setoperators[ make_pair(t, kind::MEMBER) ] = em->mkVar( std::string("member") + elementTypeAsString, em->mkPredicateType( elet_t ) ); if(!enableAxioms) sout << "(define-fun subset" << elementTypeAsString << " " << " ( (s1 " << name << ") (s2 " << name << ") )" << " Bool" <<" (= emptyset" << elementTypeAsString << " (setminus" << elementTypeAsString << " s1 s2)) )" << endl; setoperators[ make_pair(t, kind::SUBSET) ] = em->mkVar( std::string("subset") + elementTypeAsString, em->mkPredicateType( t_t ) ); if(enableAxioms) { int N = sizeof(setaxioms) / sizeof(setaxioms[0]); for(int i = 0; i < N; ++i) { string s = setaxioms[i]; ostringstream oss; oss << language::SetLanguage(language::output::LANG_SMTLIB_V2) << elementType; boost::replace_all(s, "HOLDA", elementTypeAsString); boost::replace_all(s, "HOLDB", oss.str()); if( s == "" ) continue; sout << s << endl; } } } Expr ret; if(e.getKind() == kind::EMPTYSET) { ret = setoperators[ make_pair(t, e.getKind()) ]; } else { vector children = e.getChildren(); children.insert(children.begin(), setoperators[ make_pair(t, e.getKind()) ]); ret = em->mkExpr(kind::APPLY, children); } // cout << "returning " << ret << endl; return ret; } public: Mapper(ExprManager* e) : em(e),depth(0) { sout << language::SetLanguage(language::output::LANG_SMTLIB_V2); } void defineSetSort() { if(setTypes.empty()) { cout << "(define-sort Set (X) (Array X Bool) )" << endl; } } Expr collectSortsExpr(Expr e) { if(substitutions.find(e) != substitutions.end()) { return substitutions[e]; } ++depth; Expr old_e = e; for(unsigned i = 0; i < e.getNumChildren(); ++i) { collectSortsExpr(e[i]); } e = e.substitute(substitutions); // cout << "[debug] " << e << " " << e.getKind() << " " << theory::kindToTheoryId(e.getKind()) << endl; if(theory::kindToTheoryId(e.getKind()) == theory::THEORY_SETS) { SetType t = SetType(e.getType().isBoolean() ? e[1].getType() : e.getType()); substitutions[e] = add(t, e); e = e.substitute(substitutions); } substitutions[old_e] = e; // cout << ";"; for(int i = 0; i < depth; ++i) cout << " "; cout << old_e << " => " << e << endl; --depth; return e; } void dump() { cout << sout.str(); } }; int main(int argc, char* argv[]) { try { // Get the filename string input; if(argc > 1){ input = string(argv[1]); } else { input = ""; } // Create the expression manager Options options; options.setInputLanguage(language::input::LANG_SMTLIB_V2); cout << language::SetLanguage(language::output::LANG_SMTLIB_V2); // cout << Expr::dag(0); ExprManager exprManager(options); Mapper m(&exprManager); // Create the parser ParserBuilder parserBuilder(&exprManager, input, options); if(input == "") parserBuilder.withStreamInput(cin); Parser* parser = parserBuilder.build(); // Variables and assertions vector variables; vector info_tags; vector info_data; vector assertions; Command* cmd = NULL; CommandSequence commandsSequence; bool logicisset = false; while ((cmd = parser->nextCommand())) { // till logic is set, don't do any modifications if(!parser->logicIsSet()) { cout << (*cmd) << endl; delete cmd; continue; } // transform set-logic command, if there is one SetBenchmarkLogicCommand* setlogic = dynamic_cast(cmd); if(setlogic) { LogicInfo logicinfo(setlogic->getLogic()); if(!logicinfo.isTheoryEnabled(theory::THEORY_SETS)) { cerr << "Sets theory not enabled. Stopping translation." << endl; return 0; } logicinfo = logicinfo.getUnlockedCopy(); if(enableAxioms) { logicinfo.enableQuantifiers(); logicinfo.lock(); if(!logicinfo.hasEverything()) { (logicinfo = logicinfo.getUnlockedCopy()).disableTheory(theory::THEORY_SETS); logicinfo.lock(); cout << SetBenchmarkLogicCommand(logicinfo.getLogicString()) << endl; } } else { logicinfo.enableTheory(theory::THEORY_ARRAY); // we print logic string only for Quantifiers, for Z3 stuff // we don't set the logic } delete cmd; continue; } // if we reach here, logic is set by now, so can define our sort if( !logicisset ) { logicisset = true; m.defineSetSort(); } // declare/define-sort commands are printed immediately DeclareTypeCommand* declaresort = dynamic_cast(cmd); DefineTypeCommand* definesort = dynamic_cast(cmd); if(declaresort || definesort) { cout << *cmd << endl; delete cmd; continue; } // other commands are queued up, while replacing with new function symbols AssertCommand* assert = dynamic_cast(cmd); DeclareFunctionCommand* declarefun = dynamic_cast(cmd); DefineFunctionCommand* definefun = dynamic_cast(cmd); Command* new_cmd = NULL; if(assert) { Expr newexpr = m.collectSortsExpr(assert->getExpr()); new_cmd = new AssertCommand(newexpr); } else if(declarefun) { Expr newfunc = m.collectSortsExpr(declarefun->getFunction()); new_cmd = new DeclareFunctionCommand(declarefun->getSymbol(), newfunc, declarefun->getType()); } else if(definefun) { Expr newfunc = m.collectSortsExpr(definefun->getFunction()); Expr newformula = m.collectSortsExpr(definefun->getFormula()); new_cmd = new DefineFunctionCommand(definefun->getSymbol(), newfunc, definefun->getFormals(), newformula); } if(new_cmd == NULL) { commandsSequence.addCommand(cmd); } else { commandsSequence.addCommand(new_cmd); delete cmd; } } m.dump(); cout << commandsSequence; // Get rid of the parser //delete parser; } catch (Exception& e) { cerr << e << endl; } } cvc4-1.5/examples/simple_vc_compat_c.c000066400000000000000000000036371313116454100200360ustar00rootroot00000000000000/********************* */ /*! \file simple_vc_compat_c.c ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the C compatibility interface ** (quite similar to the old CVC3 C interface) ** ** A simple demonstration of the C compatibility interface ** (quite similar to the old CVC3 C interface). **/ #include #include /* #include /* use this after CVC4 is properly installed */ #include "bindings/compat/c/c_interface.h" int main() { VC vc = vc_createValidityChecker(NULL); /* Prove that for integers x and y: * x > 0 AND y > 0 => 2x + y >= 3 */ Type integer = vc_intType(vc); Expr x = vc_varExpr(vc, "x", integer); Expr y = vc_varExpr(vc, "y", integer); Expr zero = vc_ratExpr(vc, 0, 1); Expr x_positive = vc_gtExpr(vc, x, zero); Expr y_positive = vc_gtExpr(vc, y, zero); Expr two = vc_ratExpr(vc, 2, 1); Expr twox = vc_multExpr(vc, two, x); Expr twox_plus_y = vc_plusExpr(vc, twox, y); Expr three = vc_ratExpr(vc, 3, 1); Expr twox_plus_y_geq_3 = vc_geExpr(vc, twox_plus_y, three); Expr formula = vc_impliesExpr(vc, vc_andExpr(vc, x_positive, y_positive), twox_plus_y_geq_3); char* formulaString = vc_printExprString(vc, formula); printf("Checking validity of formula %s with CVC4.\n", formulaString); printf("CVC4 should return 1 (meaning VALID).\n"); printf("Result from CVC4 is: %d\n", vc_query(vc, formula)); free(formulaString); return 0; } cvc4-1.5/examples/simple_vc_compat_cxx.cpp000066400000000000000000000042261313116454100207510ustar00rootroot00000000000000/********************* */ /*! \file simple_vc_compat_cxx.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the C++ compatibility interface ** (quite similar to the old CVC3 C++ interface) ** ** A simple demonstration of the C++ compatibility interface (quite ** similar to the old CVC3 C++ interface). Note that the library is ** named "libcvc4compat," to mark it as being part of CVC4, but the ** header file is "cvc3_compat.h" to indicate the similarity to the ** CVC3 interface, and the namespace is "CVC3". CVC3::Expr and ** CVC4::Expr are incompatible; to avoid confusion, it is best to not ** include both the CVC3 and CVC4 interface headers. **/ #include // #include // use this after CVC4 is properly installed #include "compat/cvc3_compat.h" using namespace std; using namespace CVC3; int main() { ValidityChecker* vc = ValidityChecker::create(); // Prove that for integers x and y: // x > 0 AND y > 0 => 2x + y >= 3 Type integer = vc->intType(); Expr x = vc->varExpr("x", integer); Expr y = vc->varExpr("y", integer); Expr zero = vc->ratExpr(0); Expr x_positive = vc->gtExpr(x, zero); Expr y_positive = vc->gtExpr(y, zero); Expr two = vc->ratExpr(2); Expr twox = vc->multExpr(two, x); Expr twox_plus_y = vc->plusExpr(twox, y); Expr three = vc->ratExpr(3); Expr twox_plus_y_geq_3 = vc->geExpr(twox_plus_y, three); Expr formula = vc->impliesExpr(vc->andExpr(x_positive, y_positive), twox_plus_y_geq_3); cout << "Checking validity of formula " << formula << " with CVC4." << endl; cout << "CVC4 should report VALID." << endl; cout << "Result from CVC4 is: " << vc->query(formula) << endl; return 0; } cvc4-1.5/examples/simple_vc_cxx.cpp000066400000000000000000000034631313116454100174100ustar00rootroot00000000000000/********************* */ /*! \file simple_vc_cxx.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A simple demonstration of the C++ interface ** ** A simple demonstration of the C++ interface. Compare to the Java ** interface in SimpleVC.java; they are virtually line-by-line ** identical. **/ #include //#include // use this after CVC4 is properly installed #include "smt/smt_engine.h" using namespace std; using namespace CVC4; int main() { ExprManager em; SmtEngine smt(&em); // Prove that for integers x and y: // x > 0 AND y > 0 => 2x + y >= 3 Type integer = em.integerType(); Expr x = em.mkVar("x", integer); Expr y = em.mkVar("y", integer); Expr zero = em.mkConst(Rational(0)); Expr x_positive = em.mkExpr(kind::GT, x, zero); Expr y_positive = em.mkExpr(kind::GT, y, zero); Expr two = em.mkConst(Rational(2)); Expr twox = em.mkExpr(kind::MULT, two, x); Expr twox_plus_y = em.mkExpr(kind::PLUS, twox, y); Expr three = em.mkConst(Rational(3)); Expr twox_plus_y_geq_3 = em.mkExpr(kind::GEQ, twox_plus_y, three); Expr formula = em.mkExpr(kind::AND, x_positive, y_positive). impExpr(twox_plus_y_geq_3); cout << "Checking validity of formula " << formula << " with CVC4." << endl; cout << "CVC4 should report VALID." << endl; cout << "Result from CVC4 is: " << smt.query(formula) << endl; return 0; } cvc4-1.5/examples/translator.cpp000066400000000000000000000245031313116454100167340ustar00rootroot00000000000000/********************* */ /*! \file translator.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief CVC4 translator ** ** The CVC4 translator executable. This program translates from one of ** CVC4's input languages to one of its output languages. **/ #include #include #include #include #include #include #include "expr/expr.h" #include "expr/expr_iomanip.h" #include "options/language.h" #include "options/options.h" #include "options/set_language.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" #include "smt/smt_engine.h" using namespace std; using namespace CVC4; using namespace CVC4::language; using namespace CVC4::parser; enum { INPUT_LANG = 'L', OUTPUT_LANG = 'O', OUTPUT_FILE = 'o', HELP = 'h', DEFAULT_DAG_THRESH, EXPAND_DEFINITIONS, COMBINE_ASSERTIONS, };/* enum */ const struct option longopts[] = { { "output-lang", required_argument, NULL, OUTPUT_LANG }, { "output-language", required_argument, NULL, OUTPUT_LANG }, { "expand-definitions", no_argument, NULL, EXPAND_DEFINITIONS }, { "combine-assertions", no_argument, NULL, COMBINE_ASSERTIONS }, { "default-dag-thresh", required_argument, NULL, DEFAULT_DAG_THRESH }, { "lang", required_argument, NULL, INPUT_LANG }, { "language", required_argument, NULL, INPUT_LANG }, { "out", required_argument, NULL, OUTPUT_FILE }, { "help", no_argument, NULL, HELP }, { NULL, no_argument, NULL, 0 }, };/* longopts */ static void showHelp() { cerr << "cvc4-translator translation tool" << endl << " --output-language | -O set output language (default smt2)" << endl << " --input-language | -L set input language (default auto)" << endl << " --out | -o set output file (- for stdout)" << endl << " --default-dag-thresh=N set DAG threshold" << endl << " --expand-definitions expand define-funs" << endl << " --combine-assertions combine all assertions into one" << endl << " --help | -h this help" << endl << "Options and input filenames can be intermixed, and order is important." << endl << "For instance, \"-O smt2 x -O cvc4 y\" reads file x in smt2 format and" << "file y in cvc4 format and writes all output to stdout." << endl << "Some canonicalization may occur." << endl << "Comments and formatting are not preserved." << endl; } static void readFile(const char* filename, InputLanguage fromLang, OutputLanguage toLang, bool expand_definitions, bool combine_assertions, ostream* out) { if(fromLang == input::LANG_AUTO) { unsigned len = strlen(filename); if(len >= 5 && !strcmp(".smt2", filename + len - 5)) { fromLang = language::input::LANG_SMTLIB_V2; } else if(len >= 4 && !strcmp(".smt", filename + len - 4)) { fromLang = language::input::LANG_SMTLIB_V1; } else if(len >= 5 && !strcmp(".smt1", filename + len - 5)) { fromLang = language::input::LANG_SMTLIB_V1; } else if((len >= 2 && !strcmp(".p", filename + len - 2)) || (len >= 5 && !strcmp(".tptp", filename + len - 5))) { fromLang = language::input::LANG_TPTP; } else if(( len >= 4 && !strcmp(".cvc", filename + len - 4) ) || ( len >= 5 && !strcmp(".cvc4", filename + len - 5) )) { fromLang = language::input::LANG_CVC4; } else { throw Exception("cannot determine input language to use for `" + string(filename) + "'"); } } if(toLang == output::LANG_AUTO) { toLang = toOutputLanguage(fromLang); } *out << language::SetLanguage(toLang); Options opts; opts.setInputLanguage(fromLang); ExprManager exprMgr(opts); ParserBuilder parserBuilder(&exprMgr, filename, opts); if(!strcmp(filename, "-")) { parserBuilder.withFilename(""); parserBuilder.withLineBufferedStreamInput(cin); } Parser *parser = parserBuilder.build(); // we only use the SmtEngine to do definition expansion for us SmtEngine *smt = expand_definitions ? new SmtEngine(&exprMgr) : NULL; // store up the assertions into one big conjunction std::vector assertions; while(Command* cmd = parser->nextCommand()) { if(expand_definitions && dynamic_cast(cmd) != NULL) { // tell the SmtEngine about the definition, but don't print it cmd->invoke(smt); } else { // have to switch on the command and expand definitions inside it if(expand_definitions && dynamic_cast(cmd) != NULL) { Expr e = static_cast(cmd)->getExpr(); delete cmd; cmd = new AssertCommand(smt->expandDefinitions(e)); } else if(expand_definitions && dynamic_cast(cmd) != NULL) { Expr e = static_cast(cmd)->getExpr(); delete cmd; cmd = new QueryCommand(smt->expandDefinitions(e)); } else if(expand_definitions && dynamic_cast(cmd) != NULL) { Expr e = static_cast(cmd)->getExpr(); delete cmd; cmd = new CheckSatCommand(smt->expandDefinitions(e)); } else if(expand_definitions && dynamic_cast(cmd) != NULL) { Expr e = static_cast(cmd)->getTerm(); delete cmd; cmd = new SimplifyCommand(smt->expandDefinitions(e)); } else if(expand_definitions && dynamic_cast(cmd) != NULL) { Expr e = static_cast(cmd)->getTerm(); delete cmd; cmd = new ExpandDefinitionsCommand(smt->expandDefinitions(e)); } else if(expand_definitions && dynamic_cast(cmd) != NULL) { vector terms = static_cast(cmd)->getTerms(); delete cmd; for(size_t i = 0; i < terms.size(); ++i) { terms[i] = smt->expandDefinitions(terms[i]); } cmd = new GetValueCommand(terms); } if(combine_assertions && dynamic_cast(cmd) != NULL) { // store up the assertion, don't print it yet assertions.push_back(static_cast(cmd)->getExpr()); } else { if(combine_assertions && ( dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL )) { // combine all the stored assertions and print them at this point if(!assertions.empty()) { if(assertions.size() > 1) { *out << AssertCommand(exprMgr.mkExpr(kind::AND, assertions)) << endl; } else { *out << AssertCommand(assertions[0]) << endl; } assertions.clear(); } } // now print the cmd we just parsed *out << cmd << endl; } } if(dynamic_cast(cmd) != NULL) { delete cmd; break; } delete cmd; } if(!assertions.empty()) { if(assertions.size() > 1) { *out << AssertCommand(exprMgr.mkExpr(kind::AND, assertions)) << endl; } else { *out << AssertCommand(assertions[0]) << endl; } assertions.clear(); } *out << flush; delete smt; delete parser; } /** * Translate from an input language to an output language. */ int main(int argc, char* argv[]) { ostream* out = &cout; InputLanguage fromLang = input::LANG_AUTO; OutputLanguage toLang = output::LANG_SMTLIB_V2; size_t files = 0; int dag_thresh = 1; bool expand_definitions = false; bool combine_assertions = false; try { int c; while((c = getopt_long(argc, argv, "-L:O:o:h", longopts, NULL)) != -1) { switch(c) { case 1: ++files; *out << expr::ExprDag(dag_thresh); readFile(optarg, (!strcmp(optarg, "-") && fromLang == input::LANG_AUTO) ? input::LANG_CVC4 : fromLang, toLang, expand_definitions, combine_assertions, out); break; case INPUT_LANG: if(!strcmp(optarg, "help")) { Options::printLanguageHelp(cerr); exit(1); } fromLang = toInputLanguage(optarg); break; case OUTPUT_LANG: if(!strcmp(optarg, "help")) { Options::printLanguageHelp(cerr); exit(1); } toLang = toOutputLanguage(optarg); break; case OUTPUT_FILE: out->flush(); if(out != &cout) { ((ofstream*)out)->close(); delete out; } if(strcmp(optarg, "-")) { out = new ofstream(optarg); } else { out = &cout; } break; case DEFAULT_DAG_THRESH: { if(!isdigit(*optarg)) { cerr << "error: --default-dag-thresh requires non-negative argument: `" << optarg << "' invalid." << endl; exit(1); } char* end; unsigned long ul = strtoul(optarg, &end, 10); if(errno != 0 || *end != '\0') { cerr << "error: --default-dag-thresh argument malformed: `" << optarg << "'." << endl; exit(1); } dag_thresh = ul > INT_MAX ? INT_MAX : int(ul); } break; case EXPAND_DEFINITIONS: expand_definitions = true; break; case COMBINE_ASSERTIONS: combine_assertions = true; break; case 'h': showHelp(); exit(0); case '?': showHelp(); exit(1); default: cerr << "internal error. translator failed (" << char(c) << "," << c << ")." << endl; exit(1); } } if(files == 0) { *out << expr::ExprDag(dag_thresh); readFile("-", fromLang == input::LANG_AUTO ? input::LANG_CVC4 : fromLang, toLang, expand_definitions, combine_assertions, out); exit(0); } } catch(Exception& e) { cerr << e << endl; exit(1); } return 0; } cvc4-1.5/library_versions000066400000000000000000000065361313116454100155460ustar00rootroot00000000000000# library_versions # # Format is: # CVC4-RELEASE-VERSION-REGEXP (LIBRARY:VERSION)* # # This file contains library version release information. # Lines are matched while processing configure.ac (and generating # the configure script) using the CVC4_RELEASE_STRING. Lines are # matched on the regexp in the first column, with only the first # matching line counting. The library versions following, one per # column, are then used. If there are no matching lines, an error # is raised and the configure script is not generated. # # The library version numbers are in the form current:revision:age # and are passed to libtool with -version-info # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # # A good description of what all this means is here: # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # # When a new CVC4 release is cut, this library_versions file should # be extended to provide library version information for that # release. PLEASE DON'T REMOVE LINES (or edit historical lines) # from this file unless they are truly in error and the release # wasn't made with that erroneous information; this file should # ultimately provide a nice historical log of the mapping between # CVC4 release numbers and the corresponding interface version # information of libraries. # # For now, libcvc4bindings' version info is used for all language # bindings libraries, and _also_ for all "compatibility" bindings # libraries (i.e., the old CVC3-esque C and Java bindings). This # may need to be split out in future, if some bindings (particularly # the compatibility ones) change more(/less) frequently than the # others. # 0\..* libcvc4:0:0:0 libcvc4parser:0:0:0 libcvc4compat:0:0:0 libcvc4bindings:0:0:0 1\.0 libcvc4:0:0:0 libcvc4parser:0:0:0 libcvc4compat:0:0:0 libcvc4bindings:0:0:0 1\.0\.1-prerelease libcvc4:0:0:0 libcvc4parser:0:0:0 libcvc4compat:0:0:0 libcvc4bindings:0:0:0 1\.1-prerelease libcvc4:0:0:0 libcvc4parser:0:0:0 libcvc4compat:0:0:0 libcvc4bindings:0:0:0 1\.1 libcvc4:1:0:0 libcvc4parser:1:0:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0 1\.1\.1-prerelease libcvc4:1:0:0 libcvc4parser:1:0:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0 1\.2-prerelease libcvc4:1:0:0 libcvc4parser:1:0:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0 1\.2 libcvc4:1:1:1 libcvc4parser:1:1:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0 1\.2\.1-prerelease libcvc4:1:1:1 libcvc4parser:1:1:0 libcvc4compat:1:0:0 libcvc4bindings:1:0:0 1\.3-prerelease libcvc4:2:0:0 libcvc4parser:2:0:0 libcvc4compat:2:0:0 libcvc4bindings:2:0:0 1\.3 libcvc4:2:0:0 libcvc4parser:2:0:0 libcvc4compat:2:0:0 libcvc4bindings:2:0:0 1\.3\.1-prerelease libcvc4:2:0:0 libcvc4parser:2:0:0 libcvc4compat:2:0:0 libcvc4bindings:2:0:0 1\.4-prerelease libcvc4:2:0:0 libcvc4parser:2:0:0 libcvc4compat:2:0:0 libcvc4bindings:2:0:0 1\.4 libcvc4:3:0:0 libcvc4parser:3:0:0 libcvc4compat:3:0:0 libcvc4bindings:3:0:0 1\.4\.1-prerelease libcvc4:3:0:0 libcvc4parser:3:0:0 libcvc4compat:3:0:0 libcvc4bindings:3:0:0 1\.5-prerelease libcvc4:3:0:0 libcvc4parser:3:0:0 libcvc4compat:3:0:0 libcvc4bindings:3:0:0 1\.5 libcvc4:4:0:0 libcvc4parser:4:0:0 libcvc4compat:4:0:0 libcvc4bindings:4:0:0 cvc4-1.5/proofs/000077500000000000000000000000001313116454100135255ustar00rootroot00000000000000cvc4-1.5/proofs/lfsc_checker/000077500000000000000000000000001313116454100161405ustar00rootroot00000000000000cvc4-1.5/proofs/lfsc_checker/AUTHORS000066400000000000000000000001361313116454100172100ustar00rootroot00000000000000The core authors and designers of the LFSC proof checker are: Andy Reynolds Aaron Stump cvc4-1.5/proofs/lfsc_checker/COPYING000066400000000000000000000016231313116454100171750ustar00rootroot00000000000000LFSC is copyright (C) 2012, 2013 The University of Iowa. All rights reserved. LFSC is open-source; distribution is under the terms of the modified BSD license. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT OWNERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cvc4-1.5/proofs/lfsc_checker/INSTALL000066400000000000000000000366001313116454100171760ustar00rootroot00000000000000Installation 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. cvc4-1.5/proofs/lfsc_checker/Makefile.am000066400000000000000000000007501313116454100201760ustar00rootroot00000000000000AM_CXXFLAGS = -Wall -Wno-deprecated bin_PROGRAMS = lfsc-checker lfsc_checker_SOURCES = \ main.cpp lfsc_checker_LDADD = \ @builddir@/liblfsc_checker.la noinst_LTLIBRARIES = liblfsc_checker.la liblfsc_checker_la_SOURCES = \ check.cpp \ check.h \ chunking_memory_management.h \ code.cpp \ code.h \ expr.cpp \ expr.h \ libwriter.cpp \ libwriter.h \ position.h \ print_smt2.cpp \ print_smt2.h \ scccode.cpp \ scccode.h \ sccwriter.cpp \ sccwriter.h \ trie.cpp \ trie.h cvc4-1.5/proofs/lfsc_checker/Makefile.in000066400000000000000000000716521313116454100202200ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ bin_PROGRAMS = lfsc-checker$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblfsc_checker_la_LIBADD = am_liblfsc_checker_la_OBJECTS = check.lo code.lo expr.lo libwriter.lo \ print_smt2.lo scccode.lo sccwriter.lo trie.lo liblfsc_checker_la_OBJECTS = $(am_liblfsc_checker_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lfsc_checker_OBJECTS = main.$(OBJEXT) lfsc_checker_OBJECTS = $(am_lfsc_checker_OBJECTS) lfsc_checker_DEPENDENCIES = @builddir@/liblfsc_checker.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(liblfsc_checker_la_SOURCES) $(lfsc_checker_SOURCES) DIST_SOURCES = $(liblfsc_checker_la_SOURCES) $(lfsc_checker_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \ $(top_srcdir)/config/config.sub $(top_srcdir)/config/depcomp \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ $(top_srcdir)/config/missing AUTHORS COPYING INSTALL NEWS \ README config/compile config/config.guess config/config.sub \ config/depcomp config/install-sh config/ltmain.sh \ config/missing 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 am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip 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@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ 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@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ 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@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CXXFLAGS = -Wall -Wno-deprecated lfsc_checker_SOURCES = \ main.cpp lfsc_checker_LDADD = \ @builddir@/liblfsc_checker.la noinst_LTLIBRARIES = liblfsc_checker.la liblfsc_checker_la_SOURCES = \ check.cpp \ check.h \ chunking_memory_management.h \ code.cpp \ code.h \ expr.cpp \ expr.h \ libwriter.cpp \ libwriter.h \ position.h \ print_smt2.cpp \ print_smt2.h \ scccode.cpp \ scccode.h \ sccwriter.cpp \ sccwriter.h \ trie.cpp \ trie.h all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } liblfsc_checker.la: $(liblfsc_checker_la_OBJECTS) $(liblfsc_checker_la_DEPENDENCIES) $(EXTRA_liblfsc_checker_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(liblfsc_checker_la_OBJECTS) $(liblfsc_checker_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; 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 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)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_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 lfsc-checker$(EXEEXT): $(lfsc_checker_OBJECTS) $(lfsc_checker_DEPENDENCIES) $(EXTRA_lfsc_checker_DEPENDENCIES) @rm -f lfsc-checker$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(lfsc_checker_OBJECTS) $(lfsc_checker_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/code.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_smt2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scccode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sccwriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trie.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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.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 $(distdir)/_build/sub $(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/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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__post_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) config.h installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: 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 ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-cscope clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-lzip 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-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile # 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: cvc4-1.5/proofs/lfsc_checker/NEWS000066400000000000000000000004651313116454100166440ustar00rootroot00000000000000This file contains a summary of important user-visible changes to the LFSC proof checker. Changes since pre-1.0 (unversioned) releases ============================================ * Incorporated the LFSC checker into the CVC4 project. -- Morgan Deters Thu, 12 Dec 2013 18:16:08 -0500 cvc4-1.5/proofs/lfsc_checker/README000066400000000000000000000053611313116454100170250ustar00rootroot00000000000000lfsc: a high-performance LFSC proof checker. Andy Reynolds and Aaron Stump ---------------------------------------------------------------------- Command line parameters for LFSC: lfsc [sig_1 .... sig_n] [opts_1...opts_n] [sig_1 .... sig_n] are signature files, and options [opts_1...opts_n] are any of the following: --compile-scc : Write out all side conditions contained in signatures specified on the command line to files scccode.h, scccode.cpp (see below for example) --run-scc : Run proof checking with compiled side condition code (see below). --compile-scc-debug : Write side condition code to scccode.h, scccode.cpp that contains print statements (for debugging running of side condition code). Typical usage: ./src/opt/lfsc [sig_1 .... sig_n] [proof] [opts_1...opts_n] A proof is typically specified at the end of the list of input files in file [proof]. This will tell LFSC to type check the proof term in the file [proof]. The extension (*.plf) is commonly used for both user signature files and proof files. Side condition code compilation: LFSC may be used with side condition code compilation. This will take all side conditions ("program" constructs) in the user signature and produce equivalent C++ code in the output files scccode.h, scccode.cpp. An example for QF_IDL running with side condition code compilation: (1) In the src/ directory, run LFSC with the command line parameters: ./opt/lfsc ../sat-tests/sat.plf ../sat-tests/smt.plf \ ../sat-tests/cnf_conv.plf ../sat-tests/th_base.plf \ ../sat-tests/th_idl.plf --compile-scc This will produce scccode.h and scccode.cpp in the working directory where lfsc was run (here, src/). (2) Recompile the code base for lfsc. This will produce a copy of the LFSC executable that is capable of calling side conditions directly as compiled C++. (3) To check a proof.plf* with side condition code compilation, run LFSC with the command line parameters: ./opt/lfsc ../sat-tests/sat.plf ../sat-tests/smt.plf \ ../sat-tests/cnf_conv.plf ../sat-tests/th_base.plf \ ../sat-tests/th_idl.plf --run-scc proof.plf *Note that this proof must be compatible with the proof checking signature. The proof generator is responsible for producing a proof in the proper format that can be checked by the proof signature specified when running LFSC. For example, in the case of CLSAT in the QF_IDL logic, older proofs (proofs produced before Feb 2009) may be incompatible with the newest version of the resolution checking signature (sat.plf). The newest version of CLSAT -- which can be checked out from the Iowa repository with svn co https://svn.divms.uiowa.edu/repos/clc/clsat/trunk clsat should produce proofs compatible with the current version of sat.plf. cvc4-1.5/proofs/lfsc_checker/aclocal.m4000066400000000000000000001256761313116454100200210ustar00rootroot00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 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'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' 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.15], [], [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.15])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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$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-2014 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. # 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", "OBJC", "OBJCXX", "UPC", or "GJC". # 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 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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 10 /bin/sh. echo '/* dummy */' > 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], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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"` # 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'`; 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-2014 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != 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-2014 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 is modern enough. # If it is, 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != 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 AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_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}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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([config/libtool.m4]) m4_include([config/ltoptions.m4]) m4_include([config/ltsugar.m4]) m4_include([config/ltversion.m4]) m4_include([config/lt~obsolete.m4]) cvc4-1.5/proofs/lfsc_checker/check.cpp000066400000000000000000001124221313116454100177230ustar00rootroot00000000000000#include "position.h" #include "check.h" #include "code.h" #include "expr.h" #include "trie.h" #include "sccwriter.h" #include "libwriter.h" #ifndef _MSC_VER #include #endif #include #include #include #include "scccode.h" #include "print_smt2.h" using namespace std; #ifndef _MSC_VER using namespace __gnu_cxx; #endif int linenum = 1; int colnum = 1; const char *filename = 0; FILE *curfile = 0; //#define USE_HASH_MAPS //AJR: deprecated symmap2 progs; std::vector< Expr* > ascHoles; #ifdef USE_HASH_MAPS hash_map symbols; hash_map symbol_types; #else Trie > *symbols = new Trie >; #endif hash_map imports; std::map mark_map; std::vector< std::pair< std::string, std::pair > > local_sym_names; Expr *not_defeq1 = 0; Expr *not_defeq2 = 0; bool tail_calls = true; bool big_check = true; void report_error(const string &msg) { if (filename) { Position p(filename,linenum,colnum); p.print(cout); } cout << "\n"; cout << msg; cout << "\n"; if (not_defeq1 && not_defeq2) { cout << "The following terms are not definitionally equal:\n1. "; not_defeq1->print(cout); cout << "\n2. "; not_defeq2->print(cout); } cout.flush(); exit(1); } Expr *call_run_code(Expr *code) { if (dbg_prog) { cout << "[Running "; code->print(cout); cout << "\n"; } Expr *computed_result = run_code(code); if (dbg_prog) { cout << "] returning "; if (computed_result) computed_result->print(cout); else cout << "fail"; cout << "\n"; } return computed_result; } char our_getc_c = 0; int IDBUF_LEN = 2048; char idbuf[2048]; Expr *statType = new CExpr(TYPE); Expr *statKind = new CExpr(KIND); Expr *statMpz = new CExpr(MPZ); Expr *statMpq = new CExpr(MPQ); int open_parens = 0; // only call in check() void eat_rparen() { eat_char(')'); open_parens--; } void eat_excess(int prev) { while(open_parens > prev) eat_rparen(); } /* There are four cases for check(): 1. expected=0, create is false: check() sets computed to be the classifier of the checked term. 2. expected=0, create is true: check() returns the checked expression and sets computed to be its classifier. 3. expected is non-null, create is false: check returns NULL. 4. expected is non-null, create is true: check returns the term that was checked. We consume the reference for expected, to enable tail calls in the application case. If is_hole is NULL, then the expression parsed may not be a hole. Otherwise, it may be, and we will set *is_hole to true if it is (but leave *is_hole alone if it is not). */ bool allow_run = false; int app_rec_level = 0; Expr *check(bool create, Expr *expected, Expr **computed = NULL, bool *is_hole = 0, bool return_pos = false, bool inAsc = false ) { start_check: //std::cout << "check code "; //if( expected ) // expected->print( std::cout ); //std::cout << std::endl; char d = non_ws(); switch(d) { case '(': { open_parens++; char c = non_ws(); switch (c) { case EOF: report_error("Unexpected end of file."); break; case '!': { // the pi case string id(prefix_id()); #ifdef DEBUG_SYM_NAMES Expr *sym = new SymSExpr(id,SYMS_EXPR); #else Expr *sym = new SymExpr(id); //std::cout << "name " << id << " " << sym << std::endl; #endif allow_run = true; int prevo = open_parens; Expr *domain = check(true, statType); eat_excess(prevo); allow_run = false; #ifdef USE_HASH_MAPS Expr *prev = symbols[id]; Expr *prevtp = symbol_types[id]; symbols[id] = sym; symbol_types[id] = domain; #else pairprev = symbols->insert(id.c_str(),pair(sym,domain)); #endif if (expected) expected->inc(); Expr *range = check(create, expected, computed, NULL, return_pos); eat_excess(prevo); eat_rparen(); #ifdef USE_HASH_MAPS symbols[id] = prev; symbol_types[id] = prevtp; #else symbols->insert(id.c_str(),prev); #endif if (expected) { int o = expected->followDefs()->getop(); expected->dec(); if (o != TYPE && o != KIND) report_error(string("The expected classifier for a pi abstraction") +string("is neither \"type\" nor \"kind\".\n") +string("1. the expected classifier: ") +expected->toString()); if (create){ CExpr* ret = new CExpr(PI, sym, domain, range); ret->calc_free_in(); return ret; } return 0; } else { if (create){ CExpr* ret = new CExpr(PI, sym, domain, range); ret->calc_free_in(); return ret; } int o = (*computed)->followDefs()->getop(); if (o != TYPE && o != KIND) report_error(string("The classifier for the range of a pi") +string("abstraction is neither \"type\" nor ") +string("\"kind\".\n1. the computed classifier: ") +range->toString()); return 0; } } case '%': { // the case for big lambda if (expected || create || !return_pos || !big_check) report_error(string("Big lambda abstractions can only be used") +string("in the return position of a \"bigcheck\"\n") +string("command.")); string id(prefix_id()); #ifdef DEBUG_SYM_NAMES SymExpr *sym = new SymSExpr(id, SYMS_EXPR); #else SymExpr *sym = new SymExpr(id); //std::cout << "name " << id << " " << sym << std::endl; #endif int prevo = open_parens; Expr *expected_domain = check(true, statType); eat_excess(prevo); #ifdef USE_HASH_MAPS Expr *prev = symbols[id]; Expr *prevtp = symbol_types[id]; symbols[id] = sym; symbol_types[id] = expected_domain; #else pair prevpr = symbols->insert(id.c_str(), pair(sym,expected_domain)); Expr *prev = prevpr.first; Expr *prevtp = prevpr.second; #endif expected_domain->inc(); // because we have stored it in the symbol table //will clean up local sym name eventually local_sym_names.push_back( std::pair< std::string, std::pair >( id, prevpr ) ); if (prev) prev->dec(); if (prevtp) prevtp->dec(); create = false; expected = NULL; // computed unchanged is_hole = NULL; // return_pos unchanged // note we will not store the proper return type in computed. goto start_check; } case '\\': { // the lambda case if (!expected) report_error(string("We are computing a type for a lambda ") +string("abstraction, but we can only check\n") +string("such against a type. Try inserting an ") +string("ascription (using ':').\n")); Expr *orig_expected = expected; expected = expected->followDefs(); if (expected->getop() != PI) report_error(string("We are type-checking a lambda abstraction, but\n") +string("the expected type is not a pi abstraction.\n") +string("1. The expected type: ") + expected->toString()); string id(prefix_id()); #ifdef DEBUG_SYM_NAMES SymExpr *sym = new SymSExpr(id, SYMS_EXPR); #else SymExpr *sym = new SymExpr(id); //std::cout << "name " << id << " " << sym << std::endl; #endif CExpr *pitp = (CExpr *)expected; Expr *expected_domain = pitp->kids[1]; Expr *expected_range = pitp->kids[2]; SymExpr *pivar = (SymExpr *)pitp->kids[0]; if (expected_range->followDefs()->getop() == TYPE) report_error(string("The expected classifier for a lambda abstraction") +string(" a kind, not a type.\n") +string("1. The expected classifier: ") +expected->toString()); /* we need to map the pivar to the new sym, because in our higher-order matching we may have (_ x) to unify with t. The x must be something from an expected type, since only these can have holes. We want to map expected vars x to computed vars y, so that we can set the hole to be \ y t, where t contains ys but not xs. */ #ifdef USE_HASH_MAPS Expr *prev = symbols[id]; Expr *prevtp = symbol_types[id]; symbols[id] = sym; symbol_types[id] = expected_domain; #else pair prevpr = symbols->insert(id.c_str(), pair(sym,expected_domain)); Expr *prev = prevpr.first; Expr *prevtp = prevpr.second; #endif Expr *prev_pivar_val = pivar->val; sym->inc(); pivar->val = sym; expected_domain->inc(); // because we have stored it in the symbol table expected_range->inc(); // because we will pass it to a recursive call if (tail_calls && big_check && return_pos && !create) { //will clean up local sym name eventually local_sym_names.push_back( std::pair< std::string, std::pair >( id, prevpr ) ); if (prev_pivar_val) prev_pivar_val->dec(); if (prev) prev->dec(); if (prevtp) prevtp->dec(); orig_expected->dec(); create = false; expected = expected_range; computed = NULL; is_hole = NULL; // return_pos unchanged goto start_check; } else { int prev = open_parens; Expr *range = check(create, expected_range, NULL, NULL, return_pos); eat_excess(prev); eat_rparen(); #ifdef USE_HASH_MAPS symbols[id] = prev; symbol_types[id] = prevtp; #else symbols->insert(id.c_str(), prevpr); #endif expected_domain->dec(); // because removed from the symbol table now pivar->val = prev_pivar_val; orig_expected->dec(); sym->dec(); // the pivar->val reference if (create) return new CExpr(LAM, sym, range); sym->dec(); // the symbol table reference, otherwise in the new LAM return 0; } } case '^': { // the run case if (!allow_run || !create || !expected) report_error(string("A run expression (operator \"^\") appears in") +string(" a disallowed position.")); Expr *code = read_code(); //string errstr = (string("The first argument in a run expression must be") // +string(" a call to a program.\n1. the argument: ") // +code->toString()); /* determine expected type of the result term, and make sure the code term is an allowed one. */ #if 0 Expr *progret; if (code->isArithTerm()) progret = statMpz; else { if (code->getop() != APP) report_error(errstr); CExpr *call = (CExpr *)code; // prog is not known to be a SymExpr yet CExpr *prog = (CExpr *)call->get_head(); if (prog->getop() != PROG) report_error(errstr); progret = prog->kids[0]->get_body(); } #else Expr *progret = NULL; if (code->isArithTerm()) progret = statMpz; else { if (code->getop() == APP) { CExpr *call = (CExpr *)code; // prog is not known to be a SymExpr yet CExpr *prog = (CExpr *)call->get_head(); if (prog->getop() == PROG) progret = prog->kids[0]->get_body(); } } #endif /* determine expected type of the result term, and make sure the code term is an allowed one. */ //Expr* progret = check_code( code ); /* the next term cannot be a hole where run expressions are introduced. When they are checked in applications, it can be. */ int prev = open_parens; if( progret ) progret->inc(); Expr *trm = check(true, progret); eat_excess(prev); eat_rparen(); if (expected->getop() != TYPE) report_error(string("The expected type for a run expression is not ") +string("\"type\".\n") +string("1. The expected type: ")+expected->toString()); expected->dec(); return new CExpr(RUN, code, trm); } case ':': { // the ascription case statType->inc(); int prev = open_parens; Expr *tp = check(true, statType, NULL, NULL, false, true ); eat_excess(prev); if (!expected) tp->inc(); Expr *trm = check(create, tp, NULL, NULL, return_pos); eat_excess(prev); eat_rparen(); if (expected) { if (!expected->defeq(tp)) report_error(string("The expected type does not match the ") +string("ascribed type in an ascription.\n") +string("1. The expected type: ")+expected->toString() +string("\n2. The ascribed type: ")+tp->toString()); // no need to dec tp, since it was consumed by the call to check expected->dec(); if (create) return trm; trm->dec(); return 0; } else { *computed = tp; if (create) return trm; return 0; } } case '@': { // the local definition case string id(prefix_id()); #ifdef DEBUG_SYM_NAMES SymExpr *sym = new SymSExpr(id, SYMS_EXPR); #else SymExpr *sym = new SymExpr(id); #endif int prev_open = open_parens; Expr *tp_of_trm = NULL; Expr *trm = check(true, NULL, &tp_of_trm); eat_excess(prev_open); sym->val = trm; #ifdef USE_HASH_MAPS Expr *prev = symbols[id]; Expr *prevtp = symbol_types[id]; symbols[id] = sym; symbol_types[id] = tp_of_trm; #else pair prevpr = symbols->insert(id.c_str(), pair(sym,tp_of_trm)); Expr *prev = prevpr.first; Expr *prevtp = prevpr.second; #endif if (tail_calls && big_check && return_pos && !create) { if (prev) prev->dec(); if (prevtp) prevtp->dec(); // all parameters to check() unchanged here goto start_check; } else { int prev_open = open_parens; Expr *body = check(create, expected, computed, is_hole, return_pos); eat_excess(prev_open); eat_rparen(); #ifdef USE_HASH_MAPS symbols[id] = prev; symbol_types[id] = prevtp; #else symbols->insert(id.c_str(), prevpr); #endif tp_of_trm->dec(); // because removed from the symbol table now sym->dec(); return body; } } case '~': { int prev = open_parens; Expr *e = check(create, expected, computed, is_hole, return_pos); eat_excess(prev); eat_rparen(); // this has been only very lightly tested -- ads. if (expected) { if (expected != statMpz && expected != statMpq) report_error("Negative sign where an numeric expression is expected."); } else { if ((*computed) != statMpz && (*computed) != statMpq) report_error("Negative sign where an numeric expression is expected."); } if (create) { if (e->getclass() == INT_EXPR) { IntExpr *ee = (IntExpr *)e; mpz_neg(ee->n, ee->n); return ee; } else if( e->getclass() == RAT_EXPR ) { RatExpr *ee = (RatExpr *)e; mpq_neg(ee->n, ee->n); return ee; } else { report_error("Negative sign with expr that is not an int. literal."); } } else return 0; } default: { // the application case our_ungetc(c); Expr *head_computed; int prev = open_parens; Expr *headtrm = check(create,0,&head_computed); eat_excess(prev); CExpr *headtp = (CExpr *)head_computed->followDefs(); headtp->inc(); head_computed->dec(); if ( headtp->cloned()) { // we must clone Expr *orig_headtp = headtp; headtp = (CExpr *)headtp->clone(); orig_headtp->dec(); } else headtp->setcloned(); #ifdef DEBUG_APPS char tmp[100]; sprintf(tmp,"(%d) ", app_rec_level++); cout << tmp << "{ headtp = "; headtp->debug(); #endif char c; vector holes; vector free_holes; while ((c = non_ws()) != ')') { our_ungetc(c); if (headtp->getop() != PI) report_error(string("The type of an applied term is not ") + string("a pi-type.\n") + string("\n1. the type of the term: ") + headtp->toString() + (headtrm ? (string("\n2. the term: ") + headtrm->toString()) : string(""))); SymExpr *headtp_var = (SymExpr *)headtp->kids[0]; Expr *headtp_domain = headtp->kids[1]; Expr *headtp_range = headtp->kids[2]; if (headtp_domain->getop() == RUN) { CExpr *run = (CExpr *)headtp_domain; Expr *code = run->kids[0]; Expr *expected_result = run->kids[1]; Expr *computed_result = call_run_code(code); if (!computed_result) report_error(string("A side condition failed.\n") +string("1. the side condition: ") +code->toString()); if (!expected_result->defeq(computed_result)) report_error(string("The expected result of a side condition ") +string("does not match the computed result.\n") +string("1. expected result: ") +expected_result->toString() +string("\n2. computed result: ") +computed_result->toString()); computed_result->dec(); } else { // check an argument bool var_in_range = headtp->get_free_in();//headtp_range->free_in(headtp_var); bool arg_is_hole = false; bool consumed_arg = false; bool create_arg = (create || var_in_range); headtp_domain->inc(); if (tail_calls && !create_arg && headtp_range->getop() != PI) { // we can make a tail call to check() here. if (expected) { if (!expected->defeq(headtp_range)) report_error(string("The type expected for an application ") + string("does not match the computed type.\n") + string("1. The expected type: ") + expected->toString() + string("\n2. The computed type: ") + headtp_range->toString() + (headtrm ? (string("\n3. the application: ") + headtrm->toString()) : string(""))); expected->dec(); } else { headtp_range->inc(); *computed = headtp_range; } headtp->dec(); // same as below for (int i = 0, iend = holes.size(); i < iend; i++) { if (!holes[i]->val) /* if the hole is free in the domain, we will be filling it in when we make our tail call, since the domain is the expected type for the argument */ if (!headtp_domain->free_in(holes[i])) report_error(string("A hole was left unfilled after ") +string("checking an application.\n")); holes[i]->dec(); } create = false; expected = headtp_domain; computed = NULL; is_hole = NULL; // the argument cannot be a hole // return_pos is unchanged #ifdef DEBUG_APPS cout << "Making tail call.\n"; #endif goto start_check; } Expr *arg = check(create_arg, headtp_domain, NULL, &arg_is_hole); eat_excess(prev); if (create) { #ifndef USE_FLAT_APP headtrm = new CExpr(APP, headtrm, arg); #else Expr* orig_headtrm = headtrm; headtrm = Expr::make_app( headtrm, arg ); if( orig_headtrm->getclass()==CEXPR ){ orig_headtrm->dec(); } #endif consumed_arg = true; } if (var_in_range) { Expr *tmp = arg->followDefs(); tmp->inc(); headtp_var->val = tmp; } if (arg_is_hole) { if (consumed_arg) arg->inc(); else consumed_arg = true; // not used currently #ifdef DEBUG_HOLES cout << "An argument is a hole: "; arg->debug(); #endif holes.push_back((HoleExpr *)arg); } } headtp_range->inc(); headtp->dec(); headtp = (CExpr *)headtp_range; } open_parens--; // check for remaining RUN in the head's type after all the arguments if (headtp->getop() == PI && headtp->kids[1]->getop() == RUN) { CExpr *run = (CExpr *)headtp->kids[1]; Expr *code = run->kids[0]->followDefs(); Expr *expected_result = run->kids[1]; Expr *computed_result = call_run_code(code); if (!computed_result) report_error(string("A side condition failed.\n") +string("1. the side condition: ")+code->toString()); if (!expected_result->defeq(computed_result)) report_error(string("The expected result of a side condition ") +string("does not match the computed result.\n") +string("1. expected result: ") +expected_result->toString() +string("\n2. computed result: ") +computed_result->toString()); Expr *tmp = headtp->kids[2]; tmp->inc(); headtp->dec(); headtp = (CExpr *)tmp; computed_result->dec(); } #ifdef DEBUG_APPS for (int i = 0, iend = holes.size(); i < iend; i++) { cout << tmp << "hole "; holes[i]->debug(); } cout << "}"; app_rec_level--; #endif Expr *ret = 0; if (expected) { if (!expected->defeq(headtp)){ report_error(string("The type expected for an application does not") + string(" match the computed type.(2) \n") + string("1. The expected type: ") + expected->toString() + string("\n2. The computed type: ") + headtp->toString() + (headtrm ? (string("\n3. the application: ") + headtrm->toString()) : string(""))); } expected->dec(); headtp->dec(); if (create) ret = headtrm; } else { *computed = headtp; if (create) ret = headtrm; } /* do this check here to give the defeq() call above a chance to fill in some holes */ for (int i = 0, iend = holes.size(); i < iend; i++) { if (!holes[i]->val){ if( inAsc ){ #ifdef DEBUG_HOLES std::cout << "Ascription Hole: "; holes[i]->print( std::cout ); std::cout << std::endl; #endif ascHoles.push_back( holes[i] ); }else{ report_error(string("A hole was left unfilled after checking") +string(" an application (2).\n")); } } holes[i]->dec(); } return ret; } // end application case } } case EOF: report_error("Unexpected end of file."); break; case '_': if (!is_hole) report_error("A hole is being used in a disallowed position."); *is_hole = true; if (expected) expected->dec(); return new HoleExpr(); case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { our_ungetc(d); string v; char c; while (isdigit(c = our_getc())) v.push_back(c); bool parseMpq = false; string v2; if( c=='/' ) { parseMpq = true; v.push_back( c ); while(isdigit(c = our_getc())) v.push_back(c); } our_ungetc(c); Expr *i = 0; if (create) { if( parseMpq ) { mpq_t num; mpq_init(num); if (mpq_set_str(num,v.c_str(),10) == -1) report_error("Error reading a numeral."); i = new RatExpr(num); } else { mpz_t num; if (mpz_init_set_str(num,v.c_str(),10) == -1) report_error("Error reading a numeral."); i = new IntExpr(num); } } if (expected) { if( ( !parseMpq && expected != statMpz ) || ( parseMpq && expected != statMpq ) ) report_error(string("We parsed a numeric literal, but were ") +string("expecting a term of a different type.\n") +string("1. the expected type: ")+expected->toString()); expected->dec(); if (create) return i; return 0; } else { if( parseMpq ) { statMpq->inc(); *computed = statMpq; if (create) return i; return statMpq; } else { statMpz->inc(); *computed = statMpz; if (create) return i; return statMpz; } } } default: { our_ungetc(d); string id(prefix_id()); #ifdef USE_HASH_MAPS Expr *ret = symbols[id]; Expr *rettp = symbol_types[id]; #else pair p = symbols->get(id.c_str()); Expr *ret = p.first; Expr *rettp = p.second; #endif if (!ret) report_error(string("Undeclared identifier: ")+id); if (expected) { if (!expected->defeq(rettp)) report_error(string("The type expected for a symbol does not") + string(" match the symbol's type.\n") + string("1. The symbol: ") + id + string("\n2. The expected type: ") + expected->toString() + string("\n3. The symbol's type: ") + rettp->toString()); expected->dec(); if (create) { ret->inc(); return ret; } return 0; } else { if( computed ){ *computed = rettp; (*computed)->inc(); } if (create) { ret->inc(); return ret; } return 0; } } } report_error("Unexpected operator at the start of a term."); return 0; } #ifdef USE_HASH_MAPS void discard_old_symbol(const string &id) { Expr *tmp = symbols[id]; if (tmp) tmp->dec(); tmp = symbol_types[id]; if (tmp) tmp->dec(); } #endif int check_time; void check_file(const char *_filename, args a, sccwriter* scw, libwriter* lw) { int prev_linenum = linenum; int prev_colnum = colnum; const char *prev_filename = filename; FILE * prev_curfile = curfile; // from code.h dbg_prog = a.show_runs; run_scc = a.run_scc; tail_calls = !a.no_tail_calls; std::string f; if (strcmp(_filename,"stdin") == 0) { curfile = stdin; f = std::string(_filename); } else { if (prev_curfile) { f = std::string(prev_filename); #ifdef _MSC_VER std::string str( f ); for( int n=str.length(); n>=0; n-- ){ if( str[n]=='\\' || str[n]=='/' ){ str = str.erase( n, str.length()-n ); break; } } char *tmp = (char*)str.c_str(); #else // Note: dirname may modify its argument, so we create a non-const copy. char *f_copy = strdup(f.c_str()); std::string str = std::string(dirname(f_copy)); free(f_copy); #endif f = str + std::string("/") + std::string(_filename); } else { f = std::string(_filename); } curfile = fopen(f.c_str(), "r"); if (!curfile) report_error(string("Could not open file \"") + f + string("\" for reading.\n")); } linenum = 1; colnum = 1; filename = f.c_str(); char c; while ((c = non_ws()) && c!=EOF ) { if( c == '(' ) { char d; switch ((d = non_ws())) { case 'd': char b; if ((b = our_getc()) != 'e') report_error(string("Unexpected start of command.")); switch ((b = our_getc())) { case 'f': {// expecting "define" if (our_getc() != 'i' || our_getc() != 'n' || our_getc() != 'e') report_error(string("Unexpected start of command.")); string id(prefix_id()); Expr *ttp; int prevo = open_parens; Expr *t = check(true, 0, &ttp, NULL, true); eat_excess(prevo); int o = ttp->followDefs()->getop(); if (o == KIND) report_error(string("Kind-level definitions are not supported.\n")); SymSExpr *s = new SymSExpr(id); s->val = t; #ifdef USE_HASH_MAPS discard_old_symbol(id); symbols[id] = s; symbol_types[id] = ttp; #else pair prev = symbols->insert(id.c_str(), pair(s,ttp)); if (prev.first) prev.first->dec(); if (prev.second) prev.second->dec(); #endif break; } case 'c': {// expecting "declare" if (our_getc() != 'l' || our_getc() != 'a' || our_getc() != 'r' || our_getc() != 'e') report_error(string("Unexpected start of command.")); string id(prefix_id()); Expr *ttp; int prevo = open_parens; Expr *t = check(true, 0, &ttp, NULL, true); eat_excess(prevo); ttp = ttp->followDefs(); if (ttp->getop() != TYPE && ttp->getop() != KIND) report_error(string("The expression declared for \"") +id+string("\" is neither\na type nor a kind.\n") +string("1. The expression: ") +t->toString() +string("\n2. Its classifier (should be \"type\" ") +string("or \"kind\"): ")+ttp->toString()); ttp->dec(); SymSExpr *s = new SymSExpr(id); #ifdef USE_HASH_MAPS discard_old_symbol(id); symbols[id] = s; symbol_types[id] = t; #else pair prev = symbols->insert(id.c_str(), pair(s,t)); if( lw ) lw->add_symbol( s, t ); if (prev.first) prev.first->dec(); if (prev.second) prev.second->dec(); #endif break; } default: report_error(string("Unexpected start of command.")); } // switch((b = our_getc())) following "de" break; case 'c': { if (our_getc() != 'h' || our_getc() != 'e' || our_getc() != 'c' || our_getc() != 'k') report_error(string("Unexpected start of command.")); if( run_scc ){ init_compiled_scc(); } Expr *computed; big_check = true; int prev = open_parens; (void)check(false, 0, &computed, NULL, true); //print out ascription holes for( int a=0; a<(int)ascHoles.size(); a++ ){ #ifdef PRINT_SMT2 print_smt2( ascHoles[a], std::cout ); #else ascHoles[a]->print( std::cout ); #endif std::cout << std::endl; } if( !ascHoles.empty() ) std::cout << std::endl; ascHoles.clear(); //clean up local symbols for( int a=0; a<(int)local_sym_names.size(); a++ ){ #ifdef USE_HASH_MAPS #else symbols->insert( local_sym_names[a].first.c_str(), local_sym_names[a].second ); #endif } local_sym_names.clear(); mark_map.clear(); eat_excess(prev); computed->dec(); //cleanup(); //exit(0); break; } case 'o': { // opaque case if (our_getc() != 'p' || our_getc() != 'a' || our_getc() != 'q' || our_getc() != 'u' || our_getc() != 'e') report_error(string("Unexpected start of command.")); string id(prefix_id()); Expr *ttp; int prevo = open_parens; (void)check(false, 0, &ttp, NULL, true); eat_excess(prevo); int o = ttp->followDefs()->getop(); if (o == KIND) report_error(string("Kind-level definitions are not supported.\n")); SymSExpr *s = new SymSExpr(id); #ifdef USE_HASH_MAPS discard_old_symbol(id); symbols[id] = s; symbol_types[id] = ttp; #else pair prev = symbols->insert(id.c_str(), pair(s,ttp)); if (prev.first) prev.first->dec(); if (prev.second) prev.second->dec(); #endif break; } case 'r': { // run case if (our_getc() != 'u' || our_getc() != 'n') report_error(string("Unexpected start of command.")); Expr *code = read_code(); check_code(code); cout << "[Running-sc "; code->print(cout); Expr *tmp = run_code(code); cout << "] = \n"; if (tmp) { tmp->print(cout); tmp->dec(); } else cout << "fail"; cout << "\n"; code->dec(); break; } case 'p': { // program case if (our_getc() != 'r' || our_getc() != 'o' || our_getc() != 'g' || our_getc() != 'r' || our_getc() != 'a' || our_getc() != 'm') report_error(string("Unexpected start of command.")); string progstr(prefix_id()); SymSExpr *prog = new SymSExpr(progstr); if (progs.find(progstr) != progs.end()) report_error(string("Redeclaring program ")+progstr+string(".")); progs[progstr] = prog; eat_char('('); char d; vector vars; vector tps; Expr *tmp; while ((d = non_ws()) != ')') { our_ungetc(d); eat_char('('); string varstr = prefix_id(); #ifdef USE_HASH_MAPS if (symbols.find(varstr) != symbols.end()) #else if (symbols->get(varstr.c_str()).first != NULL) #endif report_error(string("A program variable is already declared") +string(" (as a constant).\n1. The variable: ") +varstr); Expr *var = new SymSExpr(varstr); vars.push_back(var); statType->inc(); int prev = open_parens; Expr *tp = check(true, NULL, &tmp, 0, true); if( tp->getclass()==SYMS_EXPR ){ #ifdef USE_HASH_MAPS Expr *tptp = symbol_types[((SymSExpr*)tp)->s]; #else pair p = symbols->get(((SymSExpr*)tp)->s.c_str()); Expr *tptp = p.second; #endif if( !tptp->isType( statType ) ){ report_error(string("Bad argument for side condition")); } }else{ if (!tp->isDatatype()){ report_error(string("Type for a program variable is not a ") +string("datatype.\n1. the type: ")+tp->toString()); } } eat_excess(prev); tps.push_back(tp); eat_char(')'); #ifdef USE_HASH_MAPS symbols[varstr] = var; symbol_types[varstr] = tp; #else symbols->insert(varstr.c_str(), pair(var,tp)); #endif } if (!vars.size()) report_error("A program lacks input variables."); statType->inc(); int prev = open_parens; Expr *progtp = check(true,statType,&tmp,0, true); eat_excess(prev); if (!progtp->isDatatype()) report_error(string("Return type for a program is not a") +string(" datatype.\n1. the type: ")+progtp->toString()); Expr *progcode = read_code(); for (int i = vars.size() - 1, iend = 0; i >= iend; i--) { vars[i]->inc(); // used below for the program code (progcode) progtp = new CExpr(PI, vars[i], tps[i], progtp); progtp->calc_free_in(); } // just put the type here for type checking. Make sure progtp is kid 0. prog->val = new CExpr(PROG, progtp); check_code(progcode); progcode = new CExpr(PROG, progtp, new CExpr(PROGVARS, vars), progcode); //if compiling side condition code, give this code to the side condition code writer if( a.compile_scc ){ if( scw ){ scw->add_scc( progstr, (CExpr*)progcode ); } } // remove the variables from the symbol table. for (int i = 0, iend = vars.size(); i < iend; i++) { string &s = ((SymSExpr *)vars[i])->s; #ifdef USE_HASH_MAPS symbols[s] = NULL; symbol_types[s] = NULL; #else symbols->insert(s.c_str(), pair(NULL,NULL)); #endif } progtp->inc(); prog->val->dec(); prog->val = progcode; break; } default: report_error(string("Unexpected start of command.")); } // switch((d = non_ws()) eat_char(')'); } // while else { if( c != ')' ) { char c2[2]; c2[1] = 0; c2[0] = c; string syn = string("Bad syntax (mismatched parentheses?): "); syn.append(string(c2)); report_error(syn); } } } if (curfile != stdin) fclose(curfile); linenum = prev_linenum; colnum = prev_colnum; filename = prev_filename; curfile = prev_curfile; } class Deref : public Trie >::Cleaner { public: ~Deref() {} void clean(pair p) { Expr *tmp = p.first; if (tmp) { #ifdef DEBUG cout << "Cleaning up "; tmp->debug(); #endif tmp->dec(); } tmp = p.second; if (tmp) { #ifdef DEBUG cout << " : "; tmp->debug(); #endif tmp->dec(); } #ifdef DEBUG cout << "\n"; #endif } }; template <> Trie >::Cleaner * Trie >::cleaner = new Deref; void cleanup() { symmap::iterator i, iend; #ifdef USE_HASH_MAPS Expr *tmp; for (i = symbols.begin(), iend = symbols.end(); i != iend; i++) { tmp = i->second; if (tmp) { #ifdef DEBUG cout << "Cleaning up " << i->first << " : "; tmp->debug(); #endif tmp->dec(); } } for (i = symbol_types.begin(), iend = symbol_types.end(); i != iend; i++) { tmp = i->second; if (tmp) { #ifdef DEBUG cout << "Cleaning up " << i->first << " : "; tmp->debug(); #endif tmp->dec(); } } #else delete symbols; #endif // clean up programs symmap2::iterator j, jend; for (j = progs.begin(), jend = progs.end(); j != jend; j++) { SymExpr *p = j->second; if (p) { Expr *progcode = p->val; p->val = NULL; progcode->dec(); p->dec(); } } } void init() { #ifdef USE_HASH_MAPS string tp("type"); symbols[tp] = statType; symbol_types[tp] = statKind; string mpz("mpz"); symbols[mpz] = statMpz; symbol_types[mpz] = statType; statType->inc(); sym #else symbols->insert("type", pair(statType, statKind)); statType->inc(); symbols->insert("mpz", pair(statMpz, statType)); symbols->insert("mpq", pair(statMpq, statType)); #endif } cvc4-1.5/proofs/lfsc_checker/check.h000066400000000000000000000060571313116454100173760ustar00rootroot00000000000000#ifndef SC2_CHECK_H #define SC2_CHECK_H #include "expr.h" #include "trie.h" #ifdef _MSC_VER #include #include #else #include #endif #include #include #include // see the help message in main.cpp for explanation typedef struct args { std::vector files; bool show_runs; bool no_tail_calls; bool compile_scc; bool compile_scc_debug; bool run_scc; bool use_nested_app; bool compile_lib; } args; extern int check_time; class sccwriter; class libwriter; void init(); void check_file(const char *_filename, args a, sccwriter* scw = NULL, libwriter* lw = NULL); void cleanup(); extern char our_getc_c; void report_error(const std::string &); extern int linenum; extern int colnum; extern const char *filename; extern FILE *curfile; inline void our_ungetc(char c) { if (our_getc_c != 0) report_error("Internal error: our_ungetc buffer full"); our_getc_c = c; if (c == '\n') { linenum--; colnum=-1; } else colnum--; } inline char our_getc() { char c; if (our_getc_c > 0) { c = our_getc_c; our_getc_c = 0; } else{ #ifndef __linux__ c = fgetc(curfile); #else c = fgetc_unlocked(curfile); #endif } switch(c) { case '\n': linenum++; #ifdef DEBUG_LINES std::cout << "line " << linenum << "." << std::endl; #endif colnum = 1; break; case char(EOF): break; default: colnum++; } return c; } // return the next character that is not whitespace inline char non_ws() { char c; while(isspace(c = our_getc())); if (c == ';') { // comment to end of line while((c = our_getc()) != '\n' && c != char(EOF)); return non_ws(); } return c; } inline void eat_char(char expected) { if (non_ws() != expected) { char tmp[80]; sprintf(tmp,"Expecting a \'%c\'",expected); report_error(tmp); } } extern int IDBUF_LEN; extern char idbuf[]; inline const char *prefix_id() { int i = 0; char c = idbuf[i++] = non_ws(); while (!isspace(c) && c != '(' && c != ')' && c != char(EOF)) { if (i == IDBUF_LEN) report_error("Identifier is too long"); idbuf[i++] = c = our_getc(); } our_ungetc(c); idbuf[i-1] = 0; return idbuf; } #ifdef _MSC_VER typedef std::hash_map symmap; typedef std::hash_map symmap2; #else typedef __gnu_cxx::hash_map symmap; typedef __gnu_cxx::hash_map symmap2; #endif extern symmap2 progs; extern std::vector< Expr* > ascHoles; #ifdef USE_HASH_MAPS extern symmap symbols; extern symmap symbol_types; #else extern Trie > *symbols; #endif extern std::map mark_map; extern std::vector< std::pair< std::string, std::pair > > local_sym_names; #ifndef _MSC_VER namespace __gnu_cxx { template<> struct hash< std::string > { size_t operator()( const std::string& x ) const { return hash< const char* >()( x.c_str() ); } }; } #endif extern Expr *statMpz; extern Expr *statMpq; extern Expr *statType; #endif cvc4-1.5/proofs/lfsc_checker/chunking_memory_management.h000066400000000000000000000127621313116454100237130ustar00rootroot00000000000000/////////////////////////////////////////////////////////////////////////////// // // // Copyright (C) 2002 by the Board of Trustees of Leland Stanford // // Junior University. See LICENSE for details. // // // /////////////////////////////////////////////////////////////////////////////// /* chunking_memory_management.h Aaron Stump, 6/11/99 This file contains macros that allow you easily to add chunking memory management for classes. RCS Version: $Id: chunking_memory_management.h,v 1.1 2004/11/12 16:26:19 stump Exp $ */ #ifndef _chunking_memory_management_h_ #define _chunking_memory_management_h_ #include /************************************************************************ * MACRO: ADD_CHUNKING_MEMORY_MANAGEMENT_H() * Aaron Stump, 6/11/99 * * ABSTRACT: This macro should be called exactly once inside the body * of the declaration of the class THE_CLASS to add chunking memory * management for the class. That class should not itself declare the * operators new and delete. The macro * C_MACROS__ADD_CHUNKING_MEMORY_MANAGEMENT_CC should be called with * the same value for THE_CLASS in a .cc file for that class. * * NOTE that the access specifier will be public after calling this * macro. * * THE_FIELD is a field of the class to use for the next pointer in the * free list data structure. It can be of any type, but must have enough * space to hold a pointer. ************************************************************************/ #define C_MACROS__ADD_CHUNKING_MEMORY_MANAGEMENT_H(THE_CLASS,THE_FIELD) \ private:\ static unsigned C_MACROS__CHUNK_SIZE;\ static unsigned C_MACROS__BLOCK_SIZE;\ static void *C_MACROS__freelist;\ static bool C_MACROS__initialized;\ static char *C_MACROS__next_free_block;\ static char *C_MACROS__end_of_current_chunk;\ \ static void C_MACROS__allocate_new_chunk();\ \ public:\ static void C_MACROS__init_chunks() {\ if (!C_MACROS__initialized) {\ C_MACROS__allocate_new_chunk();\ C_MACROS__initialized = true;\ }\ }\ \ static void *operator new(size_t size, void *h = NULL);\ static void operator delete(void *ptr)\ /************************************************************************ * MACRO: ADD_CHUNKING_MEMORY_MANAGEMENT_CC() * Aaron Stump, 6/11/99 * * ABSTRACT: This macro should be called exactly once in a .cc file * for the class THE_CLASS to add chunking memory management for the * class. This macro should be called with the same value for * THE_CLASS as was used in calling * C_MACROS__ADD_CHUNKING_MEMORY_MANAGEMENT_H in the body of the * declaration of THE_CLASS. THE_CHUNK_SIZE is the number of blocks * of memory to get at once using malloc(). A block is the portion * of memory needed for one instance of THE_CLASS. * * * IMPLEMENTATION: ************************************************************************ * FUNCTION: allocate_new_chunk() * Aaron Stump, 6/8/99 * * ABSTRACT: This method allocates a new chunk of memory to use for * allocating instances of THE_CLASS. ************************************************************************ * FUNCTION: new() * Aaron Stump, 6/8/99 * * ABSTRACT: This allocator uses chunks for more efficient allocation. ************************************************************************ * FUNCTION: delete() * Aaron Stump, 6/8/99 * * ABSTRACT: This delete() puts the chunk pointed to by ptr on the * freelist. ************************************************************************ * Chunking_Memory_Management_Initializer and its static instance are used * to call the static init_chunks() method for THE_CLASS. ************************************************************************/ #define C_MACROS__ADD_CHUNKING_MEMORY_MANAGEMENT_CC(THE_CLASS,THE_FIELD,THE_CHUNK_SIZE) \ unsigned THE_CLASS::C_MACROS__CHUNK_SIZE = THE_CHUNK_SIZE;\ \ unsigned THE_CLASS::C_MACROS__BLOCK_SIZE = sizeof(THE_CLASS);\ \ void * THE_CLASS::C_MACROS__freelist = NULL;\ char * THE_CLASS::C_MACROS__next_free_block = NULL;\ char * THE_CLASS::C_MACROS__end_of_current_chunk = NULL;\ bool THE_CLASS::C_MACROS__initialized = false;\ \ void \ THE_CLASS::C_MACROS__allocate_new_chunk() {\ \ unsigned tmp = C_MACROS__CHUNK_SIZE * C_MACROS__BLOCK_SIZE;\ char *chunk = (char *)malloc(tmp);\ \ assert (chunk != NULL); \ \ C_MACROS__next_free_block = chunk;\ C_MACROS__end_of_current_chunk = chunk + tmp;\ }\ \ void * \ THE_CLASS::operator new(size_t size, void *h) {\ (void)size; /* size should always be _BLOCK_SIZE */\ \ if (h != NULL)\ /* we're being told what memory we should use */\ return h;\ \ char *new_block;\ \ if (C_MACROS__freelist) {\ /* we have a block on the freelist that we can use */\ new_block = (char *)C_MACROS__freelist; \ C_MACROS__freelist = (void *)((THE_CLASS *)new_block)->THE_FIELD; \ }\ else {\ /* we have to get a new block from a chunk (which we may */\ /* have to allocate*/\ \ if (C_MACROS__next_free_block == C_MACROS__end_of_current_chunk)\ C_MACROS__allocate_new_chunk();\ \ new_block = C_MACROS__next_free_block;\ C_MACROS__next_free_block += C_MACROS__BLOCK_SIZE;\ }\ \ return new_block;\ }\ \ void \ THE_CLASS::operator delete(void *ptr) {\ void **f = (void **)&((THE_CLASS *)ptr)->THE_FIELD; \ *f = C_MACROS__freelist; \ C_MACROS__freelist = ptr; \ } #endif cvc4-1.5/proofs/lfsc_checker/code.cpp000066400000000000000000001123001313116454100175530ustar00rootroot00000000000000#include "check.h" #include "code.h" #include #include "scccode.h" using namespace std; string *eat_str(const char *str, bool check_end = true) { string *s = new string(); char c, d; while ((c = *str++)) { d = our_getc(); if (c != d) { our_ungetc(d); return s; } s->push_back(d); } if (check_end && (d = our_getc()) != ' ' && d != '(' && d != '\n' && d != '\t') { our_ungetc(d); return s; } delete s; return 0; } SymSExpr *read_ctor() { string id(prefix_id()); #ifdef USE_HASH_TABLES Expr *s = symbols[id]; Expr *stp = symbol_types[id]; #else pair p = symbols->get(id.c_str()); Expr *s = p.first; Expr *stp = p.second; #endif if (!stp) report_error("Undeclared identifier parsing a pattern."); if (s->getclass() != SYMS_EXPR || ((SymExpr *)s)->val) report_error("The head of a pattern is not a constructor."); s->inc(); return (SymSExpr *)s; } Expr *read_case() { eat_char('('); Expr *pat = NULL; vector vars; #ifdef USE_HASH_MAPS vectorprevs; #else vector >prevs; #endif char d = non_ws(); switch(d) { case '(': { // parse application SymSExpr *s = read_ctor(); pat = s; char c; while ((c = non_ws()) != ')') { our_ungetc(c); string varstr(prefix_id()); SymSExpr *var = new SymSExpr(varstr); vars.push_back(var); #ifdef USE_HASH_MAPS prevs.push_back(symbols[varstr]); symbols[varstr] = var; #else prevs.push_back(symbols->insert(varstr.c_str(), pair(var,NULL))); #endif #ifndef USE_FLAT_APP pat = new CExpr(APP,pat,var); #else Expr* orig_pat = pat; pat = Expr::make_app(pat,var); if( orig_pat->getclass()==CEXPR ){ orig_pat->dec(); } #endif } break; } // default case case 'd': { delete eat_str("efault"); } break; case EOF: report_error("Unexpected end of file parsing a pattern."); break; default: // could be an identifier our_ungetc(d); pat = read_ctor(); break; } Expr *ret = read_code(); if( pat ) ret = new CExpr(CASE, pat, ret); for (int i = 0, iend = prevs.size(); i < iend; i++) { string &s = vars[i]->s; #ifdef USE_HASH_MAPS symbols[s] = prevs[i]; #else symbols->insert(s.c_str(), prevs[i]); #endif } eat_char(')'); return ret; } Expr *read_code() { string *pref = NULL; char d = non_ws(); switch(d) { case '(': { char c = non_ws(); switch (c) { case 'd': { our_ungetc('d'); pref = eat_str("do"); if (pref) break; Expr *ret = read_code(); while ((c = non_ws()) != ')') { our_ungetc(c); ret = new CExpr(DO,ret,read_code()); } return ret; } case 'f': { our_ungetc('f'); pref = eat_str("fail"); if (pref) break; Expr *c = read_code(); eat_char(')'); //do we need to check this??? //if (c->getclass() != SYMS_EXPR || ((SymExpr *)c)->val) // report_error(string("\"fail\" must be used with a (undefined) base ") // +string("type.\n1. the expression used: "+c->toString())); return new CExpr(FAIL, c); } case 'l': { our_ungetc('l'); pref = eat_str("let"); if (pref) break; string id(prefix_id()); SymSExpr *var = new SymSExpr(id); Expr *t1 = read_code(); #ifdef USE_HASH_MAPS Expr *prev = symbols[id]; symbols[id] = var; #else pair prev = symbols->insert(id.c_str(), pair(var,NULL)); #endif Expr *t2 = read_code(); #ifdef USE_HASH_MAPS symbols[id] = prev; #else symbols->insert(id.c_str(), prev); #endif eat_char(')'); return new CExpr(LET, var, t1, t2); } case 'i': { our_ungetc('i'); pref = eat_str("ifmarked",false); if (pref) break; #ifndef MARKVAR_32 Expr *e1 = read_code(); Expr *e2 = read_code(); Expr *e3 = read_code(); Expr *ret = new CExpr(IFMARKED, e1, e2, e3); #else int index = read_index(); Expr *e1 = read_code(); Expr *e2 = read_code(); Expr *e3 = read_code(); Expr *ret = NULL; if( index>=1 && index<=32 ) { ret = new CExpr( IFMARKED, new IntExpr( index-1 ), e1, e2, e3 ); } else { std::cout << "Can't make IFMARKED with index = " << index << std::endl; } Expr::markedCount++; //Expr *ret = new CExpr(IFMARKED, e1, e2, e3); #endif eat_char(')'); return ret; } case 'm': { char c; switch ((c = our_getc())) { case 'a': { char cc; switch ((cc = our_getc())) { case 't': { our_ungetc('t'); pref = eat_str("tch"); if (pref) { pref->insert(0,"ma"); break; } vector cases; cases.push_back(read_code()); // the scrutinee while ((c = non_ws()) != ')' && c != 'd') { our_ungetc(c); cases.push_back(read_case()); } if (cases.size() == 1) // counting scrutinee report_error("A match has no cases."); if (c == 'd') { // we have a default case //delete eat_str("efault"); our_ungetc(c); cases.push_back(read_case()); } return new CExpr(MATCH,cases); } case 'r': { our_ungetc('r'); pref = eat_str("rkvar", false); if (pref) { pref->insert(0,"ma"); break; } #ifndef MARKVAR_32 Expr *ret = new CExpr(MARKVAR,read_code()); #else int index = read_index(); CExpr* ret = NULL; if( index>=1 && index<=32 ) { ret = new CExpr( MARKVAR, new IntExpr( index-1 ), read_code() ); } else { std::cout << "Can't make MARKVAR with index = " << index << std::endl; } Expr::markedCount++; //Expr *ret = new CExpr(MARKVAR,read_code()); #endif eat_char(')'); return ret; } default: our_ungetc(c); pref = new string("ma"); break; } } case 'p': { our_ungetc('p'); pref = eat_str("p_",false); if (pref) { pref->insert(0,"m"); break; } char c = our_getc(); switch(c) { case 'a': { our_ungetc('a'); pref = eat_str("add"); if (pref) { pref->insert(0,"mp_"); break; } Expr* e1 = read_code(); Expr* e2 = read_code(); Expr *ret = new CExpr(ADD, e1, e2); eat_char(')'); return ret; } case 'n': { our_ungetc('n'); pref = eat_str("neg"); if (pref) { pref->insert(0,"mp_"); break; } Expr *ret = new CExpr(NEG, read_code()); eat_char(')'); return ret; } case 'i': { // mpz_if_neg char c = our_getc(); if( c=='f' ) { c = our_getc(); switch( c ) { case 'n': { our_ungetc('n'); pref = eat_str("neg"); if( pref ) { pref->insert(0,"mp_if"); break; } Expr* e1 = read_code(); Expr* e2 = read_code(); Expr* e3 = read_code(); Expr* ret = new CExpr(IFNEG, e1, e2, e3 ); eat_char(')'); return ret; } case 'z': { our_ungetc('z'); pref = eat_str("zero"); if( pref ) { pref->insert(0,"mp_if"); break; } Expr* e1 = read_code(); Expr* e2 = read_code(); Expr* e3 = read_code(); Expr* ret = new CExpr(IFZERO, e1, e2, e3 ); eat_char(')'); return ret; } default: our_ungetc(c); pref = new string("mp_if"); break; } } else { our_ungetc(c); pref = new string("mp_i"); break; } } case 'm': { our_ungetc('m'); pref = eat_str("mul"); if( pref ){ pref->insert(0,"mp_"); break; } Expr* e1 = read_code(); Expr* e2 = read_code(); Expr* ret = new CExpr(MUL, e1, e2 ); eat_char(')'); return ret; } case 'd': { our_ungetc('d'); pref = eat_str("div"); if( pref ){ pref->insert(0,"mp_"); break; } Expr* e1 = read_code(); Expr* e2 = read_code(); Expr* ret = new CExpr(DIV, e1, e2 ); eat_char(')'); return ret; } default: our_ungetc(c); pref = new string("mp_"); break; } } default: our_ungetc(c); pref = new string("m"); break; } break; } case '~': { Expr *e = read_code(); if( e->getclass()==INT_EXPR ) { IntExpr *ee = (IntExpr *)e; mpz_neg(ee->n, ee->n); eat_char(')'); return ee; } else if( e->getclass() == RAT_EXPR ) { RatExpr *ee = (RatExpr *)e; mpq_neg(ee->n, ee->n); eat_char(')'); return ee; } else { report_error("Negative sign with expr that is not an int. literal."); } } case 'c': { our_ungetc('c'); pref = eat_str("compare"); if (pref) break; Expr *e1 = read_code(); Expr *e2 = read_code(); Expr *e3 = read_code(); Expr *e4 = read_code(); eat_char(')'); return new CExpr(COMPARE, e1, e2, e3, e4); } break; case EOF: report_error("Unexpected end of file."); break; default: { // the application case our_ungetc(c); break; } } // parse application if (pref) // we have eaten part of the name of an applied identifier pref->append(prefix_id()); else pref = new string(prefix_id()); Expr *ret = progs[*pref]; if (!ret) #ifdef USE_HASH_TABLES ret = symbols[*pref]; #else ret = symbols->get(pref->c_str()).first; #endif if (!ret) report_error(string("Undeclared identifier at head of an application: ") +*pref); ret->inc(); delete pref; while ((c = non_ws()) != ')') { our_ungetc(c); #ifndef USE_FLAT_APP ret = new CExpr(APP,ret,read_code()); #else Expr* ke = read_code(); Expr* orig_ret = ret; ret = Expr::make_app(ret,ke); if( orig_ret->getclass()==CEXPR ){ orig_ret->dec(); } #endif } return ret; } // end case '(' case EOF: report_error("Unexpected end of file."); break; case '_': report_error("Holes may not be used in code."); return NULL; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { our_ungetc(d); string v; char c; while (isdigit(c = our_getc())) v.push_back(c); bool parseMpq = false; if( c=='/' ) { parseMpq = true; v.push_back(c); while(isdigit(c = our_getc())) v.push_back(c); } our_ungetc(c); if( parseMpq ) { mpq_t num; mpq_init(num); if (mpq_set_str(num,v.c_str(),10) == -1 ) report_error("Error reading a mpq numeral."); Expr* e = new RatExpr( num ); return e; } else { mpz_t num; if (mpz_init_set_str(num,v.c_str(),10) == -1) report_error("Error reading a numeral."); return new IntExpr(num); } } default: { our_ungetc(d); string id(prefix_id()); #ifdef USE_HASH_MAPS Expr *ret = symbols[id]; #else pair p = symbols->get(id.c_str()); Expr *ret = p.first; #endif if (!ret) ret = progs[id]; if (!ret) report_error(string("Undeclared identifier: ")+id); ret->inc(); return ret; } } report_error("Unexpected operator in a piece of code."); return 0; } // the input is owned by the caller, the output by us (so do not dec it). Expr *check_code(Expr *_e) { CExpr *e = (CExpr *)_e; switch (e->getop()) { case NOT_CEXPR: switch (e->getclass()) { case INT_EXPR: return statMpz; case RAT_EXPR: return statMpq; case SYM_EXPR: { report_error("Internal error: an LF variable is encountered in code"); break; } case SYMS_EXPR: { #ifdef USE_HASH_MAPS Expr *tp = symbol_types[((SymSExpr *)e)->s]; #else Expr *tp = symbols->get(((SymSExpr *)e)->s.c_str()).second; #endif if (!tp) report_error(string("A symbol is missing a type in a piece of code.") +string("\n1. the symbol: ")+((SymSExpr *)e)->s); return tp; } case HOLE_EXPR: report_error("Encountered a hole unexpectedly in code."); default: report_error("Unrecognized form of expr in code."); } case APP: { #ifdef USE_FLAT_APP Expr* h = e->kids[0]->followDefs(); vector argtps; int counter = 1; while( e->kids[counter] ) { argtps.push_back( check_code( e->kids[counter] ) ); counter++; } int iend = counter-1; #else vector args; Expr *h = (Expr *)e->collect_args(args); int iend = args.size(); vector argtps(iend); for (int i = 0; i < iend; i++) argtps[i] = check_code(args[i]); #endif Expr *tp = NULL; if (h->getop() == PROG){ tp = ((CExpr *)h)->kids[0]; }else { #ifdef USE_HASH_MAPS tp = symbol_types[((SymSExpr *)h)->s]; #else tp = symbols->get(((SymSExpr *)h)->s.c_str()).second; #endif } if (!tp) report_error(string("The head of an application is missing a type in ") +string("code.\n1. the application: ")+e->toString()); tp = tp->followDefs(); if (tp->getop() != PI) report_error(string("The head of an application does not have ") +string("functional type in code.") +string("\n1. the application: ")+e->toString()); CExpr *cur = (CExpr *)tp; int i = 0; while (cur->getop() == PI) { if (i >= iend) report_error(string("A function is not being fully applied in code.\n") +string("1. the application: ")+e->toString() +string("\n2. its (functional) type: ")+cur->toString()); if( argtps[i]->getop()==APP ) argtps[i] = ((CExpr*)argtps[i])->kids[0]; if (argtps[i] != cur->kids[1]) { char buf[1024]; sprintf(buf,"%d",i); report_error(string("Type mismatch for argument ") + string(buf) + string(" in application in code.\n") + string("1. the application: ")+e->toString() + string("\n2. the head's type: ")+tp->toString() #ifdef USE_FLAT_APP + string("\n3. the argument: ")+e->kids[i+1]->toString() #else + string("\n3. the argument: ")+args[i]->toString() #endif + string("\n4. computed type: ")+argtps[i]->toString() + string("\n5. expected type: ") +cur->kids[1]->toString()); } //if (cur->kids[2]->free_in((SymExpr *)cur->kids[0])) if( cur->get_free_in() ){ cur->calc_free_in(); //are you sure? if( cur->get_free_in() ) report_error(string("A dependently typed function is being applied in") +string(" code.\n1. the application: ")+e->toString() +string("\n2. the head's type: ")+tp->toString()); //ok, reset the mark cur->setexmark(); } i++; cur = (CExpr *)cur->kids[2]; } if (i < iend) report_error(string("A function is being fully applied to too many ") +string("arguments in code.\n") +string("1. the application: ")+e->toString() +string("\n2. the head's type: ")+tp->toString()); return cur; } //is this right? case MPZ: return statType; break; case MPQ: return statType; break; case DO: check_code(e->kids[0]); return check_code(e->kids[1]); case LET: { SymSExpr * var = (SymSExpr *)e->kids[0]; Expr *tp1 = check_code(e->kids[1]); #ifdef USE_HASH_MAPS Expr *prevtp = symbol_types[var->s]; symbol_types[var->s] = tp1; #else pair prev = symbols->insert(var->s.c_str(), pair(NULL,tp1)); #endif Expr *tp2 = check_code(e->kids[2]); #ifdef USE_HASH_MAPS symbol_types[var->s] = prevtp; #else symbols->insert(var->s.c_str(), prev); #endif return tp2; } case ADD: case MUL: case DIV: { Expr *tp0 = check_code(e->kids[0]); Expr *tp1 = check_code(e->kids[1]); if (tp0 != statMpz && tp0 != statMpq ) report_error(string("Argument to mp_[arith] does not have type \"mpz\" or \"mpq\".\n") +string("1. the argument: ")+e->kids[0]->toString() +string("\n1. its type: ")+tp0->toString()); if (tp0 != tp1) report_error(string("Arguments to mp_[arith] have differing types.\n") +string("1. argument 1: ")+e->kids[0]->toString() +string("\n1. its type: ")+tp0->toString() +string("2. argument 2: ")+e->kids[1]->toString() +string("\n2. its type: ")+tp1->toString()); return tp0; } case NEG: { Expr *tp0 = check_code(e->kids[0]); if (tp0 != statMpz && tp0 != statMpq ) report_error(string("Argument to mp_neg does not have type \"mpz\" or \"mpq\".\n") +string("1. the argument: ")+e->kids[0]->toString() +string("\n1. its type: ")+tp0->toString()); return tp0; } case IFNEG: case IFZERO: { Expr *tp0 = check_code(e->kids[0]); if (tp0 != statMpz && tp0 != statMpq) report_error(string("Argument to mp_if does not have type \"mpz\" or \"mpq\".\n") +string("1. the argument: ")+e->kids[0]->toString() +string("\n1. its type: ")+tp0->toString()); SymSExpr *tp1 = (SymSExpr *)check_code(e->kids[1]); SymSExpr *tp2 = (SymSExpr *)check_code(e->kids[2]); if (tp1->getclass() != SYMS_EXPR || tp1->val || tp1 != tp2) report_error(string("\"mp_if\" used with expressions that do not ") +string("have equal simple datatypes\nfor their types.\n") +string("0. 0'th expression: ")+e->kids[0]->toString() +string("\n1. first expression: ")+e->kids[1]->toString() +string("\n2. second expression: ")+e->kids[2]->toString() +string("\n3. first expression's type: ")+tp1->toString() +string("\n4. second expression's type: ")+tp2->toString()); return tp1; } case FAIL: { Expr *tp = check_code(e->kids[0]); if (tp != statType) report_error(string("\"fail\" is used with an expression which is ") +string("not a type.\n1. the expression :") +e->kids[0]->toString() +string("\n2. its type: ")+tp->toString()); return e->kids[0]; } case MARKVAR: { SymSExpr *tp = (SymSExpr *)check_code(e->kids[1]); Expr* tptp = NULL; if (tp->getclass() == SYMS_EXPR && !tp->val){ #ifdef USE_HASH_MAPS tptp = symbol_types[tp->s]; #else tptp = symbols->get(tp->s.c_str()).second; #endif } if (!tptp->isType( statType )){ string errstr = (string("\"markvar\" is used with an expression which ") +string("cannot be a lambda-bound variable.\n") +string("1. the expression :") +e->kids[1]->toString() +string("\n2. its type: ")+tp->toString()); report_error(errstr); } return tp; } case IFMARKED: { SymSExpr *tp = (SymSExpr *)check_code(e->kids[1]); Expr* tptp = NULL; if (tp->getclass() == SYMS_EXPR && !tp->val){ #ifdef USE_HASH_MAPS tptp = symbol_types[tp->s]; #else tptp = symbols->get(tp->s.c_str()).second; #endif } if (!tptp->isType( statType ) ){ string errstr = (string("\"ifmarked\" is used with an expression which ") +string("cannot be a lambda-bound variable.\n") +string("1. the expression :") +e->kids[1]->toString() +string("\n2. its type: ")+tp->toString()); report_error(errstr); } SymSExpr *tp1 = (SymSExpr *)check_code(e->kids[2]); SymSExpr *tp2 = (SymSExpr *)check_code(e->kids[3]); if (tp1->getclass() != SYMS_EXPR || tp1->val || tp1 != tp2) report_error(string("\"ifmarked\" used with expressions that do not ") +string("have equal simple datatypes\nfor their types.\n") +string("0. 0'th expression: ")+e->kids[1]->toString() +string("\n1. first expression: ")+e->kids[2]->toString() +string("\n2. second expression: ")+e->kids[3]->toString() +string("\n3. first expression's type: ")+tp1->toString() +string("\n4. second expression's type: ")+tp2->toString()); return tp1; } case COMPARE: { SymSExpr *tp0 = (SymSExpr *)check_code(e->kids[0]); if (tp0->getclass() != SYMS_EXPR || tp0->val){ string errstr0 = (string("\"compare\" is used with a first expression which ") +string("cannot be a lambda-bound variable.\n") +string("1. the expression :") +e->kids[0]->toString() +string("\n2. its type: ")+tp0->toString()); report_error(errstr0); } SymSExpr *tp1 = (SymSExpr *)check_code(e->kids[1]); if (tp1->getclass() != SYMS_EXPR || tp1->val){ string errstr1 = (string("\"compare\" is used with a second expression which ") +string("cannot be a lambda-bound variable.\n") +string("1. the expression :") +e->kids[1]->toString() +string("\n2. its type: ")+tp1->toString()); report_error(errstr1); } SymSExpr *tp2 = (SymSExpr *)check_code(e->kids[2]); SymSExpr *tp3 = (SymSExpr *)check_code(e->kids[3]); if (tp2->getclass() != SYMS_EXPR || tp2->val || tp2 != tp3) report_error(string("\"compare\" used with expressions that do not ") +string("have equal simple datatypes\nfor their types.\n") +string("\n1. first expression: ")+e->kids[2]->toString() +string("\n2. second expression: ")+e->kids[3]->toString() +string("\n3. first expression's type: ")+tp2->toString() +string("\n4. second expression's type: ")+tp3->toString()); return tp2; } case MATCH: { SymSExpr *scruttp = (SymSExpr *)check_code(e->kids[0]); Expr *tptp = NULL; if (scruttp->getclass() == SYMS_EXPR && !scruttp->val){ #ifdef USE_HASH_MAPS tptp = symbol_types[scruttp->s]; #else tptp = symbols->get(scruttp->s.c_str()).second; #endif } if (!tptp->isType( statType )){ string errstr = (string("The scrutinee of a match is not ") +string("a plain piece of data.\n") +string("1. the scrutinee: ") +e->kids[0]->toString() +string("\n2. its type: ")+scruttp->toString()); report_error(errstr); } int i = 1; Expr **cur = &e->kids[i]; Expr *mtp = NULL; Expr *c_or_default; CExpr *c; while ((c_or_default = *cur++)) { Expr *tp = NULL; CExpr *pat = NULL; if (c_or_default->getop() != CASE) // this is the default of the MATCH tp = check_code(c_or_default); else { // this is a CASE of the MATCH c = (CExpr *)c_or_default; pat = (CExpr *)c->kids[0]; // might be just a SYMS_EXPR if (pat->getclass() == SYMS_EXPR) tp = check_code(c->kids[1]); else { // extend type context and then check the body of the case #ifdef USE_HASH_MAPS vectorprevs; #else vector >prevs; #endif vector vars; SymSExpr *ctor = (SymSExpr *)pat->collect_args(vars); #ifdef USE_HASH_MAPS CExpr *ctortp = (CExpr *)symbol_types[ctor->s]; #else CExpr *ctortp = (CExpr *)symbols->get(ctor->s.c_str()).second; #endif CExpr *curtp = ctortp; for (int i = 0, iend = vars.size(); i < iend; i++) { if ( curtp->followDefs()->getop() != PI) report_error(string("Too many arguments to a constructor in") +string(" a pattern.\n1. the pattern: ") +pat->toString() +string("\n2. the head's type: " +ctortp->toString())); #ifdef USE_HASH_MAPS prevs.push_back(symbol_types[((SymSExpr *)vars[i])->s]); symbol_types[((SymSExpr *)vars[i])] = curtp->followDefs()->kids[1]; #else prevs.push_back (symbols->insert(((SymSExpr *)vars[i])->s.c_str(), pair(NULL, ((CExpr *)(curtp->followDefs()))->kids[1]))); #endif curtp = (CExpr *)((CExpr *)(curtp->followDefs()))->kids[2]; } tp = check_code(c->kids[1]); for (int i = 0, iend = prevs.size(); i < iend; i++) { #ifdef USE_HASH_MAPS symbol_types[((SymSExpr *)vars[i])->s] = prevs[i]; #else symbols->insert(((SymSExpr *)vars[i])->s.c_str(), prevs[i]); #endif } } } // check that the type for the body of this case -- or the default value -- // matches the type for the previous case if we had one. if (!mtp) mtp = tp; else if (mtp != tp) report_error(string("Types for bodies of match cases or the default differ.") +string("\n1. type for first case's body: ") +mtp->toString() +(pat == NULL ? string("\n2. type for the default") : (string("\n2. type for the body of case for ") +pat->toString())) +string(": ")+tp->toString()); } return mtp; } } // end switch report_error("Type checking an unrecognized form of code (internal error)."); return NULL; } bool dbg_prog; bool run_scc; int dbg_prog_indent_lvl = 0; void dbg_prog_indent(std::ostream &os) { for (int i = 0; i < dbg_prog_indent_lvl; i++) os << " "; } Expr *run_code(Expr *_e) { start_run_code: CExpr *e = (CExpr *)_e; if( e ) { //std::cout << ". "; //e->print( std::cout ); //std::cout << std::endl; //std::cout << e->getop() << " " << e->getclass() << std::endl; } switch (e->getop()) { case NOT_CEXPR: switch(e->getclass()) { case INT_EXPR: case RAT_EXPR: e->inc(); return e; case HOLE_EXPR: { Expr *tmp = e->followDefs(); if (tmp == e) report_error("Encountered an unfilled hole running code."); tmp->inc(); return tmp; } case SYMS_EXPR: case SYM_EXPR: { Expr *tmp = e->followDefs(); //std::cout << "follow def = "; //tmp->print( std::cout ); //std::cout << std::endl; if (tmp == e) { e->inc(); return e; } tmp->inc(); return tmp; } } case FAIL: return NULL; case DO: { Expr *tmp = run_code(e->kids[0]); if (!tmp) return NULL; tmp->dec(); _e = e->kids[1]; goto start_run_code; } case LET: { Expr *r0 = run_code(e->kids[1]); if (!r0) return NULL; SymExpr *var = (SymExpr *)e->kids[0]; Expr *prev = var->val; var->val = r0; Expr *r1 = run_code(e->kids[2]); var->val = prev; r0->dec(); return r1; } case ADD: case MUL: case DIV: { Expr *r1 = run_code(e->kids[0]); if (!r1) return NULL; Expr *r2 = run_code(e->kids[1]); if (!r2) return NULL; if( r1->getclass()==INT_EXPR && r2->getclass()==INT_EXPR ) { mpz_t r; mpz_init(r); if( e->getop()==ADD ) mpz_add(r, ((IntExpr *)r1)->n, ((IntExpr *)r2)->n); else if( e->getop()==MUL ) mpz_mul(r, ((IntExpr *)r1)->n, ((IntExpr *)r2)->n); else if( e->getop()==DIV ) mpz_cdiv_q(r, ((IntExpr *)r1)->n, ((IntExpr *)r2)->n); r1->dec(); r2->dec(); return new IntExpr(r); } else if( r1->getclass()==RAT_EXPR && r2->getclass()==RAT_EXPR ) { mpq_t q; mpq_init(q); if( e->getop()==ADD ) mpq_add(q, ((RatExpr *)r1)->n, ((RatExpr *)r2)->n); else if( e->getop()==MUL ) mpq_mul(q, ((RatExpr *)r1)->n, ((RatExpr *)r2)->n); else if( e->getop()==DIV ) mpq_div(q, ((RatExpr *)r1)->n, ((RatExpr *)r2)->n); r1->dec(); r2->dec(); return new RatExpr(q); } else { //std::cout << "An arithmetic operation failed. " << r1->getclass() << " " << r2->getclass() << std::endl; r1->dec(); r2->dec(); return NULL; } } case NEG: { Expr *r1 = run_code(e->kids[0]); if (!r1) return NULL; if (r1->getclass() == INT_EXPR) { mpz_t r; mpz_init(r); mpz_neg(r, ((IntExpr *)r1)->n); r1->dec(); return new IntExpr(r); } else if( r1->getclass() == RAT_EXPR ) { mpq_t q; mpq_init(q); mpq_neg(q, ((RatExpr *)r1)->n); r1->dec(); return new RatExpr(q); } else { std::cout << "An arithmetic negation failed. " << r1->getclass() << std::endl; //((SymSExpr*)r1)->val->print( std::cout ); std::cout << ((SymSExpr*)r1)->val << std::endl; r1->dec(); return NULL; } } case IFNEG: case IFZERO:{ Expr *r1 = run_code(e->kids[0]); if (!r1) return NULL; bool cond = true; if( r1->getclass() == INT_EXPR ){ if( e->getop() == IFNEG ) cond = mpz_sgn( ((IntExpr *)r1)->n )<0; else if( e->getop() == IFZERO ) cond = mpz_sgn( ((IntExpr *)r1)->n )==0; }else if( r1->getclass() == RAT_EXPR ){ if( e->getop() == IFNEG ) cond = mpq_sgn( ((RatExpr *)r1)->n )<0; else if( e->getop() == IFZERO ) cond = mpq_sgn( ((RatExpr *)r1)->n )==0; } else { std::cout << "An arithmetic if-expression failed. " << r1->getclass() << std::endl; r1->dec(); return NULL; } r1->dec(); if( cond ) _e = e->kids[1]; else _e = e->kids[2]; goto start_run_code; } case IFMARKED: { Expr *r1 = run_code(e->kids[1]); if (!r1) return NULL; if(r1->getclass() != SYM_EXPR && r1->getclass() != SYMS_EXPR ){ r1->dec(); return NULL; } #ifndef MARKVAR_32 if (r1->getexmark()) { #else if(((SymExpr*)r1)->getmark( ((IntExpr*)e->kids[0])->get_num() ) ){ #endif r1->dec(); _e = e->kids[2]; goto start_run_code; } // else r1->dec(); _e = e->kids[3]; goto start_run_code; } case COMPARE: { Expr *r1 = run_code(e->kids[0]); if (!r1) return NULL; if (r1->getclass() != SYM_EXPR && r1->getclass() != SYMS_EXPR) { r1->dec(); return NULL; } Expr *r2 = run_code(e->kids[1]); if (!r2) return NULL; if (r2->getclass() != SYM_EXPR && r2->getclass() != SYMS_EXPR) { r2->dec(); return NULL; } if( r1dec(); _e = e->kids[2]; goto start_run_code; } //else r2->dec(); _e = e->kids[3]; goto start_run_code; } case MARKVAR: { Expr *r1 = run_code(e->kids[1]); if (!r1) return NULL; if (r1->getclass() != SYM_EXPR && r1->getclass() != SYMS_EXPR) { r1->dec(); return NULL; } #ifndef MARKVAR_32 if (r1->getexmark()) r1->clearexmark(); else r1->setexmark(); #else if(((SymExpr*)r1)->getmark( ((IntExpr*)e->kids[0])->get_num() ) ) ((SymExpr*)r1)->clearmark( ((IntExpr*)e->kids[0])->get_num() ); else ((SymExpr*)r1)->setmark( ((IntExpr*)e->kids[0])->get_num() ); #endif return r1; } case MATCH: { Expr *scrut = run_code(e->kids[0]); if (!scrut) return 0; vector args; Expr *hd = scrut->collect_args(args); Expr **cases = &e->kids[1]; // CExpr *c; Expr *c_or_default; while ((c_or_default = *cases++)) { if (c_or_default->getop() != CASE){ //std::cout << "run the default " << std::endl; //c_or_default->print( std::cout ); // this is the default of the MATCH return run_code(c_or_default); } // this is a CASE of the MATCH CExpr *c = (CExpr *)c_or_default; Expr *p = c->kids[0]; if (hd == p->get_head()) { vector vars; p->collect_args(vars); int jend = args.size(); vector old_vals(jend); for (int j = 0; j < jend; j++) { SymExpr *var = (SymExpr *)vars[j]; old_vals[j] = var->val; var->val = args[j]; args[j]->inc(); } scrut->dec(); Expr *ret = run_code(c->kids[1] /* the body of the case */); for (int j = 0; j < jend; j++) { ((SymExpr *)vars[j])->val = old_vals[j]; args[j]->dec(); } return ret; } } break; } case APP: { Expr *tmp = e->whr(); if (e != tmp) { _e = tmp; goto start_run_code; } // e is in weak head normal form vector args; Expr *hd = e->collect_args(args); for (int i = 0, iend = args.size(); i < iend; i++) if (!(args[i] = run_code(args[i]))) { for (int j = 0; j < i; j++) args[j]->dec(); return NULL; } if (hd->getop() != PROG) { hd->inc(); Expr *tmp = Expr::build_app(hd,args); return tmp; } assert(hd->getclass() == CEXPR); CExpr *prog = (CExpr *)hd; assert(prog->kids[1]->getclass() == CEXPR); Expr **cur = ((CExpr *)prog->kids[1])->kids; vector old_vals; SymExpr *var; int i = 0; if( run_scc && e->get_head( false )->getclass()==SYMS_EXPR ) { //std::cout << "running " << ((SymSExpr*)e->get_head( false ))->s.c_str() << " with " << (int)args.size() << " arguments" << std::endl; //#ifndef USE_FLAT_APP // for( int a=0; a<(int)args.size(); a++ ) // { // args[a] = CExpr::convert_to_flat_app( args[a] ); // } //#endif Expr *ret = run_compiled_scc( e->get_head( false ), args ); for (int i = 0, iend = args.size(); i < iend; i++) { args[i]->dec(); } //#ifndef USE_FLAT_APP // ret = CExpr::convert_to_tree_app( ret ); //#endif //ret->inc(); return ret; } else { while((var = (SymExpr *)*cur++)) { // Check whether not enough arguments were supplied if (i >= args.size()) { for (size_t i = 0; i < args.size(); i++) { args[i]->dec(); } return NULL; } old_vals.push_back(var->val); var->val = args[i++]; } // Check whether too many arguments were supplied if (i < args.size()) { for (size_t i = 0; i < args.size(); i++) { args[i]->dec(); } return NULL; } if (dbg_prog) { dbg_prog_indent(cout); cout << "["; e->print(cout); cout << "\n"; } dbg_prog_indent_lvl++; Expr *ret = run_code(prog->kids[2]); dbg_prog_indent_lvl--; if (dbg_prog) { dbg_prog_indent(cout); cout << "= "; if (ret) ret->print(cout); else cout << "fail"; cout << "]\n"; } cur = ((CExpr *)prog->kids[1])->kids; i = 0; while((var = (SymExpr *)*cur++)) { assert(i < args.size()); args[i]->dec(); var->val = old_vals[i++]; } return ret; } } } // end switch return NULL; } int read_index() { int index = 1; string v; char c; while (isdigit(c = our_getc())) v.push_back(c); our_ungetc(c); if( v.length()>0 ) { index = atoi( v.c_str() ); } return index; } cvc4-1.5/proofs/lfsc_checker/code.h000066400000000000000000000003571313116454100172300ustar00rootroot00000000000000#ifndef SC2_CODE_H #define SC2_CODE_H #include "expr.h" Expr *read_code(); Expr *check_code(Expr *); // compute the type for the given code Expr *run_code(Expr *); int read_index(); extern bool dbg_prog; extern bool run_scc; #endif cvc4-1.5/proofs/lfsc_checker/config.h.in000066400000000000000000000043661313116454100201740ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `gmp' library (-lgmp). */ #undef HAVE_LIBGMP /* 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_MEMORY_H /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_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 `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to `__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 rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `unsigned int' if does not define. */ #undef size_t cvc4-1.5/proofs/lfsc_checker/config/000077500000000000000000000000001313116454100174055ustar00rootroot00000000000000cvc4-1.5/proofs/lfsc_checker/config/compile000077500000000000000000000162451313116454100207730ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 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 if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a 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: cvc4-1.5/proofs/lfsc_checker/config/config.guess000077500000000000000000001247531313116454100217410ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # 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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # 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 # # Please send patches to . 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 1992-2015 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 case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # 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=`(uname -p 2>/dev/null || \ /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 ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-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*|earm*|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 # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; 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/[-_].*//' | cut -d. -f1,2` ;; 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}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_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 ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix 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/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 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 ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *: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-${LIBC}`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/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${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-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 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 ;; x86_64:Haiku:*:*) echo x86_64-unknown-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 eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 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 case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi 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 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: cvc4-1.5/proofs/lfsc_checker/config/config.sub000077500000000000000000001064601313116454100213770ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # 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 3 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # 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 1992-2015 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-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ 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 | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | 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 \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]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 \ | visium \ | 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 ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | 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-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | 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-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | 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-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | 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-* \ | visium-* \ | 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 ;; asmjs) basic_machine=asmjs-unknown ;; 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 ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; 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 ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-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 ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-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 | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) 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* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -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* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -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* | -tirtos*) # 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 ;; -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 ;; c8051-*) os=-elf ;; 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: cvc4-1.5/proofs/lfsc_checker/config/depcomp000077500000000000000000000560161313116454100207720ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 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 # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} 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" # Avoid interferences from the environment. gccflag= dashmflag= # 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 information. 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## 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). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - 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 -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # 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. ## 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. tr ' ' "$nl" < "$tmpdepfile" \ | 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 -ne 0; then 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 make_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. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" 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 -ne 0; then 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,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_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. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool 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$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; 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 -ne 0; then 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" echo >> "$depfile" # make sure the fragment doesn't end with a backslash 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" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | 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" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | 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: cvc4-1.5/proofs/lfsc_checker/config/install-sh000077500000000000000000000354631313116454100214240ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/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-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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: cvc4-1.5/proofs/lfsc_checker/config/libtool.m4000066400000000000000000011263111313116454100213200ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 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) 2014 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 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 this program. If not, see . ]) # serial 58 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.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 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_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _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 m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that 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 set != "${COLLECT_NAMES+set}"; 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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 0 = "$lt_write_fail" && 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 yes = "$silent" && 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 that 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 # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _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 set != "${COLLECT_NAMES+set}"; 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) 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' 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 0 = "$_lt_result"; 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 0 = "$_lt_result" && $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 yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; 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 no = "$lt_cv_ld_force_load"; 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 yes = "$lt_cv_ld_force_load"; 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 yes != "$lt_cv_apple_cc_single_mod"; 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 set = "${lt_cv_aix_libpath+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 that will find a shell with a builtin # printf (that 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], [AS_HELP_STRING([--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 yes = "$GCC"; 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 where 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 no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. 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 what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. 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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; 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" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; 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 yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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*|x86_64-*-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 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; 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 bitrig* | 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "[$]$2"; 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 yes = "[$]$2"; 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # 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" && \ test undefined != "$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 17 != "$i" # 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 yes = "$cross_compiling"; 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 -fvisibility=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 yes != "$enable_dlopen"; 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 ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) 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 no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && 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 yes = "$lt_cv_dlopen_self"; 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 no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; 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 no = "$hard_links"; 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 where 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 yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; 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 relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; 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_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _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 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; 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` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac 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" elif test -n "$lt_multi_os_dir"; then 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 AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) 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 ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 yes = "$lt_cv_prog_gnu_ld"; 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 yes = "$with_gnu_ld"; 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=sco 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 yes = "$with_gnu_ld"; 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _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], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that 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 that 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 no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [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 # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # 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* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 ;; os2*) 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 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) 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 no != "$lt_cv_path_NM"; 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 -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) 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 one 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 yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # 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 yes = "$GCC"; 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 ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # 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"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$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"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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, # D for any global variable and I for any imported 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};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,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 can'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* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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 yes = "$pipe_works"; 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_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _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_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _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 yes = "$GXX"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ia64 != "$host_cpu"; 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 yes = "$GCC"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ;; 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' case $cc_basename in 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' ;; esac ;; 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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' ;; tcc*) # Fabrice Bellard et al's Tiny 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)='-static' ;; 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 that 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) 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 yes = "$with_gnu_ld"; 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 yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/([^)]\+)\s\+//' 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 ia64 != "$host_cpu"; 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, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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 ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $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 linux-dietlibc = "$host_os"; 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 no = "$tmp_diet" 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' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-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 yes = "$supports_anon_versioning"; 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 tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; 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 yes = "$supports_anon_versioning"; 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 cannot *** 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 no = "$_LT_TAGVAR(ld_shlibs, $1)"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 yes = "$with_gnu_ld"; 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 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 yes = "$GCC"; 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 "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; 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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; 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 yes = "$GCC"; 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 yes = "$lt_cv_irix_exported_symbol"; 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 _LT_TAGVAR(link_all_deplibs, $1)=no 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 ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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* | bitrig*) 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__`"; 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 _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' 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 shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; 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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes,yes = "$GCC,$enable_shared"; 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 what 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); 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 yes != "$_lt_caught_CXX_error"; 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 yes = "$GXX"; 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 yes = "$GXX"; 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 yes = "$with_gnu_ld"; 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 ia64 = "$host_cpu"; 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive 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 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; 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 yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # 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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 yes = "$with_gnu_ld"; 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 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; 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 "x$output_objdir/$soname" = "x$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 yes = "$GXX"; 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 "x$output_objdir/$soname" = "x$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 no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$supports_anon_versioning"; 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 ;; openbsd* | bitrig*) 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__`"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 $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 $wl-h $wl$soname -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 $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 $wl-h $wl$soname -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 CANNOT 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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes != "$_lt_caught_CXX_error" 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 @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@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 x-L = "$p" || test x-R = "$p"; 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 no = "$pre_test_object_deps_done"; 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 no = "$pre_test_object_deps_done"; 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)= ;; 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 no = "$F77"; 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 yes != "$_lt_disable_F77"; 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 yes != "$_lt_disable_F77" 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 no = "$FC"; 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 yes != "$_lt_disable_FC"; 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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 yes != "$_lt_disable_FC" 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 set = "${GCJFLAGS+set}" || 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 10 -lt "$lt_ac_count" && 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], [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_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what 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 cvc4-1.5/proofs/lfsc_checker/config/ltmain.sh000066400000000000000000011714641313116454100212430ustar00rootroot00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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 this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-0.1" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! 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 ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_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 # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_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 '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. 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. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # 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" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_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 "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # 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. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # 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 "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_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 "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_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_append 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_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || 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_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd 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 -z "$func_relative_path_tlibdir"; 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 -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # 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 () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_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. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # 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). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet 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 () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" 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 () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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 . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # 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. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. 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) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "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 yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; 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 } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # 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 # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # 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 test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; 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." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # 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 | func_generated_by_libtool_p } # 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 yes = "$lalib_p" } # 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 () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # 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 () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs 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 () { $debug_cmd 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 () { $debug_cmd 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 yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; 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 "$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 () { $debug_cmd # 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 () { $debug_cmd 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 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd $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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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 () { $debug_cmd 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_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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 yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot 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 yes = "$build_old_libs"; 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 no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; 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 yes = "$need_locks"; 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 warn = "$need_locks"; 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 yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; 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 warn = "$need_locks" && 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 yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; 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 warn = "$need_locks" && 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 no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && 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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 () { $debug_cmd # 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 $opt_dry_run; then # 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 else 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 fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd 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_quiet && 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 finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # 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=false 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=: ;; -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-m = "X$prev" && 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=: if $isdir; 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 ;; os2*) 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 yes = "$build_old_libs"; 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=: 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'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; 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_quiet || { 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 install = "$opt_mode" && 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 () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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) $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 can'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 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; 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 func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' 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[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi 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" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; 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" "${nlist}I"' # 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_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 () { $debug_cmd 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 () { $debug_cmd 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_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 () { $debug_cmd 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 case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) 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 } }'` ;; esac 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 () { $debug_cmd 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 () { $debug_cmd 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 that possess that section. Heuristic: eliminate # all those that 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_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 () { $debug_cmd 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 () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; 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 yes = "$lock_old_archive_extraction"; 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 () { $debug_cmd 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` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result 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 "$sed_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 where 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) $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/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that 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) $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 yes = "$fast_install"; 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 yes = "$shlibpath_overrides_runpath" && 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 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* 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_platform || defined ... */ #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 #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 (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]; size_t 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 = (size_t) (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 (STREQ (str, pat)) *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 size_t 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) { size_t orig_value_len = strlen (orig_value); size_t 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 #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\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 () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd 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 # what 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 that 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= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false 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 yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && 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) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; 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 ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. 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 none = "$pic_object" && test none = "$non_pic_object"; 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 none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; 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 dlprefiles = "$prev"; 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 none != "$non_pic_object"; 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 none = "$pic_object"; 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 ;; os2dllname) os2dllname=$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 rpath = "$prev"; 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-export-symbols = "X$arg"; 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-lc = "X$arg" || test X-lm = "X$arg"; 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && 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-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm 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 ;; -os2dllname) prev=os2dllname 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 # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -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*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) 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 ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # 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 none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; 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 none = "$pic_object"; 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 dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; 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 yes = "$export_dynamic" && 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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" 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 lib = "$linkmode"; 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=false 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 lib,link = "$linkmode,$pass"; 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 lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; 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 lib,dlpreopen = "$linkmode,$pass"; 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 dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; 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 conv = "$pass" && 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 conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; 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 link = "$pass"; 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 conv = "$pass"; 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=false 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=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; 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=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # 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 lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; 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 prog != "$linkmode" && test lib != "$linkmode"; 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 yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; 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 dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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 yes = "$installed"; 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 yes = "$hardcode_automatic" && 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 dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; 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 lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: 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 $linkalldeplibs; 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 prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; 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 yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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* | *os2*) 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 cannot # 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 no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; 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 yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; 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 prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; 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 no = "$link_static" && 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 no != "$link_all_deplibs"; 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 link = "$pass"; then if test prog = "$linkmode"; 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 dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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 no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; 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 pass_all != "$deplibs_check_method"; 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 no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|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" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; 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 0 -ne "$loop"; 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 0 -ne "$loop"; 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 ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 -n "$precious_files_regex"; 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 yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; 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 yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 yes = "$build_libtool_libs"; 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 yes = "$build_libtool_need_lc"; 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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 yes = "$allow_libtool_libs_with_static_runtimes"; 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 none = "$deplibs_check_method"; 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 yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || 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 relink = "$opt_mode" || 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 func_dll_def_p "$export_symbols" || { # 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 ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || 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 yes = "$try_normal_branch" \ && { 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 : != "$skipped_export"; 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 : != "$skipped_export" && 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 yes = "$compiler_needs_object" && 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 yes = "$thread_safe" && 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 relink = "$opt_mode"; 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 yes = "$module" && 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 : != "$skipped_export" && 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 : != "$skipped_export" && test yes = "$with_gnu_ld"; 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 : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; 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 -z "$objlist" || 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 1 -eq "$k"; 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 ${skipped_export-false} && { 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 } 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_quiet || { 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 relink = "$opt_mode"; 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 ${skipped_export-false} && { 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 } 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 yes = "$module" && 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=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { 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 relink = "$opt_mode"; 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 relink = "$opt_mode"; 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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; 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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags 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 yes = "$build_libtool_libs" || 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 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 test yes = "$build_libtool_libs" || { 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 } if test -n "$pic_flag" || test default != "$pic_mode"; 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" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && 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 CXX = "$tagname"; 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 yes = "$build_old_libs"; 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@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # 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 } 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 yes = "$no_install"; 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 case $hardcode_action,$fast_install in relink,*) # 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" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # 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 case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac 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 yes = "$build_libtool_libs"; 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 -z "$oldobjs"; 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 yes = "$build_old_libs" && 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 yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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 -n "$bindir"; 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) $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 cannot 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 no,yes = "$installed,$need_relink"; 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 } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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=: ;; -*) 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 . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; 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 $rmforce; 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" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || 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 none != "$pic_object"; 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 none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; 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 yes = "$fast_install" && 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 } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi 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 # where 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: cvc4-1.5/proofs/lfsc_checker/config/ltoptions.m4000066400000000000000000000342621313116454100217110ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 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 8 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_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _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_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _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=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])]) cvc4-1.5/proofs/lfsc_checker/config/ltsugar.m4000066400000000000000000000104401313116454100213270ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 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 ]) cvc4-1.5/proofs/lfsc_checker/config/ltversion.m4000066400000000000000000000012731313116454100216770ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 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 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) cvc4-1.5/proofs/lfsc_checker/config/lt~obsolete.m4000066400000000000000000000137741313116454100222350ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 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])]) cvc4-1.5/proofs/lfsc_checker/config/missing000077500000000000000000000153301313116454100210060ustar00rootroot00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written 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 case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man 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 # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # 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: cvc4-1.5/proofs/lfsc_checker/configure000077500000000000000000022572641313116454100200710ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for lfsc-checker 1.0. # # 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: cvc-bugs@cs.nyu.edu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: 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='lfsc-checker' PACKAGE_TARNAME='lfsc-checker' PACKAGE_VERSION='1.0' PACKAGE_STRING='lfsc-checker 1.0' PACKAGE_BUGREPORT='cvc-bugs@cs.nyu.edu' PACKAGE_URL='' ac_unique_file="libwriter.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE target_os target_vendor target_cpu target CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM 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 runstatedir 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_silent_rules enable_shared enable_static with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_maintainer_mode ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS CCC CXXCPP' # 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' runstatedir='${localstatedir}/run' 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 ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -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 runstatedir 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 lfsc-checker 1.0 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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/lfsc-checker] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of lfsc-checker 1.0:";; 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-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --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] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --disable-maintainer-mode disable make rules and dependencies not useful (and sometimes confusing) to the casual installer Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --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). 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 LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { 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 lfsc-checker configure 1.0 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_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 cvc-bugs@cs.nyu.edu ## ## ---------------------------------- ##" ) | 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 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 lfsc-checker $as_me 1.0, 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 # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers config.h" am__api_version='1.15' # 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; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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 --is-lightweight"; then am_missing_run="$MISSING " 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+set}" != 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; } 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 { $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 # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' 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='lfsc-checker' VERSION='1.0' # 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"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). 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}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -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 pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -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_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' 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 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 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 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 whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_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. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != 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 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="$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 10 /bin/sh. echo '/* dummy */' > 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 { $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 no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) 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 no != "$lt_cv_path_NM"; 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 -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # 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" && \ test undefined != "$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 17 != "$i" # 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"} 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 yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; 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 # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # 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* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 ;; os2*) 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 one 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 0 -eq "$ac_status"; 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 0 -ne "$ac_status"; 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 no = "$lt_cv_ar_at_file"; 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 bitrig* | 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 # 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 ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # 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"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$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"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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, # D for any global variable and I for any imported 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};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,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 can'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* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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 yes = "$pipe_works"; 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 yes = "$GCC"; 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; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_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 dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode # options accordingly. 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 what ABI is being produced by ac_compile, and set linker # options accordingly. 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 yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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 emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. 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*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; 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" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; 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 yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. 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*|x86_64-*-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 yes != "$lt_cv_path_mainfest_tool"; 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 0 = "$_lt_result"; 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 0 = "$_lt_result" && $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 yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; 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 no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; 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 # 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 shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # 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 set != "${COLLECT_NAMES+set}"; 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 func_cc_basename $compiler cc_basename=$func_cc_basename_result # 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 yes = "$GCC"; 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "$lt_cv_prog_compiler_rtti_exceptions"; 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 yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; 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' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; 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' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; 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 that 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "$lt_cv_prog_compiler_pic_works"; 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 yes = "$lt_cv_prog_compiler_static_works"; 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 no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; 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 no = "$hard_links"; 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 yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) 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 yes = "$with_gnu_ld"; 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 yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/(^)\+)\s\+//' 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 ia64 != "$host_cpu"; 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, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=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 linux-dietlibc = "$host_os"; 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 no = "$tmp_diet" 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' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-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 yes = "$supports_anon_versioning"; 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 tcc*) export_dynamic_flag_spec='-rdynamic' ;; 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 yes = "$supports_anon_versioning"; 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 cannot *** 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 no = "$ld_shlibs"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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 set = "${lt_cv_aix_libpath+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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 set = "${lt_cv_aix_libpath+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 yes = "$with_gnu_ld"; 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 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 yes = "$lt_cv_ld_force_load"; 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 yes = "$GCC"; 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 "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; 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 no = "$with_gnu_ld"; 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 yes,no = "$GCC,$with_gnu_ld"; 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 yes = "$lt_cv_prog_compiler__b"; 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 no = "$with_gnu_ld"; 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 yes = "$GCC"; 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 yes = "$lt_cv_irix_exported_symbol"; 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 link_all_deplibs=no 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 ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; 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* | bitrig*) 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__`"; 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 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; 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 no = "$ld_shlibs" && 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 yes,yes = "$GCC,$enable_shared"; 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 yes = "$GCC"; 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` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac 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" elif test -n "$lt_multi_os_dir"; then 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 ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 yes = "$lt_cv_prog_gnu_ld"; 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 yes = "$with_gnu_ld"; 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=sco 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 yes = "$with_gnu_ld"; 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $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 yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; 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 relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; 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 ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) 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 no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && 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 yes = "$cross_compiling"; 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 -fvisibility=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 yes = "$lt_cv_dlopen_self"; 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 yes = "$cross_compiling"; 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 -fvisibility=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 what 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac 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 yes = "$enable_shared" || 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: { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # on by default { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # turn off static lib building by default # 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=no fi # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 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 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 10 /bin/sh. echo '/* dummy */' > 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 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 no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); 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 yes != "$_lt_caught_CXX_error"; 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 func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; 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 no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 yes = "$with_gnu_ld"; 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 ia64 = "$host_cpu"; 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive 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 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; 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 yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; 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 set = "${lt_cv_aix_libpath+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 yes = "$with_gnu_ld"; 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 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $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, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 yes = "$lt_cv_ld_force_load"; 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*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; 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 yes != "$lt_cv_apple_cc_single_mod"; 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 ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; 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 "x$output_objdir/$soname" = "x$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 yes = "$GXX"; 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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; 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 yes = "$supports_anon_versioning"; 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 ;; openbsd* | bitrig*) 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__`"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 yes,no = "$GXX,$with_gnu_ld"; 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 $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 $wl-h $wl$soname -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 $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 $wl-h $wl$soname -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 CANNOT 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 no = "$ld_shlibs_CXX" && 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 x-L = "$p" || test x-R = "$p"; 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 no = "$pre_test_object_deps_done"; 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 no = "$pre_test_object_deps_done"; 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= ;; 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 yes = "$GXX"; 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 ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; 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' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ia64 != "$host_cpu"; 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 that 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" ## exclude from sc_useless_quotes_in_assignment # 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 yes = "$lt_cv_prog_compiler_pic_works_CXX"; 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 yes = "$lt_cv_prog_compiler_static_works_CXX"; 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 no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; 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 no = "$hard_links"; 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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 no = "$ld_shlibs_CXX" && 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 yes,yes = "$GCC,$enable_shared"; 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 ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # 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' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # 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' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac 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%'\''`; $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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 yes = "$lt_cv_prog_gnu_ld"; 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # 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 dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # 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 # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) 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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi 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 shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 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' ;; 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 yes = "$with_gnu_ld"; 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=sco 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 yes = "$with_gnu_ld"; 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 no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $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 yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; 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 relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; 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 yes != "$_lt_caught_CXX_error" 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=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 whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_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. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != 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 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="$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 10 /bin/sh. echo '/* dummy */' > 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 # Checks for libraries. # FIXME: Replace `main' with a function in `-lgmp': { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_init in -lgmp" >&5 $as_echo_n "checking for __gmpz_init in -lgmp... " >&6; } if ${ac_cv_lib_gmp___gmpz_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgmp $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 __gmpz_init (); int main () { return __gmpz_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gmp___gmpz_init=yes else ac_cv_lib_gmp___gmpz_init=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_gmp___gmpz_init" >&5 $as_echo "$ac_cv_lib_gmp___gmpz_init" >&6; } if test "x$ac_cv_lib_gmp___gmpz_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGMP 1 _ACEOF LIBS="-lgmp $LIBS" fi # Checks for header files. for ac_header in stdlib.h string.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 # 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_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 # Checks for library functions. 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_func in strdup do : ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" if test "x$ac_cv_func_strdup" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRDUP 1 _ACEOF fi done 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi 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 -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 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 "${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 : "${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 lfsc-checker $as_me 1.0, 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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ lfsc-checker config.status 1.0 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 # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $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_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $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"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $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"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $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"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $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_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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 \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that 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' RM='$RM' ofile='$ofile' _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 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "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 "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf 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"` # 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'`; 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 } ;; "libtool":C) # See if we are running on zsh, and set the options that 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 # Generated automatically by $as_me ($PACKAGE) $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. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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 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 this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### 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 # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # 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 into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # 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 where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # 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 # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # 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 cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _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 set != "${COLLECT_NAMES+set}"; 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) 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 ;; 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 cvc4-1.5/proofs/lfsc_checker/configure.ac000066400000000000000000000020521313116454100204250ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.61]) AC_INIT([lfsc-checker], [1.0], [cvc-bugs@cs.nyu.edu]) AC_CONFIG_SRCDIR([libwriter.h]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.11 foreign no-define tar-pax]) LT_INIT AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # on by default AM_MAINTAINER_MODE([enable]) # turn off static lib building by default AC_ENABLE_SHARED AC_DISABLE_STATIC # Checks for programs. AC_PROG_CXX AC_PROG_CC # Checks for libraries. # FIXME: Replace `main' with a function in `-lgmp': AC_CHECK_LIB([gmp], [__gmpz_init]) # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_INLINE AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_MALLOC AC_CHECK_FUNCS([strdup]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT cvc4-1.5/proofs/lfsc_checker/expr.cpp000066400000000000000000000517621313116454100176350ustar00rootroot00000000000000#include "expr.h" #include #include #ifdef _MSC_VER #include #endif #include "check.h" using namespace std; int HoleExpr::next_id = 0; int Expr::markedCount = 0; C_MACROS__ADD_CHUNKING_MEMORY_MANAGEMENT_CC(CExpr,kids,32768); //C_MACROS__ADD_CHUNKING_MEMORY_MANAGEMENT_CC(IntCExpr,_n,32768); #define USE_HOLE_PATH_COMPRESSION void Expr::debug() { print(cout); /* cout << "\nAt " << this << "\n"; cout << "marked = " << getmark() << "\n"; */ cout << "\n"; cout.flush(); } bool destroy_progs = false; #define destroydec(rr) \ do { \ Expr *r = rr; \ int ref = r->data >> 9; \ ref = ref - 1; \ if (ref == 0) { \ _e = r; \ goto start_destroy; \ } \ else \ r->data = (ref << 9) | (r->data & 511); \ } while(0) //removed from below "ref = ref -1;": r->debugrefcnt(ref,DEC); void Expr::destroy(Expr *_e, bool dec_kids) { start_destroy: switch (_e->getclass()) { case INT_EXPR: delete (IntExpr *)_e; break; case SYMS_EXPR: { SymSExpr *e = (SymSExpr *)_e; if (e->val && e->val->getop() != PROG) { Expr *tmp = e->val; delete e; destroydec(tmp); } else delete e; break; } case SYM_EXPR: { SymExpr *e = (SymExpr *)_e; if (e->val && e->val->getop() != PROG) { Expr *tmp = e->val; delete e; destroydec(tmp); } else delete e; break; } case HOLE_EXPR: { HoleExpr *e = (HoleExpr *)_e; if (e->val) { Expr *tmp = e->val; delete e; destroydec(tmp); } else delete e; break; } case CEXPR: { CExpr *e = (CExpr *)_e; if (dec_kids) { Expr **cur = e->kids; Expr *tmp; while((tmp = *cur++)) { if (*cur) tmp->dec(); else { delete e; destroydec(tmp); break; } } } else delete e; break; } } } Expr *Expr::clone() { switch (getclass()) { case INT_EXPR: case RAT_EXPR: inc(); return this; case SYMS_EXPR: case SYM_EXPR: { SymExpr *e = (SymExpr *)this; if (e->val) if (e->val->getop() != PROG) return e->val->clone(); e->inc(); return e; } case HOLE_EXPR: { HoleExpr *e = (HoleExpr *)this; if (e->val) return e->val->clone(); e->inc(); return e; } case CEXPR: { CExpr *e = (CExpr *)this; int op = e->getop(); switch(op) { case LAM: { #ifdef DEBUG_SYM_NAMES SymSExpr *var = (SymSExpr *)e->kids[0]; SymSExpr *newvar = new SymSExpr(*var,SYMS_EXPR); #else SymExpr *var = (SymExpr *)e->kids[0]; SymExpr *newvar = new SymExpr(*var); #endif Expr *prev = var->val; var->val = newvar; Expr *bod = e->kids[1]->clone(); var->val = prev; return new CExpr(LAM,newvar,bod); } case PI: { #ifdef DEBUG_SYM_NAMES SymSExpr *var = (SymSExpr *)e->kids[0]; SymSExpr *newvar = new SymSExpr(*var,SYMS_EXPR); #else SymExpr *var = (SymExpr *)e->kids[0]; SymExpr *newvar = new SymExpr(*var); #endif Expr *tp = e->kids[1]->clone(); Expr *prev = var->val; var->val = newvar; Expr *bod = e->kids[2]->clone(); var->val = prev; Expr* ret = new CExpr(PI,newvar,tp,bod); if( data&256 ) ret->data |=256; return ret; } default: { Expr **cur = e->kids; Expr *tmp; int size = 0; while((*cur++)) size++; Expr **kids = new Expr*[size+1]; kids[size]=0; cur = e->kids; bool diff_kid = false; int i = 0; while((tmp = *cur++)) { Expr *c = tmp->clone(); diff_kid |= (c != tmp); kids[i++] = c; } if (diff_kid) return new CExpr(op, true /* dummy */, kids); for (int i = 0, iend = size; i != iend; i++) kids[i]->dec(); delete[] kids; e->inc(); return e; } } } } std::abort(); // should never be reached } Expr* Expr::build_app(Expr *hd, const std::vector &args, int start) { #ifndef USE_FLAT_APP Expr *ret = hd; for (int i = start, iend = args.size(); i < iend; i++) ret = new CExpr(APP,ret,args[i]); return ret; #else if( start>=(int)args.size() ) return hd; else { Expr **kids = new Expr *[args.size() - start + 2]; kids[0] = hd; for (int i = start, iend = args.size(); i < iend; i++) kids[i - start + 1] = args[i]; kids[args.size() - start + 1] = NULL; return new CExpr(APP, true /* dummy */, kids); } #endif } Expr* Expr::make_app(Expr* e1, Expr* e2 ) { //std::cout << "make app from "; //e1->print( std::cout ); //std::cout << " "; //e2->print( std::cout ); //std::cout << std::endl; CExpr *ret; if( e1->getclass()==CEXPR ){ int counter = 0; while( ((CExpr*)e1)->kids[counter] ){ counter++; } Expr **kids = new Expr *[counter + 2]; counter = 0; while( ((CExpr*)e1)->kids[counter] ){ kids[counter] = ((CExpr *)e1)->kids[counter]; kids[counter]->inc(); counter++; } kids[counter] = e2; kids[counter + 1] = NULL; ret = new CExpr(APP, true /* dummy */, kids); }else{ ret = new CExpr( APP, e1, e2 ); } //ret->print( std::cout ); //std::cout << std::endl; return ret; } int Expr::cargCount = 0; Expr *Expr::collect_args(std::vector &args, bool follow_defs) { //cargCount++; //if( cargCount%1000==0) //std::cout << cargCount << std::endl; #ifndef USE_FLAT_APP CExpr *e = (CExpr *)this; args.reserve(16); while( e->getop() == APP ) { args.push_back(e->kids[1]); e = (CExpr *)e->kids[0]; if (follow_defs) e = (CExpr *)e->followDefs(); } std::reverse(args.begin(),args.end()); return e; #else CExpr *e = (CExpr *)this; args.reserve(16); if( e->getop()==APP ){ int counter = 1; while( e->kids[counter] ) { args.push_back(e->kids[counter]); counter++; } e = (CExpr*)e->kids[0]; } if (follow_defs) return e->followDefs(); else return e; #endif } Expr *Expr::get_head(bool follow_defs) const { CExpr *e = (CExpr *)this; while( e->getop() == APP ) { e = (CExpr *)e->kids[0]; if (follow_defs) e = (CExpr *)e->followDefs(); } return e; } Expr *Expr::get_body(int op, bool follow_defs) const { CExpr *e = (CExpr *)this; while( e->getop() == op ) { e = (CExpr *)e->kids[2]; if (follow_defs) e = (CExpr *)e->followDefs(); } return e; } // if the return value is different from this, then it is a new reference Expr *CExpr::whr() { vector args; if (get_head()->getop() == LAM) { CExpr *head = (CExpr *)collect_args(args, true); Expr *cloned_head; if (head->cloned()) { // we must clone head = (CExpr *)head->clone(); cloned_head = head; } else { head->setcloned(); cloned_head = 0; } int i = 0; int iend = args.size(); /* we will end up incrementing the ref count for all the args, since each is either pointed to by a var (following a beta-reduction), or else just an argument in the new application we build below. */ do { Expr *tmp = args[i++]->followDefs(); ((SymExpr *)head->kids[0])->val = tmp; tmp->inc(); head = (CExpr *)head->kids[1]; } while(head->getop() == LAM && i < iend); for (; i < iend; i++) args[i]->inc(); head->inc(); if (cloned_head) cloned_head->dec(); return build_app(head,args,i); } else return this; } Expr* CExpr::convert_to_tree_app( Expr* e ) { if( e->getop()==APP ) { std::vector< Expr* > kds; int counter = 1; while( ((CExpr*)e)->kids[counter] ) { kds.push_back( convert_to_tree_app( ((CExpr*)e)->kids[counter] ) ); counter++; } Expr* app = Expr::build_app( e->get_head(), kds ); //app->inc(); return app; } else { return e; } } Expr* CExpr::convert_to_flat_app( Expr* e ) { if( e->getop()==APP ) { std::vector< Expr* > args; Expr* hd = ((CExpr*)e)->collect_args( args ); Expr **kids = new Expr *[args.size() + 2]; kids[0] = hd; for (size_t a = 0; a < args.size(); a++) { kids[a + 1] = convert_to_flat_app(args[a]); } kids[args.size() + 1] = 0; CExpr *nce = new CExpr(APP, true /* dummy */, kids); nce->inc(); return nce; } else { return e; } } bool Expr::defeq(Expr *e) { /* we handle a few special cases up front, where this Expr might equal e, even though they have different opclass (i.e., different structure). */ if (this == e) return true; int op1 = getop(); int op2 = e->getop(); switch (op1) { case ASCRIBE: return ((CExpr *)this)->kids[0]->defeq(e); case APP: { Expr *tmp = ((CExpr *)this)->whr(); if (tmp != this) { bool b = tmp->defeq(e); tmp->dec(); return b; } if (get_head()->getclass() == HOLE_EXPR) { vector args; Expr *head = collect_args(args, true); Expr *t = e; t->inc(); for (int i = 0, iend = args.size(); i < iend; i++) { // don't worry about SYMS_EXPR's, since we should not be in code here. if (args[i]->getclass() != SYM_EXPR || args[i]->getexmark()) /* we cannot fill the hole in this case. Either this is not a variable or we are using a variable again. */ return false; SymExpr *v = (SymExpr *)args[i]; // we may have been mapping from expected var v to a computed var Expr *tmp = (v->val ? v->val : v); tmp->inc(); t = new CExpr(LAM, tmp, t); args[i]->setexmark(); } for (int i = 0, iend = args.size(); i < iend; i++) args[i]->clearexmark(); #ifdef DEBUG_HOLES cout << "Filling hole "; head->debug(); cout << "with "; t->debug(); #endif ((HoleExpr *)head)->val = t; return true; } break; } case NOT_CEXPR: switch (getclass()) { case HOLE_EXPR: { HoleExpr *h = (HoleExpr *)this; if (h->val) return h->val->defeq(e); #ifdef DEBUG_HOLES cout << "Filling hole "; h->debug(); cout << "with "; e->debug(); #endif #ifdef USE_HOLE_PATH_COMPRESSION Expr *tmp = e->followDefs(); #else Expr *tmp = e; #endif h->val = tmp; tmp->inc(); return true; } case SYMS_EXPR: case SYM_EXPR: { SymExpr *s = (SymExpr *)this; if (s->val) return s->val->defeq(e); break; } } break; } switch (op2) { case ASCRIBE: return defeq(((CExpr *)e)->kids[0]); case APP: { Expr *tmp = ((CExpr *)e)->whr(); if (tmp != e) { bool b = defeq(tmp); tmp->dec(); return b; } break; } case NOT_CEXPR: switch (e->getclass()) { case HOLE_EXPR: { HoleExpr *h = (HoleExpr *)e; if (h->val) return defeq(h->val); #ifdef DEBUG_HOLES cout << "Filling hole "; h->debug(); cout << "with "; debug(); #endif #ifdef USE_HOLE_PATH_COMPRESSION Expr *tmp = followDefs(); #else Expr *tmp = this; #endif h->val = tmp; tmp->inc(); return true; } case SYMS_EXPR: case SYM_EXPR: { SymExpr *s = (SymExpr *)e; if (s->val) return defeq(s->val); break; } } break; } /* at this point, e1 and e2 must have the same opclass if they are to be equal. */ if (op1 != op2) return false; if (op1 == NOT_CEXPR) { switch(getclass()) { case INT_EXPR: { IntExpr *i1 = (IntExpr *)this; IntExpr *i2 = (IntExpr *)e; return (mpz_cmp(i1->n,i2->n) == 0); } case RAT_EXPR: { RatExpr *r1 = (RatExpr *)this; RatExpr *r2 = (RatExpr *)e; return (mpq_cmp(r1->n,r2->n) == 0); } case SYMS_EXPR: case SYM_EXPR: return (this == e); } } /* Now op1 and op2 must both be CExprs, and must have the same op to be equal. */ CExpr *e1 = (CExpr *)this; CExpr *e2 = (CExpr *)e; int last = 1; switch (op1) { case PI: if (!e1->kids[1]->defeq(e2->kids[1])) return false; last++; // fall through to LAM case case LAM: { /* It is critical that we point e1's var. (v1) back to e2's (call it v2). The reason this is critical is that we assume any holes are in e1. So we could end up with (_ v1) = t. We wish to fill _ in this case with (\ v2 t). If v2 pointed to v1, we could not return (\ v1 t), because the fact that v2 points to v1 would then be lost. */ SymExpr *v1 = (SymExpr *)e1->kids[0]; Expr *prev_v1_val = v1->val; v1->val = e2->kids[0]->followDefs(); bool bodies_equal = e1->kids[last]->defeq(e2->kids[last]); v1->val = prev_v1_val; return bodies_equal; } case APP: #ifndef USE_FLAT_APP return (e1->kids[0]->defeq(e2->kids[0]) && e1->kids[1]->defeq(e2->kids[1])); #else { int counter = 0; while( e1->kids[counter] ){ if( e1->kids[counter]!=e2->kids[counter] ){ if( !e2->kids[counter] || !e1->kids[counter]->defeq( e2->kids[counter] ) ) return false; //--- optimization : replace child with equivalent pointer if was defeq // Heuristic: prefer symbolic kids because they may be cheaper to // deal with (e.g. in free_in()). if (e2->kids[counter]->isSymbolic() || (!e1->kids[counter]->isSymbolic() && e1->kids[counter]->getrefcnt() < e2->kids[counter]->getrefcnt())) { e1->kids[counter]->dec(); e2->kids[counter]->inc(); e1->kids[counter] = e2->kids[counter]; }else{ e2->kids[counter]->dec(); e1->kids[counter]->inc(); e2->kids[counter] = e1->kids[counter]; } } //--- counter++; } return e2->kids[counter]==NULL; } #endif case TYPE: case KIND: case MPZ: // already checked that both exprs have the same opclass. return true; } // switch(op1) std::abort(); // never reached. } int Expr::fiCounter = 0; bool Expr::_free_in(Expr *x, expr_ptr_set_t *visited) { // fiCounter++; // if( fiCounter%1==0 ) // std::cout << fiCounter << std::endl; if (visited->find(this) != visited->end()) { return false; } switch (getop()) { case NOT_CEXPR: switch (getclass()) { case HOLE_EXPR: { HoleExpr *h = (HoleExpr *)this; if (h->val) return h->val->_free_in(x, visited); return (h == x); } case SYMS_EXPR: case SYM_EXPR: { SymExpr *s = (SymExpr *)this; if (s->val && s->val->getclass() == HOLE_EXPR) /* we do not need to follow the "val" pointer except in this one case, when x is a hole (which we do not bother to check here) */ return s->val->_free_in(x, visited); return (s == x); } case INT_EXPR: return false; } break; case LAM: case PI: if (x == ((CExpr *)this)->kids[0]) return false; // fall through default: { // must be a CExpr assert(this->getclass() == CEXPR); CExpr *e = (CExpr *)this; Expr *tmp; Expr **cur = e->kids; visited->insert(this); while ((tmp = *cur++)) if (tmp->_free_in(x, visited)) return true; return false; } } std::abort(); // should not be reached } void Expr::calc_free_in(){ data &= ~256; data |= 256*((CExpr *)this)->kids[2]->free_in( ((CExpr *)this)->kids[0] ); } string Expr::toString() { ostringstream oss; print(oss); return oss.str(); } static void print_kids(ostream &os, Expr **kids) { Expr *tmp; while ((tmp = *kids++)) { os << " "; tmp->print(os); } } static void print_vector(ostream &os, const vector &v) { for(int i = 0, iend = v.size(); i < iend; i++) { os << " "; v[i]->print(os); } } void Expr::print(ostream &os) { CExpr *e = (CExpr *)this; // for CEXPR cases //std::cout << e->getop() << " "; /* #ifdef DEBUG_REFCNT os << "<"; char tmp[10]; sprintf(tmp,"%d",getrefcnt()); os << tmp << "> "; #endif */ switch(getop()) { case NOT_CEXPR: { switch(getclass()) { case INT_EXPR: { IntExpr *e = (IntExpr *)this; if (mpz_sgn(e->n) < 0) { os << "(~ "; mpz_t tmp; mpz_init(tmp); mpz_neg(tmp,e->n); char *s = mpz_get_str(0,10,tmp); os << s; free(s); mpz_clear(tmp); os << ")"; //os << "mpz"; } else { char *s = mpz_get_str(0,10,e->n); os << s; free(s); //os << "mpz"; } break; } case RAT_EXPR: { RatExpr *e = (RatExpr *)this; char *s = mpq_get_str(0,10,e->n); os << s; if (mpq_sgn(e->n) < 0) { os << "(~ "; mpq_t tmp; mpq_init(tmp); mpq_neg(tmp,e->n); char *s = mpq_get_str(0,10,tmp); os << s; free(s); mpq_clear(tmp); os << ")"; } else { char *s = mpq_get_str(0,10,e->n); os << s; free(s); } break; } #ifndef DEBUG_SYM_NAMES case SYM_EXPR: { SymExpr *e = (SymExpr *)this; if (e->val) { if (e->val->getop() == PROG) { os << e; #ifdef DEBUG_SYMS os << "[PROG]"; #endif }else{ #ifdef DEBUG_SYMS os << e; os << "[SYM "; #endif e->val->print(os); #ifdef DEBUG_SYMS os << "]"; #endif } } else os << e; break; } #else case SYM_EXPR: /* if we are debugging sym names, then SYM_EXPRs are really SymSExprs. */ #endif case SYMS_EXPR: { SymSExpr *e = (SymSExpr *)this; if (e->val) { if (e->val->getop() == PROG) { os << e->s; #ifdef DEBUG_SYMS os << "[PROG]"; #endif }else{ #ifdef DEBUG_SYMS os << e->s; os << "[SYM "; #endif e->val->print(os); #ifdef DEBUG_SYMS os << "]"; #endif } } else os << e->s; break; } case HOLE_EXPR: { HoleExpr *e = (HoleExpr *)this; if (e->val) { #ifdef DEBUG_SYMS os << "_" << "[HOLE "; #endif e->val->print(os); #ifdef DEBUG_SYMS os << "]"; #endif }else { os << "_"; #ifdef DEBUG_HOLE_NAMES char tmp[100]; sprintf(tmp,"%d",e->id); os << "[ " << tmp << "]"; #else os << "[ " << e << "]"; #endif } break; } default: os << "; unrecognized form of expr"; break; } break; } // case NOT_CEXPR case APP: { os << "("; vector args; Expr *head = collect_args(args, false /* follow_defs */); head->print(os); print_vector(os, args); os << ")"; break; } case LAM: os << "(\\"; print_kids(os, e->kids); os << ")"; break; case PI: os << "(!"; print_kids(os, e->kids); os << ")"; break; case TYPE: os << "type"; break; case KIND: os << "kind"; break; case MPZ: os << "mpz"; break; case MPQ: os << "mpq"; break; case ADD: os << "(mp_add"; print_kids(os,e->kids); os << ")"; break; case MUL: os << "(mp_mul"; print_kids(os,e->kids); os << ")"; break; case DIV: os << "(mp_div"; print_kids(os,e->kids); os << ")"; break; case NEG: os << "(mp_neg"; print_kids(os,e->kids); os << ")"; break; case IFNEG: os << "(ifneg"; print_kids(os,e->kids); os << ")"; break; case IFZERO: os << "(ifzero"; print_kids(os,e->kids); os << ")"; break; case RUN: os << "(run"; print_kids(os,e->kids); os << ")"; break; case PROG: os << "(prog"; print_kids(os,e->kids); os << ")"; break; case PROGVARS: os << "("; print_kids(os,e->kids); os << ")"; break; case MATCH: os << "(match"; print_kids(os,e->kids); os << ")"; break; case CASE: os << "("; print_kids(os,e->kids); os << ")"; break; case LET: os << "(let"; print_kids(os,e->kids); os << ")"; break; case DO: os << "(do"; print_kids(os,e->kids); os << ")"; break; case IFMARKED: os << "(ifmarked"; print_kids(os,e->kids); os << ")"; break; case COMPARE: os << "(compare"; print_kids(os,e->kids); os << ")"; break; case MARKVAR: os << "(markvar"; print_kids(os,e->kids); os << ")"; break; case FAIL: os << "(fail "; print_kids(os, e->kids); os << ")"; break; case ASCRIBE: os << "(:"; print_kids(os, e->kids); os << ")"; break; default: os << "; unrecognized form of expr(2) " << getop() << " " << getclass(); } // switch(getop()) } bool Expr::isType( Expr* statType ){ Expr* typ = this; while( typ!=statType ){ if( typ->getop()==PI ){ typ = ((CExpr*)typ)->kids[2]; }else{ return false; } } return true; } int SymExpr::symmCount = 0; #ifdef MARKVAR_32 int SymExpr::mark() { if( mark_map.find( this )== mark_map.end() ) { symmCount++; mark_map[this] = 0; } return mark_map[this]; } void SymExpr::smark( int m ) { mark_map[this] = m; } #endif cvc4-1.5/proofs/lfsc_checker/expr.h000066400000000000000000000220701313116454100172700ustar00rootroot00000000000000#ifndef sc2__expr_h #define sc2__expr_h #include #include #include #include #include #include #include "chunking_memory_management.h" #include "gmp.h" #define USE_FLAT_APP //AJR: off deprecated #define MARKVAR_32 //#define DEBUG_SYM_NAMES //#define DEBUG_SYMS // Expr class enum { CEXPR = 0, INT_EXPR, RAT_EXPR, HOLE_EXPR, SYM_EXPR, SYMS_EXPR }; // operators for CExprs enum { NOT_CEXPR = 0, // for INT_EXPR, HOLE_EXPR, SYM_EXPR, SYMS_EXPR APP, PI, LAM, TYPE, KIND, ASCRIBE, MPZ, MPQ, PROG, PROGVARS, MATCH, CASE, PAT, DO, ADD, MUL, DIV, NEG, IFNEG, IFZERO, LET, RUN, FAIL, MARKVAR, IFMARKED, COMPARE }; class Expr; class SymExpr; namespace __gnu_cxx { template <> struct hash { size_t operator()(const Expr *x) const { return reinterpret_cast(x); } }; } struct eqExprPtr { bool operator()(const Expr *e1, const Expr *e2) const { return e1 == e2; } }; typedef __gnu_cxx::hash_set, eqExprPtr> expr_ptr_set_t; class Expr { protected: /* bits 0-2: Expr class bits 3-7: operator bit 8: a flag for already cloned, free_in calculation bits 9-31: ref count*/ int data; enum { INC, DEC, CREATE }; void debugrefcnt(int ref, int what) { std::cout << "["; debug(); switch(what) { case INC: std::cout << " inc to "; break; case DEC: std::cout << " dec to "; break; case CREATE: std::cout << " creating]\n"; return; } char tmp[10]; sprintf(tmp,"%d",ref); std::cout << tmp << "]\n"; } Expr(int _class, int _op) : data(1 << 9 /* refcount 1, not cloned */| (_op << 3) | _class) { } bool _free_in(Expr *x, expr_ptr_set_t *visited); public: virtual ~Expr() {} static int markedCount; inline Expr* followDefs(); inline int getclass() const { return data & 7; } int getexmark() const { return data & 256; } void setexmark() { data |= 256; } void clearexmark() { data &= ~256; } inline int getop() const { return (data >> 3) & 31; } int cloned() const { return data & 256; } void setcloned() { data |= 256; } inline int getrefcnt() { return data >> 9; } inline void inc() { int ref = getrefcnt(); //static int iCounter = 0; //iCounter++; //if( iCounter%10000==0 ){ // //print( std::cout ); // std::cout << " " << ref << std::endl; //} ref = ref<4194303 ? ref + 1 : ref; #ifdef DEBUG_REFCNT debugrefcnt(ref,INC); #endif data = (ref << 9) | (data & 511); } static void destroy(Expr *, bool); inline void dec(bool dec_kids = true) { int ref = getrefcnt(); ref = ref - 1; #ifdef DEBUG_REFCNT debugrefcnt(ref,DEC); #endif if (ref == 0) destroy(this,dec_kids); else data = (ref << 9) | (data & 511); } //must pass statType (the expr representing "type") to this function bool isType( Expr* statType ); inline bool isDatatype() const { return getclass() == SYMS_EXPR || getop() == MPZ || getop() == MPQ; } inline bool isArithTerm() const { return getop() == ADD || getop() == NEG; } inline bool isSymbolic() const { return getclass() == SYM_EXPR || getclass() == SYMS_EXPR; } static Expr *build_app(Expr *hd, const std::vector &args, int start = 0); static Expr *make_app(Expr* e1, Expr* e2 ); /* if this is an APP, return the head, and store the args in args. If follow_defs is true, we proceed through defined heads; otherwise not. */ Expr *collect_args(std::vector &args, bool follow_defs = true); Expr *get_head(bool follow_defs = true) const; Expr *get_body(int op = PI, bool follow_defs = true) const; std::string toString(); void print(std::ostream &); void debug(); /* check whether or not this expr is alpha equivalent to e. If this expr contains unfilled holes, fill them as we go. We do not fill holes in e. We do not take responsibility for the reference to this nor the reference to e. */ bool defeq(Expr *e); /* return a clone of this expr. All abstractions are really duplicated in memory. Other expressions may not actually be duplicated in memory, but their refcounts will be incremented. */ Expr *clone(); // x can be a SymExpr or a HoleExpr. bool free_in(Expr *x) { expr_ptr_set_t visited; return _free_in(x, &visited); } bool get_free_in() const { return data & 256; } void calc_free_in(); static int cargCount; static int fiCounter; }; class CExpr : public Expr { public: C_MACROS__ADD_CHUNKING_MEMORY_MANAGEMENT_H(CExpr,kids); Expr **kids; virtual ~CExpr() { delete[] kids; } CExpr(int _op) : Expr(CEXPR, _op), kids() { kids = new Expr *[1]; kids[0] = 0; #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } CExpr(int _op, Expr *e1) : Expr(CEXPR, _op), kids() { kids = new Expr *[2]; kids[0] = e1; kids[1] = 0; #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } CExpr(int _op, Expr *e1, Expr *e2) : Expr(CEXPR, _op), kids() { kids = new Expr *[3]; kids[0] = e1; kids[1] = e2; kids[2] = 0; #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } CExpr(int _op, Expr *e1, Expr *e2, Expr *e3) : Expr(CEXPR, _op), kids() { kids = new Expr *[4]; kids[0] = e1; kids[1] = e2; kids[2] = e3; kids[3] = 0; #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } CExpr(int _op, Expr *e1, Expr *e2, Expr *e3, Expr *e4) : Expr(CEXPR, _op), kids() { kids = new Expr *[5]; kids[0] = e1; kids[1] = e2; kids[2] = e3; kids[3] = e4; kids[4] = 0; #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } CExpr(int _op, const std::vector &_kids) : Expr(CEXPR, _op), kids() { int i, iend = _kids.size(); kids = new Expr *[iend + 1]; for (i = 0; i < iend; i++) kids[i] = _kids[i]; kids[i] = 0; #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } // _kids must be null-terminated. CExpr(int _op, bool dummy, Expr **_kids) : Expr(CEXPR, _op), kids(_kids) { (void)dummy; #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } Expr *whr(); static Expr* convert_to_tree_app( Expr* ce ); static Expr* convert_to_flat_app( Expr* ce ); }; class IntExpr : public Expr { public: mpz_t n; virtual ~IntExpr() { mpz_clear(n); } IntExpr(mpz_t _n) : Expr(INT_EXPR, 0), n() { mpz_init_set(n,_n); #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } IntExpr(signed long int _n ) : Expr(INT_EXPR, 0), n() { mpz_init_set_si( n, _n ); } unsigned long int get_num() { return mpz_get_ui( n ); } }; class RatExpr : public Expr { public: mpq_t n; virtual ~RatExpr() { mpq_clear(n); } RatExpr(mpq_t _n) : Expr(RAT_EXPR, 0), n() { mpq_init( n ); mpq_set(n,_n); #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif mpq_canonicalize( n ); } RatExpr(signed long int _n1, unsigned long int _n2 ) : Expr(RAT_EXPR, 0), n() { mpq_init( n ); mpq_set_si( n, _n1, _n2 ); mpq_canonicalize( n ); } }; class SymExpr : public Expr { public: Expr *val; // may be set by beta-reduction and clone(). static int symmCount; SymExpr(std::string _s, int theclass = SYM_EXPR) : Expr(theclass, 0), val(0) { (void)_s; #ifdef DEBUG_REFCNT if (theclass == SYM_EXPR) debugrefcnt(1,CREATE); #endif } SymExpr(const SymExpr &e, int theclass = SYM_EXPR) : Expr(theclass, 0), val(0) { (void)e; #ifdef DEBUG_REFCNT if (theclass == SYM_EXPR) debugrefcnt(1,CREATE); #endif } virtual ~SymExpr() {} #ifdef MARKVAR_32 private: int mark(); void smark( int m ); public: int getmark( int i = 0 ) { return (mark() >> i)&1; } void setmark( int i = 0 ) { smark( mark() | (1 << i) ); } void clearmark( int i = 0 ) { smark( mark() & ~(1 << i) ); } #endif }; class SymSExpr : public SymExpr { public: std::string s; SymSExpr(std::string _s, int theclass = SYMS_EXPR) : SymExpr(_s, theclass), s(_s) { #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } SymSExpr(const SymSExpr &e, int theclass = SYMS_EXPR) : SymExpr(e, theclass), s(e.s) { #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } virtual ~SymSExpr() {} }; class HoleExpr : public Expr { static int next_id; public: #ifdef DEBUG_HOLE_NAMES int id; #endif HoleExpr() : Expr(HOLE_EXPR, 0), val(0) { #ifdef DEBUG_HOLE_NAMES id = next_id++; #endif #ifdef DEBUG_REFCNT debugrefcnt(1,CREATE); #endif } Expr *val; // may be set during subst(), defeq(), and clone(). }; inline Expr * Expr::followDefs() { switch(getclass()) { case HOLE_EXPR: { HoleExpr *h = (HoleExpr *)this; if (h->val) return h->val->followDefs(); break; } case SYMS_EXPR: case SYM_EXPR: { SymExpr *h = (SymExpr *)this; if (h->val) return h->val->followDefs(); break; } } return this; } #endif cvc4-1.5/proofs/lfsc_checker/libwriter.cpp000066400000000000000000000223601313116454100206520ustar00rootroot00000000000000#include "libwriter.h" #include #include #include void libwriter::get_var_name( const std::string& n, std::string& nn ) { nn = std::string( n.c_str() ); for( int i = 0; i <(int)n.length(); i++ ){ char c = n[i]; if (c <= 47) c += 65; else if (c >= 58 && c <= 64) c += 97-58; if ((c >= 91 && c <= 94) || c == 96) c += 104-91; else if (c >= 123) c -= 4; nn[i] = c; } } void libwriter::write_file() { //std::cout << "write lib" << std::endl; std::ostringstream os_enum; std::ostringstream os_print; std::ostringstream os_constructor_h; std::ostringstream os_constructor_c; for ( int a=0; a<(int)syms.size(); a++ ) { //std::cout << "sym #" << (a+1) << ": "; //std::cout << ((SymSExpr*)syms[a])->s.c_str() << std::endl; //defs[a]->print( std::cout ); //std::cout << std::endl; if( defs[a]->getclass()==CEXPR ){ //calculate which arguments are required for input std::vector< Expr* > args; std::vector< bool > argsNeed; std::vector< Expr* > argTypes; CExpr* c = ((CExpr*)defs[a]); while( c->getop()==PI ){ //std::cout << c->kids[0] << std::endl; if( ((CExpr*)c->kids[1])->getop()!=RUN ){ args.push_back( c->kids[0] ); argsNeed.push_back( true ); argTypes.push_back( c->kids[1] ); } for( int b=0; b<(int)args.size(); b++ ){ if( argsNeed[b] ){ if( ((CExpr*)c->kids[1])->getop()==RUN ){ if( ((CExpr*)c->kids[1])->kids[1]->free_in( args[b] ) ){ argsNeed[b] = false; } }else{ if( c->kids[1]->free_in( args[b] ) ){ argsNeed[b] = false; } } } } c = (CExpr*)(c->kids[2]); } //record if this declares a judgement if( ((CExpr*)defs[a])->getop()==PI && c->getop()==TYPE ){ //std::cout << "This is a judgement" << std::endl; judgements.push_back( syms[a] ); //record if this declares a proof rule }else if( c->getclass()==CEXPR && std::find( judgements.begin(), judgements.end(), c->kids[0] )!=judgements.end() ){ std::cout << "Handle rule: " << ((SymSExpr*)syms[a])->s.c_str() << std::endl; //std::cout << "These are required to input:" << std::endl; //for( int b=0; b<(int)args.size(); b++ ){ // if( argsNeed[b] ){ // std::cout << ((SymSExpr*)args[b])->s.c_str() << std::endl; // } //} os_enum << " rule_" << ((SymSExpr*)syms[a])->s.c_str() << "," << std::endl; os_print << " case rule_" << ((SymSExpr*)syms[a])->s.c_str() << ": os << \""; os_print << ((SymSExpr*)syms[a])->s.c_str() << "\";break;" << std::endl; std::ostringstream os_args; os_args << "("; bool firstTime = true; for( int b=0; b<(int)args.size(); b++ ){ if( argsNeed[b] ){ if( !firstTime ) os_args << ","; std::string str; get_var_name( ((SymSExpr*)args[b])->s, str ); os_args << " LFSCProof* " << str.c_str(); firstTime = false; } } if( !firstTime ){ os_args << " "; } os_args << ")"; os_constructor_h << " static LFSCProof* make_" << ((SymSExpr*)syms[a])->s.c_str(); os_constructor_h << os_args.str().c_str() << ";" << std::endl; os_constructor_c << "LFSCProof* LFSCProof::make_" << ((SymSExpr*)syms[a])->s.c_str(); os_constructor_c << os_args.str().c_str() << "{" << std::endl; os_constructor_c << " LFSCProof **kids = new LFSCProof *[" << (int)args.size()+1 << "];" << std::endl; for( int b=0; b<(int)args.size(); b++ ){ os_constructor_c << " kids[" << b << "] = "; if( argsNeed[b] ){ std::string str; get_var_name( ((SymSExpr*)args[b])->s, str ); os_constructor_c << str.c_str(); }else{ os_constructor_c << "hole"; } os_constructor_c << ";" << std::endl; } os_constructor_c << " kids[" << (int)args.size() << "] = 0;" << std::endl; os_constructor_c << " return new LFSCProofC( rule_" << ((SymSExpr*)syms[a])->s.c_str() << ", kids );" << std::endl; os_constructor_c << "}" << std::endl << std::endl; } } //write the header static std::string filename( "lfsc_proof" ); std::fstream fsh; std::string fnameh( filename ); fnameh.append(".h"); fsh.open( fnameh.c_str(), std::ios::out ); fsh << "#ifndef LFSC_PROOF_LIB_H" << std::endl; fsh << "#define LFSC_PROOF_LIB_H" << std::endl; fsh << std::endl; fsh << "#include " << std::endl; fsh << std::endl; fsh << "class LFSCProof{" << std::endl; fsh << "protected:" << std::endl; fsh << " enum{" << std::endl; fsh << os_enum.str().c_str(); fsh << " };" << std::endl; fsh << " static LFSCProof* hole;" << std::endl; fsh << " LFSCProof(){}" << std::endl; fsh << "public:" << std::endl; fsh << " virtual ~LFSCProof(){}" << std::endl; fsh << " static void init();" << std::endl; fsh << std::endl; fsh << " //functions to build LFSC proofs" << std::endl; fsh << os_constructor_h.str().c_str(); fsh << std::endl; fsh << " virtual void set_child( int i, LFSCProof* e ) {}" << std::endl; fsh << " virtual void print( std::ostream& os ){}" << std::endl; fsh << "};" << std::endl; fsh << std::endl; fsh << "class LFSCProofC : public LFSCProof{" << std::endl; fsh << " short id;" << std::endl; fsh << " LFSCProof **kids;" << std::endl; fsh << "public:" << std::endl; fsh << " LFSCProofC( short d_id, LFSCProof **d_kids ) : id( d_id ), kids( d_kids ){}" << std::endl; fsh << " void set_child( int i, LFSCProof* e ) { kids[i] = e; }" << std::endl; fsh << " void print( std::ostream& os );" << std::endl; fsh << "};" << std::endl; fsh << std::endl; fsh << "class LFSCProofSym : public LFSCProof{" << std::endl; fsh << "private:" << std::endl; fsh << " std::string s;" << std::endl; fsh << " LFSCProofSym( std::string ss ) : s( ss ){}" << std::endl; fsh << "public:" << std::endl; fsh << " static LFSCProofSym* make( std::string ss ) { return new LFSCProofSym( ss ); }" << std::endl; fsh << " static LFSCProofSym* make( const char* ss ) { return new LFSCProofSym( std::string( ss ) ); }" << std::endl; fsh << " ~LFSCProofSym(){}" << std::endl; fsh << " void print( std::ostream& os ) { os << s.c_str(); }" << std::endl; fsh << "};" << std::endl; fsh << std::endl; fsh << "class LFSCProofLam : public LFSCProof{" << std::endl; fsh << " LFSCProofSym* var;" << std::endl; fsh << " LFSCProof* body;" << std::endl; fsh << " LFSCProof* typ;" << std::endl; fsh << " LFSCProofLam( LFSCProofSym* d_var, LFSCProof* d_body, LFSCProof* d_typ ) : var( d_var ), body( d_body ), typ( d_typ ){}" << std::endl; fsh << "public:" << std::endl; fsh << " static LFSCProof* make( LFSCProofSym* d_var, LFSCProof* d_body, LFSCProof* d_typ = NULL ) {" << std::endl; fsh << " return new LFSCProofLam( d_var, d_body, d_typ );" << std::endl; fsh << " }" << std::endl; fsh << " ~LFSCProofLam(){}" << std::endl; fsh << std::endl; fsh << " void print( std::ostream& os );" << std::endl; fsh << "};" << std::endl; fsh << std::endl; fsh << "#endif" << std::endl; //write the cpp std::fstream fsc; std::string fnamec( filename ); fnamec.append(".cpp"); fsc.open( fnamec.c_str(), std::ios::out ); fsc << "#include \"lfsc_proof.h\"" << std::endl; fsc << std::endl; fsc << "LFSCProof* LFSCProof::hole = NULL;" << std::endl; fsc << std::endl; fsc << "void LFSCProof::init(){" << std::endl; fsc << " hole = LFSCProofSym::make( \"_\" );" << std::endl; fsc << "}" << std::endl; fsc << std::endl; fsc << "void LFSCProofC::print( std::ostream& os ){" << std::endl; fsc << " os << \"(\";" << std::endl; fsc << " switch( id ){" << std::endl; fsc << os_print.str().c_str(); fsc << " }" << std::endl; fsc << " int counter = 0;" << std::endl; fsc << " while( kids[counter] ){" << std::endl; fsc << " os << \" \";" << std::endl; fsc << " kids[counter]->print( os );" << std::endl; fsc << " counter++;" << std::endl; fsc << " }" << std::endl; fsc << " os << \")\";" << std::endl; fsc << "}" << std::endl; fsc << std::endl; fsc << "void LFSCProofLam::print( std::ostream& os ){" << std::endl; fsc << " os << \"(\";" << std::endl; fsc << " if( typ ){" << std::endl; fsc << " os << \"% \";" << std::endl; fsc << " }else{" << std::endl; fsc << " os << \"\\\\ \";" << std::endl; fsc << " }" << std::endl; fsc << " var->print( os );" << std::endl; fsc << " if( typ ){" << std::endl; fsc << " os << \" \";" << std::endl; fsc << " typ->print( os );" << std::endl; fsc << " }" << std::endl; fsc << " os << std::endl;" << std::endl; fsc << " body->print( os );" << std::endl; fsc << " os << \")\";" << std::endl; fsc << "}" << std::endl; fsc << std::endl; fsc << os_constructor_c.str().c_str(); fsc << std::endl; } } cvc4-1.5/proofs/lfsc_checker/libwriter.h000066400000000000000000000007211313116454100203140ustar00rootroot00000000000000#ifndef LIB_WRITER_H #define LIB_WRITER_H #include "expr.h" #include class libwriter { private: std::vector< Expr* > syms; std::vector< Expr* > defs; std::vector< Expr* > judgements; //get the variable name void get_var_name( const std::string& n, std::string& nn ); public: libwriter(){} virtual ~libwriter(){} void add_symbol( Expr* s, Expr* t ) { syms.push_back( s ); defs.push_back( t ); } void write_file(); }; #endif cvc4-1.5/proofs/lfsc_checker/main.cpp000066400000000000000000000066671313116454100176070ustar00rootroot00000000000000#include "expr.h" #include "check.h" #include #include "sccwriter.h" #include "libwriter.h" #include using namespace std; args a; static void parse_args(int argc, char **argv, args &a) { char *arg0 = *argv; /* skip 0'th argument */ argv++; argc--; while (argc) { if ((strncmp("-h", *argv, 2) == 0) || (strncmp("--h", *argv, 3) == 0)) { cout << "Usage: " << arg0 << " [options] infile1 ...infile_n\n"; cout << "If no infiles are named on the command line, input is read\n" << "from stdin. Specifying the infile \"stdin\" will also read\n" << "from stdin. Options are:\n\n"; cout << "--show-runs: print debugging information for runs of side condition code\n"; cout << "--compile-scc: compile side condition code\n"; cout << "--compile-scc-debug: compile debug versions of side condition code\n"; cout << "--run-scc: use compiled side condition code\n"; exit(0); } else if(strcmp("--show-runs", *argv) == 0) { argc--; argv++; a.show_runs = true; } else if(strcmp("--no-tail-calls", *argv) == 0) { // this is just for debugging. argc--; argv++; a.no_tail_calls = true; } else if( strcmp("--compile-scc", *argv) == 0 ){ argc--; argv++; a.compile_scc = true; a.compile_scc_debug = false; } else if( strcmp("--compile-scc-debug", *argv) == 0 ) { argc--; argv++; a.compile_scc = true; a.compile_scc_debug = true; } else if( strcmp("--compile-lib", *argv) == 0 ) { argc--; argv++; a.compile_lib = true; } else if( strcmp("--run-scc", *argv) == 0 ){ argc--; argv++; a.run_scc = true; } else if( strcmp("--use-nested-app", *argv) == 0 ){ argc--; argv++; a.use_nested_app = true; //not implemented yet }else { a.files.push_back(*argv); argc--; argv++; } } } void sighandler(int /* signum */) { cerr << "\nInterrupted. sc is aborting.\n"; exit(1); } int main(int argc, char **argv) { a.show_runs = false; a.no_tail_calls = false; a.compile_scc = false; a.run_scc = false; a.use_nested_app = false; signal(SIGINT, sighandler); parse_args(argc, argv, a); init(); check_time = (int)clock(); if (a.files.size()) { sccwriter* scw = NULL; libwriter* lw = NULL; if( a.compile_scc ){ scw = new sccwriter( a.compile_scc_debug ? opt_write_call_debug : 0 ); } if( a.compile_lib ){ lw = new libwriter; } /* process the files named */ int i = 0, iend = a.files.size(); for (; i < iend; i++) { const char *filename = a.files[i].c_str(); check_file(filename, a, scw, lw); } if( scw ){ scw->write_file(); delete scw; } if( lw ){ #ifdef DEBUG_SYM_NAMES lw->write_file(); delete lw; #else std::cout << "ERROR libwriter: Must compile LFSC with DEBUG_SYM_NAMES flag (see Expr.h)" << std::endl; #endif } } else check_file("stdin", a); //std::cout << "time = " << (int)clock() - t << std::endl; //while(1){} #ifdef DEBUG cout << "Clearing globals.\n"; cout.flush(); cleanup(); a.files.clear(); #endif std::cout << "Proof checked successfully!" << std::endl << std::endl; std::cout << "time = " << (int)clock() - check_time << std::endl; std::cout << "sym count = " << SymExpr::symmCount << std::endl; std::cout << "marked count = " << Expr::markedCount << std::endl; } cvc4-1.5/proofs/lfsc_checker/position.h000066400000000000000000000010701313116454100201530ustar00rootroot00000000000000#ifndef sc2__position_h #define sc2__position_h #include #include class Position { public: const char *filename; int linenum; int colnum; Position(const char *_f, int l, int c) : filename(_f), linenum(l), colnum(c) {} void print(std::ostream &os) { os << filename; if (colnum == -1) { char tmp[1024]; sprintf(tmp, ", line %d, end of column: ", linenum); os << tmp; } else { char tmp[1024]; sprintf(tmp, ", line %d, column %d: ", linenum, colnum); os << tmp; } } }; #endif cvc4-1.5/proofs/lfsc_checker/print_smt2.cpp000066400000000000000000000053741313116454100207560ustar00rootroot00000000000000#include "print_smt2.h" #ifdef PRINT_SMT2 void print_smt2( Expr* p, std::ostream& s, short mode ) { switch( p->getclass() ) { case CEXPR: { switch( p->getop() ) { case APP: { std::vector args; Expr *head = p->collect_args(args, false); short newMode = get_mode( head ); if( is_smt2_poly_formula( head ) ) { s << "("; head->print( s ); s << " "; print_smt2( args[1], s, newMode ); s << " "; print_smt2( args[2], s, newMode ); s << ")"; } else if( ( mode==2 || mode==3 ) && mode==newMode ) { print_smt2( args[0], s, newMode ); s << " "; print_smt2( args[1], s, newMode ); } else if( newMode==1 ) { if( mode!=1 || newMode!=mode ){ s << "("; } print_smt2( args[2], s, newMode ); s << " "; print_smt2( args[3], s, 0 ); if( mode!=1 || newMode!=mode ){ s << ")"; } } else { s << "("; switch( newMode ) { case 4: s << "=>";break; default: head->print( s );break; } s << " "; for( int a=0; a<(int)args.size(); a++ ){ print_smt2( args[a], s, newMode ); if( a!=(int)args.size()-1 ) s << " "; } s << ")"; } } break; default: std::cout << "Unhandled op " << p->getop() << std::endl; break; } } break; case HOLE_EXPR: { HoleExpr *e = (HoleExpr *)p; if( e->val ){ print_smt2( e->val, s, mode ); }else{ s << "_"; } } break; case SYMS_EXPR: case SYM_EXPR: if( ((SymExpr*)p)->val ) print_smt2( ((SymExpr*)p)->val, s, mode ); else p->print( s ); break; default: std::cout << "Unhandled class " << p->getclass() << std::endl; break; } } bool is_smt2_poly_formula( Expr* e ) { if( e->getclass()==SYMS_EXPR ) { SymSExpr* s = (SymSExpr*)e; static std::string eq("="); static std::string distinct("distinct"); return s->s==eq || s->s==distinct; }else{ return false; } } short get_mode( Expr* e ) { if( e->getclass()==SYMS_EXPR ){ SymSExpr* s = (SymSExpr*)e; static std::string applys("apply"); if ( s->s==applys ) return 1; static std::string ands("and"); if ( s->s==ands ) return 2; static std::string ors("or"); if ( s->s==ors ) return 3; static std::string impls("impl"); if ( s->s==impls ) return 4; } return 0; } #endif cvc4-1.5/proofs/lfsc_checker/print_smt2.h000066400000000000000000000003641313116454100204150ustar00rootroot00000000000000#ifndef PRINT_SMT2_H #define PRINT_SMT2_H #define PRINT_SMT2 #include "expr.h" #ifdef PRINT_SMT2 void print_smt2( Expr* p, std::ostream& s, short mode = 0 ); bool is_smt2_poly_formula( Expr* p ); short get_mode( Expr* p ); #endif #endif cvc4-1.5/proofs/lfsc_checker/scccode.cpp000066400000000000000000000002061313116454100202450ustar00rootroot00000000000000#include "scccode.h" void init_compiled_scc(){ } Expr* run_compiled_scc( Expr* p, std::vector< Expr* >& args ){ return NULL; } cvc4-1.5/proofs/lfsc_checker/scccode.h000066400000000000000000000002361313116454100177150ustar00rootroot00000000000000#ifndef SCC_CODE_H #define SCC_CODE_H #include "check.h" void init_compiled_scc(); Expr* run_compiled_scc( Expr* p, std::vector< Expr* >& args ); #endif cvc4-1.5/proofs/lfsc_checker/sccwriter.cpp000066400000000000000000000736651313116454100206720ustar00rootroot00000000000000#include "sccwriter.h" #include #include int sccwriter::exprCount = 0; int sccwriter::strCount = 0; int sccwriter::argsCount = 0; int sccwriter::rnumCount = 0; int sccwriter::get_prog_index( const std::string& str ) { for( int a=0; a<(int)progNames.size(); a++ ){ if( progNames[a]==str ){ return a; } } return -1; } int sccwriter::get_prog_index_by_expr( Expr* e ) { for( int a=0; a<(int)progPtrs.size(); a++ ){ if( progPtrs[a]==e ){ return a; } } return -1; } bool sccwriter::is_var( const std::string& str ) { for( int a=0; a<(int)vars.size(); a++ ){ if( vars[a]==str ){ return true; } } return false; } void sccwriter::add_global_sym( const std::string& str ) { for( int a=0; a<(int)globalSyms.size(); a++ ){ if( globalSyms[a]==str ){ return; } } globalSyms.push_back( str ); } void sccwriter::indent( std::ostream& os, int ind ) { for( int a=0; akids[1]; int counter = 0; //write each argument while( progvars->kids[counter] ) { if( counter!=0 ) { os << ", "; } os << "Expr* "; write_variable( ((SymSExpr*)progvars->kids[counter])->s, os ); //add to vars if options are set to do so if( opts&opt_write_add_args ) { vars.push_back( ((SymSExpr*)progvars->kids[counter])->s ); } counter++; } os << " )"; if( opts&opt_write_call_debug ) { os << "{" << std::endl; indent( os, 1 ); os << "std::cout << \"Call function " << fname.c_str() << " with arguments \";" << std::endl; counter = 0; while( progvars->kids[counter] ) { if( counter!=0 ) { indent( os, 1 ); os << "std::cout << \", \";" << std::endl; } indent( os, 1 ); write_variable( ((SymSExpr*)progvars->kids[counter])->s, os ); os << "->print( std::cout );" << std::endl; counter++; } indent( os, 1 ); os << "std::cout << std::endl;" << std::endl; } } void sccwriter::get_function_name( const std::string& pname, std::string& fname ) { fname = std::string( "f_" ); fname.append( pname ); } void sccwriter::write_variable( const std::string& n, std::ostream& os ) { std::string nn; get_var_name( n, nn ); os << nn.c_str(); } void sccwriter::get_var_name( const std::string& n, std::string& nn ) { nn = std::string( n.c_str() ); for( int i = 0; i <(int)n.length(); i++ ){ char c = n[i]; if (c <= 47) c += 65; else if (c >= 58 && c <= 64) c += 97-58; if ((c >= 91 && c <= 94) || c == 96) c += 104-91; else if (c >= 123) c -= 4; nn[i] = c; } } void sccwriter::write_file() { static std::string filename( "scccode" ); //writer the h file std::fstream fsh; std::string fnameh( filename ); fnameh.append(".h"); fsh.open( fnameh.c_str(), std::ios::out ); //write the header in h fsh << "#ifndef SCC_CODE_H" << std::endl; fsh << "#define SCC_CODE_H" << std::endl << std::endl; //include necessary files in h file fsh << "#include \"check.h\"" << std::endl << std::endl; //write the init function fsh << "void init_compiled_scc();" << std::endl << std::endl; //write the entry function fsh << "Expr* run_compiled_scc( Expr* p, std::vector< Expr* >& args );" << std::endl << std::endl; //write the side condition code functions for( int n=0; n<(int)progs.size(); n++ ) { //write the header in the h file fsh << "inline "; write_function_header( fsh, n ); fsh << ";" << std::endl << std::endl; } fsh << "#endif" << std::endl << std::endl; fsh.close(); //writer the cpp code std::fstream fsc; std::string fnamec( filename ); fnamec.append(".cpp"); fsc.open( fnamec.c_str(), std::ios::out ); //include the h file in the cpp fsc << "#include \"scccode.h\"" << std::endl << std::endl; std::ostringstream fsc_funcs; //write the side condition code functions for( currProgram=0; currProgram<(int)progs.size(); currProgram++ ) { //reset naming counters vars.clear(); exprCount = 0; strCount = 0; argsCount = 0; rnumCount = 0; //for debugging std::cout << "program #" << currProgram << " " << progNames[currProgram].c_str() << std::endl; //write the function header write_function_header( fsc_funcs, currProgram, opt_write_add_args|options ); if( (options&opt_write_call_debug)==0 ) { fsc_funcs << "{" << std::endl; } //write the code //std::vector< std::string > cleanVec; //write_code( get_prog( n )->kids[2], fsc, 1, "return ", cleanVec ); //debug_write_code( progs[n].second->kids[2], fsc, 1 ); std::string expr; write_expr( get_prog( currProgram )->kids[2], fsc_funcs, 1, expr ); indent( fsc_funcs, 1 ); fsc_funcs << "return " << expr.c_str() << ";" << std::endl; fsc_funcs << "}" << std::endl << std::endl; } //write the predefined symbols necessary - symbols and progs for( int a=0; a<(int)globalSyms.size(); a++ ) { fsc << "Expr* e_" << globalSyms[a].c_str() << ";" << std::endl; } for( int a=0; a<(int)progs.size(); a++ ) { fsc << "Expr* e_" << progNames[a].c_str() << ";" << std::endl; } fsc << std::endl; //write the init function - initialize symbols and progs fsc << "void init_compiled_scc(){" << std::endl; for( int a=0; a<(int)globalSyms.size(); a++ ) { indent( fsc, 1 ); fsc << "e_" << globalSyms[a].c_str() << " = symbols->get(\"" << globalSyms[a].c_str() << "\").first;" << std::endl; } for( int a=0; a<(int)progs.size(); a++ ) { indent( fsc, 1 ); fsc << "e_" << progNames[a].c_str() << " = progs[\"" << progNames[a].c_str() << "\"];" << std::endl; } fsc << "}" << std::endl << std::endl; fsc << "Expr* run_compiled_scc( Expr* p, std::vector< Expr* >& args ){" << std::endl; //for( int n=0; n<(int)progs.size(); n++ ){ // indent( fsc, 1 ); // fsc << "static std::string s_" << progNames[n].c_str() << " = std::string( \"" << progNames[n].c_str() << "\" );" << std::endl; //} for( int n=0; n<(int)progs.size(); n++ ){ indent( fsc, 1 ); if( n!=0 ){ fsc << "}else "; } //for each function, test to see if the string matches the name of the function fsc << "if( p==e_" << progNames[n].c_str() << " ){" << std::endl; indent( fsc, 2 ); std::string fname; get_function_name( progNames[n], fname ); //map the function to the proper function fsc << "return " << fname.c_str() << "( "; //write the arguments to the function from args CExpr* progvars = (CExpr*)get_prog( n )->kids[1]; int counter = 0; bool firstTime = true; while( progvars->kids[counter] ) { if( !firstTime ) { fsc << ", "; } fsc << "args[" << counter << "]"; firstTime = false; counter++; } fsc << " );" << std::endl; } indent( fsc, 1 ); fsc << "}else{" << std::endl; indent( fsc, 2 ); //return null in the case the function could not be found fsc << "return NULL;" << std::endl; indent( fsc, 1 ); fsc << "}" << std::endl; fsc << "}" << std::endl << std::endl; fsc << fsc_funcs.str().c_str(); fsc.close(); } void sccwriter::write_code( Expr* code, std::ostream& os, int ind, const char* retModStr, int opts ) { std::string retModString; std::string incString; if ( retModStr ) { retModString = std::string( retModStr ); retModString.append( " = " ); incString = std::string( retModStr ); incString.append( "->inc();" ); } switch( code->getclass() ) { case INT_EXPR: { indent( os, ind ); os << retModString.c_str(); os << "new IntExpr( (signed long int)" << mpz_get_si( ((IntExpr*)code)->n ) << " );" << std::endl; indent( os, ind ); os << incString.c_str() << std::endl; } break; case RAT_EXPR: { mpz_t num, den; mpz_init(num); mpz_init(den); mpq_get_num( num, ((RatExpr*)code)->n ); mpq_get_den( den, ((RatExpr*)code)->n ); indent( os, ind ); os << retModString.c_str(); os << "new RatExpr( " << mpz_get_si( num ) << ", " << mpz_get_si( den ) << " );" << std::endl; indent( os, ind ); os << incString.c_str() << std::endl; } break; case SYMS_EXPR: { //if it is a variable, simply write it to buffer if( is_var( ((SymSExpr*)code)->s ) ) { indent( os, ind ); os << retModString.c_str(); write_variable( ((SymSExpr*)code)->s.c_str(), os ); os << ";" << std::endl; } else //else must look at symbol lookup table { std::string var; get_var_name( ((SymSExpr*)code)->s, var ); indent( os, ind ); os << retModString.c_str() << "e_" << var.c_str() << ";" << std::endl; add_global_sym( var ); } indent( os, ind ); os << incString.c_str() << std::endl; } break; default: switch( code->getop() ) { case APP: { //collect the arguments std::vector< Expr* > argVector; code->collect_args( argVector ); //write the arguments std::vector< std::string > args; for( int a=0; a<(int)argVector.size(); a++ ) { std::string expr; write_expr( argVector[a], os, ind, expr ); args.push_back( expr ); } //write_args( (CExpr*)code, os, ind, 1, args ); Expr* hd = code->get_head(); //map to a program in the case that it is a program if( hd->getop()==PROG && get_prog_index_by_expr( hd )!=-1 ) { indent( os, ind ); os << retModString << "f_" << progNames[ get_prog_index_by_expr( hd ) ].c_str() << "( "; for( int a=0; a<(int)args.size(); a++ ) { os << args[a].c_str(); if( a!=(int)( args.size()-1 ) ){ os << ", "; } } os << " );" << std::endl; for( int a=0; a<(int)args.size(); a++ ) { write_dec( args[a], os, ind ); } } else { #ifdef USE_FLAT_APP std::string expr; write_expr( hd, os, ind, expr ); indent( os, ind ); os << retModString << "new CExpr( APP, "; os << expr.c_str() << ", "; for( int a=0; a<(int)args.size(); a++ ) { os << args[a].c_str(); if( a!=(int)( args.size()-1 ) ){ os << ", "; } } os << " );" << std::endl; #else std::string expr; write_expr( hd, os, ind, expr ); indent( os, ind ); os << retModString; for( int a=0; a<(int)args.size(); a++ ) { os << "new CExpr( APP, "; } os << expr.c_str() << ", "; for( int a=0; a<(int)args.size(); a++ ) { os << args[a].c_str(); os << " )"; if( a!=(int)( args.size()-1 ) ){ os << ", "; } } os << ";" << std::endl; #endif //indent( os, ind ); //os << expr.c_str() << "->dec();" << std::endl; } } break; case MATCH: { //calculate the value for the expression std::string expr; write_expr( ((CExpr*)code)->kids[0], os, ind, expr ); //get the head std::ostringstream sshd; sshd << "e" << exprCount; exprCount++; indent( os, ind ); os << "Expr* " << sshd.str().c_str() << " = " << expr.c_str() << "->followDefs()->get_head();" << std::endl; //write the arguments std::vector< std::string > args; write_args( (CExpr*)code, os, ind, 1, args ); bool encounterDefault = false; //now make an if statement corresponding to the match int a = 0; while( ((CExpr*)code)->kids[a+1] ) { indent( os, ind ); if( a!=0 ){ os << "}else"; } if( ((CExpr*)code)->kids[a+1]->getop()!=CASE ){ encounterDefault = true; os << "{" << std::endl; //write the body of the case write_code( ((CExpr*)code)->kids[a+1], os, ind+1, retModStr ); indent( os, ind ); os << "}" << std::endl; }else{ if( a!=0 ) os << " "; os << "if( " << sshd.str().c_str() << "==" << args[a].c_str() << " ){" << std::endl; //collect args from the variable in the code std::ostringstream ssargs; ssargs << "args" << argsCount; argsCount++; #ifndef USE_FLAT_APP indent( os, ind+1 ); os << "std::vector< Expr* > " << ssargs.str().c_str() << ";" << std::endl; indent( os, ind+1 ); os << expr.c_str() << "->followDefs()->collect_args( " << ssargs.str().c_str() << " );" << std::endl; #endif //set the variables defined in the pattern equal to the arguments std::vector< Expr* > caseArgs; ((CExpr*)((CExpr*)code)->kids[a+1])->kids[0]->collect_args( caseArgs ); for( int b=0; b<(int)caseArgs.size(); b++ ) { indent( os, ind+1 ); os << "Expr* "; write_variable( ((SymSExpr*)caseArgs[b])->s.c_str(), os ); #ifdef USE_FLAT_APP os << " = ((CExpr*)" << expr.c_str() << "->followDefs())->kids[" << b+1 << "];" << std::endl; #else os << " = " << ssargs.str().c_str() << "[" << b << "];" << std::endl; #endif vars.push_back( ((SymSExpr*)caseArgs[b])->s ); } //write the body of the case write_code( ((CExpr*)code)->kids[a+1], os, ind+1, retModStr, opt_write_case_body ); } a++; } if( !encounterDefault ) { indent( os, ind ); os << "}else{" << std::endl; indent( os, ind + 1 ); os << "std::cout << \"Could not find match for expression in function f_"; os << progNames[currProgram].c_str() << " \";" << std::endl; indent( os, ind + 1 ); os << sshd.str().c_str() << "->print( std::cout );" << std::endl; indent( os, ind + 1 ); os << "std::cout << std::endl;" << std::endl; indent( os, ind + 1 ); os << "exit( 1 );" << std::endl; indent( os, ind ); os << "}" << std::endl; } write_dec( expr, os, ind ); for( int a=0; a<(int)args.size(); a++ ) { write_dec( args[a], os, ind ); } } break; case CASE: if( opts&opt_write_case_body ) { write_code( ((CExpr*)code)->kids[1], os, ind, retModStr ); } else { write_code( ((CExpr*)code)->kids[0]->get_head(), os, ind, retModStr ); } break; case DO: { //write each of the children in sequence int counter = 0; while( ((CExpr*)code)->kids[counter] ) { if( ((CExpr*)code)->kids[counter+1]==NULL ) { write_code( ((CExpr*)code)->kids[counter], os, ind, retModStr ); } else { std::string expr; write_expr( ((CExpr*)code)->kids[counter], os, ind, expr ); //clean up memory write_dec( expr, os, ind ); } counter++; } } break; case LET: { indent( os, ind ); os << "Expr* "; write_variable( ((SymSExpr*)((CExpr*)code)->kids[0])->s, os ); os << " = NULL;" << std::endl; std::ostringstream ss; write_variable( ((SymSExpr*)((CExpr*)code)->kids[0])->s, ss ); write_code( ((CExpr*)code)->kids[1], os, ind, ss.str().c_str() ); //add it to the variables vars.push_back( ((SymSExpr*)((CExpr*)code)->kids[0])->s ); write_code( ((CExpr*)code)->kids[2], os, ind, retModStr ); //clean up memory indent( os, ind ); write_variable( ((SymSExpr*)((CExpr*)code)->kids[0])->s, os ); os << "->dec();" << std::endl; } break; case FAIL: { indent( os, ind ); os << retModString.c_str() << "NULL;" << std::endl; } break; #ifndef MARKVAR_32 case MARKVAR: { //calculate the value for the expression std::string expr; write_expr( ((CExpr*)code)->kids[0], os, ind, expr, opt_write_check_sym_expr ); //set the mark on the expression indent( os, ind ); os << "if (" << expr.c_str() << "->followDefs()->getmark())" << std::endl; indent( os, ind+1 ); os << expr.c_str() << "->followDefs()->clearmark();" << std::endl; indent( os, ind ); os << "else" << std::endl; indent( os, ind+1 ); os << expr.c_str() << "->followDefs()->setmark();" << std::endl; //write the return if necessary if( retModStr!=NULL ){ indent( os, ind ); os << retModString.c_str() << expr.c_str() << ";" << std::endl; indent( os, ind ); os << incString.c_str() << std::endl; } write_dec( expr, os, ind ); } break; case IFMARKED: { //calculate the value for the expression std::string expr; write_expr( ((CExpr*)code)->kids[0], os, ind, expr, opt_write_check_sym_expr ); //if mark is set, write code for kids[1] indent( os, ind ); os << "if (" << expr.c_str() << "->followDefs()->getmark()){" << std::endl; write_code( ((CExpr*)code)->kids[1], os, ind+1, retModStr ); //else write code for kids[2] indent( os, ind ); os << "}else{" << std::endl; write_code( ((CExpr*)code)->kids[2], os, ind+1, retModStr ); indent( os, ind ); os << "}" << std::endl; //clean up memory write_dec( expr, os, ind ); } break; #else case MARKVAR: { //calculate the value for the expression std::string expr; write_expr( ((CExpr*)code)->kids[1], os, ind, expr, opt_write_check_sym_expr ); //set the mark on the expression indent( os, ind ); os << "if ( ((SymExpr*)" << expr.c_str() << "->followDefs())->getmark("; os << ((IntExpr*)((CExpr*)code)->kids[0])->get_num() << "))" << std::endl; indent( os, ind+1 ); os << "((SymExpr*)" << expr.c_str() << "->followDefs())->clearmark("; os << ((IntExpr*)((CExpr*)code)->kids[0])->get_num() << ");" << std::endl; indent( os, ind ); os << "else" << std::endl; indent( os, ind+1 ); os << "((SymExpr*)" << expr.c_str() << "->followDefs())->setmark("; os << ((IntExpr*)((CExpr*)code)->kids[0])->get_num() << ");" << std::endl; //write the return if necessary if( retModStr!=NULL ){ indent( os, ind ); os << retModString.c_str() << expr.c_str() << ";" << std::endl; indent( os, ind ); os << incString.c_str() << std::endl; } write_dec( expr, os, ind ); } break; case COMPARE: { std::string expr1, expr2; write_expr( ((CExpr*)code)->kids[0], os, ind, expr1, opt_write_check_sym_expr ); write_expr( ((CExpr*)code)->kids[1], os, ind, expr2, opt_write_check_sym_expr ); indent( os, ind ); os << "if( ((SymExpr*)" << expr1.c_str() << ")->followDefs() < ((SymExpr*)" << expr2.c_str() << ")->followDefs() ){" << std::endl; write_code( ((CExpr*)code)->kids[2], os, ind+1, retModStr ); indent( os, ind ); os << "}else{" << std::endl; write_code( ((CExpr*)code)->kids[3], os, ind+1, retModStr ); indent( os, ind ); os << "}" << std::endl; //clean up memory write_dec( expr1, os, ind ); write_dec( expr2, os, ind ); } break; case IFMARKED: { //calculate the value for the expression std::string expr; write_expr( ((CExpr*)code)->kids[1], os, ind, expr, opt_write_check_sym_expr ); //if mark is set, write code for kids[1] indent( os, ind ); os << "if ( ((SymExpr*)" << expr.c_str() << "->followDefs())->getmark("; os << ((IntExpr*)((CExpr*)code)->kids[0])->get_num() << ")){" << std::endl; write_code( ((CExpr*)code)->kids[2], os, ind+1, retModStr ); //else write code for kids[2] indent( os, ind ); os << "}else{" << std::endl; write_code( ((CExpr*)code)->kids[3], os, ind+1, retModStr ); indent( os, ind ); os << "}" << std::endl; //clean up memory write_dec( expr, os, ind ); } break; #endif case ADD: case MUL: case DIV: { //calculate the value for the first expression std::string expr1; write_expr( ((CExpr*)code)->kids[0], os, ind, expr1 ); //calculate the value for the second expression std::string expr2; write_expr( ((CExpr*)code)->kids[1], os, ind, expr2 ); std::ostringstream ss; ss << "rnum" << rnumCount; rnumCount++; indent( os, ind ); os << "if( " << expr1.c_str() << "->followDefs()->getclass()==INT_EXPR ){" << std::endl; indent( os, ind+1 ); os << "mpz_t " << ss.str().c_str() << ";" << std::endl; indent( os, ind+1 ); os << "mpz_init(" << ss.str().c_str() << ");" << std::endl; indent( os, ind+1 ); os << "mpz_"; if( code->getop()==ADD ) os << "add"; else os << "mul"; os << "( " << ss.str().c_str() << ", ((IntExpr*)" << expr1.c_str() << "->followDefs())->n, ((IntExpr*)" << expr2.c_str() << "->followDefs())->n);" << std::endl; indent( os, ind+1 ); os << retModString.c_str() << "new IntExpr(" << ss.str().c_str() << ");" << std::endl; indent( os, ind ); os << "}else if( " << expr1.c_str() << "->followDefs()->getclass()==RAT_EXPR ){" << std::endl; indent( os, ind+1 ); os << "mpq_t " << ss.str().c_str() << ";" << std::endl; indent( os, ind+1 ); os << "mpq_init(" << ss.str().c_str() << ");" << std::endl; indent( os, ind+1 ); os << "mpq_"; if( code->getop()==ADD ) os << "add"; else if( code->getop()==MUL ) os << "mul"; else os << "div"; os << "( " << ss.str().c_str() << ", ((RatExpr*)" << expr1.c_str() << "->followDefs())->n, ((RatExpr*)" << expr2.c_str() << "->followDefs())->n);" << std::endl; indent( os, ind+1 ); os << retModString.c_str() << "new RatExpr(" << ss.str().c_str() << ");" << std::endl; indent( os, ind ); os << "}" << std::endl; //clean up memory write_dec( expr1, os, ind ); write_dec( expr2, os, ind ); } break; case NEG: { //calculate the value for the first expression std::string expr1; write_expr( ((CExpr*)code)->kids[0], os, ind, expr1 ); std::ostringstream ss; ss << "rnum" << rnumCount; rnumCount++; indent( os, ind ); os << "if( " << expr1.c_str() << "->followDefs()->getclass()==INT_EXPR ){" << std::endl; indent( os, ind+1 ); os << "mpz_t " << ss.str().c_str() << ";" << std::endl; indent( os, ind+1 ); os << "mpz_init(" << ss.str().c_str() << ");" << std::endl; indent( os, ind+1 ); os << "mpz_neg( " << ss.str().c_str() << ", ((IntExpr*)" << expr1.c_str() << "->followDefs())->n );" << std::endl; indent( os, ind+1 ); os << retModString.c_str() << "new IntExpr(" << ss.str().c_str() << ");" << std::endl; indent( os, ind ); os << "}else if( " << expr1.c_str() << "->followDefs()->getclass()==RAT_EXPR ){" << std::endl; indent( os, ind+1 ); os << "mpq_t " << ss.str().c_str() << ";" << std::endl; indent( os, ind+1 ); os << "mpq_init(" << ss.str().c_str() << ");" << std::endl; indent( os, ind+1 ); os << "mpq_neg( " << ss.str().c_str() << ", ((RatExpr*)" << expr1.c_str() << "->followDefs())->n );" << std::endl; indent( os, ind+1 ); os << retModString.c_str() << "new RatExpr(" << ss.str().c_str() << ");" << std::endl; indent( os, ind ); os << "}" << std::endl; //clean up memory write_dec( expr1, os, ind ); } break; case IFNEG: case IFZERO: { std::string expr1; write_expr( ((CExpr*)code)->kids[0], os, ind, expr1 ); indent( os, ind ); os << "if( " << expr1.c_str() << "->followDefs()->getclass()==INT_EXPR ){" << std::endl; indent( os, ind+1 ); os << "if( mpz_sgn( ((IntExpr *)" << expr1.c_str() << "->followDefs())->n ) "; if( code->getop()==IFNEG ) os << "<"; else os << "=="; os << " 0 ){" << std::endl; write_code( ((CExpr*)code)->kids[1], os, ind+2, retModStr ); indent( os, ind+1 ); os << "}else{" << std::endl; write_code( ((CExpr*)code)->kids[2], os, ind+2, retModStr ); indent( os, ind+1 ); os << "}" << std::endl; indent( os, ind ); os << "}else if( " << expr1.c_str() << "->followDefs()->getclass()==RAT_EXPR ){" << std::endl; indent( os, ind+1 ); os << "if( mpq_sgn( ((RatExpr *)" << expr1.c_str() << "->followDefs())->n ) "; if( code->getop()==IFNEG ) os << "<"; else os << "=="; os << " 0 ){" << std::endl; write_code( ((CExpr*)code)->kids[1], os, ind+2, retModStr ); indent( os, ind+1 ); os << "}else{" << std::endl; write_code( ((CExpr*)code)->kids[2], os, ind+2, retModStr ); indent( os, ind+1 ); os << "}" << std::endl; indent( os, ind ); os << "}" << std::endl; //clean up memory write_dec( expr1, os, ind ); } break; case RUN:/*?*/break; case PI:/*?*/break; case LAM:/*?*/break; case TYPE:/*?*/break; case KIND:/*?*/break; case ASCRIBE:/*?*/break; case MPZ:/*?*/break; case PROG:/*?*/break; case PROGVARS:/*?*/break; case PAT:/*?*/break; } break; } } void sccwriter::write_args( CExpr* code, std::ostream& os, int ind, int childCounter, std::vector< std::string >& args, int opts ) { bool encounterCase = false; while( code->kids[childCounter] && (!encounterCase || code->kids[childCounter]->getop()==CASE ) ) { encounterCase = encounterCase || code->kids[childCounter]->getop()==CASE; if( code->kids[childCounter]->getclass()==SYMS_EXPR ) { args.push_back( ((SymSExpr*)code->kids[childCounter])->s ); } else { //calculate the value for the argument std::string expr; write_expr( code->kids[childCounter], os, ind, expr, opts ); args.push_back( expr ); } childCounter++; } } void sccwriter::write_expr( Expr* code, std::ostream& os, int ind, std::string& expr, int opts ) { if( code->getclass()==SYMS_EXPR && is_var( ((SymSExpr*)code)->s ) ) { get_var_name( ((SymSExpr*)code)->s, expr ); indent( os, ind ); os << expr.c_str() << "->inc();" << std::endl; } else { std::ostringstream ss; ss << "e" << exprCount; exprCount++; //declare the expression indent( os, ind ); if( code->getclass()==SYMS_EXPR && !is_var( ((SymSExpr*)code)->s ) ) { os << "static "; } os << "Expr* " << ss.str().c_str() << " = NULL;" << std::endl; //write the expression std::ostringstream ss2; ss2 << ss.str().c_str(); write_code( code, os, ind, ss2.str().c_str(), opts ); //if is not a sym expression, then decrement the expression and return null if( opts&opt_write_check_sym_expr ) { indent( os, ind ); os << "if (" << expr.c_str() << "->getclass() != SYM_EXPR) {" << std::endl; indent( os, ind+1 ); os << "exit( 1 );" << std::endl; indent( os, ind ); os << "}" << std::endl; } expr = std::string( ss.str().c_str() ); vars.push_back( expr ); } //increment the counter for memory management //indent( os, ind ); //os << expr.c_str() << "->inc();" << std::endl; } void sccwriter::write_dec( const std::string& expr, std::ostream& os, int ind ) { bool wd = true; if( wd ) { indent( os, ind ); os << expr.c_str() << "->dec();" << std::endl; } } void sccwriter::debug_write_code( Expr* code, std::ostream& os, int ind ) { indent( os, ind ); switch( code->getclass() ) { case INT_EXPR: os << "int_expr"; break; case HOLE_EXPR: os << "hole_expr"; break; case SYM_EXPR: os << "sym_expr"; break; case SYMS_EXPR: os << "syms_expr: " << ((SymSExpr*)code)->s.c_str(); break; default: switch( code->getop() ) { case APP: os << "app"; break; case PI: os << "pi"; break; case LAM: os << "lam"; break; case TYPE: os << "type"; break; case KIND: os << "kind"; break; case ASCRIBE: os << "ascribe"; break; case MPZ: os << "mpz"; break; case PROG: os << "prog"; break; case PROGVARS: os << "progvars"; break; case MATCH: os << "match"; break; case CASE: os << "case"; break; case PAT: os << "pat"; break; case DO: os << "do"; break; case ADD: os << "add"; break; case NEG: os << "neg"; break; case LET: os << "let"; break; case RUN: os << "run"; break; case FAIL: os << "fail"; break; case MARKVAR: os << "markvar"; break; case IFMARKED: os << "ifmarked"; break; case COMPARE: os << "compare"; break; default: os << "???"; break; } } os << std::endl; if( code->getop()!=0 ) { CExpr* ce = (CExpr*)code; int counter = 0; while( ce->kids[counter] ){ debug_write_code( ce->kids[counter], os, ind+1 ); counter++; } } } cvc4-1.5/proofs/lfsc_checker/sccwriter.h000066400000000000000000000052061313116454100203210ustar00rootroot00000000000000#ifndef SCC_WRITER_H #define SCC_WRITER_H #include "expr.h" #include #include "check.h" enum { opt_write_case_body = 0x00000001, opt_write_check_sym_expr = 0x00000002, opt_write_add_args = 0x000000004, opt_write_no_inc = 0x00000008, opt_write_call_debug = 0x00000010, opt_write_nested_app = 0x00000020, }; class sccwriter { private: //options int options; //programs to write to file symmap progs; //list of indicies in progs std::vector< Expr* > progPtrs; std::vector< std::string > progNames; int currProgram; //current variables in the scope std::vector< std::string > vars; //global variables stored for lookups std::vector< std::string > globalSyms; //symbols that must be dec'ed std::vector< std::string > decSyms; //get program CExpr* get_prog( int n ) { return (CExpr*)progs[ progNames[n] ]; } //get index for string int get_prog_index_by_expr( Expr* e ); int get_prog_index( const std::string& str ); //is variable in current scope bool is_var( const std::string& str ); //add global sym void add_global_sym( const std::string& str ); //expression count static int exprCount; //string count static int strCount; //args count static int argsCount; //num count static int rnumCount; //indent static void indent( std::ostream& os, int ind ); //write function header void write_function_header( std::ostream& os, int index, int opts = 0 ); void write_code( Expr* code, std::ostream& os, int ind, const char* retModStr, int opts = 0 ); //write all children starting at child counter to stream, store in Expr* e_...e_; void write_args( CExpr* code, std::ostream& os, int ind, int childCounter, std::vector< std::string >& args, int opts = 0 ); //write expression - store result of code into e_ for some Expr* e_; void write_expr( Expr* code, std::ostream& os, int ind, std::string& expr, int opts = 0 ); //write variable void write_variable( const std::string& n, std::ostream& os ); //get function name void get_function_name( const std::string& pname, std::string& fname ); //get the variable name void get_var_name( const std::string& n, std::string& nn ); //write dec void write_dec( const std::string& expr, std::ostream& os, int ind ); public: sccwriter( int opts = 0 ) : options( opts ){} virtual ~sccwriter(){} void add_scc( const std::string& pname, Expr* exp ) { //progs.push_back( std::pair< std::string, CExpr* >( pname, exp ) ); progs[pname] = exp; progPtrs.push_back( exp ); progNames.push_back( pname ); } void write_file(); //write code static void debug_write_code( Expr* code, std::ostream& os, int ind ); }; #endif cvc4-1.5/proofs/lfsc_checker/trie.cpp000066400000000000000000000007311313116454100176100ustar00rootroot00000000000000#include "trie.h" #include class Simple : public Trie::Cleaner { public: ~Simple() {} void clean(int p) { (void)p; } }; template <> Trie::Cleaner *Trie::cleaner = new Simple; void unit_test_trie() { Trie t; t.insert("a", 1); t.insert("b", 2); t.insert("abc", 3); t.insert("b", 0); std::cout << "a: " << t.get("a") << "\n"; std::cout << "b: " << t.get("b") << "\n"; std::cout << "abc: " << t.get("abc") << "\n"; } cvc4-1.5/proofs/lfsc_checker/trie.h000066400000000000000000000043471313116454100172640ustar00rootroot00000000000000#ifndef sc2__trie_h #define sc2__trie_h #include #include #include #include template class Trie { protected: char *str; Data d; bool using_next; std::vector *> next; // s is assumed to be non-empty (and non-null) Data insert_next(const char *s, const Data &x) { assert(s != NULL && s[0] != '\0'); unsigned c = s[0]; if (c >= next.size()) { using_next = true; next.resize(c+1); next[c] = new Trie; } else if (!next[c]) next[c] = new Trie; return next[c]->insert(&s[1], x); } // s is assumed to be non-empty (and non-null) Data get_next(const char *s) { assert(s != NULL && s[0] != '\0'); unsigned c = s[0]; if (c >= next.size()) return Data(); Trie *n = next[c]; if (!n) return Data(); return n->get(&s[1]); } public: Trie() : str(), d(), using_next(false), next() { } ~Trie(); class Cleaner { public: virtual ~Cleaner() {} virtual void clean(Data d) = 0; }; static Cleaner *cleaner; Data get(const char *s) { if (!s[0] && (!str || !str[0])) return d; if (str && strcmp(str, s) == 0) return d; if (using_next) return get_next(s); return Data(); } Data insert(const char *s, const Data &x) { if (s[0] == 0) { // we need to insert x right here. if (str) { if (str[0] == 0) { // we need to replace d with x Data old = d; d = x; return old; } // we need to push str into next. (void)insert_next(str,d); free(str); } str = strdup(s); d = x; return Data(); } if (str) { // cannot store x here if (str[0] != 0) { insert_next(str,d); free(str); str = 0; d = Data(); } return insert_next(s,x); } if (using_next) // also cannot store x here return insert_next(s,x); // we can insert x here as an optimization str = strdup(s); d = x; return Data(); } }; template Trie::~Trie() { cleaner->clean(d); for (int i = 0, iend = next.size(); i < iend; i++) { Trie *t = next[i]; if (t) delete t; } if (str) free(str); } extern void unit_test_trie(); #endif cvc4-1.5/proofs/signatures/000077500000000000000000000000001313116454100157115ustar00rootroot00000000000000cvc4-1.5/proofs/signatures/Makefile.am000066400000000000000000000020141313116454100177420ustar00rootroot00000000000000# These CORE_PLFs are combined to give a "master signature" against # which proofs are checked internally when using --check-proofs. To # add support for more theories, just list them here in the same order # you would to the LFSC proof-checker binary. # CORE_PLFS = sat.plf smt.plf th_base.plf th_arrays.plf th_bv.plf th_bv_bitblast.plf th_bv_rewrites.plf th_real.plf th_int.plf noinst_LTLIBRARIES = libsignatures.la dist_pkgdata_DATA = \ $(CORE_PLFS) libsignatures_la_SOURCES = \ signatures.cpp BUILT_SOURCES = \ signatures.cpp signatures.cpp: $(CORE_PLFS) $(AM_V_GEN)( \ echo "namespace CVC4 {"; \ echo "namespace proof {"; \ echo; \ echo "extern const char *const plf_signatures;"; \ echo "const char *const plf_signatures = \"\\"; \ cat $+ | sed 's,\\,\\\\,g;s,",\\",g;s,$$,\\n\\,g'; \ echo "\";"; \ echo; \ echo "} /* CVC4::proof namespace */"; \ echo "} /* CVC4 namespace */"; \ ) > $@ EXTRA_DIST = \ example.plf \ example-arrays.plf \ example-quant.plf \ ex-mem.plf \ th_quant.plf cvc4-1.5/proofs/signatures/Makefile.in000066400000000000000000000632151313116454100177650ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = proofs/signatures ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_pkgdata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsignatures_la_LIBADD = am_libsignatures_la_OBJECTS = signatures.lo libsignatures_la_OBJECTS = $(am_libsignatures_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libsignatures_la_SOURCES) DIST_SOURCES = $(libsignatures_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } am__installdirs = "$(DESTDIR)$(pkgdatadir)" DATA = $(dist_pkgdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ # These CORE_PLFs are combined to give a "master signature" against # which proofs are checked internally when using --check-proofs. To # add support for more theories, just list them here in the same order # you would to the LFSC proof-checker binary. # CORE_PLFS = sat.plf smt.plf th_base.plf th_arrays.plf th_bv.plf th_bv_bitblast.plf th_bv_rewrites.plf th_real.plf th_int.plf noinst_LTLIBRARIES = libsignatures.la dist_pkgdata_DATA = \ $(CORE_PLFS) libsignatures_la_SOURCES = \ signatures.cpp BUILT_SOURCES = \ signatures.cpp EXTRA_DIST = \ example.plf \ example-arrays.plf \ example-quant.plf \ ex-mem.plf \ th_quant.plf all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu proofs/signatures/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu proofs/signatures/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libsignatures.la: $(libsignatures_la_OBJECTS) $(libsignatures_la_DEPENDENCIES) $(EXTRA_libsignatures_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libsignatures_la_OBJECTS) $(libsignatures_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signatures.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_pkgdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_pkgdataDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-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-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-dist_pkgdataDATA .PRECIOUS: Makefile signatures.cpp: $(CORE_PLFS) $(AM_V_GEN)( \ echo "namespace CVC4 {"; \ echo "namespace proof {"; \ echo; \ echo "extern const char *const plf_signatures;"; \ echo "const char *const plf_signatures = \"\\"; \ cat $+ | sed 's,\\,\\\\,g;s,",\\",g;s,$$,\\n\\,g'; \ echo "\";"; \ echo; \ echo "} /* CVC4::proof namespace */"; \ echo "} /* CVC4 namespace */"; \ ) > $@ # 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: cvc4-1.5/proofs/signatures/ex-mem.plf000066400000000000000000000026401313116454100176060ustar00rootroot00000000000000(check (% s sort (% a (term s) (% b (term s) (% c (term s) (% f (term (arrow s s)) ; -------------------- declaration of input formula ----------------------------------- (% A1 (th_holds (= s a b)) (% A2 (th_holds (= s b c)) (% A3 (th_holds (not (= s a c))) ; ------------------- specify that the following is a proof of the empty clause ----------------- (: (holds cln) ; ---------- use atoms (a1, a2, a3) to map theory literals to boolean literals (v1, v2, v3) ------ (decl_atom (= s a b) (\ v1 (\ a1 (decl_atom (= s b c) (\ v2 (\ a2 (decl_atom (= s a c) (\ v3 (\ a3 ; --------------------------- proof of theory lemma --------------------------------------------- (satlem _ _ (ast _ _ _ a1 (\ l1 (ast _ _ _ a2 (\ l2 (asf _ _ _ a3 (\ l3 (clausify_false (contra _ (trans _ _ _ _ l1 l2) l3)))))))) (\ CT1 ; -------------------- clausification of input formulas ----------------------------------------- (satlem _ _ (asf _ _ _ a1 (\ l1 (clausify_false (contra _ A1 l1) ))) (\ C1 ; C1 is the clause ( v1 ) (satlem _ _ (asf _ _ _ a2 (\ l2 (clausify_false (contra _ A2 l2) ))) (\ C2 ; C2 is the clause ( v2 ) (satlem _ _ (ast _ _ _ a3 (\ l3 (clausify_false (contra _ l3 A3) ))) (\ C3 ; C3 is the clause ( ~v3 ) ; -------------------- resolution proof ------------------------------------------------------------ (satlem_simplify _ _ _ (R _ _ (R _ _ C2 (R _ _ C1 CT1 v1) v2) C3 v3) (\ x x)) ))))))))))))))))))))))))))) cvc4-1.5/proofs/signatures/example-arrays.plf000066400000000000000000000070331313116454100213510ustar00rootroot00000000000000; to check, run : lfsc sat.plf smt.plf th_base.plf example.plf ; -------------------------------------------------------------------------------- ; literals : ; L1 : a = write( a, i, read( a, i ) ; L2 : read( a, k ) = read( write( a, i, read( a, i ) ), k ) ; L3 : i = k ; input : ; ~L1 ; (extenstionality) lemma : ; L1 or ~L2 ; theory conflicts : ; L2 or ~L3 ; L2 or L3 ; With the theory lemma, the input is unsatisfiable. ; -------------------------------------------------------------------------------- ; (0) -------------------- term declarations ----------------------------------- (check (% I sort (% E sort (% a (term (Array I E)) (% i (term I) ; (1) -------------------- input formula ----------------------------------- (% A1 (th_holds (not (= (Array I E) a (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i))))) ; (2) ------------------- specify that the following is a proof of the empty clause ----------------- (: (holds cln) ; (3) -------------------- theory lemmas prior to rewriting/preprocess/CNF ----------------- ; --- these should introduce (th_holds ...) ; extensionality lemma : notice this also introduces skolem k (ext _ _ a (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i)) (\ k (\ A2 ; (4) -------------------- map theory literals to boolean variables ; --- maps all theory literals involved in proof to boolean literals (decl_atom (= (Array I E) a (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i))) (\ v1 (\ a1 (decl_atom (= E (apply _ _ (apply _ _ (read I E) a) k) (apply _ _ (apply _ _ (read I E) (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i))) k)) (\ v2 (\ a2 (decl_atom (= I i k) (\ v3 (\ a3 ; (5) -------------------- theory conflicts --------------------------------------------- ; --- these should introduce (holds ...) (satlem _ _ (asf _ _ _ a3 (\ l3 (asf _ _ _ a2 (\ l2 (clausify_false ; use read over write rule "row" (contra _ (symm _ _ _ (row _ _ _ _ a (apply _ _ (apply _ _ (read I E) a) i) l3)) l2) ))))) (\ CT1 ; CT1 is the clause ( v2 V v3 ) (satlem _ _ (ast _ _ _ a3 (\ l3 (asf _ _ _ a2 (\ l2 (clausify_false ; use read over write rule "row1" (contra _ (symm _ _ _ (trans _ _ _ _ (symm _ _ _ (cong _ _ _ _ _ _ (refl _ (apply _ _ (read I E) (apply _ _ (apply _ _ (apply _ _ (write I E) a) i) (apply _ _ (apply _ _ (read I E) a) i)))) l3)) (trans _ _ _ _ (row1 _ _ a i (apply _ _ (apply _ _ (read I E) a) i)) (cong _ _ _ _ _ _ (refl _ (apply _ _ (read I E) a)) l3) ))) l2) ))))) (\ CT2 ; CT2 is the clause ( v2 V ~v3 ) ; (6) -------------------- clausification ----------------------------------------- ; --- these should introduce (holds ...) (satlem _ _ (ast _ _ _ a1 (\ l1 (clausify_false ; input formula A1 is ( ~a1 ) ; the following is a proof of a1 ^ ( ~a1 ) => false (contra _ l1 A1) ))) (\ C1 ; C1 is the clause ( ~v1 ) (satlem _ _ (asf _ _ _ a1 (\ l1 (ast _ _ _ a2 (\ l2 (clausify_false ; lemma A2 is ( a1 V ~a2 ) ; the following is a proof of ~a1 ^ a2 ^ ( a1 V ~a2 ) => false (contra _ l2 (or_elim_1 _ _ l1 A2)) ))))) (\ C2 ; C2 is the clause ( v1 V ~v2 ) ; (7) -------------------- resolution proof ------------------------------------------------------------ (satlem_simplify _ _ _ (R _ _ (R _ _ CT1 CT2 v3) (R _ _ C2 C1 v1) v2) (\ x x)) ))))))))))))))))))))))))))) cvc4-1.5/proofs/signatures/example-quant.plf000066400000000000000000000035711313116454100212030ustar00rootroot00000000000000; to check, run : lfsc sat.plf smt.plf th_base.plf example.plf ; -------------------------------------------------------------------------------- ; literals : ; L1 : forall x. x != x ; L2 : t = t ; input : ; L1 ; (instantiation) lemma : ; L1 => L2 ; theory conflicts : ; ~L2 ; With the theory lemma, the input is unsatisfiable. ; -------------------------------------------------------------------------------- ; (0) -------------------- term declarations ----------------------------------- (check (% s sort (% t (term s) ; (1) -------------------- input formula ----------------------------------- (% x (term s) (% A1 (th_holds (forall _ x (not (= _ x x)))) ; (2) ------------------- specify that the following is a proof of the empty clause ----------------- (: (holds cln) ; (3) -------------------- theory lemmas prior to rewriting/preprocess/CNF ----------------- ; --- these should introduce (th_holds ...) ; instantiation lemma (inst _ _ _ t (not (= _ t t)) A1 (\ A2 ; (4) -------------------- map theory literals to boolean variables ; --- maps all theory literals involved in proof to boolean literals (decl_atom (forall _ x (not (= _ x x))) (\ v1 (\ a1 (decl_atom (= _ t t) (\ v2 (\ a2 ; (5) -------------------- theory conflicts --------------------------------------------- ; --- these should introduce (holds ...) (satlem _ _ (asf _ _ _ a2 (\ l2 (clausify_false (contra _ (refl _ t) l2) ))) (\ CT1 ; CT1 is the clause ( v2 ) ; (6) -------------------- clausification ----------------------------------------- ; --- these should introduce (holds ...) (satlem _ _ (ast _ _ _ a2 (\ l2 (clausify_false (contra _ l2 A2) ))) (\ C1 ; C1 is the clause ( ~v2 ) ; (7) -------------------- resolution proof ------------------------------------------------------------ (satlem_simplify _ _ _ (R _ _ CT1 C1 v2) (\ x x)) )))))))))))))))))) cvc4-1.5/proofs/signatures/example.plf000066400000000000000000000047761313116454100200650ustar00rootroot00000000000000; to check, run : lfsc sat.plf smt.plf th_base.plf example.plf ; -------------------------------------------------------------------------------- ; input : ; ( a = b ) ; ( b = f(c) ) ; ( a != f(c) V a != b ) ; theory lemma (by transitivity) : ; ( a != b V b != f(c) V a = f(c) ) ; With the theory lemma, the input is unsatisfiable. ; -------------------------------------------------------------------------------- (check (% s sort (% a (term s) (% b (term s) (% c (term s) (% f (term (arrow s s)) ; -------------------- declaration of input formula ----------------------------------- (% A1 (th_holds (= s a b)) (% A2 (th_holds (= s b (apply _ _ f c))) (% A3 (th_holds (or (not (= s a (apply _ _ f c))) (not (= s a b)))) ; ------------------- specify that the following is a proof of the empty clause ----------------- (: (holds cln) ; ---------- use atoms (a1, a2, a3) to map theory literals to boolean literals (v1, v2, v3) ------ (decl_atom (= s a b) (\ v1 (\ a1 (decl_atom (= s b (apply _ _ f c)) (\ v2 (\ a2 (decl_atom (= s a (apply _ _ f c)) (\ v3 (\ a3 ; --------------------------- proof of theory lemma --------------------------------------------- (satlem _ _ (ast _ _ _ a1 (\ l1 (ast _ _ _ a2 (\ l2 (asf _ _ _ a3 (\ l3 (clausify_false ; this should be a proof of l1 ^ l2 ^ ~l3 => false ; this is done by theory proof rules (currently just use "trust") trust ))))))) (\ CT ; CT is the clause ( ~v1 V ~v2 V v3 ) ; -------------------- clausification of input formulas ----------------------------------------- (satlem _ _ (asf _ _ _ a1 (\ l1 (clausify_false ; input formula A1 is ( ~l1 ) ; the following should be a proof of l1 ^ ( ~l1 ) => false ; this is done by natural deduction rules (contra _ A1 l1) ))) (\ C1 ; C1 is the clause ( v1 ) (satlem _ _ (asf _ _ _ a2 (\ l2 (clausify_false ; input formula A2 is ( ~l2 ) ; the following should be a proof of l2 ^ ( ~l2 ) => false ; this is done by natural deduction rules (contra _ A2 l2) ))) (\ C2 ; C2 is the clause ( v2 ) (satlem _ _ (ast _ _ _ a3 (\ l3 (ast _ _ _ a1 (\ l1 (clausify_false ; input formula A3 is ( ~a3 V ~a1 ) ; the following should be a proof of a3 ^ a1 ^ ( ~a3 V ~a1 ) => false ; this is done by natural deduction rules (contra _ l1 (or_elim_1 _ _ (not_not_intro _ l3) A3)) ))))) (\ C3 ; C3 is the clause ( ~v3 V ~v1 ) ; -------------------- resolution proof ------------------------------------------------------------ (satlem_simplify _ _ _ (R _ _ C1 (R _ _ C2 (R _ _ CT C3 v3) v2) v1) (\ x x)) )))))))))))))))))))))))))) ) cvc4-1.5/proofs/signatures/sat.plf000066400000000000000000000106251313116454100172070ustar00rootroot00000000000000(declare bool type) (declare tt bool) (declare ff bool) (declare var type) (declare lit type) (declare pos (! x var lit)) (declare neg (! x var lit)) (declare clause type) (declare cln clause) (declare clc (! x lit (! c clause clause))) ; constructs for general clauses for R, Q, satlem (declare concat_cl (! c1 clause (! c2 clause clause))) (declare clr (! l lit (! c clause clause))) ; code to check resolutions (program append ((c1 clause) (c2 clause)) clause (match c1 (cln c2) ((clc l c1') (clc l (append c1' c2))))) ; we use marks as follows: ; -- mark 1 to record if we are supposed to remove a positive occurrence of the variable. ; -- mark 2 to record if we are supposed to remove a negative occurrence of the variable. ; -- mark 3 if we did indeed remove the variable positively ; -- mark 4 if we did indeed remove the variable negatively (program simplify_clause ((c clause)) clause (match c (cln cln) ((clc l c1) (match l ; Set mark 1 on v if it is not set, to indicate we should remove it. ; After processing the rest of the clause, set mark 3 if we were already ; supposed to remove v (so if mark 1 was set when we began). Clear mark3 ; if we were not supposed to be removing v when we began this call. ((pos v) (let m (ifmarked v tt (do (markvar v) ff)) (let c' (simplify_clause c1) (match m (tt (do (ifmarked3 v v (markvar3 v)) c')) (ff (do (ifmarked3 v (markvar3 v) v) (markvar v) (clc l c'))))))) ; the same as the code for tt, but using different marks. ((neg v) (let m (ifmarked2 v tt (do (markvar2 v) ff)) (let c' (simplify_clause c1) (match m (tt (do (ifmarked4 v v (markvar4 v)) c')) (ff (do (ifmarked4 v (markvar4 v) v) (markvar2 v) (clc l c'))))))))) ((concat_cl c1 c2) (append (simplify_clause c1) (simplify_clause c2))) ((clr l c1) (match l ; set mark 1 to indicate we should remove v, and fail if ; mark 3 is not set after processing the rest of the clause ; (we will set mark 3 if we remove a positive occurrence of v). ((pos v) (let m (ifmarked v tt (do (markvar v) ff)) (let m3 (ifmarked3 v (do (markvar3 v) tt) ff) (let c' (simplify_clause c1) (ifmarked3 v (do (match m3 (tt v) (ff (markvar3 v))) (match m (tt v) (ff (markvar v))) c') (fail clause)))))) ; same as the tt case, but with different marks. ((neg v) (let m2 (ifmarked2 v tt (do (markvar2 v) ff)) (let m4 (ifmarked4 v (do (markvar4 v) tt) ff) (let c' (simplify_clause c1) (ifmarked4 v (do (match m4 (tt v) (ff (markvar4 v))) (match m2 (tt v) (ff (markvar2 v))) c') (fail clause)))))) )))) ; resolution proofs (declare holds (! c clause type)) (declare R (! c1 clause (! c2 clause (! u1 (holds c1) (! u2 (holds c2) (! n var (holds (concat_cl (clr (pos n) c1) (clr (neg n) c2))))))))) (declare Q (! c1 clause (! c2 clause (! u1 (holds c1) (! u2 (holds c2) (! n var (holds (concat_cl (clr (neg n) c1) (clr (pos n) c2))))))))) (declare satlem_simplify (! c1 clause (! c2 clause (! c3 clause (! u1 (holds c1) (! r (^ (simplify_clause c1) c2) (! u2 (! x (holds c2) (holds c3)) (holds c3)))))))) (declare satlem (! c clause (! c2 clause (! u (holds c) (! u2 (! v (holds c) (holds c2)) (holds c2)))))) ; A little example to demonstrate simplify_clause. ; It can handle nested clr's of both polarities, ; and correctly cleans up marks when it leaves a ; clr or clc scope. Uncomment and run with ; --show-runs to see it in action. ; ; (check ; (% v1 var ; (% u1 (holds (concat_cl (clr (neg v1) (clr (pos v1) (clc (pos v1) (clr (pos v1) (clc (pos v1) (clc (neg v1) cln)))))) ; (clc (pos v1) (clc (pos v1) cln)))) ; (satlem _ _ _ u1 (\ x x)))))) ;(check ; (% v1 var ; (% u1 (holds (clr (neg v1) (concat_cl (clc (neg v1) cln) ; (clr (neg v1) (clc (neg v1) cln))))) ; (satlem _ _ _ u1 (\ x x)))))) cvc4-1.5/proofs/signatures/signatures.cpp000066400000000000000000001455001313116454100206060ustar00rootroot00000000000000namespace CVC4 { namespace proof { extern const char *const plf_signatures; const char *const plf_signatures = "\ (declare bool type)\n\ (declare tt bool)\n\ (declare ff bool)\n\ \n\ (declare var type)\n\ \n\ (declare lit type)\n\ (declare pos (! x var lit))\n\ (declare neg (! x var lit))\n\ \n\ (declare clause type)\n\ (declare cln clause)\n\ (declare clc (! x lit (! c clause clause)))\n\ \n\ ; constructs for general clauses for R, Q, satlem\n\ \n\ (declare concat_cl (! c1 clause (! c2 clause clause)))\n\ (declare clr (! l lit (! c clause clause)))\n\ \n\ ; code to check resolutions\n\ \n\ (program append ((c1 clause) (c2 clause)) clause\n\ (match c1 (cln c2) ((clc l c1') (clc l (append c1' c2)))))\n\ \n\ ; we use marks as follows:\n\ ; -- mark 1 to record if we are supposed to remove a positive occurrence of the variable.\n\ ; -- mark 2 to record if we are supposed to remove a negative occurrence of the variable.\n\ ; -- mark 3 if we did indeed remove the variable positively\n\ ; -- mark 4 if we did indeed remove the variable negatively\n\ (program simplify_clause ((c clause)) clause\n\ (match c\n\ (cln cln)\n\ ((clc l c1)\n\ (match l\n\ ; Set mark 1 on v if it is not set, to indicate we should remove it.\n\ ; After processing the rest of the clause, set mark 3 if we were already\n\ ; supposed to remove v (so if mark 1 was set when we began). Clear mark3\n\ ; if we were not supposed to be removing v when we began this call.\n\ ((pos v)\n\ (let m (ifmarked v tt (do (markvar v) ff))\n\ (let c' (simplify_clause c1)\n\ (match m\n\ (tt (do (ifmarked3 v v (markvar3 v)) c'))\n\ (ff (do (ifmarked3 v (markvar3 v) v) (markvar v) (clc l c')))))))\n\ ; the same as the code for tt, but using different marks.\n\ ((neg v)\n\ (let m (ifmarked2 v tt (do (markvar2 v) ff))\n\ (let c' (simplify_clause c1)\n\ (match m\n\ (tt (do (ifmarked4 v v (markvar4 v)) c'))\n\ (ff (do (ifmarked4 v (markvar4 v) v) (markvar2 v) (clc l c')))))))))\n\ ((concat_cl c1 c2) (append (simplify_clause c1) (simplify_clause c2)))\n\ ((clr l c1)\n\ (match l\n\ ; set mark 1 to indicate we should remove v, and fail if\n\ ; mark 3 is not set after processing the rest of the clause\n\ ; (we will set mark 3 if we remove a positive occurrence of v).\n\ ((pos v)\n\ (let m (ifmarked v tt (do (markvar v) ff))\n\ (let m3 (ifmarked3 v (do (markvar3 v) tt) ff)\n\ (let c' (simplify_clause c1)\n\ (ifmarked3 v (do (match m3 (tt v) (ff (markvar3 v)))\n\ (match m (tt v) (ff (markvar v))) c')\n\ (fail clause))))))\n\ ; same as the tt case, but with different marks.\n\ ((neg v)\n\ (let m2 (ifmarked2 v tt (do (markvar2 v) ff))\n\ (let m4 (ifmarked4 v (do (markvar4 v) tt) ff)\n\ (let c' (simplify_clause c1)\n\ (ifmarked4 v (do (match m4 (tt v) (ff (markvar4 v)))\n\ (match m2 (tt v) (ff (markvar2 v))) c')\n\ (fail clause))))))\n\ ))))\n\ \n\ \n\ ; resolution proofs\n\ \n\ (declare holds (! c clause type))\n\ \n\ (declare R (! c1 clause (! c2 clause\n\ (! u1 (holds c1)\n\ (! u2 (holds c2)\n\ (! n var\n\ (holds (concat_cl (clr (pos n) c1)\n\ (clr (neg n) c2)))))))))\n\ \n\ (declare Q (! c1 clause (! c2 clause\n\ (! u1 (holds c1)\n\ (! u2 (holds c2)\n\ (! n var\n\ (holds (concat_cl (clr (neg n) c1)\n\ (clr (pos n) c2)))))))))\n\ \n\ (declare satlem_simplify\n\ (! c1 clause\n\ (! c2 clause\n\ (! c3 clause\n\ (! u1 (holds c1)\n\ (! r (^ (simplify_clause c1) c2)\n\ (! u2 (! x (holds c2) (holds c3))\n\ (holds c3))))))))\n\ \n\ (declare satlem\n\ (! c clause\n\ (! c2 clause\n\ (! u (holds c)\n\ (! u2 (! v (holds c) (holds c2))\n\ (holds c2))))))\n\ \n\ ; A little example to demonstrate simplify_clause.\n\ ; It can handle nested clr's of both polarities,\n\ ; and correctly cleans up marks when it leaves a\n\ ; clr or clc scope. Uncomment and run with\n\ ; --show-runs to see it in action.\n\ ;\n\ ; (check\n\ ; (% v1 var\n\ ; (% u1 (holds (concat_cl (clr (neg v1) (clr (pos v1) (clc (pos v1) (clr (pos v1) (clc (pos v1) (clc (neg v1) cln))))))\n\ ; (clc (pos v1) (clc (pos v1) cln))))\n\ ; (satlem _ _ _ u1 (\\ x x))))))\n\ \n\ \n\ ;(check\n\ ; (% v1 var\n\ ; (% u1 (holds (clr (neg v1) (concat_cl (clc (neg v1) cln)\n\ ; (clr (neg v1) (clc (neg v1) cln)))))\n\ ; (satlem _ _ _ u1 (\\ x x))))))\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;\n\ ; SMT syntax and semantics (not theory-specific)\n\ ;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ; depends on sat.plf\n\ \n\ (declare formula type)\n\ (declare th_holds (! f formula type))\n\ \n\ ; standard logic definitions\n\ (declare true formula)\n\ (declare false formula)\n\ \n\ (define formula_op1\n\ (! f formula\n\ formula))\n\ \n\ (define formula_op2\n\ (! f1 formula\n\ (! f2 formula\n\ formula)))\n\ \n\ (define formula_op3\n\ (! f1 formula\n\ (! f2 formula\n\ (! f3 formula\n\ formula))))\n\ \n\ (declare not formula_op1)\n\ (declare and formula_op2)\n\ (declare or formula_op2)\n\ (declare impl formula_op2)\n\ (declare iff formula_op2)\n\ (declare xor formula_op2)\n\ (declare ifte formula_op3)\n\ \n\ ; terms\n\ (declare sort type)\n\ (declare term (! t sort type)) ; declared terms in formula\n\ \n\ ; standard definitions for =, ite, let and flet\n\ (declare = (! s sort\n\ (! x (term s)\n\ (! y (term s)\n\ formula))))\n\ (declare ite (! s sort\n\ (! f formula\n\ (! t1 (term s)\n\ (! t2 (term s)\n\ (term s))))))\n\ (declare let (! s sort\n\ (! t (term s)\n\ (! f (! v (term s) formula)\n\ formula))))\n\ (declare flet (! f1 formula\n\ (! f2 (! v formula formula)\n\ formula)))\n\ \n\ ; We view applications of predicates as terms of sort \"Bool\".\n\ ; Such terms can be injected as atomic formulas using \"p_app\".\n\ (declare Bool sort) ; the special sort for predicates\n\ (declare p_app (! x (term Bool) formula)) ; propositional application of term\n\ \n\ ; boolean terms\n\ (declare t_true (term Bool))\n\ (declare t_false (term Bool))\n\ (declare t_t_neq_f\n\ (th_holds (not (= Bool t_true t_false))))\n\ (declare pred_eq_t\n\ (! x (term Bool)\n\ (! u (th_holds (p_app x))\n\ (th_holds (= Bool x t_true)))))\n\ \n\ (declare pred_eq_f\n\ (! x (term Bool)\n\ (! u (th_holds (not (p_app x)))\n\ (th_holds (= Bool x t_false)))))\n\ \n\ (declare f_to_b\n\ (! f formula\n\ (term Bool)))\n\ \n\ (declare true_preds_equal\n\ (! x1 (term Bool)\n\ (! x2 (term Bool)\n\ (! u1 (th_holds (p_app x1))\n\ (! u2 (th_holds (p_app x2))\n\ (th_holds (= Bool x1 x2)))))))\n\ \n\ (declare false_preds_equal\n\ (! x1 (term Bool)\n\ (! x2 (term Bool)\n\ (! u1 (th_holds (not (p_app x1)))\n\ (! u2 (th_holds (not (p_app x2)))\n\ (th_holds (= Bool x1 x2)))))))\n\ \n\ (declare pred_refl_pos\n\ (! x1 (term Bool)\n\ (! u1 (th_holds (p_app x1))\n\ (th_holds (= Bool x1 x1)))))\n\ \n\ (declare pred_refl_neg\n\ (! x1 (term Bool)\n\ (! u1 (th_holds (not (p_app x1)))\n\ (th_holds (= Bool x1 x1)))))\n\ \n\ (declare pred_not_iff_f\n\ (! x (term Bool)\n\ (! u (th_holds (not (iff false (p_app x))))\n\ (th_holds (= Bool t_true x)))))\n\ \n\ (declare pred_not_iff_f_2\n\ (! x (term Bool)\n\ (! u (th_holds (not (iff (p_app x) false)))\n\ (th_holds (= Bool x t_true)))))\n\ \n\ (declare pred_not_iff_t\n\ (! x (term Bool)\n\ (! u (th_holds (not (iff true (p_app x))))\n\ (th_holds (= Bool t_false x)))))\n\ \n\ (declare pred_not_iff_t_2\n\ (! x (term Bool)\n\ (! u (th_holds (not (iff (p_app x) true)))\n\ (th_holds (= Bool x t_false)))))\n\ \n\ (declare pred_iff_f\n\ (! x (term Bool)\n\ (! u (th_holds (iff false (p_app x)))\n\ (th_holds (= Bool t_false x)))))\n\ \n\ (declare pred_iff_f_2\n\ (! x (term Bool)\n\ (! u (th_holds (iff (p_app x) false))\n\ (th_holds (= Bool x t_false)))))\n\ \n\ (declare pred_iff_t\n\ (! x (term Bool)\n\ (! u (th_holds (iff true (p_app x)))\n\ (th_holds (= Bool t_true x)))))\n\ \n\ (declare pred_iff_t_2\n\ (! x (term Bool)\n\ (! u (th_holds (iff (p_app x) true))\n\ (th_holds (= Bool x t_true)))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;\n\ ; CNF Clausification\n\ ;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ ; binding between an LF var and an (atomic) formula\n\ \n\ (declare atom (! v var (! p formula type)))\n\ \n\ ; binding between two LF vars\n\ (declare bvatom (! sat_v var (! bv_v var type)))\n\ \n\ (declare decl_atom\n\ (! f formula\n\ (! u (! v var\n\ (! a (atom v f)\n\ (holds cln)))\n\ (holds cln))))\n\ \n\ ;; declare atom enhanced with mapping\n\ ;; between SAT prop variable and BVSAT prop variable\n\ (declare decl_bvatom\n\ (! f formula\n\ (! u (! v var\n\ (! bv_v var\n\ (! a (atom v f)\n\ (! bva (atom bv_v f)\n\ (! vbv (bvatom v bv_v)\n\ (holds cln))))))\n\ (holds cln))))\n\ \n\ \n\ ; clausify a formula directly\n\ (declare clausify_form\n\ (! f formula\n\ (! v var\n\ (! a (atom v f)\n\ (! u (th_holds f)\n\ (holds (clc (pos v) cln)))))))\n\ \n\ (declare clausify_form_not\n\ (! f formula\n\ (! v var\n\ (! a (atom v f)\n\ (! u (th_holds (not f))\n\ (holds (clc (neg v) cln)))))))\n\ \n\ (declare clausify_false\n\ (! u (th_holds false)\n\ (holds cln)))\n\ \n\ (declare th_let_pf\n\ (! f formula\n\ (! u (th_holds f)\n\ (! u2 (! v (th_holds f) (holds cln))\n\ (holds cln)))))\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;\n\ ; Natural deduction rules : used for CNF\n\ ;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ ;; for eager bit-blasting\n\ (declare iff_symm\n\ (! f formula\n\ (th_holds (iff f f))))\n\ \n\ \n\ ;; contradiction\n\ \n\ (declare contra\n\ (! f formula\n\ (! r1 (th_holds f)\n\ (! r2 (th_holds (not f))\n\ (th_holds false)))))\n\ \n\ ; truth\n\ (declare truth (th_holds true))\n\ \n\ ;; not not\n\ \n\ (declare not_not_intro\n\ (! f formula\n\ (! u (th_holds f)\n\ (th_holds (not (not f))))))\n\ \n\ (declare not_not_elim\n\ (! f formula\n\ (! u (th_holds (not (not f)))\n\ (th_holds f))))\n\ \n\ ;; or elimination\n\ \n\ (declare or_elim_1\n\ (! f1 formula\n\ (! f2 formula\n\ (! u1 (th_holds (not f1))\n\ (! u2 (th_holds (or f1 f2))\n\ (th_holds f2))))))\n\ \n\ (declare or_elim_2\n\ (! f1 formula\n\ (! f2 formula\n\ (! u1 (th_holds (not f2))\n\ (! u2 (th_holds (or f1 f2))\n\ (th_holds f1))))))\n\ \n\ (declare not_or_elim\n\ (! f1 formula\n\ (! f2 formula\n\ (! u2 (th_holds (not (or f1 f2)))\n\ (th_holds (and (not f1) (not f2)))))))\n\ \n\ ;; and elimination\n\ \n\ (declare and_elim_1\n\ (! f1 formula\n\ (! f2 formula\n\ (! u (th_holds (and f1 f2))\n\ (th_holds f1)))))\n\ \n\ (declare and_elim_2\n\ (! f1 formula\n\ (! f2 formula\n\ (! u (th_holds (and f1 f2))\n\ (th_holds f2)))))\n\ \n\ (declare not_and_elim\n\ (! f1 formula\n\ (! f2 formula\n\ (! u2 (th_holds (not (and f1 f2)))\n\ (th_holds (or (not f1) (not f2)))))))\n\ \n\ ;; impl elimination\n\ \n\ (declare impl_intro (! f1 formula\n\ (! f2 formula\n\ (! i1 (! u (th_holds f1)\n\ (th_holds f2))\n\ (th_holds (impl f1 f2))))))\n\ \n\ (declare impl_elim\n\ (! f1 formula\n\ (! f2 formula\n\ (! u2 (th_holds (impl f1 f2))\n\ (th_holds (or (not f1) f2))))))\n\ \n\ (declare not_impl_elim\n\ (! f1 formula\n\ (! f2 formula\n\ (! u (th_holds (not (impl f1 f2)))\n\ (th_holds (and f1 (not f2)))))))\n\ \n\ ;; iff elimination\n\ \n\ (declare iff_elim_1\n\ (! f1 formula\n\ (! f2 formula\n\ (! u1 (th_holds (iff f1 f2))\n\ (th_holds (or (not f1) f2))))))\n\ \n\ (declare iff_elim_2\n\ (! f1 formula\n\ (! f2 formula\n\ (! u1 (th_holds (iff f1 f2))\n\ (th_holds (or f1 (not f2)))))))\n\ \n\ (declare not_iff_elim\n\ (! f1 formula\n\ (! f2 formula\n\ (! u2 (th_holds (not (iff f1 f2)))\n\ (th_holds (iff f1 (not f2)))))))\n\ \n\ ; xor elimination\n\ \n\ (declare xor_elim_1\n\ (! f1 formula\n\ (! f2 formula\n\ (! u1 (th_holds (xor f1 f2))\n\ (th_holds (or (not f1) (not f2)))))))\n\ \n\ (declare xor_elim_2\n\ (! f1 formula\n\ (! f2 formula\n\ (! u1 (th_holds (xor f1 f2))\n\ (th_holds (or f1 f2))))))\n\ \n\ (declare not_xor_elim\n\ (! f1 formula\n\ (! f2 formula\n\ (! u2 (th_holds (not (xor f1 f2)))\n\ (th_holds (iff f1 f2))))))\n\ \n\ ;; ite elimination\n\ \n\ (declare ite_elim_1\n\ (! a formula\n\ (! b formula\n\ (! c formula\n\ (! u2 (th_holds (ifte a b c))\n\ (th_holds (or (not a) b)))))))\n\ \n\ (declare ite_elim_2\n\ (! a formula\n\ (! b formula\n\ (! c formula\n\ (! u2 (th_holds (ifte a b c))\n\ (th_holds (or a c)))))))\n\ \n\ (declare ite_elim_3\n\ (! a formula\n\ (! b formula\n\ (! c formula\n\ (! u2 (th_holds (ifte a b c))\n\ (th_holds (or b c)))))))\n\ \n\ (declare not_ite_elim_1\n\ (! a formula\n\ (! b formula\n\ (! c formula\n\ (! u2 (th_holds (not (ifte a b c)))\n\ (th_holds (or (not a) (not b))))))))\n\ \n\ (declare not_ite_elim_2\n\ (! a formula\n\ (! b formula\n\ (! c formula\n\ (! u2 (th_holds (not (ifte a b c)))\n\ (th_holds (or a (not c))))))))\n\ \n\ (declare not_ite_elim_3\n\ (! a formula\n\ (! b formula\n\ (! c formula\n\ (! u2 (th_holds (not (ifte a b c)))\n\ (th_holds (or (not b) (not c))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;\n\ ; For theory lemmas\n\ ; - make a series of assumptions and then derive a contradiction (or false)\n\ ; - then the assumptions yield a formula like \"v1 -> v2 -> ... -> vn -> false\"\n\ ; - In CNF, it becomes a clause: \"~v1, ~v2, ..., ~vn\"\n\ ;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (declare ast\n\ (! v var\n\ (! f formula\n\ (! C clause\n\ (! r (atom v f) ;this is specified\n\ (! u (! o (th_holds f)\n\ (holds C))\n\ (holds (clc (neg v) C))))))))\n\ \n\ (declare asf\n\ (! v var\n\ (! f formula\n\ (! C clause\n\ (! r (atom v f)\n\ (! u (! o (th_holds (not f))\n\ (holds C))\n\ (holds (clc (pos v) C))))))))\n\ \n\ ;; Bitvector lemma constructors to assume\n\ ;; the unit clause containing the assumptions\n\ ;; it also requires the mapping between bv_v and v\n\ ;; The resolution proof proving false will use bv_v as the definition clauses use bv_v\n\ ;; but the Problem clauses in the main SAT solver will use v so the learned clause is in terms of v\n\ (declare bv_asf\n\ (! v var\n\ (! bv_v var\n\ (! f formula\n\ (! C clause\n\ (! r (atom v f) ;; passed in\n\ (! x (bvatom v bv_v) ; establishes the equivalence of v to bv_\n\ (! u (! o (holds (clc (neg bv_v) cln)) ;; l binding to be used in proof\n\ (holds C))\n\ (holds (clc (pos v) C))))))))))\n\ \n\ (declare bv_ast\n\ (! v var\n\ (! bv_v var\n\ (! f formula\n\ (! C clause\n\ (! r (atom v f) ; this is specified\n\ (! x (bvatom v bv_v) ; establishes the equivalence of v to bv_v\n\ (! u (! o (holds (clc (pos bv_v) cln))\n\ (holds C))\n\ (holds (clc (neg v) C))))))))))\n\ \n\ \n\ ;; Example:\n\ ;;\n\ ;; Given theory literals (F1....Fn), and an input formula A of the form (th_holds (or F1 (or F2 .... (or F{n-1} Fn))))).\n\ ;;\n\ ;; We introduce atoms (a1,...,an) to map boolean literals (v1,...,vn) top literals (F1,...,Fn).\n\ ;; Do this at the beginning of the proof:\n\ ;;\n\ ;; (decl_atom F1 (\\ v1 (\\ a1\n\ ;; (decl_atom F2 (\\ v2 (\\ a2\n\ ;; ....\n\ ;; (decl_atom Fn (\\ vn (\\ an\n\ ;;\n\ ;; A is then clausified by the following proof:\n\ ;;\n\ ;;(satlem _ _\n\ ;;(asf _ _ _ a1 (\\ l1\n\ ;;(asf _ _ _ a2 (\\ l2\n\ ;;...\n\ ;;(asf _ _ _ an (\\ ln\n\ ;;(clausify_false\n\ ;;\n\ ;; (contra _\n\ ;; (or_elim_1 _ _ l{n-1}\n\ ;; ...\n\ ;; (or_elim_1 _ _ l2\n\ ;; (or_elim_1 _ _ l1 A))))) ln)\n\ ;;\n\ ;;))))))) (\\ C\n\ ;;\n\ ;; We now have the free variable C, which should be the clause (v1 V ... V vn).\n\ ;;\n\ ;; Polarity of literals should be considered, say we have A of the form (th_holds (or (not F1) (or F2 (not F3)))).\n\ ;; Where necessary, we use \"ast\" instead of \"asf\", introduce negations by \"not_not_intro\" for pattern matching, and flip\n\ ;; the arguments of contra:\n\ ;;\n\ ;;(satlem _ _\n\ ;;(ast _ _ _ a1 (\\ l1\n\ ;;(asf _ _ _ a2 (\\ l2\n\ ;;(ast _ _ _ a3 (\\ l3\n\ ;;(clausify_false\n\ ;;\n\ ;; (contra _ l3\n\ ;; (or_elim_1 _ _ l2\n\ ;; (or_elim_1 _ _ (not_not_intro l1) A))))\n\ ;;\n\ ;;))))))) (\\ C\n\ ;;\n\ ;; C should be the clause (~v1 V v2 V ~v3 )\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;\n\ ; Theory of Equality and Congruence Closure\n\ ;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ; depends on : smt.plf\n\ \n\ ; sorts :\n\ \n\ (declare arrow (! s1 sort (! s2 sort sort))) ; function constructor\n\ \n\ ; functions :\n\ \n\ (declare apply (! s1 sort\n\ (! s2 sort\n\ (! t1 (term (arrow s1 s2))\n\ (! t2 (term s1)\n\ (term s2))))))\n\ \n\ \n\ ; inference rules :\n\ \n\ (declare trust (th_holds false)) ; temporary\n\ (declare trust_f (! f formula (th_holds f))) ; temporary\n\ \n\ (declare refl\n\ (! s sort\n\ (! t (term s)\n\ (th_holds (= s t t)))))\n\ \n\ (declare symm (! s sort\n\ (! x (term s)\n\ (! y (term s)\n\ (! u (th_holds (= _ x y))\n\ (th_holds (= _ y x)))))))\n\ \n\ (declare trans (! s sort\n\ (! x (term s)\n\ (! y (term s)\n\ (! z (term s)\n\ (! u (th_holds (= _ x y))\n\ (! u (th_holds (= _ y z))\n\ (th_holds (= _ x z)))))))))\n\ \n\ (declare negsymm (! s sort\n\ (! x (term s)\n\ (! y (term s)\n\ (! u (th_holds (not (= _ x y)))\n\ (th_holds (not (= _ y x))))))))\n\ \n\ (declare negtrans1 (! s sort\n\ (! x (term s)\n\ (! y (term s)\n\ (! z (term s)\n\ (! u (th_holds (not (= _ x y)))\n\ (! u (th_holds (= _ y z))\n\ (th_holds (not (= _ x z))))))))))\n\ \n\ (declare negtrans2 (! s sort\n\ (! x (term s)\n\ (! y (term s)\n\ (! z (term s)\n\ (! u (th_holds (= _ x y))\n\ (! u (th_holds (not (= _ y z)))\n\ (th_holds (not (= _ x z))))))))))\n\ \n\ (declare cong (! s1 sort\n\ (! s2 sort\n\ (! a1 (term (arrow s1 s2))\n\ (! b1 (term (arrow s1 s2))\n\ (! a2 (term s1)\n\ (! b2 (term s1)\n\ (! u1 (th_holds (= _ a1 b1))\n\ (! u2 (th_holds (= _ a2 b2))\n\ (th_holds (= _ (apply _ _ a1 a2) (apply _ _ b1 b2))))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ; Examples\n\ \n\ ; an example of \"(p1 or p2(0)) and t1=t2(1)\"\n\ ;(! p1 (term Bool)\n\ ;(! p2 (term (arrow Int Bool))\n\ ;(! t1 (term Int)\n\ ;(! t2 (term (arrow Int Int))\n\ ;(! F (th_holds (and (or (p_app p1) (p_app (apply _ _ p2 0)))\n\ ; (= _ t1 (apply _ _ t2 1))))\n\ ; ...\n\ \n\ ; another example of \"p3(a,b)\"\n\ ;(! a (term Int)\n\ ;(! b (term Int)\n\ ;(! p3 (term (arrow Int (arrow Int Bool))) ; arrow is right assoc.\n\ ;(! F (th_holds (p_app (apply _ _ (apply _ _ p3 a) b))) ; apply is left assoc.\n\ ; ...\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;\n\ ; Theory of Arrays\n\ ;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ; depends on : th_base.plf\n\ \n\ ; sorts\n\ \n\ (declare Array (! s1 sort (! s2 sort sort))) ; s1 is index, s2 is element\n\ \n\ ; functions\n\ (declare write (! s1 sort\n\ (! s2 sort\n\ (term (arrow (Array s1 s2)\n\ (arrow s1\n\ (arrow s2 (Array s1 s2))))))))\n\ \n\ (declare read (! s1 sort\n\ (! s2 sort\n\ (term (arrow (Array s1 s2)\n\ (arrow s1 s2))))))\n\ \n\ ; inference rules\n\ \n\ ; read( a[i] = b, i ) == b\n\ (declare row1 (! s1 sort\n\ (! s2 sort\n\ (! t1 (term (Array s1 s2))\n\ (! t2 (term s1)\n\ (! t3 (term s2)\n\ (th_holds (= _\n\ (apply _ _ (apply _ _ (read s1 s2) (apply _ _ (apply _ _ (apply _ _ (write s1 s2) t1) t2) t3)) t2) t3))))))))\n\ \n\ ; read( a[i] = b, j ) == read( a, j ) if i != j\n\ (declare row (! s1 sort\n\ (! s2 sort\n\ (! t2 (term s1)\n\ (! t3 (term s1)\n\ (! t1 (term (Array s1 s2))\n\ (! t4 (term s2)\n\ (! u (th_holds (not (= _ t2 t3)))\n\ (th_holds (= _ (apply _ _ (apply _ _ (read s1 s2) (apply _ _ (apply _ _ (apply _ _ (write s1 s2) t1) t2) t4)) t3)\n\ (apply _ _ (apply _ _ (read s1 s2) t1) t3)))))))))))\n\ \n\ ; i == j if read( a, j ) != read( a[i] = b, j )\n\ (declare negativerow (! s1 sort\n\ (! s2 sort\n\ (! t2 (term s1)\n\ (! t3 (term s1)\n\ (! t1 (term (Array s1 s2))\n\ (! t4 (term s2)\n\ (! u (th_holds (not (= _\n\ (apply _ _ (apply _ _ (read s1 s2) (apply _ _ (apply _ _ (apply _ _ (write s1 s2) t1) t2) t4)) t3)\n\ (apply _ _ (apply _ _ (read s1 s2) t1) t3))))\n\ (th_holds (= _ t2 t3))))))))))\n\ \n\ (declare ext (! s1 sort\n\ (! s2 sort\n\ (! t1 (term (Array s1 s2))\n\ (! t2 (term (Array s1 s2))\n\ (! u1 (! k (term s1)\n\ (! u2 (th_holds (or (= _ t1 t2) (not (= _ (apply _ _ (apply _ _ (read s1 s2) t1) k) (apply _ _ (apply _ _ (read s1 s2) t2) k)))))\n\ (holds cln)))\n\ (holds cln)))))))\n\ ;;;; TEMPORARY:\n\ \n\ (declare trust-bad (th_holds false))\n\ \n\ ; helper stuff\n\ (program mpz_sub ((x mpz) (y mpz)) mpz\n\ (mp_add x (mp_mul (~1) y)))\n\ \n\ (program mp_ispos ((x mpz)) formula\n\ (mp_ifneg x false true))\n\ \n\ (program mpz_eq ((x mpz) (y mpz)) formula\n\ (mp_ifzero (mpz_sub x y) true false))\n\ \n\ (program mpz_lt ((x mpz) (y mpz)) formula\n\ (mp_ifneg (mpz_sub x y) true false))\n\ \n\ (program mpz_lte ((x mpz) (y mpz)) formula\n\ (mp_ifneg (mpz_sub x y) true (mpz_eq x y)))\n\ \n\ (program mpz_ ((x mpz) (y mpz)) formula\n\ (mp_ifzero (mpz_sub x y) true false))\n\ \n\ \n\ ; \"bitvec\" is a term of type \"sort\"\n\ ; (declare BitVec sort)\n\ (declare BitVec (!n mpz sort))\n\ \n\ ; bit type\n\ (declare bit type)\n\ (declare b0 bit)\n\ (declare b1 bit)\n\ \n\ ; bit vector type used for constants\n\ (declare bv type)\n\ (declare bvn bv)\n\ (declare bvc (! b bit (! v bv bv)))\n\ \n\ ; calculate the length of a bitvector\n\ ;; (program bv_len ((v bv)) mpz\n\ ;; (match v\n\ ;; (bvn 0)\n\ ;; ((bvc b v') (mp_add (bv_len v') 1))))\n\ \n\ \n\ ; a bv constant term\n\ (declare a_bv\n\ (! n mpz\n\ (! v bv\n\ (term (BitVec n)))))\n\ \n\ (program bv_constants_are_disequal ((x bv) (y bv)) formula\n\ (match x\n\ (bvn (fail formula))\n\ ((bvc bx x')\n\ (match y\n\ (bvn (fail formula))\n\ ((bvc by y') (match bx\n\ (b0 (match by (b0 (bv_constants_are_disequal x' y')) (b1 (true))))\n\ (b1 (match by (b0 (true)) (b1 (bv_constants_are_disequal x' y'))))\n\ ))\n\ ))\n\ ))\n\ \n\ (declare bv_disequal_constants\n\ (! n mpz\n\ (! x bv\n\ (! y bv\n\ (! c (^ (bv_constants_are_disequal x y) true)\n\ (th_holds (not (= (BitVec n) (a_bv n x) (a_bv n y)))))))))\n\ \n\ ; a bv variable\n\ (declare var_bv type)\n\ ; a bv variable term\n\ (declare a_var_bv\n\ (! n mpz\n\ (! v var_bv\n\ (term (BitVec n)))))\n\ \n\ ; bit vector binary operators\n\ (define bvop2\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (term (BitVec n))))))\n\ \n\ (declare bvand bvop2)\n\ (declare bvor bvop2)\n\ (declare bvor bvop2)\n\ (declare bvxor bvop2)\n\ (declare bvnand bvop2)\n\ (declare bvnor bvop2)\n\ (declare bvxnor bvop2)\n\ (declare bvmul bvop2)\n\ (declare bvadd bvop2)\n\ (declare bvsub bvop2)\n\ (declare bvudiv bvop2)\n\ (declare bvurem bvop2)\n\ (declare bvsdiv bvop2)\n\ (declare bvsrem bvop2)\n\ (declare bvsmod bvop2)\n\ (declare bvshl bvop2)\n\ (declare bvlshr bvop2)\n\ (declare bvashr bvop2)\n\ (declare concat bvop2)\n\ \n\ ; bit vector unary operators\n\ (define bvop1\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (term (BitVec n)))))\n\ \n\ \n\ (declare bvneg bvop1)\n\ (declare bvnot bvop1)\n\ (declare rotate_left bvop1)\n\ (declare rotate_right bvop1)\n\ \n\ (declare bvcomp\n\ (! n mpz\n\ (! t1 (term (BitVec n))\n\ (! t2 (term (BitVec n))\n\ (term (BitVec 1))))))\n\ \n\ \n\ (declare concat\n\ (! n mpz\n\ (! m mpz\n\ (! m' mpz\n\ (! t1 (term (BitVec m))\n\ (! t2 (term (BitVec m'))\n\ (term (BitVec n))))))))\n\ \n\ ;; side-condition fails in signature only??\n\ ;; (! s (^ (mp_add m m') n)\n\ \n\ ;; (declare repeat bvopp)\n\ \n\ (declare extract\n\ (! n mpz\n\ (! i mpz\n\ (! j mpz\n\ (! m mpz\n\ (! t2 (term (BitVec m))\n\ (term (BitVec n))))))))\n\ \n\ (declare zero_extend\n\ (! n mpz\n\ (! i mpz\n\ (! m mpz\n\ (! t2 (term (BitVec m))\n\ (term (BitVec n)))))))\n\ \n\ (declare sign_extend\n\ (! n mpz\n\ (! i mpz\n\ (! m mpz\n\ (! t2 (term (BitVec m))\n\ (term (BitVec n)))))))\n\ \n\ (declare repeat\n\ (! n mpz\n\ (! i mpz\n\ (! m mpz\n\ (! t2 (term (BitVec m))\n\ (term (BitVec n)))))))\n\ \n\ \n\ \n\ ;; TODO: add checks for valid typing for these operators\n\ ;; (! c1 (^ (mpz_lte i j)\n\ ;; (! c2 (^ (mpz_lt i n) true)\n\ ;; (! c3 (^ (mp_ifneg i false true) true)\n\ ;; (! c4 (^ (mp_ifneg j false true) true)\n\ ;; (! s (^ (mp_add (mpz_sub i j) 1) m)\n\ \n\ \n\ ; bit vector predicates\n\ (define bvpred\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ formula))))\n\ \n\ (declare bvult bvpred)\n\ (declare bvule bvpred)\n\ (declare bvugt bvpred)\n\ (declare bvuge bvpred)\n\ (declare bvslt bvpred)\n\ (declare bvsle bvpred)\n\ (declare bvsgt bvpred)\n\ (declare bvsge bvpred)\n\ ; bit blasted terms as list of formulas\n\ (declare bblt type)\n\ (declare bbltn bblt)\n\ (declare bbltc (! f formula (! v bblt bblt)))\n\ \n\ ; calculate the length of a bit-blasted term\n\ (program bblt_len ((v bblt)) mpz\n\ (match v\n\ (bbltn 0)\n\ ((bbltc b v') (mp_add (bblt_len v') 1))))\n\ \n\ \n\ ; (bblast_term x y) means term y corresponds to bit level interpretation x\n\ (declare bblast_term\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y bblt\n\ type))))\n\ \n\ ; FIXME: for unsupported bit-blast terms\n\ (declare trust_bblast_term\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y bblt\n\ (bblast_term n x y)))))\n\ \n\ \n\ ; Binds a symbol to the bblast_term to be used later on.\n\ (declare decl_bblast\n\ (! n mpz\n\ (! b bblt\n\ (! t (term (BitVec n))\n\ (! bb (bblast_term n t b)\n\ (! s (^ (bblt_len b) n)\n\ (! u (! v (bblast_term n t b) (holds cln))\n\ (holds cln))))))))\n\ \n\ (declare decl_bblast_with_alias\n\ (! n mpz\n\ (! b bblt\n\ (! t (term (BitVec n))\n\ (! a (term (BitVec n))\n\ (! bb (bblast_term n t b)\n\ (! e (th_holds (= _ t a))\n\ (! s (^ (bblt_len b) n)\n\ (! u (! v (bblast_term n a b) (holds cln))\n\ (holds cln))))))))))\n\ \n\ ; a predicate to represent the n^th bit of a bitvector term\n\ (declare bitof\n\ (! x var_bv\n\ (! n mpz formula)))\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;;\n\ ;; BITBLASTING RULES\n\ ;;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST CONSTANT\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_const ((v bv) (n mpz)) bblt\n\ (mp_ifneg n (match v (bvn bbltn)\n\ (default (fail bblt)))\n\ (match v ((bvc b v') (bbltc (match b (b0 false) (b1 true)) (bblast_const v' (mp_add n (~ 1)))))\n\ (default (fail bblt)))))\n\ \n\ (declare bv_bbl_const (! n mpz\n\ (! f bblt\n\ (! v bv\n\ (! c (^ (bblast_const v (mp_add n (~ 1))) f)\n\ (bblast_term n (a_bv n v) f))))))\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST VARIABLE\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_var ((x var_bv) (n mpz)) bblt\n\ (mp_ifneg n bbltn\n\ (bbltc (bitof x n) (bblast_var x (mp_add n (~ 1))))))\n\ \n\ (declare bv_bbl_var (! n mpz\n\ (! x var_bv\n\ (! f bblt\n\ (! c (^ (bblast_var x (mp_add n (~ 1))) f)\n\ (bblast_term n (a_var_bv n x) f))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST CONCAT\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_concat ((x bblt) (y bblt)) bblt\n\ (match x\n\ (bbltn (match y ((bbltc by y') (bbltc by (bblast_concat x y')))\n\ (bbltn bbltn)))\n\ ((bbltc bx x') (bbltc bx (bblast_concat x' y)))))\n\ \n\ (declare bv_bbl_concat (! n mpz\n\ (! m mpz\n\ (! m1 mpz\n\ (! x (term (BitVec m))\n\ (! y (term (BitVec m1))\n\ (! xb bblt\n\ (! yb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term m x xb)\n\ (! ybb (bblast_term m1 y yb)\n\ (! c (^ (bblast_concat xb yb ) rb)\n\ (bblast_term n (concat n m m1 x y) rb)))))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST EXTRACT\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_extract_rec ((x bblt) (i mpz) (j mpz) (n mpz)) bblt\n\ (match x\n\ ((bbltc bx x') (mp_ifneg (mpz_sub (mpz_sub j n) 1)\n\ (mp_ifneg (mpz_sub (mpz_sub n i) 1)\n\ (bbltc bx (bblast_extract_rec x' i j (mpz_sub n 1)))\n\ (bblast_extract_rec x' i j (mpz_sub n 1)))\n\ \n\ bbltn))\n\ (bbltn bbltn)))\n\ \n\ (program bblast_extract ((x bblt) (i mpz) (j mpz) (n mpz)) bblt\n\ (bblast_extract_rec x i j (mpz_sub n 1)))\n\ \n\ (declare bv_bbl_extract (! n mpz\n\ (! i mpz\n\ (! j mpz\n\ (! m mpz\n\ (! x (term (BitVec m))\n\ (! xb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term m x xb)\n\ (! c ( ^ (bblast_extract xb i j m) rb)\n\ (bblast_term n (extract n i j m x) rb)))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST ZERO/SIGN EXTEND\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program extend_rec ((x bblt) (i mpz) (b formula)) bblt\n\ (mp_ifneg i x\n\ (bbltc b (extend_rec x (mpz_sub i 1) b)))))\n\ \n\ (program bblast_zextend ((x bblt) (i mpz)) bblt\n\ (extend_rec x (mpz_sub i 1) false))\n\ \n\ (declare bv_bbl_zero_extend (! n mpz\n\ (! k mpz\n\ (! m mpz\n\ (! x (term (BitVec m))\n\ (! xb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term m x xb)\n\ (! c ( ^ (bblast_zextend xb k m) rb)\n\ (bblast_term n (zero_extend n k m x) rb))))))))))\n\ \n\ (program bblast_sextend ((x bblt) (i mpz)) bblt\n\ (match x (bbltn (fail bblt))\n\ ((bbltc xb x') (extend_rec x (mpz_sub i 1) xb))))\n\ \n\ (declare bv_bbl_sign_extend (! n mpz\n\ (! k mpz\n\ (! m mpz\n\ (! x (term (BitVec m))\n\ (! xb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term m x xb)\n\ (! c ( ^ (bblast_sextend xb k) rb)\n\ (bblast_term n (sign_extend n k m x) rb))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVAND\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_bvand ((x bblt) (y bblt)) bblt\n\ (match x\n\ (bbltn (match y (bbltn bbltn) (default (fail bblt))))\n\ ((bbltc bx x') (match y\n\ (bbltn (fail bblt))\n\ ((bbltc by y') (bbltc (and bx by) (bblast_bvand x' y')))))))\n\ \n\ (declare bv_bbl_bvand (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! xb bblt\n\ (! yb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! ybb (bblast_term n y yb)\n\ (! c (^ (bblast_bvand xb yb ) rb)\n\ (bblast_term n (bvand n x y) rb)))))))))))\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVNOT\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_bvnot ((x bblt)) bblt\n\ (match x\n\ (bbltn bbltn)\n\ ((bbltc bx x') (bbltc (not bx) (bblast_bvnot x')))))\n\ \n\ (declare bv_bbl_bvnot (! n mpz\n\ (! x (term (BitVec n))\n\ (! xb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! c (^ (bblast_bvnot xb ) rb)\n\ (bblast_term n (bvnot n x) rb))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVOR\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_bvor ((x bblt) (y bblt)) bblt\n\ (match x\n\ (bbltn (match y (bbltn bbltn) (default (fail bblt))))\n\ ((bbltc bx x') (match y\n\ (bbltn (fail bblt))\n\ ((bbltc by y') (bbltc (or bx by) (bblast_bvor x' y')))))))\n\ \n\ (declare bv_bbl_bvor (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! xb bblt\n\ (! yb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! ybb (bblast_term n y yb)\n\ (! c (^ (bblast_bvor xb yb ) rb)\n\ (bblast_term n (bvor n x y) rb)))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVXOR\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_bvxor ((x bblt) (y bblt)) bblt\n\ (match x\n\ (bbltn (match y (bbltn bbltn) (default (fail bblt))))\n\ ((bbltc bx x') (match y\n\ (bbltn (fail bblt))\n\ ((bbltc by y') (bbltc (xor bx by) (bblast_bvxor x' y')))))))\n\ \n\ (declare bv_bbl_bvxor (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! xb bblt\n\ (! yb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! ybb (bblast_term n y yb)\n\ (! c (^ (bblast_bvxor xb yb ) rb)\n\ (bblast_term n (bvxor n x y) rb)))))))))))\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVADD\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ ;; return the carry bit after adding x y\n\ ;; FIXME: not the most efficient thing in the world\n\ (program bblast_bvadd_carry ((a bblt) (b bblt) (carry formula)) formula\n\ (match a\n\ ( bbltn (match b (bbltn carry) (default (fail formula))))\n\ ((bbltc ai a') (match b\n\ (bbltn (fail formula))\n\ ((bbltc bi b') (or (and ai bi) (and (xor ai bi) (bblast_bvadd_carry a' b' carry))))))))\n\ \n\ ;; ripple carry adder where carry is the initial carry bit\n\ (program bblast_bvadd ((a bblt) (b bblt) (carry formula)) bblt\n\ (match a\n\ ( bbltn (match b (bbltn bbltn) (default (fail bblt))))\n\ ((bbltc ai a') (match b\n\ (bbltn (fail bblt))\n\ ((bbltc bi b') (bbltc (xor (xor ai bi) (bblast_bvadd_carry a' b' carry))\n\ (bblast_bvadd a' b' carry)))))))\n\ \n\ \n\ (program reverse_help ((x bblt) (acc bblt)) bblt\n\ (match x\n\ (bbltn acc)\n\ ((bbltc xi x') (reverse_help x' (bbltc xi acc)))))\n\ \n\ \n\ (program reverseb ((x bblt)) bblt\n\ (reverse_help x bbltn))\n\ \n\ \n\ ; AJR: use this version?\n\ ;(program bblast_bvadd_2h ((a bblt) (b bblt) (carry formula)) bblt\n\ ;(match a\n\ ; ( bbltn (match b (bbltn bbltn) (default (fail bblt))))\n\ ; ((bbltc ai a') (match b\n\ ; (bbltn (fail bblt))\n\ ; ((bbltc bi b')\n\ ; (let carry' (or (and ai bi) (and (xor ai bi) carry))\n\ ; (bbltc (xor (xor ai bi) carry)\n\ ; (bblast_bvadd_2h a' b' carry'))))))))\n\ \n\ ;(program bblast_bvadd_2 ((a bblt) (b bblt) (carry formula)) bblt\n\ ;(let ar (reverseb a) ;; reverse a and b so that we can build the circuit\n\ ;(let br (reverseb b) ;; from the least significant bit up\n\ ;(let ret (bblast_bvadd_2h ar br carry)\n\ ; (reverseb ret)))))\n\ \n\ (declare bv_bbl_bvadd (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! xb bblt\n\ (! yb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! ybb (bblast_term n y yb)\n\ (! c (^ (bblast_bvadd xb yb false) rb)\n\ (bblast_term n (bvadd n x y) rb)))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVNEG\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_zero ((n mpz)) bblt\n\ (mp_ifzero n bbltn\n\ (bbltc false (bblast_zero (mp_add n (~1))))))\n\ \n\ (program bblast_bvneg ((x bblt) (n mpz)) bblt\n\ (bblast_bvadd (bblast_bvnot x) (bblast_zero n) true))\n\ \n\ \n\ (declare bv_bbl_bvneg (! n mpz\n\ (! x (term (BitVec n))\n\ (! xb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! c (^ (bblast_bvneg xb n) rb)\n\ (bblast_term n (bvneg n x) rb))))))))\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVMUL\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ \n\ ;; shift add multiplier\n\ \n\ ;; (program concat ((a bblt) (b bblt)) bblt\n\ ;; (match a (bbltn b)\n\ ;; ((bbltc ai a') (bbltc ai (concat a' b)))))\n\ \n\ \n\ (program top_k_bits ((a bblt) (k mpz)) bblt\n\ (mp_ifzero k bbltn\n\ (match a (bbltn (fail bblt))\n\ ((bbltc ai a') (bbltc ai (top_k_bits a' (mpz_sub k 1)))))))\n\ \n\ (program bottom_k_bits ((a bblt) (k mpz)) bblt\n\ (reverseb (top_k_bits (reverseb a) k)))\n\ \n\ ;; assumes the least signigicant bit is at the beginning of the list\n\ (program k_bit ((a bblt) (k mpz)) formula\n\ (mp_ifneg k (fail formula)\n\ (match a (bbltn (fail formula))\n\ ((bbltc ai a') (mp_ifzero k ai (k_bit a' (mpz_sub k 1)))))))\n\ \n\ (program and_with_bit ((a bblt) (bt formula)) bblt\n\ (match a (bbltn bbltn)\n\ ((bbltc ai a') (bbltc (and bt ai) (and_with_bit a' bt)))))\n\ \n\ ;; a is going to be the current result\n\ ;; carry is going to be false initially\n\ ;; b is the and of a and b[k]\n\ ;; res is going to be bbltn initially\n\ (program mult_step_k_h ((a bblt) (b bblt) (res bblt) (carry formula) (k mpz)) bblt\n\ (match a\n\ (bbltn (match b (bbltn res) (default (fail bblt))))\n\ ((bbltc ai a')\n\ (match b (bbltn (fail bblt))\n\ ((bbltc bi b')\n\ (mp_ifneg (mpz_sub k 1)\n\ (let carry_out (or (and ai bi) (and (xor ai bi) carry))\n\ (let curr (xor (xor ai bi) carry)\n\ (mult_step_k_h a' b' (bbltc curr res) carry_out (mpz_sub k 1))))\n\ (mult_step_k_h a' b (bbltc ai res) carry (mpz_sub k 1))\n\ ))))))\n\ \n\ ;; assumes that a, b and res have already been reversed\n\ (program mult_step ((a bblt) (b bblt) (res bblt) (n mpz) (k mpz)) bblt\n\ (let k' (mpz_sub n k )\n\ (let ak (top_k_bits a k')\n\ (let b' (and_with_bit ak (k_bit b k))\n\ (mp_ifzero (mpz_sub k' 1)\n\ (mult_step_k_h res b' bbltn false k)\n\ (let res' (mult_step_k_h res b' bbltn false k)\n\ (mult_step a b (reverseb res') n (mp_add k 1))))))))\n\ \n\ \n\ (program bblast_bvmul ((a bblt) (b bblt) (n mpz)) bblt\n\ (let ar (reverseb a) ;; reverse a and b so that we can build the circuit\n\ (let br (reverseb b) ;; from the least significant bit up\n\ (let res (and_with_bit ar (k_bit br 0))\n\ (mp_ifzero (mpz_sub n 1) ;; if multiplying 1 bit numbers no need to call mult_step\n\ res\n\ (mult_step ar br res n 1))))))\n\ \n\ (declare bv_bbl_bvmul (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! xb bblt\n\ (! yb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! ybb (bblast_term n y yb)\n\ (! c (^ (bblast_bvmul xb yb n) rb)\n\ (bblast_term n (bvmul n x y) rb)))))))))))\n\ \n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST EQUALS\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ ; bit blast x = y\n\ ; for x,y of size n, it will return a conjunction (x.0 = y.0 ^ ( ... ^ (x.{n-1} = y.{n-1})))\n\ ; f is the accumulator formula that builds the equality in the right order\n\ (program bblast_eq_rec ((x bblt) (y bblt) (f formula)) formula\n\ (match x\n\ (bbltn (match y (bbltn f) (default (fail formula))))\n\ ((bbltc fx x') (match y\n\ (bbltn (fail formula))\n\ ((bbltc fy y') (bblast_eq_rec x' y' (and (iff fx fy) f)))))\n\ (default (fail formula))))\n\ \n\ (program bblast_eq ((x bblt) (y bblt)) formula\n\ (match x\n\ ((bbltc bx x') (match y ((bbltc by y') (bblast_eq_rec x' y' (iff bx by)))\n\ (default (fail formula))))\n\ (default (fail formula))))\n\ \n\ \n\ ;; TODO: a temporary bypass for rewrites that we don't support yet. As soon\n\ ;; as we do, remove this rule.\n\ \n\ (declare bv_bbl_=_false\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! bx bblt\n\ (! by bblt\n\ (! f formula\n\ (! bbx (bblast_term n x bx)\n\ (! bby (bblast_term n y by)\n\ (! c (^ (bblast_eq bx by) f)\n\ (th_holds (iff (= (BitVec n) x y) false))))))))))))\n\ \n\ (declare bv_bbl_=\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! bx bblt\n\ (! by bblt\n\ (! f formula\n\ (! bbx (bblast_term n x bx)\n\ (! bby (bblast_term n y by)\n\ (! c (^ (bblast_eq bx by) f)\n\ (th_holds (iff (= (BitVec n) x y) f))))))))))))\n\ \n\ (declare bv_bbl_=_swap\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! bx bblt\n\ (! by bblt\n\ (! f formula\n\ (! bbx (bblast_term n x bx)\n\ (! bby (bblast_term n y by)\n\ (! c (^ (bblast_eq by bx) f)\n\ (th_holds (iff (= (BitVec n) x y) f))))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVULT\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_bvult ((x bblt) (y bblt) (n mpz)) formula\n\ (match x\n\ ( bbltn (fail formula))\n\ ((bbltc xi x') (match y\n\ (bbltn (fail formula))\n\ ((bbltc yi y') (mp_ifzero n\n\ (and (not xi) yi)\n\ (or (and (iff xi yi) (bblast_bvult x' y' (mp_add n (~1)))) (and (not xi) yi))))))))\n\ \n\ (declare bv_bbl_bvult\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! bx bblt\n\ (! by bblt\n\ (! f formula\n\ (! bbx (bblast_term n x bx)\n\ (! bby (bblast_term n y by)\n\ (! c (^ (bblast_bvult bx by (mp_add n (~1))) f)\n\ (th_holds (iff (bvult n x y) f))))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVSLT\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_bvslt ((x bblt) (y bblt) (n mpz)) formula\n\ (match x\n\ ( bbltn (fail formula))\n\ ((bbltc xi x') (match y\n\ (bbltn (fail formula))\n\ ((bbltc yi y') (mp_ifzero (mpz_sub n 1)\n\ (and xi (not yi))\n\ (or (and (iff xi yi)\n\ (bblast_bvult x' y' (mpz_sub n 2)))\n\ (and xi (not yi)))))))))\n\ \n\ (declare bv_bbl_bvslt\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! bx bblt\n\ (! by bblt\n\ (! f formula\n\ (! bbx (bblast_term n x bx)\n\ (! bby (bblast_term n y by)\n\ (! c (^ (bblast_bvslt bx by n) f)\n\ (th_holds (iff (bvslt n x y) f))))))))))))\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;; BITBLAST BVCOMP\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ (program bblast_bvcomp ((x bblt) (y bblt) (n mpz)) bblt\n\ (match x ((bbltc bx x') (match y ((bbltc by y')\n\ (bbltc (bblast_eq_rec x' y' (iff bx by)) bbltn))\n\ (default (fail bblt))))\n\ (default (fail bblt))\n\ ))\n\ \n\ (declare bv_bbl_bvcomp (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (! xb bblt\n\ (! yb bblt\n\ (! rb bblt\n\ (! xbb (bblast_term n x xb)\n\ (! ybb (bblast_term n y yb)\n\ (! c (^ (bblast_bvcomp xb yb n) rb)\n\ (bblast_term 1 (bvcomp n x y) rb)))))))))))\n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;;\n\ ;; BITBLASTING CONNECTORS\n\ ;;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ \n\ ; bit-blasting connections\n\ \n\ (declare intro_assump_t\n\ (! f formula\n\ (! v var\n\ (! C clause\n\ (! h (th_holds f)\n\ (! a (atom v f)\n\ (! u (! unit (holds (clc (pos v) cln))\n\ (holds C))\n\ (holds C))))))))\n\ \n\ (declare intro_assump_f\n\ (! f formula\n\ (! v var\n\ (! C clause\n\ (! h (th_holds (not f))\n\ (! a (atom v f)\n\ (! u (! unit (holds (clc (neg v) cln))\n\ (holds C))\n\ (holds C))))))))\n\ \n\ \n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ ;;\n\ ;; REWRITE RULES\n\ ;;\n\ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\ \n\ \n\ ; rewrite rule :\n\ ; x + y = y + x\n\ (declare bvadd_symm\n\ (! n mpz\n\ (! x (term (BitVec n))\n\ (! y (term (BitVec n))\n\ (th_holds (= (BitVec n) (bvadd _ x y) (bvadd _ y x)))))))\n\ \n\ ;; (declare bvcrazy_rewrite\n\ ;; (! n mpz\n\ ;; (! x (term (BitVec n))\n\ ;; (! y (term (BitVec n))\n\ ;; (! xn bv_poly\n\ ;; (! yn bv_poly\n\ ;; (! hxn (bv_normalizes x xn)\n\ ;; (! hyn (bv_normalizes y yn)\n\ ;; (! s (^ (rewrite_scc xn yn) true)\n\ ;; (! u (! x (term (BitVec n)) (holds cln))\n\ ;; (holds cln)))))))))))\n\ \n\ ;; (th_holds (= (BitVec n) (bvadd x y) (bvadd y x)))))))\n\ \n\ \n\ \n\ ; necessary?\n\ ;; (program calc_bvand ((a bv) (b bv)) bv\n\ ;; (match a\n\ ;; (bvn (match b (bvn bvn) (default (fail bv))))\n\ ;; ((bvc ba a') (match b\n\ ;; ((bvc bb b') (bvc (match ba (b0 b0) (b1 bb)) (calc_bvand a' b')))\n\ ;; (default (fail bv))))))\n\ \n\ ;; ; rewrite rule (w constants) :\n\ ;; ; a & b = c\n\ ;; (declare bvand_const (! c bv\n\ ;; (! a bv\n\ ;; (! b bv\n\ ;; (! u (^ (calc_bvand a b) c)\n\ ;; (th_holds (= BitVec (bvand (a_bv a) (a_bv b)) (a_bv c))))))))\n\ \n\ \n\ ;; making constant bit-vectors\n\ (program mk_ones ((n mpz)) bv\n\ (mp_ifzero n bvn (bvc b1 (mk_ones (mpz_sub n 1)))))\n\ \n\ (program mk_zero ((n mpz)) bv\n\ (mp_ifzero n bvn (bvc b0 (mk_ones (mpz_sub n 1)))))\n\ \n\ \n\ \n\ ;; (bvxnor a b) => (bvnot (bvxor a b))\n\ ;; (declare bvxnor_elim\n\ ;; (! n mpz\n\ ;; (! a (term (BitVec n))\n\ ;; (! b (term (BitVec n))\n\ ;; (! a' (term (BitVec n))\n\ ;; (! b' (term (BitVec n))\n\ ;; (! rwa (rw_term _ a a')\n\ ;; (! rwb (rw_term _ b b')\n\ ;; (rw_term n (bvxnor _ a b)\n\ ;; (bvnot _ (bvxor _ a' b')))))))))))\n\ \n\ \n\ \n\ ;; ;; (bvxor a 0) => a\n\ ;; (declare bvxor_zero\n\ ;; (! n mpz\n\ ;; (! zero_bits bv\n\ ;; (! sc (^ (mk_zero n) zero_bits)\n\ ;; (! a (term (BitVec n))\n\ ;; (! b (term (BitVec n))\n\ ;; (! a' (term (BitVec n))\n\ ;; (! rwa (rw_term _ a a')\n\ ;; (! rwb (rw_term _ b (a_bv _ zero_bits))\n\ ;; (rw_term _ (bvxor _ a b)\n\ ;; a'))))))))))\n\ \n\ ;; ;; (bvxor a 11) => (bvnot a)\n\ ;; (declare bvxor_one\n\ ;; (! n mpz\n\ ;; (! one_bits bv\n\ ;; (! sc (^ (mk_ones n) one_bits)\n\ ;; (! a (term (BitVec n))\n\ ;; (! b (term (BitVec n))\n\ ;; (! a' (term (BitVec n))\n\ ;; (! rwa (rw_term _ a a')\n\ ;; (! rwb (rw_term _ b (a_bv _ one_bits))\n\ ;; (rw_term _ (bvxor _ a b)\n\ ;; (bvnot _ a')))))))))))\n\ \n\ \n\ ;; ;; (bvnot (bvnot a)) => a\n\ ;; (declare bvnot_idemp\n\ ;; (! n mpz\n\ ;; (! a (term (BitVec n))\n\ ;; (! a' (term (BitVec n))\n\ ;; (! rwa (rw_term _ a a')\n\ ;; (rw_term _ (bvnot _ (bvnot _ a))\n\ ;; a'))))))\n\ ;\n\ ; Equality swap\n\ ;\n\ \n\ (declare rr_bv_eq\n\ (! n mpz\n\ (! t1 (term (BitVec n))\n\ (! t2 (term (BitVec n))\n\ (th_holds (iff (= (BitVec n) t2 t1) (= (BitVec n) t1 t2)))))))\n\ \n\ ;\n\ ; Additional rules...\n\ ;\n\ \n\ ;\n\ ; Default, if nothing else applied\n\ ;\n\ \n\ (declare rr_bv_default\n\ (! t1 formula\n\ (! t2 formula\n\ (th_holds (iff t1 t2))))))\n\ (declare Real sort)\n\ \n\ (define arithpred_Real (! x (term Real)\n\ (! y (term Real)\n\ formula)))\n\ \n\ (declare >_Real arithpred_Real)\n\ (declare >=_Real arithpred_Real)\n\ (declare <_Real arithpred_Real)\n\ (declare <=_Real arithpred_Real)\n\ \n\ (define arithterm_Real (! x (term Real)\n\ (! y (term Real)\n\ (term Real))))\n\ \n\ (declare +_Real arithterm_Real)\n\ (declare -_Real arithterm_Real)\n\ (declare *_Real arithterm_Real) ; is * ok to use?\n\ (declare /_Real arithterm_Real) ; is / ok to use?\n\ \n\ ; a constant term\n\ (declare a_real (! x mpq (term Real)))\n\ \n\ ; unary negation\n\ (declare u-_Real (! t (term Real) (term Real)))\n\ (declare Int sort)\n\ \n\ (define arithpred_Int (! x (term Int)\n\ (! y (term Int)\n\ formula)))\n\ \n\ (declare >_Int arithpred_Int)\n\ (declare >=_Int arithpred_Int)\n\ (declare <_Int arithpred_Int)\n\ (declare <=_Int arithpred_Int)\n\ \n\ (define arithterm_Int (! x (term Int)\n\ (! y (term Int)\n\ (term Int))))\n\ \n\ (declare +_Int arithterm_Int)\n\ (declare -_Int arithterm_Int)\n\ (declare *_Int arithterm_Int) ; is * ok to use?\n\ (declare /_Int arithterm_Int) ; is / ok to use?\n\ \n\ ; a constant term\n\ (declare a_int (! x mpz (term Int)))\n\ \n\ ; unary negation\n\ (declare u-_Int (! t (term Int) (term Int)))\n\ "; } /* CVC4::proof namespace */ } /* CVC4 namespace */ cvc4-1.5/proofs/signatures/smt.plf000066400000000000000000000256611313116454100172310ustar00rootroot00000000000000;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; SMT syntax and semantics (not theory-specific) ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; depends on sat.plf (declare formula type) (declare th_holds (! f formula type)) ; standard logic definitions (declare true formula) (declare false formula) (define formula_op1 (! f formula formula)) (define formula_op2 (! f1 formula (! f2 formula formula))) (define formula_op3 (! f1 formula (! f2 formula (! f3 formula formula)))) (declare not formula_op1) (declare and formula_op2) (declare or formula_op2) (declare impl formula_op2) (declare iff formula_op2) (declare xor formula_op2) (declare ifte formula_op3) ; terms (declare sort type) (declare term (! t sort type)) ; declared terms in formula ; standard definitions for =, ite, let and flet (declare = (! s sort (! x (term s) (! y (term s) formula)))) (declare ite (! s sort (! f formula (! t1 (term s) (! t2 (term s) (term s)))))) (declare let (! s sort (! t (term s) (! f (! v (term s) formula) formula)))) (declare flet (! f1 formula (! f2 (! v formula formula) formula))) ; We view applications of predicates as terms of sort "Bool". ; Such terms can be injected as atomic formulas using "p_app". (declare Bool sort) ; the special sort for predicates (declare p_app (! x (term Bool) formula)) ; propositional application of term ; boolean terms (declare t_true (term Bool)) (declare t_false (term Bool)) (declare t_t_neq_f (th_holds (not (= Bool t_true t_false)))) (declare pred_eq_t (! x (term Bool) (! u (th_holds (p_app x)) (th_holds (= Bool x t_true))))) (declare pred_eq_f (! x (term Bool) (! u (th_holds (not (p_app x))) (th_holds (= Bool x t_false))))) (declare f_to_b (! f formula (term Bool))) (declare true_preds_equal (! x1 (term Bool) (! x2 (term Bool) (! u1 (th_holds (p_app x1)) (! u2 (th_holds (p_app x2)) (th_holds (= Bool x1 x2))))))) (declare false_preds_equal (! x1 (term Bool) (! x2 (term Bool) (! u1 (th_holds (not (p_app x1))) (! u2 (th_holds (not (p_app x2))) (th_holds (= Bool x1 x2))))))) (declare pred_refl_pos (! x1 (term Bool) (! u1 (th_holds (p_app x1)) (th_holds (= Bool x1 x1))))) (declare pred_refl_neg (! x1 (term Bool) (! u1 (th_holds (not (p_app x1))) (th_holds (= Bool x1 x1))))) (declare pred_not_iff_f (! x (term Bool) (! u (th_holds (not (iff false (p_app x)))) (th_holds (= Bool t_true x))))) (declare pred_not_iff_f_2 (! x (term Bool) (! u (th_holds (not (iff (p_app x) false))) (th_holds (= Bool x t_true))))) (declare pred_not_iff_t (! x (term Bool) (! u (th_holds (not (iff true (p_app x)))) (th_holds (= Bool t_false x))))) (declare pred_not_iff_t_2 (! x (term Bool) (! u (th_holds (not (iff (p_app x) true))) (th_holds (= Bool x t_false))))) (declare pred_iff_f (! x (term Bool) (! u (th_holds (iff false (p_app x))) (th_holds (= Bool t_false x))))) (declare pred_iff_f_2 (! x (term Bool) (! u (th_holds (iff (p_app x) false)) (th_holds (= Bool x t_false))))) (declare pred_iff_t (! x (term Bool) (! u (th_holds (iff true (p_app x))) (th_holds (= Bool t_true x))))) (declare pred_iff_t_2 (! x (term Bool) (! u (th_holds (iff (p_app x) true)) (th_holds (= Bool x t_true))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; CNF Clausification ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; binding between an LF var and an (atomic) formula (declare atom (! v var (! p formula type))) ; binding between two LF vars (declare bvatom (! sat_v var (! bv_v var type))) (declare decl_atom (! f formula (! u (! v var (! a (atom v f) (holds cln))) (holds cln)))) ;; declare atom enhanced with mapping ;; between SAT prop variable and BVSAT prop variable (declare decl_bvatom (! f formula (! u (! v var (! bv_v var (! a (atom v f) (! bva (atom bv_v f) (! vbv (bvatom v bv_v) (holds cln)))))) (holds cln)))) ; clausify a formula directly (declare clausify_form (! f formula (! v var (! a (atom v f) (! u (th_holds f) (holds (clc (pos v) cln))))))) (declare clausify_form_not (! f formula (! v var (! a (atom v f) (! u (th_holds (not f)) (holds (clc (neg v) cln))))))) (declare clausify_false (! u (th_holds false) (holds cln))) (declare th_let_pf (! f formula (! u (th_holds f) (! u2 (! v (th_holds f) (holds cln)) (holds cln))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Natural deduction rules : used for CNF ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; for eager bit-blasting (declare iff_symm (! f formula (th_holds (iff f f)))) ;; contradiction (declare contra (! f formula (! r1 (th_holds f) (! r2 (th_holds (not f)) (th_holds false))))) ; truth (declare truth (th_holds true)) ;; not not (declare not_not_intro (! f formula (! u (th_holds f) (th_holds (not (not f)))))) (declare not_not_elim (! f formula (! u (th_holds (not (not f))) (th_holds f)))) ;; or elimination (declare or_elim_1 (! f1 formula (! f2 formula (! u1 (th_holds (not f1)) (! u2 (th_holds (or f1 f2)) (th_holds f2)))))) (declare or_elim_2 (! f1 formula (! f2 formula (! u1 (th_holds (not f2)) (! u2 (th_holds (or f1 f2)) (th_holds f1)))))) (declare not_or_elim (! f1 formula (! f2 formula (! u2 (th_holds (not (or f1 f2))) (th_holds (and (not f1) (not f2))))))) ;; and elimination (declare and_elim_1 (! f1 formula (! f2 formula (! u (th_holds (and f1 f2)) (th_holds f1))))) (declare and_elim_2 (! f1 formula (! f2 formula (! u (th_holds (and f1 f2)) (th_holds f2))))) (declare not_and_elim (! f1 formula (! f2 formula (! u2 (th_holds (not (and f1 f2))) (th_holds (or (not f1) (not f2))))))) ;; impl elimination (declare impl_intro (! f1 formula (! f2 formula (! i1 (! u (th_holds f1) (th_holds f2)) (th_holds (impl f1 f2)))))) (declare impl_elim (! f1 formula (! f2 formula (! u2 (th_holds (impl f1 f2)) (th_holds (or (not f1) f2)))))) (declare not_impl_elim (! f1 formula (! f2 formula (! u (th_holds (not (impl f1 f2))) (th_holds (and f1 (not f2))))))) ;; iff elimination (declare iff_elim_1 (! f1 formula (! f2 formula (! u1 (th_holds (iff f1 f2)) (th_holds (or (not f1) f2)))))) (declare iff_elim_2 (! f1 formula (! f2 formula (! u1 (th_holds (iff f1 f2)) (th_holds (or f1 (not f2))))))) (declare not_iff_elim (! f1 formula (! f2 formula (! u2 (th_holds (not (iff f1 f2))) (th_holds (iff f1 (not f2))))))) ; xor elimination (declare xor_elim_1 (! f1 formula (! f2 formula (! u1 (th_holds (xor f1 f2)) (th_holds (or (not f1) (not f2))))))) (declare xor_elim_2 (! f1 formula (! f2 formula (! u1 (th_holds (xor f1 f2)) (th_holds (or f1 f2)))))) (declare not_xor_elim (! f1 formula (! f2 formula (! u2 (th_holds (not (xor f1 f2))) (th_holds (iff f1 f2)))))) ;; ite elimination (declare ite_elim_1 (! a formula (! b formula (! c formula (! u2 (th_holds (ifte a b c)) (th_holds (or (not a) b))))))) (declare ite_elim_2 (! a formula (! b formula (! c formula (! u2 (th_holds (ifte a b c)) (th_holds (or a c))))))) (declare ite_elim_3 (! a formula (! b formula (! c formula (! u2 (th_holds (ifte a b c)) (th_holds (or b c))))))) (declare not_ite_elim_1 (! a formula (! b formula (! c formula (! u2 (th_holds (not (ifte a b c))) (th_holds (or (not a) (not b)))))))) (declare not_ite_elim_2 (! a formula (! b formula (! c formula (! u2 (th_holds (not (ifte a b c))) (th_holds (or a (not c)))))))) (declare not_ite_elim_3 (! a formula (! b formula (! c formula (! u2 (th_holds (not (ifte a b c))) (th_holds (or (not b) (not c)))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; For theory lemmas ; - make a series of assumptions and then derive a contradiction (or false) ; - then the assumptions yield a formula like "v1 -> v2 -> ... -> vn -> false" ; - In CNF, it becomes a clause: "~v1, ~v2, ..., ~vn" ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (declare ast (! v var (! f formula (! C clause (! r (atom v f) ;this is specified (! u (! o (th_holds f) (holds C)) (holds (clc (neg v) C)))))))) (declare asf (! v var (! f formula (! C clause (! r (atom v f) (! u (! o (th_holds (not f)) (holds C)) (holds (clc (pos v) C)))))))) ;; Bitvector lemma constructors to assume ;; the unit clause containing the assumptions ;; it also requires the mapping between bv_v and v ;; The resolution proof proving false will use bv_v as the definition clauses use bv_v ;; but the Problem clauses in the main SAT solver will use v so the learned clause is in terms of v (declare bv_asf (! v var (! bv_v var (! f formula (! C clause (! r (atom v f) ;; passed in (! x (bvatom v bv_v) ; establishes the equivalence of v to bv_ (! u (! o (holds (clc (neg bv_v) cln)) ;; l binding to be used in proof (holds C)) (holds (clc (pos v) C)))))))))) (declare bv_ast (! v var (! bv_v var (! f formula (! C clause (! r (atom v f) ; this is specified (! x (bvatom v bv_v) ; establishes the equivalence of v to bv_v (! u (! o (holds (clc (pos bv_v) cln)) (holds C)) (holds (clc (neg v) C)))))))))) ;; Example: ;; ;; Given theory literals (F1....Fn), and an input formula A of the form (th_holds (or F1 (or F2 .... (or F{n-1} Fn))))). ;; ;; We introduce atoms (a1,...,an) to map boolean literals (v1,...,vn) top literals (F1,...,Fn). ;; Do this at the beginning of the proof: ;; ;; (decl_atom F1 (\ v1 (\ a1 ;; (decl_atom F2 (\ v2 (\ a2 ;; .... ;; (decl_atom Fn (\ vn (\ an ;; ;; A is then clausified by the following proof: ;; ;;(satlem _ _ ;;(asf _ _ _ a1 (\ l1 ;;(asf _ _ _ a2 (\ l2 ;;... ;;(asf _ _ _ an (\ ln ;;(clausify_false ;; ;; (contra _ ;; (or_elim_1 _ _ l{n-1} ;; ... ;; (or_elim_1 _ _ l2 ;; (or_elim_1 _ _ l1 A))))) ln) ;; ;;))))))) (\ C ;; ;; We now have the free variable C, which should be the clause (v1 V ... V vn). ;; ;; Polarity of literals should be considered, say we have A of the form (th_holds (or (not F1) (or F2 (not F3)))). ;; Where necessary, we use "ast" instead of "asf", introduce negations by "not_not_intro" for pattern matching, and flip ;; the arguments of contra: ;; ;;(satlem _ _ ;;(ast _ _ _ a1 (\ l1 ;;(asf _ _ _ a2 (\ l2 ;;(ast _ _ _ a3 (\ l3 ;;(clausify_false ;; ;; (contra _ l3 ;; (or_elim_1 _ _ l2 ;; (or_elim_1 _ _ (not_not_intro l1) A)))) ;; ;;))))))) (\ C ;; ;; C should be the clause (~v1 V v2 V ~v3 ) cvc4-1.5/proofs/signatures/th_arrays.plf000066400000000000000000000044771313116454100204240ustar00rootroot00000000000000;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Theory of Arrays ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; depends on : th_base.plf ; sorts (declare Array (! s1 sort (! s2 sort sort))) ; s1 is index, s2 is element ; functions (declare write (! s1 sort (! s2 sort (term (arrow (Array s1 s2) (arrow s1 (arrow s2 (Array s1 s2)))))))) (declare read (! s1 sort (! s2 sort (term (arrow (Array s1 s2) (arrow s1 s2)))))) ; inference rules ; read( a[i] = b, i ) == b (declare row1 (! s1 sort (! s2 sort (! t1 (term (Array s1 s2)) (! t2 (term s1) (! t3 (term s2) (th_holds (= _ (apply _ _ (apply _ _ (read s1 s2) (apply _ _ (apply _ _ (apply _ _ (write s1 s2) t1) t2) t3)) t2) t3)))))))) ; read( a[i] = b, j ) == read( a, j ) if i != j (declare row (! s1 sort (! s2 sort (! t2 (term s1) (! t3 (term s1) (! t1 (term (Array s1 s2)) (! t4 (term s2) (! u (th_holds (not (= _ t2 t3))) (th_holds (= _ (apply _ _ (apply _ _ (read s1 s2) (apply _ _ (apply _ _ (apply _ _ (write s1 s2) t1) t2) t4)) t3) (apply _ _ (apply _ _ (read s1 s2) t1) t3))))))))))) ; i == j if read( a, j ) != read( a[i] = b, j ) (declare negativerow (! s1 sort (! s2 sort (! t2 (term s1) (! t3 (term s1) (! t1 (term (Array s1 s2)) (! t4 (term s2) (! u (th_holds (not (= _ (apply _ _ (apply _ _ (read s1 s2) (apply _ _ (apply _ _ (apply _ _ (write s1 s2) t1) t2) t4)) t3) (apply _ _ (apply _ _ (read s1 s2) t1) t3)))) (th_holds (= _ t2 t3)))))))))) (declare ext (! s1 sort (! s2 sort (! t1 (term (Array s1 s2)) (! t2 (term (Array s1 s2)) (! u1 (! k (term s1) (! u2 (th_holds (or (= _ t1 t2) (not (= _ (apply _ _ (apply _ _ (read s1 s2) t1) k) (apply _ _ (apply _ _ (read s1 s2) t2) k))))) (holds cln))) (holds cln))))))) cvc4-1.5/proofs/signatures/th_base.plf000066400000000000000000000053051313116454100200240ustar00rootroot00000000000000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Theory of Equality and Congruence Closure ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; depends on : smt.plf ; sorts : (declare arrow (! s1 sort (! s2 sort sort))) ; function constructor ; functions : (declare apply (! s1 sort (! s2 sort (! t1 (term (arrow s1 s2)) (! t2 (term s1) (term s2)))))) ; inference rules : (declare trust (th_holds false)) ; temporary (declare trust_f (! f formula (th_holds f))) ; temporary (declare refl (! s sort (! t (term s) (th_holds (= s t t))))) (declare symm (! s sort (! x (term s) (! y (term s) (! u (th_holds (= _ x y)) (th_holds (= _ y x))))))) (declare trans (! s sort (! x (term s) (! y (term s) (! z (term s) (! u (th_holds (= _ x y)) (! u (th_holds (= _ y z)) (th_holds (= _ x z))))))))) (declare negsymm (! s sort (! x (term s) (! y (term s) (! u (th_holds (not (= _ x y))) (th_holds (not (= _ y x)))))))) (declare negtrans1 (! s sort (! x (term s) (! y (term s) (! z (term s) (! u (th_holds (not (= _ x y))) (! u (th_holds (= _ y z)) (th_holds (not (= _ x z)))))))))) (declare negtrans2 (! s sort (! x (term s) (! y (term s) (! z (term s) (! u (th_holds (= _ x y)) (! u (th_holds (not (= _ y z))) (th_holds (not (= _ x z)))))))))) (declare cong (! s1 sort (! s2 sort (! a1 (term (arrow s1 s2)) (! b1 (term (arrow s1 s2)) (! a2 (term s1) (! b2 (term s1) (! u1 (th_holds (= _ a1 b1)) (! u2 (th_holds (= _ a2 b2)) (th_holds (= _ (apply _ _ a1 a2) (apply _ _ b1 b2)))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Examples ; an example of "(p1 or p2(0)) and t1=t2(1)" ;(! p1 (term Bool) ;(! p2 (term (arrow Int Bool)) ;(! t1 (term Int) ;(! t2 (term (arrow Int Int)) ;(! F (th_holds (and (or (p_app p1) (p_app (apply _ _ p2 0))) ; (= _ t1 (apply _ _ t2 1)))) ; ... ; another example of "p3(a,b)" ;(! a (term Int) ;(! b (term Int) ;(! p3 (term (arrow Int (arrow Int Bool))) ; arrow is right assoc. ;(! F (th_holds (p_app (apply _ _ (apply _ _ p3 a) b))) ; apply is left assoc. ; ... cvc4-1.5/proofs/signatures/th_bv.plf000066400000000000000000000074611313116454100175260ustar00rootroot00000000000000;;;; TEMPORARY: (declare trust-bad (th_holds false)) ; helper stuff (program mpz_sub ((x mpz) (y mpz)) mpz (mp_add x (mp_mul (~1) y))) (program mp_ispos ((x mpz)) formula (mp_ifneg x false true)) (program mpz_eq ((x mpz) (y mpz)) formula (mp_ifzero (mpz_sub x y) true false)) (program mpz_lt ((x mpz) (y mpz)) formula (mp_ifneg (mpz_sub x y) true false)) (program mpz_lte ((x mpz) (y mpz)) formula (mp_ifneg (mpz_sub x y) true (mpz_eq x y))) (program mpz_ ((x mpz) (y mpz)) formula (mp_ifzero (mpz_sub x y) true false)) ; "bitvec" is a term of type "sort" ; (declare BitVec sort) (declare BitVec (!n mpz sort)) ; bit type (declare bit type) (declare b0 bit) (declare b1 bit) ; bit vector type used for constants (declare bv type) (declare bvn bv) (declare bvc (! b bit (! v bv bv))) ; calculate the length of a bitvector ;; (program bv_len ((v bv)) mpz ;; (match v ;; (bvn 0) ;; ((bvc b v') (mp_add (bv_len v') 1)))) ; a bv constant term (declare a_bv (! n mpz (! v bv (term (BitVec n))))) (program bv_constants_are_disequal ((x bv) (y bv)) formula (match x (bvn (fail formula)) ((bvc bx x') (match y (bvn (fail formula)) ((bvc by y') (match bx (b0 (match by (b0 (bv_constants_are_disequal x' y')) (b1 (true)))) (b1 (match by (b0 (true)) (b1 (bv_constants_are_disequal x' y')))) )) )) )) (declare bv_disequal_constants (! n mpz (! x bv (! y bv (! c (^ (bv_constants_are_disequal x y) true) (th_holds (not (= (BitVec n) (a_bv n x) (a_bv n y))))))))) ; a bv variable (declare var_bv type) ; a bv variable term (declare a_var_bv (! n mpz (! v var_bv (term (BitVec n))))) ; bit vector binary operators (define bvop2 (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (term (BitVec n)))))) (declare bvand bvop2) (declare bvor bvop2) (declare bvor bvop2) (declare bvxor bvop2) (declare bvnand bvop2) (declare bvnor bvop2) (declare bvxnor bvop2) (declare bvmul bvop2) (declare bvadd bvop2) (declare bvsub bvop2) (declare bvudiv bvop2) (declare bvurem bvop2) (declare bvsdiv bvop2) (declare bvsrem bvop2) (declare bvsmod bvop2) (declare bvshl bvop2) (declare bvlshr bvop2) (declare bvashr bvop2) (declare concat bvop2) ; bit vector unary operators (define bvop1 (! n mpz (! x (term (BitVec n)) (term (BitVec n))))) (declare bvneg bvop1) (declare bvnot bvop1) (declare rotate_left bvop1) (declare rotate_right bvop1) (declare bvcomp (! n mpz (! t1 (term (BitVec n)) (! t2 (term (BitVec n)) (term (BitVec 1)))))) (declare concat (! n mpz (! m mpz (! m' mpz (! t1 (term (BitVec m)) (! t2 (term (BitVec m')) (term (BitVec n)))))))) ;; side-condition fails in signature only?? ;; (! s (^ (mp_add m m') n) ;; (declare repeat bvopp) (declare extract (! n mpz (! i mpz (! j mpz (! m mpz (! t2 (term (BitVec m)) (term (BitVec n)))))))) (declare zero_extend (! n mpz (! i mpz (! m mpz (! t2 (term (BitVec m)) (term (BitVec n))))))) (declare sign_extend (! n mpz (! i mpz (! m mpz (! t2 (term (BitVec m)) (term (BitVec n))))))) (declare repeat (! n mpz (! i mpz (! m mpz (! t2 (term (BitVec m)) (term (BitVec n))))))) ;; TODO: add checks for valid typing for these operators ;; (! c1 (^ (mpz_lte i j) ;; (! c2 (^ (mpz_lt i n) true) ;; (! c3 (^ (mp_ifneg i false true) true) ;; (! c4 (^ (mp_ifneg j false true) true) ;; (! s (^ (mp_add (mpz_sub i j) 1) m) ; bit vector predicates (define bvpred (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) formula)))) (declare bvult bvpred) (declare bvule bvpred) (declare bvugt bvpred) (declare bvuge bvpred) (declare bvslt bvpred) (declare bvsle bvpred) (declare bvsgt bvpred) (declare bvsge bvpred) cvc4-1.5/proofs/signatures/th_bv_bitblast.plf000066400000000000000000000474751313116454100214230ustar00rootroot00000000000000; bit blasted terms as list of formulas (declare bblt type) (declare bbltn bblt) (declare bbltc (! f formula (! v bblt bblt))) ; calculate the length of a bit-blasted term (program bblt_len ((v bblt)) mpz (match v (bbltn 0) ((bbltc b v') (mp_add (bblt_len v') 1)))) ; (bblast_term x y) means term y corresponds to bit level interpretation x (declare bblast_term (! n mpz (! x (term (BitVec n)) (! y bblt type)))) ; FIXME: for unsupported bit-blast terms (declare trust_bblast_term (! n mpz (! x (term (BitVec n)) (! y bblt (bblast_term n x y))))) ; Binds a symbol to the bblast_term to be used later on. (declare decl_bblast (! n mpz (! b bblt (! t (term (BitVec n)) (! bb (bblast_term n t b) (! s (^ (bblt_len b) n) (! u (! v (bblast_term n t b) (holds cln)) (holds cln)))))))) (declare decl_bblast_with_alias (! n mpz (! b bblt (! t (term (BitVec n)) (! a (term (BitVec n)) (! bb (bblast_term n t b) (! e (th_holds (= _ t a)) (! s (^ (bblt_len b) n) (! u (! v (bblast_term n a b) (holds cln)) (holds cln)))))))))) ; a predicate to represent the n^th bit of a bitvector term (declare bitof (! x var_bv (! n mpz formula))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; BITBLASTING RULES ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST CONSTANT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_const ((v bv) (n mpz)) bblt (mp_ifneg n (match v (bvn bbltn) (default (fail bblt))) (match v ((bvc b v') (bbltc (match b (b0 false) (b1 true)) (bblast_const v' (mp_add n (~ 1))))) (default (fail bblt))))) (declare bv_bbl_const (! n mpz (! f bblt (! v bv (! c (^ (bblast_const v (mp_add n (~ 1))) f) (bblast_term n (a_bv n v) f)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST VARIABLE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_var ((x var_bv) (n mpz)) bblt (mp_ifneg n bbltn (bbltc (bitof x n) (bblast_var x (mp_add n (~ 1)))))) (declare bv_bbl_var (! n mpz (! x var_bv (! f bblt (! c (^ (bblast_var x (mp_add n (~ 1))) f) (bblast_term n (a_var_bv n x) f)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST CONCAT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_concat ((x bblt) (y bblt)) bblt (match x (bbltn (match y ((bbltc by y') (bbltc by (bblast_concat x y'))) (bbltn bbltn))) ((bbltc bx x') (bbltc bx (bblast_concat x' y))))) (declare bv_bbl_concat (! n mpz (! m mpz (! m1 mpz (! x (term (BitVec m)) (! y (term (BitVec m1)) (! xb bblt (! yb bblt (! rb bblt (! xbb (bblast_term m x xb) (! ybb (bblast_term m1 y yb) (! c (^ (bblast_concat xb yb ) rb) (bblast_term n (concat n m m1 x y) rb))))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST EXTRACT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_extract_rec ((x bblt) (i mpz) (j mpz) (n mpz)) bblt (match x ((bbltc bx x') (mp_ifneg (mpz_sub (mpz_sub j n) 1) (mp_ifneg (mpz_sub (mpz_sub n i) 1) (bbltc bx (bblast_extract_rec x' i j (mpz_sub n 1))) (bblast_extract_rec x' i j (mpz_sub n 1))) bbltn)) (bbltn bbltn))) (program bblast_extract ((x bblt) (i mpz) (j mpz) (n mpz)) bblt (bblast_extract_rec x i j (mpz_sub n 1))) (declare bv_bbl_extract (! n mpz (! i mpz (! j mpz (! m mpz (! x (term (BitVec m)) (! xb bblt (! rb bblt (! xbb (bblast_term m x xb) (! c ( ^ (bblast_extract xb i j m) rb) (bblast_term n (extract n i j m x) rb))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST ZERO/SIGN EXTEND ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program extend_rec ((x bblt) (i mpz) (b formula)) bblt (mp_ifneg i x (bbltc b (extend_rec x (mpz_sub i 1) b))))) (program bblast_zextend ((x bblt) (i mpz)) bblt (extend_rec x (mpz_sub i 1) false)) (declare bv_bbl_zero_extend (! n mpz (! k mpz (! m mpz (! x (term (BitVec m)) (! xb bblt (! rb bblt (! xbb (bblast_term m x xb) (! c ( ^ (bblast_zextend xb k m) rb) (bblast_term n (zero_extend n k m x) rb)))))))))) (program bblast_sextend ((x bblt) (i mpz)) bblt (match x (bbltn (fail bblt)) ((bbltc xb x') (extend_rec x (mpz_sub i 1) xb)))) (declare bv_bbl_sign_extend (! n mpz (! k mpz (! m mpz (! x (term (BitVec m)) (! xb bblt (! rb bblt (! xbb (bblast_term m x xb) (! c ( ^ (bblast_sextend xb k) rb) (bblast_term n (sign_extend n k m x) rb)))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVAND ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_bvand ((x bblt) (y bblt)) bblt (match x (bbltn (match y (bbltn bbltn) (default (fail bblt)))) ((bbltc bx x') (match y (bbltn (fail bblt)) ((bbltc by y') (bbltc (and bx by) (bblast_bvand x' y'))))))) (declare bv_bbl_bvand (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! xb bblt (! yb bblt (! rb bblt (! xbb (bblast_term n x xb) (! ybb (bblast_term n y yb) (! c (^ (bblast_bvand xb yb ) rb) (bblast_term n (bvand n x y) rb))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVNOT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_bvnot ((x bblt)) bblt (match x (bbltn bbltn) ((bbltc bx x') (bbltc (not bx) (bblast_bvnot x'))))) (declare bv_bbl_bvnot (! n mpz (! x (term (BitVec n)) (! xb bblt (! rb bblt (! xbb (bblast_term n x xb) (! c (^ (bblast_bvnot xb ) rb) (bblast_term n (bvnot n x) rb)))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVOR ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_bvor ((x bblt) (y bblt)) bblt (match x (bbltn (match y (bbltn bbltn) (default (fail bblt)))) ((bbltc bx x') (match y (bbltn (fail bblt)) ((bbltc by y') (bbltc (or bx by) (bblast_bvor x' y'))))))) (declare bv_bbl_bvor (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! xb bblt (! yb bblt (! rb bblt (! xbb (bblast_term n x xb) (! ybb (bblast_term n y yb) (! c (^ (bblast_bvor xb yb ) rb) (bblast_term n (bvor n x y) rb))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVXOR ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_bvxor ((x bblt) (y bblt)) bblt (match x (bbltn (match y (bbltn bbltn) (default (fail bblt)))) ((bbltc bx x') (match y (bbltn (fail bblt)) ((bbltc by y') (bbltc (xor bx by) (bblast_bvxor x' y'))))))) (declare bv_bbl_bvxor (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! xb bblt (! yb bblt (! rb bblt (! xbb (bblast_term n x xb) (! ybb (bblast_term n y yb) (! c (^ (bblast_bvxor xb yb ) rb) (bblast_term n (bvxor n x y) rb))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVADD ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; return the carry bit after adding x y ;; FIXME: not the most efficient thing in the world (program bblast_bvadd_carry ((a bblt) (b bblt) (carry formula)) formula (match a ( bbltn (match b (bbltn carry) (default (fail formula)))) ((bbltc ai a') (match b (bbltn (fail formula)) ((bbltc bi b') (or (and ai bi) (and (xor ai bi) (bblast_bvadd_carry a' b' carry)))))))) ;; ripple carry adder where carry is the initial carry bit (program bblast_bvadd ((a bblt) (b bblt) (carry formula)) bblt (match a ( bbltn (match b (bbltn bbltn) (default (fail bblt)))) ((bbltc ai a') (match b (bbltn (fail bblt)) ((bbltc bi b') (bbltc (xor (xor ai bi) (bblast_bvadd_carry a' b' carry)) (bblast_bvadd a' b' carry))))))) (program reverse_help ((x bblt) (acc bblt)) bblt (match x (bbltn acc) ((bbltc xi x') (reverse_help x' (bbltc xi acc))))) (program reverseb ((x bblt)) bblt (reverse_help x bbltn)) ; AJR: use this version? ;(program bblast_bvadd_2h ((a bblt) (b bblt) (carry formula)) bblt ;(match a ; ( bbltn (match b (bbltn bbltn) (default (fail bblt)))) ; ((bbltc ai a') (match b ; (bbltn (fail bblt)) ; ((bbltc bi b') ; (let carry' (or (and ai bi) (and (xor ai bi) carry)) ; (bbltc (xor (xor ai bi) carry) ; (bblast_bvadd_2h a' b' carry')))))))) ;(program bblast_bvadd_2 ((a bblt) (b bblt) (carry formula)) bblt ;(let ar (reverseb a) ;; reverse a and b so that we can build the circuit ;(let br (reverseb b) ;; from the least significant bit up ;(let ret (bblast_bvadd_2h ar br carry) ; (reverseb ret))))) (declare bv_bbl_bvadd (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! xb bblt (! yb bblt (! rb bblt (! xbb (bblast_term n x xb) (! ybb (bblast_term n y yb) (! c (^ (bblast_bvadd xb yb false) rb) (bblast_term n (bvadd n x y) rb))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVNEG ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_zero ((n mpz)) bblt (mp_ifzero n bbltn (bbltc false (bblast_zero (mp_add n (~1)))))) (program bblast_bvneg ((x bblt) (n mpz)) bblt (bblast_bvadd (bblast_bvnot x) (bblast_zero n) true)) (declare bv_bbl_bvneg (! n mpz (! x (term (BitVec n)) (! xb bblt (! rb bblt (! xbb (bblast_term n x xb) (! c (^ (bblast_bvneg xb n) rb) (bblast_term n (bvneg n x) rb)))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVMUL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; shift add multiplier ;; (program concat ((a bblt) (b bblt)) bblt ;; (match a (bbltn b) ;; ((bbltc ai a') (bbltc ai (concat a' b))))) (program top_k_bits ((a bblt) (k mpz)) bblt (mp_ifzero k bbltn (match a (bbltn (fail bblt)) ((bbltc ai a') (bbltc ai (top_k_bits a' (mpz_sub k 1))))))) (program bottom_k_bits ((a bblt) (k mpz)) bblt (reverseb (top_k_bits (reverseb a) k))) ;; assumes the least signigicant bit is at the beginning of the list (program k_bit ((a bblt) (k mpz)) formula (mp_ifneg k (fail formula) (match a (bbltn (fail formula)) ((bbltc ai a') (mp_ifzero k ai (k_bit a' (mpz_sub k 1))))))) (program and_with_bit ((a bblt) (bt formula)) bblt (match a (bbltn bbltn) ((bbltc ai a') (bbltc (and bt ai) (and_with_bit a' bt))))) ;; a is going to be the current result ;; carry is going to be false initially ;; b is the and of a and b[k] ;; res is going to be bbltn initially (program mult_step_k_h ((a bblt) (b bblt) (res bblt) (carry formula) (k mpz)) bblt (match a (bbltn (match b (bbltn res) (default (fail bblt)))) ((bbltc ai a') (match b (bbltn (fail bblt)) ((bbltc bi b') (mp_ifneg (mpz_sub k 1) (let carry_out (or (and ai bi) (and (xor ai bi) carry)) (let curr (xor (xor ai bi) carry) (mult_step_k_h a' b' (bbltc curr res) carry_out (mpz_sub k 1)))) (mult_step_k_h a' b (bbltc ai res) carry (mpz_sub k 1)) )))))) ;; assumes that a, b and res have already been reversed (program mult_step ((a bblt) (b bblt) (res bblt) (n mpz) (k mpz)) bblt (let k' (mpz_sub n k ) (let ak (top_k_bits a k') (let b' (and_with_bit ak (k_bit b k)) (mp_ifzero (mpz_sub k' 1) (mult_step_k_h res b' bbltn false k) (let res' (mult_step_k_h res b' bbltn false k) (mult_step a b (reverseb res') n (mp_add k 1)))))))) (program bblast_bvmul ((a bblt) (b bblt) (n mpz)) bblt (let ar (reverseb a) ;; reverse a and b so that we can build the circuit (let br (reverseb b) ;; from the least significant bit up (let res (and_with_bit ar (k_bit br 0)) (mp_ifzero (mpz_sub n 1) ;; if multiplying 1 bit numbers no need to call mult_step res (mult_step ar br res n 1)))))) (declare bv_bbl_bvmul (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! xb bblt (! yb bblt (! rb bblt (! xbb (bblast_term n x xb) (! ybb (bblast_term n y yb) (! c (^ (bblast_bvmul xb yb n) rb) (bblast_term n (bvmul n x y) rb))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST EQUALS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; bit blast x = y ; for x,y of size n, it will return a conjunction (x.0 = y.0 ^ ( ... ^ (x.{n-1} = y.{n-1}))) ; f is the accumulator formula that builds the equality in the right order (program bblast_eq_rec ((x bblt) (y bblt) (f formula)) formula (match x (bbltn (match y (bbltn f) (default (fail formula)))) ((bbltc fx x') (match y (bbltn (fail formula)) ((bbltc fy y') (bblast_eq_rec x' y' (and (iff fx fy) f))))) (default (fail formula)))) (program bblast_eq ((x bblt) (y bblt)) formula (match x ((bbltc bx x') (match y ((bbltc by y') (bblast_eq_rec x' y' (iff bx by))) (default (fail formula)))) (default (fail formula)))) ;; TODO: a temporary bypass for rewrites that we don't support yet. As soon ;; as we do, remove this rule. (declare bv_bbl_=_false (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! bx bblt (! by bblt (! f formula (! bbx (bblast_term n x bx) (! bby (bblast_term n y by) (! c (^ (bblast_eq bx by) f) (th_holds (iff (= (BitVec n) x y) false)))))))))))) (declare bv_bbl_= (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! bx bblt (! by bblt (! f formula (! bbx (bblast_term n x bx) (! bby (bblast_term n y by) (! c (^ (bblast_eq bx by) f) (th_holds (iff (= (BitVec n) x y) f)))))))))))) (declare bv_bbl_=_swap (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! bx bblt (! by bblt (! f formula (! bbx (bblast_term n x bx) (! bby (bblast_term n y by) (! c (^ (bblast_eq by bx) f) (th_holds (iff (= (BitVec n) x y) f)))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVULT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_bvult ((x bblt) (y bblt) (n mpz)) formula (match x ( bbltn (fail formula)) ((bbltc xi x') (match y (bbltn (fail formula)) ((bbltc yi y') (mp_ifzero n (and (not xi) yi) (or (and (iff xi yi) (bblast_bvult x' y' (mp_add n (~1)))) (and (not xi) yi)))))))) (declare bv_bbl_bvult (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! bx bblt (! by bblt (! f formula (! bbx (bblast_term n x bx) (! bby (bblast_term n y by) (! c (^ (bblast_bvult bx by (mp_add n (~1))) f) (th_holds (iff (bvult n x y) f)))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVSLT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_bvslt ((x bblt) (y bblt) (n mpz)) formula (match x ( bbltn (fail formula)) ((bbltc xi x') (match y (bbltn (fail formula)) ((bbltc yi y') (mp_ifzero (mpz_sub n 1) (and xi (not yi)) (or (and (iff xi yi) (bblast_bvult x' y' (mpz_sub n 2))) (and xi (not yi))))))))) (declare bv_bbl_bvslt (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! bx bblt (! by bblt (! f formula (! bbx (bblast_term n x bx) (! bby (bblast_term n y by) (! c (^ (bblast_bvslt bx by n) f) (th_holds (iff (bvslt n x y) f)))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; BITBLAST BVCOMP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (program bblast_bvcomp ((x bblt) (y bblt) (n mpz)) bblt (match x ((bbltc bx x') (match y ((bbltc by y') (bbltc (bblast_eq_rec x' y' (iff bx by)) bbltn)) (default (fail bblt)))) (default (fail bblt)) )) (declare bv_bbl_bvcomp (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (! xb bblt (! yb bblt (! rb bblt (! xbb (bblast_term n x xb) (! ybb (bblast_term n y yb) (! c (^ (bblast_bvcomp xb yb n) rb) (bblast_term 1 (bvcomp n x y) rb))))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; BITBLASTING CONNECTORS ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; bit-blasting connections (declare intro_assump_t (! f formula (! v var (! C clause (! h (th_holds f) (! a (atom v f) (! u (! unit (holds (clc (pos v) cln)) (holds C)) (holds C)))))))) (declare intro_assump_f (! f formula (! v var (! C clause (! h (th_holds (not f)) (! a (atom v f) (! u (! unit (holds (clc (neg v) cln)) (holds C)) (holds C)))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; REWRITE RULES ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; rewrite rule : ; x + y = y + x (declare bvadd_symm (! n mpz (! x (term (BitVec n)) (! y (term (BitVec n)) (th_holds (= (BitVec n) (bvadd _ x y) (bvadd _ y x))))))) ;; (declare bvcrazy_rewrite ;; (! n mpz ;; (! x (term (BitVec n)) ;; (! y (term (BitVec n)) ;; (! xn bv_poly ;; (! yn bv_poly ;; (! hxn (bv_normalizes x xn) ;; (! hyn (bv_normalizes y yn) ;; (! s (^ (rewrite_scc xn yn) true) ;; (! u (! x (term (BitVec n)) (holds cln)) ;; (holds cln))))))))))) ;; (th_holds (= (BitVec n) (bvadd x y) (bvadd y x))))))) ; necessary? ;; (program calc_bvand ((a bv) (b bv)) bv ;; (match a ;; (bvn (match b (bvn bvn) (default (fail bv)))) ;; ((bvc ba a') (match b ;; ((bvc bb b') (bvc (match ba (b0 b0) (b1 bb)) (calc_bvand a' b'))) ;; (default (fail bv)))))) ;; ; rewrite rule (w constants) : ;; ; a & b = c ;; (declare bvand_const (! c bv ;; (! a bv ;; (! b bv ;; (! u (^ (calc_bvand a b) c) ;; (th_holds (= BitVec (bvand (a_bv a) (a_bv b)) (a_bv c)))))))) ;; making constant bit-vectors (program mk_ones ((n mpz)) bv (mp_ifzero n bvn (bvc b1 (mk_ones (mpz_sub n 1))))) (program mk_zero ((n mpz)) bv (mp_ifzero n bvn (bvc b0 (mk_ones (mpz_sub n 1))))) ;; (bvxnor a b) => (bvnot (bvxor a b)) ;; (declare bvxnor_elim ;; (! n mpz ;; (! a (term (BitVec n)) ;; (! b (term (BitVec n)) ;; (! a' (term (BitVec n)) ;; (! b' (term (BitVec n)) ;; (! rwa (rw_term _ a a') ;; (! rwb (rw_term _ b b') ;; (rw_term n (bvxnor _ a b) ;; (bvnot _ (bvxor _ a' b'))))))))))) ;; ;; (bvxor a 0) => a ;; (declare bvxor_zero ;; (! n mpz ;; (! zero_bits bv ;; (! sc (^ (mk_zero n) zero_bits) ;; (! a (term (BitVec n)) ;; (! b (term (BitVec n)) ;; (! a' (term (BitVec n)) ;; (! rwa (rw_term _ a a') ;; (! rwb (rw_term _ b (a_bv _ zero_bits)) ;; (rw_term _ (bvxor _ a b) ;; a')))))))))) ;; ;; (bvxor a 11) => (bvnot a) ;; (declare bvxor_one ;; (! n mpz ;; (! one_bits bv ;; (! sc (^ (mk_ones n) one_bits) ;; (! a (term (BitVec n)) ;; (! b (term (BitVec n)) ;; (! a' (term (BitVec n)) ;; (! rwa (rw_term _ a a') ;; (! rwb (rw_term _ b (a_bv _ one_bits)) ;; (rw_term _ (bvxor _ a b) ;; (bvnot _ a'))))))))))) ;; ;; (bvnot (bvnot a)) => a ;; (declare bvnot_idemp ;; (! n mpz ;; (! a (term (BitVec n)) ;; (! a' (term (BitVec n)) ;; (! rwa (rw_term _ a a') ;; (rw_term _ (bvnot _ (bvnot _ a)) ;; a')))))) cvc4-1.5/proofs/signatures/th_bv_rewrites.plf000066400000000000000000000005111313116454100214370ustar00rootroot00000000000000; ; Equality swap ; (declare rr_bv_eq (! n mpz (! t1 (term (BitVec n)) (! t2 (term (BitVec n)) (th_holds (iff (= (BitVec n) t2 t1) (= (BitVec n) t1 t2))))))) ; ; Additional rules... ; ; ; Default, if nothing else applied ; (declare rr_bv_default (! t1 formula (! t2 formula (th_holds (iff t1 t2)))))) cvc4-1.5/proofs/signatures/th_int.plf000066400000000000000000000011541313116454100177020ustar00rootroot00000000000000(declare Int sort) (define arithpred_Int (! x (term Int) (! y (term Int) formula))) (declare >_Int arithpred_Int) (declare >=_Int arithpred_Int) (declare <_Int arithpred_Int) (declare <=_Int arithpred_Int) (define arithterm_Int (! x (term Int) (! y (term Int) (term Int)))) (declare +_Int arithterm_Int) (declare -_Int arithterm_Int) (declare *_Int arithterm_Int) ; is * ok to use? (declare /_Int arithterm_Int) ; is / ok to use? ; a constant term (declare a_int (! x mpz (term Int))) ; unary negation (declare u-_Int (! t (term Int) (term Int))) cvc4-1.5/proofs/signatures/th_quant.plf000066400000000000000000000047421313116454100202460ustar00rootroot00000000000000(declare forall (! s sort (! t (term s) (! f formula formula)))) (program eqterm ((n1 term) (n2 term)) bool (do (markvar n1) (let s (ifmarked n2 tt ff) (do (markvar n1) s)))) (program is_inst_t ((ti term) (t term) (k term)) bool (match t ((apply s1 s2 t1 t2) (match ti ((apply si1 si2 ti1 ti2) (match (is_inst_t ti1 t1 k) (tt (is_inst_t ti2 t2 k)) (ff ff))) (default ff))) (default (eqterm ti (ifmarked t k t))))) (program is_inst_f ((fi formula) (f formula) (k term)) bool (match f ((and f1 f2) (match fi ((and fi1 fi2) (match (is_inst_f fi1 f1 k) (tt (is_inst_f fi2 f2 k)) (ff ff))) (default ff))) ((or f1 f2) (match fi ((or fi1 fi2) (match (is_inst_f fi1 f1 k) (tt (is_inst_f fi2 f2 k)) (ff ff))) (default ff))) ((impl f1 f2) (match fi ((impl fi1 fi2) (match (is_inst_f fi1 f1 k) (tt (is_inst_f fi2 f2 k)) (ff ff))) (default ff))) ((not f1) (match fi ((not fi1) (is_inst_f fi1 f1 k)) (default ff))) ((iff f1 f2) (match fi ((iff fi1 fi2) (match (is_inst_f fi1 f1 k) (tt (is_inst_f fi2 f2 k)) (ff ff))) (default ff))) ((xor f1 f2) (match fi ((xor fi1 fi2) (match (is_inst_f fi1 f1 k) (tt (is_inst_f fi2 f2 k)) (ff ff))) (default ff))) ((ifte f1 f2 f3) (match fi ((ifte fi1 fi2 fi3) (match (is_inst_f fi1 f1 k) (tt (match (is_inst_f fi2 f2 k) (tt (is_inst_f fi3 f3 k)) (ff ff))) (ff ff))) (default ff))) ((= s t1 t2) (match fi ((= s ti1 ti2) (match (is_inst_t ti1 t1 k) (tt (is_inst_t ti2 t2 k)) (ff ff))) (default ff))) ((forall s t1 f1) (match fi ((forall s ti1 fi1) (is_inst_f fi1 f1 k)) (default ff))) (default ff))) (program is_inst ((fi formula) (f formula) (t term) (k term)) bool (do (markvar t) (let f1 (is_inst_f fi f k) (do (markvar t) f1)))) (declare skolem (! s sort (! t (term s) (! f formula (! p (th_holds (not (forall s t f))) (! u (! k (term s) (! fi formula (! p1 (th_holds (not fi)) (! r (^ (is_inst fi f t k) tt) (holds cln))))) (holds cln))))))) (declare inst (! s sort (! t (term s) (! f formula (! k (term s) (! fi formula (! p (th_holds (forall s t f)) (! r (^ (is_inst fi f t k) tt) (! u (! p1 (th_holds fi) (holds cln)) (holds cln)))))))))) cvc4-1.5/proofs/signatures/th_real.plf000066400000000000000000000012511313116454100200310ustar00rootroot00000000000000(declare Real sort) (define arithpred_Real (! x (term Real) (! y (term Real) formula))) (declare >_Real arithpred_Real) (declare >=_Real arithpred_Real) (declare <_Real arithpred_Real) (declare <=_Real arithpred_Real) (define arithterm_Real (! x (term Real) (! y (term Real) (term Real)))) (declare +_Real arithterm_Real) (declare -_Real arithterm_Real) (declare *_Real arithterm_Real) ; is * ok to use? (declare /_Real arithterm_Real) ; is / ok to use? ; a constant term (declare a_real (! x mpq (term Real))) ; unary negation (declare u-_Real (! t (term Real) (term Real))) cvc4-1.5/src/000077500000000000000000000000001313116454100130045ustar00rootroot00000000000000cvc4-1.5/src/Makefile.am000066400000000000000000000575561313116454100150620ustar00rootroot00000000000000# LIBCVC4_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4_VERSION = @CVC4_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ -D __STDC_LIMIT_MACROS \ -D __STDC_FORMAT_MACROS \ -I@builddir@ -I@srcdir@/include -I@srcdir@ -I@top_srcdir@/proofs/lfsc_checker AM_CXXFLAGS = -Wall -Wno-unknown-pragmas -Wno-parentheses $(FLAG_VISIBILITY_HIDDEN) SUBDIRS = lib base options util expr smt_util prop/minisat prop/bvminisat . parser compat bindings main # The THEORIES list has been moved to Makefile.theories include @top_srcdir@/src/Makefile.theories lib_LTLIBRARIES = libcvc4.la libcvc4_la_LDFLAGS = -version-info $(LIBCVC4_VERSION) # This "tricks" automake into linking us as a C++ library (rather than # as a C library, which messes up exception handling support) nodist_EXTRA_libcvc4_la_SOURCES = dummy.cpp libcvc4_la_SOURCES = \ git_versioninfo.cpp \ svn_versioninfo.cpp \ context/backtrackable.h \ context/cdchunk_list.h \ context/cddense_set.h \ context/cdhashmap.h \ context/cdhashmap_forward.h \ context/cdhashset.h \ context/cdhashset_forward.h \ context/cdinsert_hashmap.h \ context/cdinsert_hashmap_forward.h \ context/cdlist.h \ context/cdlist_forward.h \ context/cdmaybe.h \ context/cdo.h \ context/cdqueue.h \ context/cdtrail_hashmap.h \ context/cdtrail_hashmap_forward.h \ context/cdtrail_queue.h \ context/cdvector.h \ context/context.cpp \ context/context.h \ context/context_mm.cpp \ context/context_mm.h \ decision/decision_attributes.h \ decision/decision_engine.cpp \ decision/decision_engine.h \ decision/decision_strategy.h \ decision/justification_heuristic.cpp \ decision/justification_heuristic.h \ printer/dagification_visitor.cpp \ printer/dagification_visitor.h \ printer/printer.cpp \ printer/printer.h \ printer/ast/ast_printer.cpp \ printer/ast/ast_printer.h \ printer/cvc/cvc_printer.cpp \ printer/cvc/cvc_printer.h \ printer/smt1/smt1_printer.cpp \ printer/smt1/smt1_printer.h \ printer/smt2/smt2_printer.cpp \ printer/smt2/smt2_printer.h \ printer/tptp/tptp_printer.cpp \ printer/tptp/tptp_printer.h \ proof/arith_proof.cpp \ proof/arith_proof.h \ proof/array_proof.cpp \ proof/array_proof.h \ proof/bitvector_proof.cpp \ proof/bitvector_proof.h \ proof/clause_id.h \ proof/cnf_proof.cpp \ proof/cnf_proof.h \ proof/lemma_proof.cpp \ proof/lemma_proof.h \ proof/proof.h \ proof/proof_manager.cpp \ proof/proof_manager.h \ proof/proof_output_channel.cpp \ proof/proof_output_channel.h \ proof/proof_utils.cpp \ proof/proof_utils.h \ proof/sat_proof.h \ proof/sat_proof_implementation.h \ proof/simplify_boolean_node.cpp \ proof/simplify_boolean_node.h \ proof/skolemization_manager.cpp \ proof/skolemization_manager.h \ proof/theory_proof.cpp \ proof/theory_proof.h \ proof/uf_proof.cpp \ proof/uf_proof.h \ proof/unsat_core.cpp \ proof/unsat_core.h \ prop/cnf_stream.cpp \ prop/cnf_stream.h \ prop/cryptominisat.cpp \ prop/cryptominisat.h \ prop/prop_engine.cpp \ prop/prop_engine.h \ prop/registrar.h \ prop/sat_solver.h \ prop/sat_solver_factory.cpp \ prop/sat_solver_factory.h \ prop/sat_solver_types.h \ prop/theory_proxy.cpp \ prop/theory_proxy.h \ smt/command.cpp \ smt/command.h \ smt/command_list.cpp \ smt/command_list.h \ smt/dump.cpp \ smt/dump.h \ smt/logic_exception.h \ smt/logic_request.cpp \ smt/logic_request.h \ smt/managed_ostreams.cpp \ smt/managed_ostreams.h \ smt/model.cpp \ smt/model.h \ smt/smt_engine.cpp \ smt/smt_engine.h \ smt/smt_engine_check_proof.cpp \ smt/smt_engine_scope.cpp \ smt/smt_engine_scope.h \ smt/smt_statistics_registry.cpp \ smt/smt_statistics_registry.h \ smt/term_formula_removal.cpp \ smt/term_formula_removal.h \ smt/update_ostream.h \ theory/assertion.cpp \ theory/assertion.h \ theory/atom_requests.cpp \ theory/atom_requests.h \ theory/care_graph.h \ theory/interrupted.h \ theory/ite_utilities.cpp \ theory/ite_utilities.h \ theory/logic_info.cpp \ theory/logic_info.h \ theory/output_channel.h \ theory/quantifiers_engine.cpp \ theory/quantifiers_engine.h \ theory/rep_set.cpp \ theory/rep_set.h \ theory/rewriter.cpp \ theory/rewriter.h \ theory/rewriter_attributes.h \ theory/shared_terms_database.cpp \ theory/shared_terms_database.h \ theory/sort_inference.cpp \ theory/sort_inference.h \ theory/substitutions.cpp \ theory/substitutions.h \ theory/term_registration_visitor.cpp \ theory/term_registration_visitor.h \ theory/theory.cpp \ theory/theory.h \ theory/theory_engine.cpp \ theory/theory_engine.h \ theory/theory_model.cpp \ theory/theory_model.h \ theory/theory_registrar.h \ theory/theory_test_utils.h \ theory/type_enumerator.h \ theory/unconstrained_simplifier.cpp \ theory/unconstrained_simplifier.h \ theory/valuation.cpp \ theory/valuation.h \ theory/arith/approx_simplex.cpp \ theory/arith/approx_simplex.h \ theory/arith/arith_ite_utils.cpp \ theory/arith/arith_ite_utils.h \ theory/arith/arith_rewriter.cpp \ theory/arith/arith_rewriter.h \ theory/arith/arith_static_learner.cpp \ theory/arith/arith_static_learner.h \ theory/arith/arith_utilities.h \ theory/arith/arithvar.cpp \ theory/arith/arithvar.h \ theory/arith/attempt_solution_simplex.cpp \ theory/arith/attempt_solution_simplex.h \ theory/arith/bound_counts.h \ theory/arith/callbacks.cpp \ theory/arith/callbacks.h \ theory/arith/congruence_manager.cpp \ theory/arith/congruence_manager.h \ theory/arith/constraint.cpp \ theory/arith/constraint.h \ theory/arith/constraint_forward.h \ theory/arith/cut_log.cpp \ theory/arith/cut_log.h \ theory/arith/delta_rational.cpp \ theory/arith/delta_rational.h \ theory/arith/dio_solver.cpp \ theory/arith/dio_solver.h \ theory/arith/dual_simplex.cpp \ theory/arith/dual_simplex.h \ theory/arith/error_set.cpp \ theory/arith/error_set.h \ theory/arith/fc_simplex.cpp \ theory/arith/fc_simplex.h \ theory/arith/infer_bounds.cpp \ theory/arith/infer_bounds.h \ theory/arith/linear_equality.cpp \ theory/arith/linear_equality.h \ theory/arith/matrix.cpp \ theory/arith/matrix.h \ theory/arith/nonlinear_extension.h \ theory/arith/nonlinear_extension.cpp \ theory/arith/normal_form.cpp \ theory/arith/normal_form.h\ theory/arith/partial_model.cpp \ theory/arith/partial_model.h \ theory/arith/pseudoboolean_proc.cpp \ theory/arith/pseudoboolean_proc.h \ theory/arith/simplex.cpp \ theory/arith/simplex.h \ theory/arith/simplex_update.cpp \ theory/arith/simplex_update.h \ theory/arith/soi_simplex.cpp \ theory/arith/soi_simplex.h \ theory/arith/tableau.cpp \ theory/arith/tableau.h \ theory/arith/tableau_sizes.cpp \ theory/arith/tableau_sizes.h \ theory/arith/theory_arith.cpp \ theory/arith/theory_arith.h \ theory/arith/theory_arith_private.cpp \ theory/arith/theory_arith_private.h \ theory/arith/theory_arith_private_forward.h \ theory/arith/theory_arith_type_rules.h \ theory/arith/type_enumerator.h \ theory/arrays/array_info.cpp \ theory/arrays/array_info.h \ theory/arrays/array_proof_reconstruction.cpp \ theory/arrays/array_proof_reconstruction.h \ theory/arrays/static_fact_manager.cpp \ theory/arrays/static_fact_manager.h \ theory/arrays/theory_arrays.cpp \ theory/arrays/theory_arrays.h \ theory/arrays/theory_arrays_rewriter.cpp \ theory/arrays/theory_arrays_rewriter.h \ theory/arrays/theory_arrays_type_rules.h \ theory/arrays/type_enumerator.h \ theory/arrays/union_find.cpp \ theory/arrays/union_find.h \ theory/booleans/circuit_propagator.cpp \ theory/booleans/circuit_propagator.h \ theory/booleans/theory_bool.cpp \ theory/booleans/theory_bool.h \ theory/booleans/theory_bool_rewriter.cpp \ theory/booleans/theory_bool_rewriter.h \ theory/booleans/theory_bool_type_rules.h \ theory/booleans/type_enumerator.h \ theory/builtin/theory_builtin.cpp \ theory/builtin/theory_builtin.h \ theory/builtin/theory_builtin_rewriter.cpp \ theory/builtin/theory_builtin_rewriter.h \ theory/builtin/theory_builtin_type_rules.h \ theory/builtin/type_enumerator.h \ theory/bv/abstraction.cpp \ theory/bv/abstraction.h \ theory/bv/aig_bitblaster.cpp \ theory/bv/bitblast_strategies_template.h \ theory/bv/bitblast_utils.h \ theory/bv/bitblaster_template.h \ theory/bv/bv_eager_solver.cpp \ theory/bv/bv_eager_solver.h \ theory/bv/bv_inequality_graph.cpp \ theory/bv/bv_inequality_graph.h \ theory/bv/bv_quick_check.cpp \ theory/bv/bv_quick_check.h \ theory/bv/bv_subtheory.h \ theory/bv/bv_subtheory_algebraic.cpp \ theory/bv/bv_subtheory_algebraic.h \ theory/bv/bv_subtheory_bitblast.cpp \ theory/bv/bv_subtheory_bitblast.h \ theory/bv/bv_subtheory_core.cpp \ theory/bv/bv_subtheory_core.h \ theory/bv/bv_subtheory_inequality.cpp \ theory/bv/bv_subtheory_inequality.h \ theory/bv/bv_to_bool.cpp \ theory/bv/bv_to_bool.h \ theory/bv/bvintropow2.cpp \ theory/bv/bvintropow2.h \ theory/bv/cd_set_collection.h \ theory/bv/eager_bitblaster.cpp \ theory/bv/lazy_bitblaster.cpp \ theory/bv/slicer.cpp \ theory/bv/slicer.h \ theory/bv/theory_bv.cpp \ theory/bv/theory_bv.h \ theory/bv/theory_bv_rewrite_rules.h \ theory/bv/theory_bv_rewrite_rules_constant_evaluation.h \ theory/bv/theory_bv_rewrite_rules_core.h \ theory/bv/theory_bv_rewrite_rules_normalization.h \ theory/bv/theory_bv_rewrite_rules_operator_elimination.h \ theory/bv/theory_bv_rewrite_rules_simplification.h \ theory/bv/theory_bv_rewriter.cpp \ theory/bv/theory_bv_rewriter.h \ theory/bv/theory_bv_type_rules.h \ theory/bv/theory_bv_utils.cpp \ theory/bv/theory_bv_utils.h \ theory/bv/type_enumerator.h \ theory/datatypes/datatypes_rewriter.h \ theory/datatypes/datatypes_sygus.cpp \ theory/datatypes/datatypes_sygus.h \ theory/datatypes/theory_datatypes.cpp \ theory/datatypes/theory_datatypes.h \ theory/datatypes/theory_datatypes_type_rules.h \ theory/datatypes/type_enumerator.cpp \ theory/datatypes/type_enumerator.h \ theory/fp/theory_fp.cpp \ theory/fp/theory_fp.h \ theory/fp/theory_fp_rewriter.cpp \ theory/fp/theory_fp_rewriter.h \ theory/fp/theory_fp_type_rules.h \ theory/idl/idl_assertion.cpp \ theory/idl/idl_assertion.h \ theory/idl/idl_assertion_db.cpp \ theory/idl/idl_assertion_db.h \ theory/idl/idl_model.cpp \ theory/idl/idl_model.h \ theory/idl/theory_idl.cpp \ theory/idl/theory_idl.h \ theory/quantifiers/alpha_equivalence.cpp \ theory/quantifiers/alpha_equivalence.h \ theory/quantifiers/ambqi_builder.cpp \ theory/quantifiers/ambqi_builder.h \ theory/quantifiers/anti_skolem.cpp \ theory/quantifiers/anti_skolem.h \ theory/quantifiers/bounded_integers.cpp \ theory/quantifiers/bounded_integers.h \ theory/quantifiers/candidate_generator.cpp \ theory/quantifiers/candidate_generator.h \ theory/quantifiers/ce_guided_instantiation.cpp \ theory/quantifiers/ce_guided_instantiation.h \ theory/quantifiers/ce_guided_single_inv.cpp \ theory/quantifiers/ce_guided_single_inv.h \ theory/quantifiers/ce_guided_single_inv_ei.cpp \ theory/quantifiers/ce_guided_single_inv_ei.h \ theory/quantifiers/ce_guided_single_inv_sol.cpp \ theory/quantifiers/ce_guided_single_inv_sol.h \ theory/quantifiers/ceg_instantiator.cpp \ theory/quantifiers/ceg_instantiator.h \ theory/quantifiers/ceg_t_instantiator.cpp \ theory/quantifiers/ceg_t_instantiator.h \ theory/quantifiers/conjecture_generator.cpp \ theory/quantifiers/conjecture_generator.h \ theory/quantifiers/equality_infer.cpp \ theory/quantifiers/equality_infer.h \ theory/quantifiers/first_order_model.cpp \ theory/quantifiers/first_order_model.h \ theory/quantifiers/full_model_check.cpp \ theory/quantifiers/full_model_check.h \ theory/quantifiers/fun_def_engine.cpp \ theory/quantifiers/fun_def_engine.h \ theory/quantifiers/fun_def_process.cpp \ theory/quantifiers/fun_def_process.h \ theory/quantifiers/inst_match.cpp \ theory/quantifiers/inst_match.h \ theory/quantifiers/inst_match_generator.cpp \ theory/quantifiers/inst_match_generator.h \ theory/quantifiers/inst_propagator.cpp \ theory/quantifiers/inst_propagator.h \ theory/quantifiers/inst_strategy_cbqi.cpp \ theory/quantifiers/inst_strategy_cbqi.h \ theory/quantifiers/inst_strategy_e_matching.cpp \ theory/quantifiers/inst_strategy_e_matching.h \ theory/quantifiers/instantiation_engine.cpp \ theory/quantifiers/instantiation_engine.h \ theory/quantifiers/local_theory_ext.cpp \ theory/quantifiers/local_theory_ext.h \ theory/quantifiers/macros.cpp \ theory/quantifiers/macros.h \ theory/quantifiers/model_builder.cpp \ theory/quantifiers/model_builder.h \ theory/quantifiers/model_engine.cpp \ theory/quantifiers/model_engine.h \ theory/quantifiers/quant_conflict_find.cpp \ theory/quantifiers/quant_conflict_find.h \ theory/quantifiers/quant_equality_engine.cpp \ theory/quantifiers/quant_equality_engine.h \ theory/quantifiers/quant_split.cpp \ theory/quantifiers/quant_split.h \ theory/quantifiers/quant_util.cpp \ theory/quantifiers/quant_util.h \ theory/quantifiers/quantifiers_attributes.cpp \ theory/quantifiers/quantifiers_attributes.h \ theory/quantifiers/quantifiers_rewriter.cpp \ theory/quantifiers/quantifiers_rewriter.h \ theory/quantifiers/relevant_domain.cpp \ theory/quantifiers/relevant_domain.h \ theory/quantifiers/rewrite_engine.cpp \ theory/quantifiers/rewrite_engine.h \ theory/quantifiers/symmetry_breaking.cpp \ theory/quantifiers/symmetry_breaking.h \ theory/quantifiers/term_database.cpp \ theory/quantifiers/term_database.h \ theory/quantifiers/theory_quantifiers.cpp \ theory/quantifiers/theory_quantifiers.h \ theory/quantifiers/theory_quantifiers_type_rules.h \ theory/quantifiers/trigger.cpp \ theory/quantifiers/trigger.h \ theory/sep/theory_sep.cpp \ theory/sep/theory_sep.h \ theory/sep/theory_sep_rewriter.cpp \ theory/sep/theory_sep_rewriter.h \ theory/sep/theory_sep_type_rules.h \ theory/sets/normal_form.h \ theory/sets/rels_utils.h \ theory/sets/theory_sets.cpp \ theory/sets/theory_sets.h \ theory/sets/theory_sets_private.cpp \ theory/sets/theory_sets_private.h \ theory/sets/theory_sets_rels.cpp \ theory/sets/theory_sets_rels.h \ theory/sets/theory_sets_rewriter.cpp \ theory/sets/theory_sets_rewriter.h \ theory/sets/theory_sets_type_enumerator.h \ theory/sets/theory_sets_type_rules.h \ theory/strings/regexp_operation.cpp \ theory/strings/regexp_operation.h \ theory/strings/theory_strings.cpp \ theory/strings/theory_strings.h \ theory/strings/theory_strings_preprocess.cpp \ theory/strings/theory_strings_preprocess.h \ theory/strings/theory_strings_rewriter.cpp \ theory/strings/theory_strings_rewriter.h \ theory/strings/theory_strings_type_rules.h \ theory/strings/type_enumerator.h \ theory/uf/equality_engine.cpp \ theory/uf/equality_engine.h \ theory/uf/equality_engine_types.h \ theory/uf/symmetry_breaker.cpp \ theory/uf/symmetry_breaker.h \ theory/uf/theory_uf.cpp \ theory/uf/theory_uf.h \ theory/uf/theory_uf_model.cpp \ theory/uf/theory_uf_model.h \ theory/uf/theory_uf_rewriter.h \ theory/uf/theory_uf_strong_solver.cpp \ theory/uf/theory_uf_strong_solver.h \ theory/uf/theory_uf_type_rules.h nodist_libcvc4_la_SOURCES = \ theory/rewriter_tables.h \ theory/theory_traits.h \ theory/type_enumerator.cpp libcvc4_la_LIBADD = \ @builddir@/base/libbase.la \ @builddir@/options/liboptions.la \ @builddir@/util/libutil.la \ @builddir@/expr/libexpr.la \ @builddir@/smt_util/libsmtutil.la \ @builddir@/prop/minisat/libminisat.la \ @builddir@/prop/bvminisat/libbvminisat.la if CVC4_PROOF libcvc4_la_LIBADD += \ @top_builddir@/proofs/lfsc_checker/liblfsc_checker.la \ @top_builddir@/proofs/signatures/libsignatures.la endif libcvc4_la_LIBADD += \ @builddir@/lib/libreplacements.la if CVC4_USE_GLPK libcvc4_la_LIBADD += $(GLPK_LIBS) libcvc4_la_LDFLAGS += $(GLPK_LDFLAGS) endif if CVC4_USE_ABC libcvc4_la_LIBADD += $(ABC_LIBS) libcvc4_la_LDFLAGS += $(ABC_LDFLAGS) endif if CVC4_USE_CRYPTOMINISAT libcvc4_la_LIBADD += $(CRYPTOMINISAT_LIBS) libcvc4_la_LDFLAGS += $(CRYPTOMINISAT_LDFLAGS) endif BUILT_SOURCES = \ theory/rewriter_tables.h \ theory/theory_traits.h \ theory/type_enumerator.cpp \ $(top_builddir)/src/.subdirs CLEANFILES = \ svn_versioninfo.cpp \ svninfo.tmp \ svninfo \ git_versioninfo.cpp \ gitinfo.tmp \ gitinfo \ theory/rewriter_tables.h \ theory/theory_traits.h \ theory/type_enumerator.cpp \ $(top_builddir)/src/.subdirs EXTRA_DIST = \ Makefile.theories \ cvc4.i \ include/cvc4.h \ include/cvc4_private.h \ include/cvc4_private_library.h \ include/cvc4_public.h \ include/cvc4parser_private.h \ include/cvc4parser_public.h \ mksubdirs \ smt/command.i \ smt/logic_exception.i \ smt/smt_engine.i \ proof/unsat_core.i \ theory/arith/kinds \ theory/arrays/kinds \ theory/booleans/kinds \ theory/builtin/kinds \ theory/bv/kinds \ theory/datatypes/kinds \ theory/example/ecdata.cpp \ theory/example/ecdata.h \ theory/example/theory_uf_tim.cpp \ theory/example/theory_uf_tim.h \ theory/fp/kinds \ theory/idl/kinds \ theory/logic_info.i \ theory/mkrewriter \ theory/mktheorytraits \ theory/quantifiers/kinds \ theory/rewriter_tables_template.h \ theory/sep/kinds \ theory/sets/kinds \ theory/strings/kinds \ theory/theory_traits_template.h \ theory/type_enumerator_template.cpp \ theory/uf/kinds svn_versioninfo.cpp: svninfo $(AM_V_GEN)( \ if test -s svninfo; then \ issvn=true; \ branch=`grep '^URL: ' svninfo | sed 's,.*/cvc4/,,'`; \ rev=`grep '^Revision: ' svninfo | awk '{print$$2}'`; \ mods=`grep '^Modifications: ' svninfo | awk '{print$$2} END { if(!NR) print "false" }'`; \ else \ issvn=false; \ branch=unknown; \ rev=0; \ mods=false; \ fi; \ echo "#include \"base/configuration.h\""; \ echo "const bool ::CVC4::Configuration::IS_SUBVERSION_BUILD = $$issvn;"; \ echo "const char* const ::CVC4::Configuration::SUBVERSION_BRANCH_NAME = \"$$branch\";"; \ echo "const unsigned ::CVC4::Configuration::SUBVERSION_REVISION = $$rev;"; \ echo "const bool ::CVC4::Configuration::SUBVERSION_HAS_MODIFICATIONS = $$mods;"; \ ) >"$@" # This .tmp business is to keep from having to re-compile options.cpp # (and then re-link the libraries) if nothing has changed. svninfo: svninfo.tmp $(AM_V_GEN)if diff -q svninfo.tmp svninfo &>/dev/null; then rm -f svninfo.tmp; else mv svninfo.tmp svninfo; fi # .PHONY ensures the .tmp version is always rebuilt (to check for any changes) .PHONY: svninfo.tmp svninfo.tmp: $(AM_V_GEN)(cd "$(top_srcdir)" && svn info && echo "Modifications: `test -z \"\`svn status -q\`\" && echo false || echo true`") >"$@" 2>/dev/null || true git_versioninfo.cpp: gitinfo $(AM_V_GEN)( \ if test -s gitinfo; then \ isgit=true; \ branch=`head -1 gitinfo`; \ rev=`head -2 gitinfo | tail -1 | awk '{print$$1}'`; \ mods=`grep '^Modifications: ' gitinfo | awk '{print$$2} END { if(!NR) print "false" }'`; \ else \ isgit=false; \ branch=unknown; \ rev=unknown; \ mods=false; \ fi; \ echo "#include \"base/configuration.h\""; \ echo "const bool ::CVC4::Configuration::IS_GIT_BUILD = $$isgit;"; \ echo "const char* const ::CVC4::Configuration::GIT_BRANCH_NAME = \"$$branch\";"; \ echo "const char* const ::CVC4::Configuration::GIT_COMMIT = \"$$rev\";"; \ echo "const bool ::CVC4::Configuration::GIT_HAS_MODIFICATIONS = $$mods;"; \ ) >"$@" # This .tmp business is to keep from having to re-compile options.cpp # (and then re-link the libraries) if nothing has changed. gitinfo: gitinfo.tmp $(AM_V_GEN)if diff -q gitinfo.tmp gitinfo &>/dev/null; then rm -f gitinfo.tmp; else mv gitinfo.tmp gitinfo; fi || true # .PHONY ensures the .tmp version is always rebuilt (to check for any changes) .PHONY: gitinfo.tmp gitinfo.tmp: $(AM_V_GEN)(cd "$(top_srcdir)"; if test -e .git/HEAD; then if ! grep -q '^ref: refs/heads/' .git/HEAD; then echo; fi; sed 's,^ref: refs/heads/,,' .git/HEAD; git show-ref refs/heads/`sed 's,^ref: refs/heads/,,' .git/HEAD`; echo "Modifications: `test -z \"\`git status -s -uno\`\" && echo false || echo true`"; fi) >"$@" 2>/dev/null || true install-data-local: (echo include/cvc4.h; \ echo include/cvc4_public.h; \ echo include/cvc4parser_public.h; \ echo base/tls.h; \ echo util/integer.h; \ echo util/rational.h; \ find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"'; \ (cd "$(srcdir)" && find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \ while read f; do \ if expr "$$f" : ".*_\(template\|private\|private_library\|test_utils\)\.h$$" &>/dev/null; then \ continue; \ fi; \ d="$$(echo "$$f" | sed 's,^include/,,')"; \ $(mkinstalldirs) "$$(dirname "$(DESTDIR)$(includedir)/cvc4/$$d")"; \ if [ -e "$$f" ]; then \ path="$$f"; \ else \ path="$(srcdir)/$$f"; \ fi; \ fixpath="$(top_builddir)/header_install.fix"; \ sed 's,^\([ \t]*#[ \t]*include[ \t*]\)"\(.*\)"\([ \t]*\)$$,\1\3,' "$$path" > "$$fixpath" || exit 1; \ echo $(INSTALL_DATA) "$$fixpath" "$(DESTDIR)$(includedir)/cvc4/$$d"; \ if $(INSTALL_DATA) "$$fixpath" "$(DESTDIR)$(includedir)/cvc4/$$d"; then \ rm -f "$$fixpath"; \ else \ rm -f "$$fixpath"; \ exit 1; \ fi; \ done uninstall-local: -(echo include/cvc4.h; \ echo include/cvc4_public.h; \ echo include/cvc4parser_public.h; \ echo base/tls.h; \ echo util/integer.h; \ echo util/rational.h; \ find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"'; \ (cd "$(srcdir)" && find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \ while read f; do \ if expr "$$f" : ".*_\(template\|private\|private_library\|test_utils\)\.h$$" &>/dev/null; then \ continue; \ fi; \ d="$$(echo "$$f" | sed 's,^include/,,')"; \ rm -f "$(DESTDIR)$(includedir)/cvc4/$$d"; \ done -rmdir "$(DESTDIR)$(includedir)/cvc4/bindings/compat" -rmdir "$(DESTDIR)$(includedir)/cvc4/bindings" -rmdir "$(DESTDIR)$(includedir)/cvc4" -rmdir "$(DESTDIR)$(libdir)/ocaml/cvc4" # This rule is ugly. It's needed to ensure that automake's dependence # includes are available during distclean, even though they come from # directories that are cleaned first. Without this rule, "distclean" # fails. %.Plo:; $(MKDIR_P) "$(dir $@)" && : > "$@" #include @top_srcdir@/src/theory/Makefile.subdirs $(top_builddir)/src/.subdirs: $(top_srcdir)/src/Makefile.theories @top_srcdir@/src/mksubdirs $(AM_V_at)test -d $(top_builddir)/src || mkdir $(top_builddir)/src $(AM_V_at)chmod +x @top_srcdir@/src/mksubdirs $(AM_V_at)( @top_srcdir@/src/mksubdirs "$(top_srcdir)" ) > $(top_builddir)/src/.subdirs.tmp @if ! diff -q $(top_builddir)/src/.subdirs $(top_builddir)/src/.subdirs.tmp &>/dev/null; then \ echo " GEN " $@; \ $(am__mv) $(top_builddir)/src/.subdirs.tmp $(top_builddir)/src/.subdirs; \ fi theory/rewriter_tables.h: theory/rewriter_tables_template.h theory/mkrewriter @top_builddir@/src/.subdirs @top_srcdir@/src/theory/*/kinds $(AM_V_at)test -d $(top_builddir)/src/theory || mkdir -p @top_builddir@/src/theory $(AM_V_at)chmod +x @srcdir@/theory/mkrewriter $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/theory/mkrewriter \ $< \ `cat @top_builddir@/src/.subdirs` \ > $@) || (rm -f $@ && exit 1) theory/theory_traits.h: theory/theory_traits_template.h theory/mktheorytraits @top_builddir@/src/.subdirs @top_srcdir@/src/theory/*/kinds $(AM_V_at)test -d $(top_builddir)/src/theory || mkdir -p @top_builddir@/src/theory $(AM_V_at)chmod +x @srcdir@/theory/mktheorytraits $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/theory/mktheorytraits \ $< \ `cat @top_builddir@/src/.subdirs` \ > $@) || (rm -f $@ && exit 1) theory/type_enumerator.cpp: theory/type_enumerator_template.cpp theory/mktheorytraits @top_builddir@/src/.subdirs @top_srcdir@/src/theory/*/kinds $(AM_V_at)test -d $(top_builddir)/src/theory || mkdir -p @top_builddir@/src/theory $(AM_V_at)chmod +x @srcdir@/theory/mktheorytraits $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/theory/mktheorytraits \ $< \ `cat @top_builddir@/src/.subdirs` \ > $@) || (rm -f $@ && exit 1) cvc4-1.5/src/Makefile.in000066400000000000000000003174521313116454100150650ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ @CVC4_PROOF_TRUE@am__append_1 = \ @CVC4_PROOF_TRUE@ @top_builddir@/proofs/lfsc_checker/liblfsc_checker.la \ @CVC4_PROOF_TRUE@ @top_builddir@/proofs/signatures/libsignatures.la @CVC4_USE_GLPK_TRUE@am__append_2 = $(GLPK_LIBS) @CVC4_USE_GLPK_TRUE@am__append_3 = $(GLPK_LDFLAGS) @CVC4_USE_ABC_TRUE@am__append_4 = $(ABC_LIBS) @CVC4_USE_ABC_TRUE@am__append_5 = $(ABC_LDFLAGS) @CVC4_USE_CRYPTOMINISAT_TRUE@am__append_6 = $(CRYPTOMINISAT_LIBS) @CVC4_USE_CRYPTOMINISAT_TRUE@am__append_7 = $(CRYPTOMINISAT_LDFLAGS) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = @CVC4_USE_GLPK_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @CVC4_USE_ABC_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) @CVC4_USE_CRYPTOMINISAT_TRUE@am__DEPENDENCIES_4 = \ @CVC4_USE_CRYPTOMINISAT_TRUE@ $(am__DEPENDENCIES_1) libcvc4_la_DEPENDENCIES = @builddir@/base/libbase.la \ @builddir@/options/liboptions.la @builddir@/util/libutil.la \ @builddir@/expr/libexpr.la @builddir@/smt_util/libsmtutil.la \ @builddir@/prop/minisat/libminisat.la \ @builddir@/prop/bvminisat/libbvminisat.la $(am__append_1) \ @builddir@/lib/libreplacements.la $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) am__dirstamp = $(am__leading_dot)dirstamp am_libcvc4_la_OBJECTS = git_versioninfo.lo svn_versioninfo.lo \ context/context.lo context/context_mm.lo \ decision/decision_engine.lo \ decision/justification_heuristic.lo \ printer/dagification_visitor.lo printer/printer.lo \ printer/ast/ast_printer.lo printer/cvc/cvc_printer.lo \ printer/smt1/smt1_printer.lo printer/smt2/smt2_printer.lo \ printer/tptp/tptp_printer.lo proof/arith_proof.lo \ proof/array_proof.lo proof/bitvector_proof.lo \ proof/cnf_proof.lo proof/lemma_proof.lo proof/proof_manager.lo \ proof/proof_output_channel.lo proof/proof_utils.lo \ proof/simplify_boolean_node.lo proof/skolemization_manager.lo \ proof/theory_proof.lo proof/uf_proof.lo proof/unsat_core.lo \ prop/cnf_stream.lo prop/cryptominisat.lo prop/prop_engine.lo \ prop/sat_solver_factory.lo prop/theory_proxy.lo smt/command.lo \ smt/command_list.lo smt/dump.lo smt/logic_request.lo \ smt/managed_ostreams.lo smt/model.lo smt/smt_engine.lo \ smt/smt_engine_check_proof.lo smt/smt_engine_scope.lo \ smt/smt_statistics_registry.lo smt/term_formula_removal.lo \ theory/assertion.lo theory/atom_requests.lo \ theory/ite_utilities.lo theory/logic_info.lo \ theory/quantifiers_engine.lo theory/rep_set.lo \ theory/rewriter.lo theory/shared_terms_database.lo \ theory/sort_inference.lo theory/substitutions.lo \ theory/term_registration_visitor.lo theory/theory.lo \ theory/theory_engine.lo theory/theory_model.lo \ theory/unconstrained_simplifier.lo theory/valuation.lo \ theory/arith/approx_simplex.lo theory/arith/arith_ite_utils.lo \ theory/arith/arith_rewriter.lo \ theory/arith/arith_static_learner.lo theory/arith/arithvar.lo \ theory/arith/attempt_solution_simplex.lo \ theory/arith/callbacks.lo theory/arith/congruence_manager.lo \ theory/arith/constraint.lo theory/arith/cut_log.lo \ theory/arith/delta_rational.lo theory/arith/dio_solver.lo \ theory/arith/dual_simplex.lo theory/arith/error_set.lo \ theory/arith/fc_simplex.lo theory/arith/infer_bounds.lo \ theory/arith/linear_equality.lo theory/arith/matrix.lo \ theory/arith/nonlinear_extension.lo \ theory/arith/normal_form.lo theory/arith/partial_model.lo \ theory/arith/pseudoboolean_proc.lo theory/arith/simplex.lo \ theory/arith/simplex_update.lo theory/arith/soi_simplex.lo \ theory/arith/tableau.lo theory/arith/tableau_sizes.lo \ theory/arith/theory_arith.lo \ theory/arith/theory_arith_private.lo \ theory/arrays/array_info.lo \ theory/arrays/array_proof_reconstruction.lo \ theory/arrays/static_fact_manager.lo \ theory/arrays/theory_arrays.lo \ theory/arrays/theory_arrays_rewriter.lo \ theory/arrays/union_find.lo \ theory/booleans/circuit_propagator.lo \ theory/booleans/theory_bool.lo \ theory/booleans/theory_bool_rewriter.lo \ theory/builtin/theory_builtin.lo \ theory/builtin/theory_builtin_rewriter.lo \ theory/bv/abstraction.lo theory/bv/aig_bitblaster.lo \ theory/bv/bv_eager_solver.lo theory/bv/bv_inequality_graph.lo \ theory/bv/bv_quick_check.lo \ theory/bv/bv_subtheory_algebraic.lo \ theory/bv/bv_subtheory_bitblast.lo \ theory/bv/bv_subtheory_core.lo \ theory/bv/bv_subtheory_inequality.lo theory/bv/bv_to_bool.lo \ theory/bv/bvintropow2.lo theory/bv/eager_bitblaster.lo \ theory/bv/lazy_bitblaster.lo theory/bv/slicer.lo \ theory/bv/theory_bv.lo theory/bv/theory_bv_rewriter.lo \ theory/bv/theory_bv_utils.lo \ theory/datatypes/datatypes_sygus.lo \ theory/datatypes/theory_datatypes.lo \ theory/datatypes/type_enumerator.lo theory/fp/theory_fp.lo \ theory/fp/theory_fp_rewriter.lo theory/idl/idl_assertion.lo \ theory/idl/idl_assertion_db.lo theory/idl/idl_model.lo \ theory/idl/theory_idl.lo \ theory/quantifiers/alpha_equivalence.lo \ theory/quantifiers/ambqi_builder.lo \ theory/quantifiers/anti_skolem.lo \ theory/quantifiers/bounded_integers.lo \ theory/quantifiers/candidate_generator.lo \ theory/quantifiers/ce_guided_instantiation.lo \ theory/quantifiers/ce_guided_single_inv.lo \ theory/quantifiers/ce_guided_single_inv_ei.lo \ theory/quantifiers/ce_guided_single_inv_sol.lo \ theory/quantifiers/ceg_instantiator.lo \ theory/quantifiers/ceg_t_instantiator.lo \ theory/quantifiers/conjecture_generator.lo \ theory/quantifiers/equality_infer.lo \ theory/quantifiers/first_order_model.lo \ theory/quantifiers/full_model_check.lo \ theory/quantifiers/fun_def_engine.lo \ theory/quantifiers/fun_def_process.lo \ theory/quantifiers/inst_match.lo \ theory/quantifiers/inst_match_generator.lo \ theory/quantifiers/inst_propagator.lo \ theory/quantifiers/inst_strategy_cbqi.lo \ theory/quantifiers/inst_strategy_e_matching.lo \ theory/quantifiers/instantiation_engine.lo \ theory/quantifiers/local_theory_ext.lo \ theory/quantifiers/macros.lo \ theory/quantifiers/model_builder.lo \ theory/quantifiers/model_engine.lo \ theory/quantifiers/quant_conflict_find.lo \ theory/quantifiers/quant_equality_engine.lo \ theory/quantifiers/quant_split.lo \ theory/quantifiers/quant_util.lo \ theory/quantifiers/quantifiers_attributes.lo \ theory/quantifiers/quantifiers_rewriter.lo \ theory/quantifiers/relevant_domain.lo \ theory/quantifiers/rewrite_engine.lo \ theory/quantifiers/symmetry_breaking.lo \ theory/quantifiers/term_database.lo \ theory/quantifiers/theory_quantifiers.lo \ theory/quantifiers/trigger.lo theory/sep/theory_sep.lo \ theory/sep/theory_sep_rewriter.lo theory/sets/theory_sets.lo \ theory/sets/theory_sets_private.lo \ theory/sets/theory_sets_rels.lo \ theory/sets/theory_sets_rewriter.lo \ theory/strings/regexp_operation.lo \ theory/strings/theory_strings.lo \ theory/strings/theory_strings_preprocess.lo \ theory/strings/theory_strings_rewriter.lo \ theory/uf/equality_engine.lo theory/uf/symmetry_breaker.lo \ theory/uf/theory_uf.lo theory/uf/theory_uf_model.lo \ theory/uf/theory_uf_strong_solver.lo nodist_libcvc4_la_OBJECTS = theory/type_enumerator.lo libcvc4_la_OBJECTS = $(am_libcvc4_la_OBJECTS) \ $(nodist_libcvc4_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcvc4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libcvc4_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcvc4_la_SOURCES) $(nodist_libcvc4_la_SOURCES) \ $(nodist_EXTRA_libcvc4_la_SOURCES) DIST_SOURCES = $(libcvc4_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ # LIBCVC4_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4_VERSION = @CVC4_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ -D __STDC_LIMIT_MACROS \ -D __STDC_FORMAT_MACROS \ -I@builddir@ -I@srcdir@/include -I@srcdir@ -I@top_srcdir@/proofs/lfsc_checker AM_CXXFLAGS = -Wall -Wno-unknown-pragmas -Wno-parentheses $(FLAG_VISIBILITY_HIDDEN) SUBDIRS = lib base options util expr smt_util prop/minisat prop/bvminisat . parser compat bindings main lib_LTLIBRARIES = libcvc4.la libcvc4_la_LDFLAGS = -version-info $(LIBCVC4_VERSION) $(am__append_3) \ $(am__append_5) $(am__append_7) # This "tricks" automake into linking us as a C++ library (rather than # as a C library, which messes up exception handling support) nodist_EXTRA_libcvc4_la_SOURCES = dummy.cpp libcvc4_la_SOURCES = \ git_versioninfo.cpp \ svn_versioninfo.cpp \ context/backtrackable.h \ context/cdchunk_list.h \ context/cddense_set.h \ context/cdhashmap.h \ context/cdhashmap_forward.h \ context/cdhashset.h \ context/cdhashset_forward.h \ context/cdinsert_hashmap.h \ context/cdinsert_hashmap_forward.h \ context/cdlist.h \ context/cdlist_forward.h \ context/cdmaybe.h \ context/cdo.h \ context/cdqueue.h \ context/cdtrail_hashmap.h \ context/cdtrail_hashmap_forward.h \ context/cdtrail_queue.h \ context/cdvector.h \ context/context.cpp \ context/context.h \ context/context_mm.cpp \ context/context_mm.h \ decision/decision_attributes.h \ decision/decision_engine.cpp \ decision/decision_engine.h \ decision/decision_strategy.h \ decision/justification_heuristic.cpp \ decision/justification_heuristic.h \ printer/dagification_visitor.cpp \ printer/dagification_visitor.h \ printer/printer.cpp \ printer/printer.h \ printer/ast/ast_printer.cpp \ printer/ast/ast_printer.h \ printer/cvc/cvc_printer.cpp \ printer/cvc/cvc_printer.h \ printer/smt1/smt1_printer.cpp \ printer/smt1/smt1_printer.h \ printer/smt2/smt2_printer.cpp \ printer/smt2/smt2_printer.h \ printer/tptp/tptp_printer.cpp \ printer/tptp/tptp_printer.h \ proof/arith_proof.cpp \ proof/arith_proof.h \ proof/array_proof.cpp \ proof/array_proof.h \ proof/bitvector_proof.cpp \ proof/bitvector_proof.h \ proof/clause_id.h \ proof/cnf_proof.cpp \ proof/cnf_proof.h \ proof/lemma_proof.cpp \ proof/lemma_proof.h \ proof/proof.h \ proof/proof_manager.cpp \ proof/proof_manager.h \ proof/proof_output_channel.cpp \ proof/proof_output_channel.h \ proof/proof_utils.cpp \ proof/proof_utils.h \ proof/sat_proof.h \ proof/sat_proof_implementation.h \ proof/simplify_boolean_node.cpp \ proof/simplify_boolean_node.h \ proof/skolemization_manager.cpp \ proof/skolemization_manager.h \ proof/theory_proof.cpp \ proof/theory_proof.h \ proof/uf_proof.cpp \ proof/uf_proof.h \ proof/unsat_core.cpp \ proof/unsat_core.h \ prop/cnf_stream.cpp \ prop/cnf_stream.h \ prop/cryptominisat.cpp \ prop/cryptominisat.h \ prop/prop_engine.cpp \ prop/prop_engine.h \ prop/registrar.h \ prop/sat_solver.h \ prop/sat_solver_factory.cpp \ prop/sat_solver_factory.h \ prop/sat_solver_types.h \ prop/theory_proxy.cpp \ prop/theory_proxy.h \ smt/command.cpp \ smt/command.h \ smt/command_list.cpp \ smt/command_list.h \ smt/dump.cpp \ smt/dump.h \ smt/logic_exception.h \ smt/logic_request.cpp \ smt/logic_request.h \ smt/managed_ostreams.cpp \ smt/managed_ostreams.h \ smt/model.cpp \ smt/model.h \ smt/smt_engine.cpp \ smt/smt_engine.h \ smt/smt_engine_check_proof.cpp \ smt/smt_engine_scope.cpp \ smt/smt_engine_scope.h \ smt/smt_statistics_registry.cpp \ smt/smt_statistics_registry.h \ smt/term_formula_removal.cpp \ smt/term_formula_removal.h \ smt/update_ostream.h \ theory/assertion.cpp \ theory/assertion.h \ theory/atom_requests.cpp \ theory/atom_requests.h \ theory/care_graph.h \ theory/interrupted.h \ theory/ite_utilities.cpp \ theory/ite_utilities.h \ theory/logic_info.cpp \ theory/logic_info.h \ theory/output_channel.h \ theory/quantifiers_engine.cpp \ theory/quantifiers_engine.h \ theory/rep_set.cpp \ theory/rep_set.h \ theory/rewriter.cpp \ theory/rewriter.h \ theory/rewriter_attributes.h \ theory/shared_terms_database.cpp \ theory/shared_terms_database.h \ theory/sort_inference.cpp \ theory/sort_inference.h \ theory/substitutions.cpp \ theory/substitutions.h \ theory/term_registration_visitor.cpp \ theory/term_registration_visitor.h \ theory/theory.cpp \ theory/theory.h \ theory/theory_engine.cpp \ theory/theory_engine.h \ theory/theory_model.cpp \ theory/theory_model.h \ theory/theory_registrar.h \ theory/theory_test_utils.h \ theory/type_enumerator.h \ theory/unconstrained_simplifier.cpp \ theory/unconstrained_simplifier.h \ theory/valuation.cpp \ theory/valuation.h \ theory/arith/approx_simplex.cpp \ theory/arith/approx_simplex.h \ theory/arith/arith_ite_utils.cpp \ theory/arith/arith_ite_utils.h \ theory/arith/arith_rewriter.cpp \ theory/arith/arith_rewriter.h \ theory/arith/arith_static_learner.cpp \ theory/arith/arith_static_learner.h \ theory/arith/arith_utilities.h \ theory/arith/arithvar.cpp \ theory/arith/arithvar.h \ theory/arith/attempt_solution_simplex.cpp \ theory/arith/attempt_solution_simplex.h \ theory/arith/bound_counts.h \ theory/arith/callbacks.cpp \ theory/arith/callbacks.h \ theory/arith/congruence_manager.cpp \ theory/arith/congruence_manager.h \ theory/arith/constraint.cpp \ theory/arith/constraint.h \ theory/arith/constraint_forward.h \ theory/arith/cut_log.cpp \ theory/arith/cut_log.h \ theory/arith/delta_rational.cpp \ theory/arith/delta_rational.h \ theory/arith/dio_solver.cpp \ theory/arith/dio_solver.h \ theory/arith/dual_simplex.cpp \ theory/arith/dual_simplex.h \ theory/arith/error_set.cpp \ theory/arith/error_set.h \ theory/arith/fc_simplex.cpp \ theory/arith/fc_simplex.h \ theory/arith/infer_bounds.cpp \ theory/arith/infer_bounds.h \ theory/arith/linear_equality.cpp \ theory/arith/linear_equality.h \ theory/arith/matrix.cpp \ theory/arith/matrix.h \ theory/arith/nonlinear_extension.h \ theory/arith/nonlinear_extension.cpp \ theory/arith/normal_form.cpp \ theory/arith/normal_form.h\ theory/arith/partial_model.cpp \ theory/arith/partial_model.h \ theory/arith/pseudoboolean_proc.cpp \ theory/arith/pseudoboolean_proc.h \ theory/arith/simplex.cpp \ theory/arith/simplex.h \ theory/arith/simplex_update.cpp \ theory/arith/simplex_update.h \ theory/arith/soi_simplex.cpp \ theory/arith/soi_simplex.h \ theory/arith/tableau.cpp \ theory/arith/tableau.h \ theory/arith/tableau_sizes.cpp \ theory/arith/tableau_sizes.h \ theory/arith/theory_arith.cpp \ theory/arith/theory_arith.h \ theory/arith/theory_arith_private.cpp \ theory/arith/theory_arith_private.h \ theory/arith/theory_arith_private_forward.h \ theory/arith/theory_arith_type_rules.h \ theory/arith/type_enumerator.h \ theory/arrays/array_info.cpp \ theory/arrays/array_info.h \ theory/arrays/array_proof_reconstruction.cpp \ theory/arrays/array_proof_reconstruction.h \ theory/arrays/static_fact_manager.cpp \ theory/arrays/static_fact_manager.h \ theory/arrays/theory_arrays.cpp \ theory/arrays/theory_arrays.h \ theory/arrays/theory_arrays_rewriter.cpp \ theory/arrays/theory_arrays_rewriter.h \ theory/arrays/theory_arrays_type_rules.h \ theory/arrays/type_enumerator.h \ theory/arrays/union_find.cpp \ theory/arrays/union_find.h \ theory/booleans/circuit_propagator.cpp \ theory/booleans/circuit_propagator.h \ theory/booleans/theory_bool.cpp \ theory/booleans/theory_bool.h \ theory/booleans/theory_bool_rewriter.cpp \ theory/booleans/theory_bool_rewriter.h \ theory/booleans/theory_bool_type_rules.h \ theory/booleans/type_enumerator.h \ theory/builtin/theory_builtin.cpp \ theory/builtin/theory_builtin.h \ theory/builtin/theory_builtin_rewriter.cpp \ theory/builtin/theory_builtin_rewriter.h \ theory/builtin/theory_builtin_type_rules.h \ theory/builtin/type_enumerator.h \ theory/bv/abstraction.cpp \ theory/bv/abstraction.h \ theory/bv/aig_bitblaster.cpp \ theory/bv/bitblast_strategies_template.h \ theory/bv/bitblast_utils.h \ theory/bv/bitblaster_template.h \ theory/bv/bv_eager_solver.cpp \ theory/bv/bv_eager_solver.h \ theory/bv/bv_inequality_graph.cpp \ theory/bv/bv_inequality_graph.h \ theory/bv/bv_quick_check.cpp \ theory/bv/bv_quick_check.h \ theory/bv/bv_subtheory.h \ theory/bv/bv_subtheory_algebraic.cpp \ theory/bv/bv_subtheory_algebraic.h \ theory/bv/bv_subtheory_bitblast.cpp \ theory/bv/bv_subtheory_bitblast.h \ theory/bv/bv_subtheory_core.cpp \ theory/bv/bv_subtheory_core.h \ theory/bv/bv_subtheory_inequality.cpp \ theory/bv/bv_subtheory_inequality.h \ theory/bv/bv_to_bool.cpp \ theory/bv/bv_to_bool.h \ theory/bv/bvintropow2.cpp \ theory/bv/bvintropow2.h \ theory/bv/cd_set_collection.h \ theory/bv/eager_bitblaster.cpp \ theory/bv/lazy_bitblaster.cpp \ theory/bv/slicer.cpp \ theory/bv/slicer.h \ theory/bv/theory_bv.cpp \ theory/bv/theory_bv.h \ theory/bv/theory_bv_rewrite_rules.h \ theory/bv/theory_bv_rewrite_rules_constant_evaluation.h \ theory/bv/theory_bv_rewrite_rules_core.h \ theory/bv/theory_bv_rewrite_rules_normalization.h \ theory/bv/theory_bv_rewrite_rules_operator_elimination.h \ theory/bv/theory_bv_rewrite_rules_simplification.h \ theory/bv/theory_bv_rewriter.cpp \ theory/bv/theory_bv_rewriter.h \ theory/bv/theory_bv_type_rules.h \ theory/bv/theory_bv_utils.cpp \ theory/bv/theory_bv_utils.h \ theory/bv/type_enumerator.h \ theory/datatypes/datatypes_rewriter.h \ theory/datatypes/datatypes_sygus.cpp \ theory/datatypes/datatypes_sygus.h \ theory/datatypes/theory_datatypes.cpp \ theory/datatypes/theory_datatypes.h \ theory/datatypes/theory_datatypes_type_rules.h \ theory/datatypes/type_enumerator.cpp \ theory/datatypes/type_enumerator.h \ theory/fp/theory_fp.cpp \ theory/fp/theory_fp.h \ theory/fp/theory_fp_rewriter.cpp \ theory/fp/theory_fp_rewriter.h \ theory/fp/theory_fp_type_rules.h \ theory/idl/idl_assertion.cpp \ theory/idl/idl_assertion.h \ theory/idl/idl_assertion_db.cpp \ theory/idl/idl_assertion_db.h \ theory/idl/idl_model.cpp \ theory/idl/idl_model.h \ theory/idl/theory_idl.cpp \ theory/idl/theory_idl.h \ theory/quantifiers/alpha_equivalence.cpp \ theory/quantifiers/alpha_equivalence.h \ theory/quantifiers/ambqi_builder.cpp \ theory/quantifiers/ambqi_builder.h \ theory/quantifiers/anti_skolem.cpp \ theory/quantifiers/anti_skolem.h \ theory/quantifiers/bounded_integers.cpp \ theory/quantifiers/bounded_integers.h \ theory/quantifiers/candidate_generator.cpp \ theory/quantifiers/candidate_generator.h \ theory/quantifiers/ce_guided_instantiation.cpp \ theory/quantifiers/ce_guided_instantiation.h \ theory/quantifiers/ce_guided_single_inv.cpp \ theory/quantifiers/ce_guided_single_inv.h \ theory/quantifiers/ce_guided_single_inv_ei.cpp \ theory/quantifiers/ce_guided_single_inv_ei.h \ theory/quantifiers/ce_guided_single_inv_sol.cpp \ theory/quantifiers/ce_guided_single_inv_sol.h \ theory/quantifiers/ceg_instantiator.cpp \ theory/quantifiers/ceg_instantiator.h \ theory/quantifiers/ceg_t_instantiator.cpp \ theory/quantifiers/ceg_t_instantiator.h \ theory/quantifiers/conjecture_generator.cpp \ theory/quantifiers/conjecture_generator.h \ theory/quantifiers/equality_infer.cpp \ theory/quantifiers/equality_infer.h \ theory/quantifiers/first_order_model.cpp \ theory/quantifiers/first_order_model.h \ theory/quantifiers/full_model_check.cpp \ theory/quantifiers/full_model_check.h \ theory/quantifiers/fun_def_engine.cpp \ theory/quantifiers/fun_def_engine.h \ theory/quantifiers/fun_def_process.cpp \ theory/quantifiers/fun_def_process.h \ theory/quantifiers/inst_match.cpp \ theory/quantifiers/inst_match.h \ theory/quantifiers/inst_match_generator.cpp \ theory/quantifiers/inst_match_generator.h \ theory/quantifiers/inst_propagator.cpp \ theory/quantifiers/inst_propagator.h \ theory/quantifiers/inst_strategy_cbqi.cpp \ theory/quantifiers/inst_strategy_cbqi.h \ theory/quantifiers/inst_strategy_e_matching.cpp \ theory/quantifiers/inst_strategy_e_matching.h \ theory/quantifiers/instantiation_engine.cpp \ theory/quantifiers/instantiation_engine.h \ theory/quantifiers/local_theory_ext.cpp \ theory/quantifiers/local_theory_ext.h \ theory/quantifiers/macros.cpp \ theory/quantifiers/macros.h \ theory/quantifiers/model_builder.cpp \ theory/quantifiers/model_builder.h \ theory/quantifiers/model_engine.cpp \ theory/quantifiers/model_engine.h \ theory/quantifiers/quant_conflict_find.cpp \ theory/quantifiers/quant_conflict_find.h \ theory/quantifiers/quant_equality_engine.cpp \ theory/quantifiers/quant_equality_engine.h \ theory/quantifiers/quant_split.cpp \ theory/quantifiers/quant_split.h \ theory/quantifiers/quant_util.cpp \ theory/quantifiers/quant_util.h \ theory/quantifiers/quantifiers_attributes.cpp \ theory/quantifiers/quantifiers_attributes.h \ theory/quantifiers/quantifiers_rewriter.cpp \ theory/quantifiers/quantifiers_rewriter.h \ theory/quantifiers/relevant_domain.cpp \ theory/quantifiers/relevant_domain.h \ theory/quantifiers/rewrite_engine.cpp \ theory/quantifiers/rewrite_engine.h \ theory/quantifiers/symmetry_breaking.cpp \ theory/quantifiers/symmetry_breaking.h \ theory/quantifiers/term_database.cpp \ theory/quantifiers/term_database.h \ theory/quantifiers/theory_quantifiers.cpp \ theory/quantifiers/theory_quantifiers.h \ theory/quantifiers/theory_quantifiers_type_rules.h \ theory/quantifiers/trigger.cpp \ theory/quantifiers/trigger.h \ theory/sep/theory_sep.cpp \ theory/sep/theory_sep.h \ theory/sep/theory_sep_rewriter.cpp \ theory/sep/theory_sep_rewriter.h \ theory/sep/theory_sep_type_rules.h \ theory/sets/normal_form.h \ theory/sets/rels_utils.h \ theory/sets/theory_sets.cpp \ theory/sets/theory_sets.h \ theory/sets/theory_sets_private.cpp \ theory/sets/theory_sets_private.h \ theory/sets/theory_sets_rels.cpp \ theory/sets/theory_sets_rels.h \ theory/sets/theory_sets_rewriter.cpp \ theory/sets/theory_sets_rewriter.h \ theory/sets/theory_sets_type_enumerator.h \ theory/sets/theory_sets_type_rules.h \ theory/strings/regexp_operation.cpp \ theory/strings/regexp_operation.h \ theory/strings/theory_strings.cpp \ theory/strings/theory_strings.h \ theory/strings/theory_strings_preprocess.cpp \ theory/strings/theory_strings_preprocess.h \ theory/strings/theory_strings_rewriter.cpp \ theory/strings/theory_strings_rewriter.h \ theory/strings/theory_strings_type_rules.h \ theory/strings/type_enumerator.h \ theory/uf/equality_engine.cpp \ theory/uf/equality_engine.h \ theory/uf/equality_engine_types.h \ theory/uf/symmetry_breaker.cpp \ theory/uf/symmetry_breaker.h \ theory/uf/theory_uf.cpp \ theory/uf/theory_uf.h \ theory/uf/theory_uf_model.cpp \ theory/uf/theory_uf_model.h \ theory/uf/theory_uf_rewriter.h \ theory/uf/theory_uf_strong_solver.cpp \ theory/uf/theory_uf_strong_solver.h \ theory/uf/theory_uf_type_rules.h nodist_libcvc4_la_SOURCES = \ theory/rewriter_tables.h \ theory/theory_traits.h \ theory/type_enumerator.cpp libcvc4_la_LIBADD = @builddir@/base/libbase.la \ @builddir@/options/liboptions.la @builddir@/util/libutil.la \ @builddir@/expr/libexpr.la @builddir@/smt_util/libsmtutil.la \ @builddir@/prop/minisat/libminisat.la \ @builddir@/prop/bvminisat/libbvminisat.la $(am__append_1) \ @builddir@/lib/libreplacements.la $(am__append_2) \ $(am__append_4) $(am__append_6) BUILT_SOURCES = \ theory/rewriter_tables.h \ theory/theory_traits.h \ theory/type_enumerator.cpp \ $(top_builddir)/src/.subdirs CLEANFILES = \ svn_versioninfo.cpp \ svninfo.tmp \ svninfo \ git_versioninfo.cpp \ gitinfo.tmp \ gitinfo \ theory/rewriter_tables.h \ theory/theory_traits.h \ theory/type_enumerator.cpp \ $(top_builddir)/src/.subdirs EXTRA_DIST = \ Makefile.theories \ cvc4.i \ include/cvc4.h \ include/cvc4_private.h \ include/cvc4_private_library.h \ include/cvc4_public.h \ include/cvc4parser_private.h \ include/cvc4parser_public.h \ mksubdirs \ smt/command.i \ smt/logic_exception.i \ smt/smt_engine.i \ proof/unsat_core.i \ theory/arith/kinds \ theory/arrays/kinds \ theory/booleans/kinds \ theory/builtin/kinds \ theory/bv/kinds \ theory/datatypes/kinds \ theory/example/ecdata.cpp \ theory/example/ecdata.h \ theory/example/theory_uf_tim.cpp \ theory/example/theory_uf_tim.h \ theory/fp/kinds \ theory/idl/kinds \ theory/logic_info.i \ theory/mkrewriter \ theory/mktheorytraits \ theory/quantifiers/kinds \ theory/rewriter_tables_template.h \ theory/sep/kinds \ theory/sets/kinds \ theory/strings/kinds \ theory/theory_traits_template.h \ theory/type_enumerator_template.cpp \ theory/uf/kinds all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } context/$(am__dirstamp): @$(MKDIR_P) context @: > context/$(am__dirstamp) context/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) context/$(DEPDIR) @: > context/$(DEPDIR)/$(am__dirstamp) context/context.lo: context/$(am__dirstamp) \ context/$(DEPDIR)/$(am__dirstamp) context/context_mm.lo: context/$(am__dirstamp) \ context/$(DEPDIR)/$(am__dirstamp) decision/$(am__dirstamp): @$(MKDIR_P) decision @: > decision/$(am__dirstamp) decision/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) decision/$(DEPDIR) @: > decision/$(DEPDIR)/$(am__dirstamp) decision/decision_engine.lo: decision/$(am__dirstamp) \ decision/$(DEPDIR)/$(am__dirstamp) decision/justification_heuristic.lo: decision/$(am__dirstamp) \ decision/$(DEPDIR)/$(am__dirstamp) printer/$(am__dirstamp): @$(MKDIR_P) printer @: > printer/$(am__dirstamp) printer/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) printer/$(DEPDIR) @: > printer/$(DEPDIR)/$(am__dirstamp) printer/dagification_visitor.lo: printer/$(am__dirstamp) \ printer/$(DEPDIR)/$(am__dirstamp) printer/printer.lo: printer/$(am__dirstamp) \ printer/$(DEPDIR)/$(am__dirstamp) printer/ast/$(am__dirstamp): @$(MKDIR_P) printer/ast @: > printer/ast/$(am__dirstamp) printer/ast/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) printer/ast/$(DEPDIR) @: > printer/ast/$(DEPDIR)/$(am__dirstamp) printer/ast/ast_printer.lo: printer/ast/$(am__dirstamp) \ printer/ast/$(DEPDIR)/$(am__dirstamp) printer/cvc/$(am__dirstamp): @$(MKDIR_P) printer/cvc @: > printer/cvc/$(am__dirstamp) printer/cvc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) printer/cvc/$(DEPDIR) @: > printer/cvc/$(DEPDIR)/$(am__dirstamp) printer/cvc/cvc_printer.lo: printer/cvc/$(am__dirstamp) \ printer/cvc/$(DEPDIR)/$(am__dirstamp) printer/smt1/$(am__dirstamp): @$(MKDIR_P) printer/smt1 @: > printer/smt1/$(am__dirstamp) printer/smt1/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) printer/smt1/$(DEPDIR) @: > printer/smt1/$(DEPDIR)/$(am__dirstamp) printer/smt1/smt1_printer.lo: printer/smt1/$(am__dirstamp) \ printer/smt1/$(DEPDIR)/$(am__dirstamp) printer/smt2/$(am__dirstamp): @$(MKDIR_P) printer/smt2 @: > printer/smt2/$(am__dirstamp) printer/smt2/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) printer/smt2/$(DEPDIR) @: > printer/smt2/$(DEPDIR)/$(am__dirstamp) printer/smt2/smt2_printer.lo: printer/smt2/$(am__dirstamp) \ printer/smt2/$(DEPDIR)/$(am__dirstamp) printer/tptp/$(am__dirstamp): @$(MKDIR_P) printer/tptp @: > printer/tptp/$(am__dirstamp) printer/tptp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) printer/tptp/$(DEPDIR) @: > printer/tptp/$(DEPDIR)/$(am__dirstamp) printer/tptp/tptp_printer.lo: printer/tptp/$(am__dirstamp) \ printer/tptp/$(DEPDIR)/$(am__dirstamp) proof/$(am__dirstamp): @$(MKDIR_P) proof @: > proof/$(am__dirstamp) proof/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) proof/$(DEPDIR) @: > proof/$(DEPDIR)/$(am__dirstamp) proof/arith_proof.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/array_proof.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/bitvector_proof.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/cnf_proof.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/lemma_proof.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/proof_manager.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/proof_output_channel.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/proof_utils.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/simplify_boolean_node.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/skolemization_manager.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/theory_proof.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/uf_proof.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) proof/unsat_core.lo: proof/$(am__dirstamp) \ proof/$(DEPDIR)/$(am__dirstamp) prop/$(am__dirstamp): @$(MKDIR_P) prop @: > prop/$(am__dirstamp) prop/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) prop/$(DEPDIR) @: > prop/$(DEPDIR)/$(am__dirstamp) prop/cnf_stream.lo: prop/$(am__dirstamp) \ prop/$(DEPDIR)/$(am__dirstamp) prop/cryptominisat.lo: prop/$(am__dirstamp) \ prop/$(DEPDIR)/$(am__dirstamp) prop/prop_engine.lo: prop/$(am__dirstamp) \ prop/$(DEPDIR)/$(am__dirstamp) prop/sat_solver_factory.lo: prop/$(am__dirstamp) \ prop/$(DEPDIR)/$(am__dirstamp) prop/theory_proxy.lo: prop/$(am__dirstamp) \ prop/$(DEPDIR)/$(am__dirstamp) smt/$(am__dirstamp): @$(MKDIR_P) smt @: > smt/$(am__dirstamp) smt/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) smt/$(DEPDIR) @: > smt/$(DEPDIR)/$(am__dirstamp) smt/command.lo: smt/$(am__dirstamp) smt/$(DEPDIR)/$(am__dirstamp) smt/command_list.lo: smt/$(am__dirstamp) smt/$(DEPDIR)/$(am__dirstamp) smt/dump.lo: smt/$(am__dirstamp) smt/$(DEPDIR)/$(am__dirstamp) smt/logic_request.lo: smt/$(am__dirstamp) \ smt/$(DEPDIR)/$(am__dirstamp) smt/managed_ostreams.lo: smt/$(am__dirstamp) \ smt/$(DEPDIR)/$(am__dirstamp) smt/model.lo: smt/$(am__dirstamp) smt/$(DEPDIR)/$(am__dirstamp) smt/smt_engine.lo: smt/$(am__dirstamp) smt/$(DEPDIR)/$(am__dirstamp) smt/smt_engine_check_proof.lo: smt/$(am__dirstamp) \ smt/$(DEPDIR)/$(am__dirstamp) smt/smt_engine_scope.lo: smt/$(am__dirstamp) \ smt/$(DEPDIR)/$(am__dirstamp) smt/smt_statistics_registry.lo: smt/$(am__dirstamp) \ smt/$(DEPDIR)/$(am__dirstamp) smt/term_formula_removal.lo: smt/$(am__dirstamp) \ smt/$(DEPDIR)/$(am__dirstamp) theory/$(am__dirstamp): @$(MKDIR_P) theory @: > theory/$(am__dirstamp) theory/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/$(DEPDIR) @: > theory/$(DEPDIR)/$(am__dirstamp) theory/assertion.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/atom_requests.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/ite_utilities.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/logic_info.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/quantifiers_engine.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/rep_set.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/rewriter.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/shared_terms_database.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/sort_inference.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/substitutions.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/term_registration_visitor.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/theory.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/theory_engine.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/theory_model.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/unconstrained_simplifier.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/valuation.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) theory/arith/$(am__dirstamp): @$(MKDIR_P) theory/arith @: > theory/arith/$(am__dirstamp) theory/arith/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/arith/$(DEPDIR) @: > theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/approx_simplex.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/arith_ite_utils.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/arith_rewriter.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/arith_static_learner.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/arithvar.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/attempt_solution_simplex.lo: \ theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/callbacks.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/congruence_manager.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/constraint.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/cut_log.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/delta_rational.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/dio_solver.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/dual_simplex.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/error_set.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/fc_simplex.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/infer_bounds.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/linear_equality.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/matrix.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/nonlinear_extension.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/normal_form.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/partial_model.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/pseudoboolean_proc.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/simplex.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/simplex_update.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/soi_simplex.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/tableau.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/tableau_sizes.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/theory_arith.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arith/theory_arith_private.lo: theory/arith/$(am__dirstamp) \ theory/arith/$(DEPDIR)/$(am__dirstamp) theory/arrays/$(am__dirstamp): @$(MKDIR_P) theory/arrays @: > theory/arrays/$(am__dirstamp) theory/arrays/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/arrays/$(DEPDIR) @: > theory/arrays/$(DEPDIR)/$(am__dirstamp) theory/arrays/array_info.lo: theory/arrays/$(am__dirstamp) \ theory/arrays/$(DEPDIR)/$(am__dirstamp) theory/arrays/array_proof_reconstruction.lo: \ theory/arrays/$(am__dirstamp) \ theory/arrays/$(DEPDIR)/$(am__dirstamp) theory/arrays/static_fact_manager.lo: theory/arrays/$(am__dirstamp) \ theory/arrays/$(DEPDIR)/$(am__dirstamp) theory/arrays/theory_arrays.lo: theory/arrays/$(am__dirstamp) \ theory/arrays/$(DEPDIR)/$(am__dirstamp) theory/arrays/theory_arrays_rewriter.lo: \ theory/arrays/$(am__dirstamp) \ theory/arrays/$(DEPDIR)/$(am__dirstamp) theory/arrays/union_find.lo: theory/arrays/$(am__dirstamp) \ theory/arrays/$(DEPDIR)/$(am__dirstamp) theory/booleans/$(am__dirstamp): @$(MKDIR_P) theory/booleans @: > theory/booleans/$(am__dirstamp) theory/booleans/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/booleans/$(DEPDIR) @: > theory/booleans/$(DEPDIR)/$(am__dirstamp) theory/booleans/circuit_propagator.lo: \ theory/booleans/$(am__dirstamp) \ theory/booleans/$(DEPDIR)/$(am__dirstamp) theory/booleans/theory_bool.lo: theory/booleans/$(am__dirstamp) \ theory/booleans/$(DEPDIR)/$(am__dirstamp) theory/booleans/theory_bool_rewriter.lo: \ theory/booleans/$(am__dirstamp) \ theory/booleans/$(DEPDIR)/$(am__dirstamp) theory/builtin/$(am__dirstamp): @$(MKDIR_P) theory/builtin @: > theory/builtin/$(am__dirstamp) theory/builtin/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/builtin/$(DEPDIR) @: > theory/builtin/$(DEPDIR)/$(am__dirstamp) theory/builtin/theory_builtin.lo: theory/builtin/$(am__dirstamp) \ theory/builtin/$(DEPDIR)/$(am__dirstamp) theory/builtin/theory_builtin_rewriter.lo: \ theory/builtin/$(am__dirstamp) \ theory/builtin/$(DEPDIR)/$(am__dirstamp) theory/bv/$(am__dirstamp): @$(MKDIR_P) theory/bv @: > theory/bv/$(am__dirstamp) theory/bv/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/bv/$(DEPDIR) @: > theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/abstraction.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/aig_bitblaster.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_eager_solver.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_inequality_graph.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_quick_check.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_subtheory_algebraic.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_subtheory_bitblast.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_subtheory_core.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_subtheory_inequality.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bv_to_bool.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/bvintropow2.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/eager_bitblaster.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/lazy_bitblaster.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/slicer.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/theory_bv.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/theory_bv_rewriter.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/bv/theory_bv_utils.lo: theory/bv/$(am__dirstamp) \ theory/bv/$(DEPDIR)/$(am__dirstamp) theory/datatypes/$(am__dirstamp): @$(MKDIR_P) theory/datatypes @: > theory/datatypes/$(am__dirstamp) theory/datatypes/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/datatypes/$(DEPDIR) @: > theory/datatypes/$(DEPDIR)/$(am__dirstamp) theory/datatypes/datatypes_sygus.lo: theory/datatypes/$(am__dirstamp) \ theory/datatypes/$(DEPDIR)/$(am__dirstamp) theory/datatypes/theory_datatypes.lo: \ theory/datatypes/$(am__dirstamp) \ theory/datatypes/$(DEPDIR)/$(am__dirstamp) theory/datatypes/type_enumerator.lo: theory/datatypes/$(am__dirstamp) \ theory/datatypes/$(DEPDIR)/$(am__dirstamp) theory/fp/$(am__dirstamp): @$(MKDIR_P) theory/fp @: > theory/fp/$(am__dirstamp) theory/fp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/fp/$(DEPDIR) @: > theory/fp/$(DEPDIR)/$(am__dirstamp) theory/fp/theory_fp.lo: theory/fp/$(am__dirstamp) \ theory/fp/$(DEPDIR)/$(am__dirstamp) theory/fp/theory_fp_rewriter.lo: theory/fp/$(am__dirstamp) \ theory/fp/$(DEPDIR)/$(am__dirstamp) theory/idl/$(am__dirstamp): @$(MKDIR_P) theory/idl @: > theory/idl/$(am__dirstamp) theory/idl/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/idl/$(DEPDIR) @: > theory/idl/$(DEPDIR)/$(am__dirstamp) theory/idl/idl_assertion.lo: theory/idl/$(am__dirstamp) \ theory/idl/$(DEPDIR)/$(am__dirstamp) theory/idl/idl_assertion_db.lo: theory/idl/$(am__dirstamp) \ theory/idl/$(DEPDIR)/$(am__dirstamp) theory/idl/idl_model.lo: theory/idl/$(am__dirstamp) \ theory/idl/$(DEPDIR)/$(am__dirstamp) theory/idl/theory_idl.lo: theory/idl/$(am__dirstamp) \ theory/idl/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/$(am__dirstamp): @$(MKDIR_P) theory/quantifiers @: > theory/quantifiers/$(am__dirstamp) theory/quantifiers/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/quantifiers/$(DEPDIR) @: > theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/alpha_equivalence.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/ambqi_builder.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/anti_skolem.lo: theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/bounded_integers.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/candidate_generator.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/ce_guided_instantiation.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/ce_guided_single_inv.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/ce_guided_single_inv_ei.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/ce_guided_single_inv_sol.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/ceg_instantiator.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/ceg_t_instantiator.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/conjecture_generator.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/equality_infer.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/first_order_model.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/full_model_check.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/fun_def_engine.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/fun_def_process.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/inst_match.lo: theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/inst_match_generator.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/inst_propagator.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/inst_strategy_cbqi.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/inst_strategy_e_matching.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/instantiation_engine.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/local_theory_ext.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/macros.lo: theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/model_builder.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/model_engine.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/quant_conflict_find.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/quant_equality_engine.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/quant_split.lo: theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/quant_util.lo: theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/quantifiers_attributes.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/quantifiers_rewriter.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/relevant_domain.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/rewrite_engine.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/symmetry_breaking.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/term_database.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/theory_quantifiers.lo: \ theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/quantifiers/trigger.lo: theory/quantifiers/$(am__dirstamp) \ theory/quantifiers/$(DEPDIR)/$(am__dirstamp) theory/sep/$(am__dirstamp): @$(MKDIR_P) theory/sep @: > theory/sep/$(am__dirstamp) theory/sep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/sep/$(DEPDIR) @: > theory/sep/$(DEPDIR)/$(am__dirstamp) theory/sep/theory_sep.lo: theory/sep/$(am__dirstamp) \ theory/sep/$(DEPDIR)/$(am__dirstamp) theory/sep/theory_sep_rewriter.lo: theory/sep/$(am__dirstamp) \ theory/sep/$(DEPDIR)/$(am__dirstamp) theory/sets/$(am__dirstamp): @$(MKDIR_P) theory/sets @: > theory/sets/$(am__dirstamp) theory/sets/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/sets/$(DEPDIR) @: > theory/sets/$(DEPDIR)/$(am__dirstamp) theory/sets/theory_sets.lo: theory/sets/$(am__dirstamp) \ theory/sets/$(DEPDIR)/$(am__dirstamp) theory/sets/theory_sets_private.lo: theory/sets/$(am__dirstamp) \ theory/sets/$(DEPDIR)/$(am__dirstamp) theory/sets/theory_sets_rels.lo: theory/sets/$(am__dirstamp) \ theory/sets/$(DEPDIR)/$(am__dirstamp) theory/sets/theory_sets_rewriter.lo: theory/sets/$(am__dirstamp) \ theory/sets/$(DEPDIR)/$(am__dirstamp) theory/strings/$(am__dirstamp): @$(MKDIR_P) theory/strings @: > theory/strings/$(am__dirstamp) theory/strings/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/strings/$(DEPDIR) @: > theory/strings/$(DEPDIR)/$(am__dirstamp) theory/strings/regexp_operation.lo: theory/strings/$(am__dirstamp) \ theory/strings/$(DEPDIR)/$(am__dirstamp) theory/strings/theory_strings.lo: theory/strings/$(am__dirstamp) \ theory/strings/$(DEPDIR)/$(am__dirstamp) theory/strings/theory_strings_preprocess.lo: \ theory/strings/$(am__dirstamp) \ theory/strings/$(DEPDIR)/$(am__dirstamp) theory/strings/theory_strings_rewriter.lo: \ theory/strings/$(am__dirstamp) \ theory/strings/$(DEPDIR)/$(am__dirstamp) theory/uf/$(am__dirstamp): @$(MKDIR_P) theory/uf @: > theory/uf/$(am__dirstamp) theory/uf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) theory/uf/$(DEPDIR) @: > theory/uf/$(DEPDIR)/$(am__dirstamp) theory/uf/equality_engine.lo: theory/uf/$(am__dirstamp) \ theory/uf/$(DEPDIR)/$(am__dirstamp) theory/uf/symmetry_breaker.lo: theory/uf/$(am__dirstamp) \ theory/uf/$(DEPDIR)/$(am__dirstamp) theory/uf/theory_uf.lo: theory/uf/$(am__dirstamp) \ theory/uf/$(DEPDIR)/$(am__dirstamp) theory/uf/theory_uf_model.lo: theory/uf/$(am__dirstamp) \ theory/uf/$(DEPDIR)/$(am__dirstamp) theory/uf/theory_uf_strong_solver.lo: theory/uf/$(am__dirstamp) \ theory/uf/$(DEPDIR)/$(am__dirstamp) theory/type_enumerator.lo: theory/$(am__dirstamp) \ theory/$(DEPDIR)/$(am__dirstamp) libcvc4.la: $(libcvc4_la_OBJECTS) $(libcvc4_la_DEPENDENCIES) $(EXTRA_libcvc4_la_DEPENDENCIES) $(AM_V_CXXLD)$(libcvc4_la_LINK) -rpath $(libdir) $(libcvc4_la_OBJECTS) $(libcvc4_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f context/*.$(OBJEXT) -rm -f context/*.lo -rm -f decision/*.$(OBJEXT) -rm -f decision/*.lo -rm -f printer/*.$(OBJEXT) -rm -f printer/*.lo -rm -f printer/ast/*.$(OBJEXT) -rm -f printer/ast/*.lo -rm -f printer/cvc/*.$(OBJEXT) -rm -f printer/cvc/*.lo -rm -f printer/smt1/*.$(OBJEXT) -rm -f printer/smt1/*.lo -rm -f printer/smt2/*.$(OBJEXT) -rm -f printer/smt2/*.lo -rm -f printer/tptp/*.$(OBJEXT) -rm -f printer/tptp/*.lo -rm -f proof/*.$(OBJEXT) -rm -f proof/*.lo -rm -f prop/*.$(OBJEXT) -rm -f prop/*.lo -rm -f smt/*.$(OBJEXT) -rm -f smt/*.lo -rm -f theory/*.$(OBJEXT) -rm -f theory/*.lo -rm -f theory/arith/*.$(OBJEXT) -rm -f theory/arith/*.lo -rm -f theory/arrays/*.$(OBJEXT) -rm -f theory/arrays/*.lo -rm -f theory/booleans/*.$(OBJEXT) -rm -f theory/booleans/*.lo -rm -f theory/builtin/*.$(OBJEXT) -rm -f theory/builtin/*.lo -rm -f theory/bv/*.$(OBJEXT) -rm -f theory/bv/*.lo -rm -f theory/datatypes/*.$(OBJEXT) -rm -f theory/datatypes/*.lo -rm -f theory/fp/*.$(OBJEXT) -rm -f theory/fp/*.lo -rm -f theory/idl/*.$(OBJEXT) -rm -f theory/idl/*.lo -rm -f theory/quantifiers/*.$(OBJEXT) -rm -f theory/quantifiers/*.lo -rm -f theory/sep/*.$(OBJEXT) -rm -f theory/sep/*.lo -rm -f theory/sets/*.$(OBJEXT) -rm -f theory/sets/*.lo -rm -f theory/strings/*.$(OBJEXT) -rm -f theory/strings/*.lo -rm -f theory/uf/*.$(OBJEXT) -rm -f theory/uf/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/git_versioninfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svn_versioninfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@context/$(DEPDIR)/context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@context/$(DEPDIR)/context_mm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@decision/$(DEPDIR)/decision_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@decision/$(DEPDIR)/justification_heuristic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@printer/$(DEPDIR)/dagification_visitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@printer/$(DEPDIR)/printer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@printer/ast/$(DEPDIR)/ast_printer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@printer/cvc/$(DEPDIR)/cvc_printer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@printer/smt1/$(DEPDIR)/smt1_printer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@printer/smt2/$(DEPDIR)/smt2_printer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@printer/tptp/$(DEPDIR)/tptp_printer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/arith_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/array_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/bitvector_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/cnf_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/lemma_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/proof_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/proof_output_channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/proof_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/simplify_boolean_node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/skolemization_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/theory_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/uf_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@proof/$(DEPDIR)/unsat_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@prop/$(DEPDIR)/cnf_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@prop/$(DEPDIR)/cryptominisat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@prop/$(DEPDIR)/prop_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@prop/$(DEPDIR)/sat_solver_factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@prop/$(DEPDIR)/theory_proxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/command.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/command_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/dump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/logic_request.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/managed_ostreams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/model.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/smt_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/smt_engine_check_proof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/smt_engine_scope.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/smt_statistics_registry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@smt/$(DEPDIR)/term_formula_removal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/assertion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/atom_requests.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/ite_utilities.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/logic_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/quantifiers_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/rep_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/shared_terms_database.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/sort_inference.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/substitutions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/term_registration_visitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/theory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/theory_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/theory_model.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/type_enumerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/unconstrained_simplifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/$(DEPDIR)/valuation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/approx_simplex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/arith_ite_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/arith_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/arith_static_learner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/arithvar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/attempt_solution_simplex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/congruence_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/constraint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/cut_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/delta_rational.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/dio_solver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/dual_simplex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/error_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/fc_simplex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/infer_bounds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/linear_equality.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/matrix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/nonlinear_extension.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/normal_form.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/partial_model.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/pseudoboolean_proc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/simplex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/simplex_update.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/soi_simplex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/tableau.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/tableau_sizes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/theory_arith.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arith/$(DEPDIR)/theory_arith_private.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arrays/$(DEPDIR)/array_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arrays/$(DEPDIR)/array_proof_reconstruction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arrays/$(DEPDIR)/static_fact_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arrays/$(DEPDIR)/theory_arrays.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arrays/$(DEPDIR)/theory_arrays_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/arrays/$(DEPDIR)/union_find.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/booleans/$(DEPDIR)/circuit_propagator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/booleans/$(DEPDIR)/theory_bool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/booleans/$(DEPDIR)/theory_bool_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/builtin/$(DEPDIR)/theory_builtin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/builtin/$(DEPDIR)/theory_builtin_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/abstraction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/aig_bitblaster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_eager_solver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_inequality_graph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_quick_check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_subtheory_algebraic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_subtheory_bitblast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_subtheory_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_subtheory_inequality.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bv_to_bool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/bvintropow2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/eager_bitblaster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/lazy_bitblaster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/slicer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/theory_bv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/theory_bv_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/bv/$(DEPDIR)/theory_bv_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/datatypes/$(DEPDIR)/datatypes_sygus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/datatypes/$(DEPDIR)/theory_datatypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/datatypes/$(DEPDIR)/type_enumerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/fp/$(DEPDIR)/theory_fp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/fp/$(DEPDIR)/theory_fp_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/idl/$(DEPDIR)/idl_assertion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/idl/$(DEPDIR)/idl_assertion_db.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/idl/$(DEPDIR)/idl_model.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/idl/$(DEPDIR)/theory_idl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/alpha_equivalence.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/ambqi_builder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/anti_skolem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/bounded_integers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/candidate_generator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/ce_guided_instantiation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/ce_guided_single_inv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/ce_guided_single_inv_ei.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/ce_guided_single_inv_sol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/ceg_instantiator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/ceg_t_instantiator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/conjecture_generator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/equality_infer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/first_order_model.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/full_model_check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/fun_def_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/fun_def_process.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/inst_match.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/inst_match_generator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/inst_propagator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/inst_strategy_cbqi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/inst_strategy_e_matching.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/instantiation_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/local_theory_ext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/macros.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/model_builder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/model_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/quant_conflict_find.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/quant_equality_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/quant_split.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/quant_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/quantifiers_attributes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/quantifiers_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/relevant_domain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/rewrite_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/symmetry_breaking.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/term_database.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/theory_quantifiers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/quantifiers/$(DEPDIR)/trigger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/sep/$(DEPDIR)/theory_sep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/sep/$(DEPDIR)/theory_sep_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/sets/$(DEPDIR)/theory_sets.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/sets/$(DEPDIR)/theory_sets_private.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/sets/$(DEPDIR)/theory_sets_rels.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/sets/$(DEPDIR)/theory_sets_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/strings/$(DEPDIR)/regexp_operation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/strings/$(DEPDIR)/theory_strings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/strings/$(DEPDIR)/theory_strings_preprocess.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/strings/$(DEPDIR)/theory_strings_rewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/uf/$(DEPDIR)/equality_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/uf/$(DEPDIR)/symmetry_breaker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/uf/$(DEPDIR)/theory_uf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/uf/$(DEPDIR)/theory_uf_model.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@theory/uf/$(DEPDIR)/theory_uf_strong_solver.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf context/.libs context/_libs -rm -rf decision/.libs decision/_libs -rm -rf printer/.libs printer/_libs -rm -rf printer/ast/.libs printer/ast/_libs -rm -rf printer/cvc/.libs printer/cvc/_libs -rm -rf printer/smt1/.libs printer/smt1/_libs -rm -rf printer/smt2/.libs printer/smt2/_libs -rm -rf printer/tptp/.libs printer/tptp/_libs -rm -rf proof/.libs proof/_libs -rm -rf prop/.libs prop/_libs -rm -rf smt/.libs smt/_libs -rm -rf theory/.libs theory/_libs -rm -rf theory/arith/.libs theory/arith/_libs -rm -rf theory/arrays/.libs theory/arrays/_libs -rm -rf theory/booleans/.libs theory/booleans/_libs -rm -rf theory/builtin/.libs theory/builtin/_libs -rm -rf theory/bv/.libs theory/bv/_libs -rm -rf theory/datatypes/.libs theory/datatypes/_libs -rm -rf theory/fp/.libs theory/fp/_libs -rm -rf theory/idl/.libs theory/idl/_libs -rm -rf theory/quantifiers/.libs theory/quantifiers/_libs -rm -rf theory/sep/.libs theory/sep/_libs -rm -rf theory/sets/.libs theory/sets/_libs -rm -rf theory/strings/.libs theory/strings/_libs -rm -rf theory/uf/.libs theory/uf/_libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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 context/$(DEPDIR)/$(am__dirstamp) -rm -f context/$(am__dirstamp) -rm -f decision/$(DEPDIR)/$(am__dirstamp) -rm -f decision/$(am__dirstamp) -rm -f printer/$(DEPDIR)/$(am__dirstamp) -rm -f printer/$(am__dirstamp) -rm -f printer/ast/$(DEPDIR)/$(am__dirstamp) -rm -f printer/ast/$(am__dirstamp) -rm -f printer/cvc/$(DEPDIR)/$(am__dirstamp) -rm -f printer/cvc/$(am__dirstamp) -rm -f printer/smt1/$(DEPDIR)/$(am__dirstamp) -rm -f printer/smt1/$(am__dirstamp) -rm -f printer/smt2/$(DEPDIR)/$(am__dirstamp) -rm -f printer/smt2/$(am__dirstamp) -rm -f printer/tptp/$(DEPDIR)/$(am__dirstamp) -rm -f printer/tptp/$(am__dirstamp) -rm -f proof/$(DEPDIR)/$(am__dirstamp) -rm -f proof/$(am__dirstamp) -rm -f prop/$(DEPDIR)/$(am__dirstamp) -rm -f prop/$(am__dirstamp) -rm -f smt/$(DEPDIR)/$(am__dirstamp) -rm -f smt/$(am__dirstamp) -rm -f theory/$(DEPDIR)/$(am__dirstamp) -rm -f theory/$(am__dirstamp) -rm -f theory/arith/$(DEPDIR)/$(am__dirstamp) -rm -f theory/arith/$(am__dirstamp) -rm -f theory/arrays/$(DEPDIR)/$(am__dirstamp) -rm -f theory/arrays/$(am__dirstamp) -rm -f theory/booleans/$(DEPDIR)/$(am__dirstamp) -rm -f theory/booleans/$(am__dirstamp) -rm -f theory/builtin/$(DEPDIR)/$(am__dirstamp) -rm -f theory/builtin/$(am__dirstamp) -rm -f theory/bv/$(DEPDIR)/$(am__dirstamp) -rm -f theory/bv/$(am__dirstamp) -rm -f theory/datatypes/$(DEPDIR)/$(am__dirstamp) -rm -f theory/datatypes/$(am__dirstamp) -rm -f theory/fp/$(DEPDIR)/$(am__dirstamp) -rm -f theory/fp/$(am__dirstamp) -rm -f theory/idl/$(DEPDIR)/$(am__dirstamp) -rm -f theory/idl/$(am__dirstamp) -rm -f theory/quantifiers/$(DEPDIR)/$(am__dirstamp) -rm -f theory/quantifiers/$(am__dirstamp) -rm -f theory/sep/$(DEPDIR)/$(am__dirstamp) -rm -f theory/sep/$(am__dirstamp) -rm -f theory/sets/$(DEPDIR)/$(am__dirstamp) -rm -f theory/sets/$(am__dirstamp) -rm -f theory/strings/$(DEPDIR)/$(am__dirstamp) -rm -f theory/strings/$(am__dirstamp) -rm -f theory/uf/$(DEPDIR)/$(am__dirstamp) -rm -f theory/uf/$(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." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) context/$(DEPDIR) decision/$(DEPDIR) printer/$(DEPDIR) printer/ast/$(DEPDIR) printer/cvc/$(DEPDIR) printer/smt1/$(DEPDIR) printer/smt2/$(DEPDIR) printer/tptp/$(DEPDIR) proof/$(DEPDIR) prop/$(DEPDIR) smt/$(DEPDIR) theory/$(DEPDIR) theory/arith/$(DEPDIR) theory/arrays/$(DEPDIR) theory/booleans/$(DEPDIR) theory/builtin/$(DEPDIR) theory/bv/$(DEPDIR) theory/datatypes/$(DEPDIR) theory/fp/$(DEPDIR) theory/idl/$(DEPDIR) theory/quantifiers/$(DEPDIR) theory/sep/$(DEPDIR) theory/sets/$(DEPDIR) theory/strings/$(DEPDIR) theory/uf/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) context/$(DEPDIR) decision/$(DEPDIR) printer/$(DEPDIR) printer/ast/$(DEPDIR) printer/cvc/$(DEPDIR) printer/smt1/$(DEPDIR) printer/smt2/$(DEPDIR) printer/tptp/$(DEPDIR) proof/$(DEPDIR) prop/$(DEPDIR) smt/$(DEPDIR) theory/$(DEPDIR) theory/arith/$(DEPDIR) theory/arrays/$(DEPDIR) theory/booleans/$(DEPDIR) theory/builtin/$(DEPDIR) theory/bv/$(DEPDIR) theory/datatypes/$(DEPDIR) theory/fp/$(DEPDIR) theory/idl/$(DEPDIR) theory/quantifiers/$(DEPDIR) theory/sep/$(DEPDIR) theory/sets/$(DEPDIR) theory/strings/$(DEPDIR) theory/uf/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-local .MAKE: $(am__recursive_targets) all check install install-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-local .PRECIOUS: Makefile # The THEORIES list has been moved to Makefile.theories include @top_srcdir@/src/Makefile.theories svn_versioninfo.cpp: svninfo $(AM_V_GEN)( \ if test -s svninfo; then \ issvn=true; \ branch=`grep '^URL: ' svninfo | sed 's,.*/cvc4/,,'`; \ rev=`grep '^Revision: ' svninfo | awk '{print$$2}'`; \ mods=`grep '^Modifications: ' svninfo | awk '{print$$2} END { if(!NR) print "false" }'`; \ else \ issvn=false; \ branch=unknown; \ rev=0; \ mods=false; \ fi; \ echo "#include \"base/configuration.h\""; \ echo "const bool ::CVC4::Configuration::IS_SUBVERSION_BUILD = $$issvn;"; \ echo "const char* const ::CVC4::Configuration::SUBVERSION_BRANCH_NAME = \"$$branch\";"; \ echo "const unsigned ::CVC4::Configuration::SUBVERSION_REVISION = $$rev;"; \ echo "const bool ::CVC4::Configuration::SUBVERSION_HAS_MODIFICATIONS = $$mods;"; \ ) >"$@" # This .tmp business is to keep from having to re-compile options.cpp # (and then re-link the libraries) if nothing has changed. svninfo: svninfo.tmp $(AM_V_GEN)if diff -q svninfo.tmp svninfo &>/dev/null; then rm -f svninfo.tmp; else mv svninfo.tmp svninfo; fi # .PHONY ensures the .tmp version is always rebuilt (to check for any changes) .PHONY: svninfo.tmp svninfo.tmp: $(AM_V_GEN)(cd "$(top_srcdir)" && svn info && echo "Modifications: `test -z \"\`svn status -q\`\" && echo false || echo true`") >"$@" 2>/dev/null || true git_versioninfo.cpp: gitinfo $(AM_V_GEN)( \ if test -s gitinfo; then \ isgit=true; \ branch=`head -1 gitinfo`; \ rev=`head -2 gitinfo | tail -1 | awk '{print$$1}'`; \ mods=`grep '^Modifications: ' gitinfo | awk '{print$$2} END { if(!NR) print "false" }'`; \ else \ isgit=false; \ branch=unknown; \ rev=unknown; \ mods=false; \ fi; \ echo "#include \"base/configuration.h\""; \ echo "const bool ::CVC4::Configuration::IS_GIT_BUILD = $$isgit;"; \ echo "const char* const ::CVC4::Configuration::GIT_BRANCH_NAME = \"$$branch\";"; \ echo "const char* const ::CVC4::Configuration::GIT_COMMIT = \"$$rev\";"; \ echo "const bool ::CVC4::Configuration::GIT_HAS_MODIFICATIONS = $$mods;"; \ ) >"$@" # This .tmp business is to keep from having to re-compile options.cpp # (and then re-link the libraries) if nothing has changed. gitinfo: gitinfo.tmp $(AM_V_GEN)if diff -q gitinfo.tmp gitinfo &>/dev/null; then rm -f gitinfo.tmp; else mv gitinfo.tmp gitinfo; fi || true # .PHONY ensures the .tmp version is always rebuilt (to check for any changes) .PHONY: gitinfo.tmp gitinfo.tmp: $(AM_V_GEN)(cd "$(top_srcdir)"; if test -e .git/HEAD; then if ! grep -q '^ref: refs/heads/' .git/HEAD; then echo; fi; sed 's,^ref: refs/heads/,,' .git/HEAD; git show-ref refs/heads/`sed 's,^ref: refs/heads/,,' .git/HEAD`; echo "Modifications: `test -z \"\`git status -s -uno\`\" && echo false || echo true`"; fi) >"$@" 2>/dev/null || true install-data-local: (echo include/cvc4.h; \ echo include/cvc4_public.h; \ echo include/cvc4parser_public.h; \ echo base/tls.h; \ echo util/integer.h; \ echo util/rational.h; \ find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"'; \ (cd "$(srcdir)" && find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \ while read f; do \ if expr "$$f" : ".*_\(template\|private\|private_library\|test_utils\)\.h$$" &>/dev/null; then \ continue; \ fi; \ d="$$(echo "$$f" | sed 's,^include/,,')"; \ $(mkinstalldirs) "$$(dirname "$(DESTDIR)$(includedir)/cvc4/$$d")"; \ if [ -e "$$f" ]; then \ path="$$f"; \ else \ path="$(srcdir)/$$f"; \ fi; \ fixpath="$(top_builddir)/header_install.fix"; \ sed 's,^\([ \t]*#[ \t]*include[ \t*]\)"\(.*\)"\([ \t]*\)$$,\1\3,' "$$path" > "$$fixpath" || exit 1; \ echo $(INSTALL_DATA) "$$fixpath" "$(DESTDIR)$(includedir)/cvc4/$$d"; \ if $(INSTALL_DATA) "$$fixpath" "$(DESTDIR)$(includedir)/cvc4/$$d"; then \ rm -f "$$fixpath"; \ else \ rm -f "$$fixpath"; \ exit 1; \ fi; \ done uninstall-local: -(echo include/cvc4.h; \ echo include/cvc4_public.h; \ echo include/cvc4parser_public.h; \ echo base/tls.h; \ echo util/integer.h; \ echo util/rational.h; \ find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"'; \ (cd "$(srcdir)" && find * -name '*.h' | \ xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \ while read f; do \ if expr "$$f" : ".*_\(template\|private\|private_library\|test_utils\)\.h$$" &>/dev/null; then \ continue; \ fi; \ d="$$(echo "$$f" | sed 's,^include/,,')"; \ rm -f "$(DESTDIR)$(includedir)/cvc4/$$d"; \ done -rmdir "$(DESTDIR)$(includedir)/cvc4/bindings/compat" -rmdir "$(DESTDIR)$(includedir)/cvc4/bindings" -rmdir "$(DESTDIR)$(includedir)/cvc4" -rmdir "$(DESTDIR)$(libdir)/ocaml/cvc4" # This rule is ugly. It's needed to ensure that automake's dependence # includes are available during distclean, even though they come from # directories that are cleaned first. Without this rule, "distclean" # fails. %.Plo:; $(MKDIR_P) "$(dir $@)" && : > "$@" #include @top_srcdir@/src/theory/Makefile.subdirs $(top_builddir)/src/.subdirs: $(top_srcdir)/src/Makefile.theories @top_srcdir@/src/mksubdirs $(AM_V_at)test -d $(top_builddir)/src || mkdir $(top_builddir)/src $(AM_V_at)chmod +x @top_srcdir@/src/mksubdirs $(AM_V_at)( @top_srcdir@/src/mksubdirs "$(top_srcdir)" ) > $(top_builddir)/src/.subdirs.tmp @if ! diff -q $(top_builddir)/src/.subdirs $(top_builddir)/src/.subdirs.tmp &>/dev/null; then \ echo " GEN " $@; \ $(am__mv) $(top_builddir)/src/.subdirs.tmp $(top_builddir)/src/.subdirs; \ fi theory/rewriter_tables.h: theory/rewriter_tables_template.h theory/mkrewriter @top_builddir@/src/.subdirs @top_srcdir@/src/theory/*/kinds $(AM_V_at)test -d $(top_builddir)/src/theory || mkdir -p @top_builddir@/src/theory $(AM_V_at)chmod +x @srcdir@/theory/mkrewriter $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/theory/mkrewriter \ $< \ `cat @top_builddir@/src/.subdirs` \ > $@) || (rm -f $@ && exit 1) theory/theory_traits.h: theory/theory_traits_template.h theory/mktheorytraits @top_builddir@/src/.subdirs @top_srcdir@/src/theory/*/kinds $(AM_V_at)test -d $(top_builddir)/src/theory || mkdir -p @top_builddir@/src/theory $(AM_V_at)chmod +x @srcdir@/theory/mktheorytraits $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/theory/mktheorytraits \ $< \ `cat @top_builddir@/src/.subdirs` \ > $@) || (rm -f $@ && exit 1) theory/type_enumerator.cpp: theory/type_enumerator_template.cpp theory/mktheorytraits @top_builddir@/src/.subdirs @top_srcdir@/src/theory/*/kinds $(AM_V_at)test -d $(top_builddir)/src/theory || mkdir -p @top_builddir@/src/theory $(AM_V_at)chmod +x @srcdir@/theory/mktheorytraits $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/theory/mktheorytraits \ $< \ `cat @top_builddir@/src/.subdirs` \ > $@) || (rm -f $@ && exit 1) # 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: cvc4-1.5/src/Makefile.theories000066400000000000000000000001371313116454100162660ustar00rootroot00000000000000 THEORIES = builtin booleans uf arith bv fp arrays datatypes sep sets strings quantifiers idl cvc4-1.5/src/base/000077500000000000000000000000001313116454100137165ustar00rootroot00000000000000cvc4-1.5/src/base/Makefile.am000066400000000000000000000045701313116454100157600ustar00rootroot00000000000000AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = libbase.la # Do not list built sources (like tls.h) here! # Rather, list them under BUILT_SOURCES, and their .in versions under # EXTRA_DIST. Otherwise, they're packaged up in the tarball, which is # no good---they belong in the configured builds/ directory. If they # end up in the source directory, they build the cvc4 that was # configured at the time of the "make dist", which (1) may not be the # configuration that the user wants, and (2) might cause link errors. libbase_la_SOURCES = \ Makefile.am \ Makefile.in \ configuration.cpp \ configuration.h \ configuration_private.h \ cvc4_assert.cpp \ cvc4_assert.h \ exception.cpp \ exception.h \ listener.cpp \ listener.h \ modal_exception.h \ output.cpp \ output.h \ ptr_closer.h BUILT_SOURCES = \ tls.h # listing {Debug,Trace}_tags too ensures that make doesn't auto-remove it # after building (if it does, we don't get the "cached" effect with # the .tmp files below, and we have to re-compile and re-link each # time, even when there are no changes). BUILT_SOURCES += \ Debug_tags.h \ Debug_tags \ Trace_tags.h \ Trace_tags MOSTLYCLEANFILES = \ Debug_tags \ Trace_tags \ Debug_tags.tmp \ Trace_tags.tmp \ Debug_tags.h \ Trace_tags.h EXTRA_DIST = \ configuration.i \ exception.i \ mktagheaders \ mktags \ modal_exception.i \ tls.h.in DISTCLEANFILES = \ tls.h.tmp \ tls.h %_tags.h: %_tags mktagheaders $(AM_V_at)chmod +x @srcdir@/mktagheaders $(AM_V_GEN)( @srcdir@/mktagheaders "$<" "$<" ) >"$@" # This .tmp business is to keep from having to re-compile options.cpp # (and then re-link the libraries) if nothing has changed. %_tags: %_tags.tmp $(AM_V_GEN)\ diff -q "$^" "$@" &>/dev/null || mv "$^" "$@" || true # .PHONY ensures the .tmp version is always rebuilt (to check for any changes) .PHONY: Debug_tags.tmp Trace_tags.tmp # The "sed" invocation below is particularly obnoxious, but it works around # inconsistencies in REs on different platforms, using only a basic regular # expression (no |, no \<, ...). Debug_tags.tmp Trace_tags.tmp: mktags $(AM_V_at)chmod +x @srcdir@/mktags $(AM_V_GEN)(@srcdir@/mktags \ '$(@:_tags.tmp=)' \ "$$(find @srcdir@/../ -name '*.cpp' -o -name '*.h' -o -name '*.cc' -o -name '*.g')") >"$@" cvc4-1.5/src/base/Makefile.in000066400000000000000000000636511313116454100157760ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = src/base ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = tls.h.tmp CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbase_la_LIBADD = am_libbase_la_OBJECTS = configuration.lo cvc4_assert.lo exception.lo \ listener.lo output.lo libbase_la_OBJECTS = $(am_libbase_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libbase_la_SOURCES) DIST_SOURCES = $(libbase_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/tls.h.in \ $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = libbase.la # Do not list built sources (like tls.h) here! # Rather, list them under BUILT_SOURCES, and their .in versions under # EXTRA_DIST. Otherwise, they're packaged up in the tarball, which is # no good---they belong in the configured builds/ directory. If they # end up in the source directory, they build the cvc4 that was # configured at the time of the "make dist", which (1) may not be the # configuration that the user wants, and (2) might cause link errors. libbase_la_SOURCES = \ Makefile.am \ Makefile.in \ configuration.cpp \ configuration.h \ configuration_private.h \ cvc4_assert.cpp \ cvc4_assert.h \ exception.cpp \ exception.h \ listener.cpp \ listener.h \ modal_exception.h \ output.cpp \ output.h \ ptr_closer.h # listing {Debug,Trace}_tags too ensures that make doesn't auto-remove it # after building (if it does, we don't get the "cached" effect with # the .tmp files below, and we have to re-compile and re-link each # time, even when there are no changes). BUILT_SOURCES = tls.h Debug_tags.h Debug_tags Trace_tags.h Trace_tags MOSTLYCLEANFILES = \ Debug_tags \ Trace_tags \ Debug_tags.tmp \ Trace_tags.tmp \ Debug_tags.h \ Trace_tags.h EXTRA_DIST = \ configuration.i \ exception.i \ mktagheaders \ mktags \ modal_exception.i \ tls.h.in DISTCLEANFILES = \ tls.h.tmp \ tls.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/base/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/base/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tls.h.tmp: $(top_builddir)/config.status $(srcdir)/tls.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES) $(EXTRA_libbase_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libbase_la_OBJECTS) $(libbase_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configuration.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvc4_assert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile %_tags.h: %_tags mktagheaders $(AM_V_at)chmod +x @srcdir@/mktagheaders $(AM_V_GEN)( @srcdir@/mktagheaders "$<" "$<" ) >"$@" # This .tmp business is to keep from having to re-compile options.cpp # (and then re-link the libraries) if nothing has changed. %_tags: %_tags.tmp $(AM_V_GEN)\ diff -q "$^" "$@" &>/dev/null || mv "$^" "$@" || true # .PHONY ensures the .tmp version is always rebuilt (to check for any changes) .PHONY: Debug_tags.tmp Trace_tags.tmp # The "sed" invocation below is particularly obnoxious, but it works around # inconsistencies in REs on different platforms, using only a basic regular # expression (no |, no \<, ...). Debug_tags.tmp Trace_tags.tmp: mktags $(AM_V_at)chmod +x @srcdir@/mktags $(AM_V_GEN)(@srcdir@/mktags \ '$(@:_tags.tmp=)' \ "$$(find @srcdir@/../ -name '*.cpp' -o -name '*.h' -o -name '*.cc' -o -name '*.g')") >"$@" # 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: cvc4-1.5/src/base/configuration.cpp000066400000000000000000000150251313116454100172740ustar00rootroot00000000000000/********************* */ /*! \file configuration.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Francois Bobot, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Implementation of Configuration class, which provides compile-time ** configuration information about the CVC4 library ** ** Implementation of Configuration class, which provides compile-time ** configuration information about the CVC4 library. **/ #include "base/configuration.h" #include #include #include #include #include "cvc4autoconfig.h" #include "base/configuration_private.h" #if defined(CVC4_DEBUG) && defined(CVC4_TRACING) # include "base/Debug_tags.h" #endif /* CVC4_DEBUG && CVC4_TRACING */ #ifdef CVC4_TRACING # include "base/Trace_tags.h" #endif /* CVC4_TRACING */ using namespace std; namespace CVC4 { string Configuration::getName() { return PACKAGE_NAME; } bool Configuration::isDebugBuild() { return IS_DEBUG_BUILD; } bool Configuration::isStatisticsBuild() { return IS_STATISTICS_BUILD; } bool Configuration::isReplayBuild() { return IS_REPLAY_BUILD; } bool Configuration::isTracingBuild() { return IS_TRACING_BUILD; } bool Configuration::isDumpingBuild() { return IS_DUMPING_BUILD; } bool Configuration::isMuzzledBuild() { return IS_MUZZLED_BUILD; } bool Configuration::isAssertionBuild() { return IS_ASSERTIONS_BUILD; } bool Configuration::isProofBuild() { return IS_PROOFS_BUILD; } bool Configuration::isCoverageBuild() { return IS_COVERAGE_BUILD; } bool Configuration::isProfilingBuild() { return IS_PROFILING_BUILD; } bool Configuration::isCompetitionBuild() { return IS_COMPETITION_BUILD; } string Configuration::getPackageName() { return PACKAGE_NAME; } string Configuration::getVersionString() { return CVC4_RELEASE_STRING; } unsigned Configuration::getVersionMajor() { return CVC4_MAJOR; } unsigned Configuration::getVersionMinor() { return CVC4_MINOR; } unsigned Configuration::getVersionRelease() { return CVC4_RELEASE; } std::string Configuration::getVersionExtra() { return CVC4_EXTRAVERSION; } std::string Configuration::about() { return CVC4_ABOUT_STRING; } bool Configuration::licenseIsGpl() { return IS_GPL_BUILD; } bool Configuration::isBuiltWithGmp() { return IS_GMP_BUILD; } bool Configuration::isBuiltWithCln() { return IS_CLN_BUILD; } bool Configuration::isBuiltWithGlpk() { return IS_GLPK_BUILD; } bool Configuration::isBuiltWithAbc() { return IS_ABC_BUILD; } bool Configuration::isBuiltWithCryptominisat() { return IS_CRYPTOMINISAT_BUILD; } bool Configuration::isBuiltWithReadline() { return IS_READLINE_BUILD; } bool Configuration::isBuiltWithCudd() { return false; } bool Configuration::isBuiltWithTlsSupport() { return USING_TLS; } unsigned Configuration::getNumDebugTags() { #if defined(CVC4_DEBUG) && defined(CVC4_TRACING) /* -1 because a NULL pointer is inserted as the last value */ return (sizeof(Debug_tags) / sizeof(Debug_tags[0])) - 1; #else /* CVC4_DEBUG && CVC4_TRACING */ return 0; #endif /* CVC4_DEBUG && CVC4_TRACING */ } char const* const* Configuration::getDebugTags() { #if defined(CVC4_DEBUG) && defined(CVC4_TRACING) return Debug_tags; #else /* CVC4_DEBUG && CVC4_TRACING */ static char const* no_tags[] = { NULL }; return no_tags; #endif /* CVC4_DEBUG && CVC4_TRACING */ } int strcmpptr(const char **s1, const char **s2){ return strcmp(*s1,*s2); } bool Configuration::isDebugTag(char const *tag){ #if defined(CVC4_DEBUG) && defined(CVC4_TRACING) unsigned ntags = getNumDebugTags(); char const* const* tags = getDebugTags(); for (unsigned i = 0; i < ntags; ++ i) { if (strcmp(tag, tags[i]) == 0) { return true; } } #endif /* CVC4_DEBUG && CVC4_TRACING */ return false; } unsigned Configuration::getNumTraceTags() { #if CVC4_TRACING /* -1 because a NULL pointer is inserted as the last value */ return sizeof(Trace_tags) / sizeof(Trace_tags[0]) - 1; #else /* CVC4_TRACING */ return 0; #endif /* CVC4_TRACING */ } char const* const* Configuration::getTraceTags() { #if CVC4_TRACING return Trace_tags; #else /* CVC4_TRACING */ static char const* no_tags[] = { NULL }; return no_tags; #endif /* CVC4_TRACING */ } bool Configuration::isTraceTag(char const * tag){ #if CVC4_TRACING unsigned ntags = getNumTraceTags(); char const* const* tags = getTraceTags(); for (unsigned i = 0; i < ntags; ++ i) { if (strcmp(tag, tags[i]) == 0) { return true; } } #endif /* CVC4_TRACING */ return false; } bool Configuration::isGitBuild() { return IS_GIT_BUILD; } const char* Configuration::getGitBranchName() { return GIT_BRANCH_NAME; } const char* Configuration::getGitCommit() { return GIT_COMMIT; } bool Configuration::hasGitModifications() { return GIT_HAS_MODIFICATIONS; } std::string Configuration::getGitId() { if(! isGitBuild()) { return ""; } const char* branchName = getGitBranchName(); if(*branchName == '\0') { branchName = "-"; } stringstream ss; ss << "git " << branchName << " " << string(getGitCommit()).substr(0, 8) << ( ::CVC4::Configuration::hasGitModifications() ? " (with modifications)" : "" ); return ss.str(); } bool Configuration::isSubversionBuild() { return IS_SUBVERSION_BUILD; } const char* Configuration::getSubversionBranchName() { return SUBVERSION_BRANCH_NAME; } unsigned Configuration::getSubversionRevision() { return SUBVERSION_REVISION; } bool Configuration::hasSubversionModifications() { return SUBVERSION_HAS_MODIFICATIONS; } std::string Configuration::getSubversionId() { if(! isSubversionBuild()) { return ""; } stringstream ss; ss << "subversion " << getSubversionBranchName() << " r" << getSubversionRevision() << ( ::CVC4::Configuration::hasSubversionModifications() ? " (with modifications)" : "" ); return ss.str(); } std::string Configuration::getCompiler() { stringstream ss; #ifdef __GNUC__ ss << "GCC"; #else /* __GNUC__ */ ss << "unknown compiler"; #endif /* __GNUC__ */ #ifdef __VERSION__ ss << " version " << __VERSION__; #else /* __VERSION__ */ ss << ", unknown version"; #endif /* __VERSION__ */ return ss.str(); } std::string Configuration::getCompiledDateTime() { return __DATE__ " " __TIME__; } }/* CVC4 namespace */ cvc4-1.5/src/base/configuration.h000066400000000000000000000067651313116454100167540ustar00rootroot00000000000000/********************* */ /*! \file configuration.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Francois Bobot ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Interface to a public class that provides compile-time information ** about the CVC4 library. ** ** Interface to a public class that provides compile-time information ** about the CVC4 library. **/ #include "cvc4_public.h" #ifndef __CVC4__CONFIGURATION_H #define __CVC4__CONFIGURATION_H #include namespace CVC4 { /** * Represents the (static) configuration of CVC4. */ class CVC4_PUBLIC Configuration { private: /** Private default ctor: Disallow construction of this class */ Configuration(); // these constants are filled in by the build system static const bool IS_SUBVERSION_BUILD; static const char* const SUBVERSION_BRANCH_NAME; static const unsigned SUBVERSION_REVISION; static const bool SUBVERSION_HAS_MODIFICATIONS; static const bool IS_GIT_BUILD; static const char* const GIT_BRANCH_NAME; static const char* const GIT_COMMIT; static const bool GIT_HAS_MODIFICATIONS; public: static std::string getName(); static bool isDebugBuild(); static bool isStatisticsBuild(); static bool isReplayBuild(); static bool isTracingBuild(); static bool isDumpingBuild(); static bool isMuzzledBuild(); static bool isAssertionBuild(); static bool isProofBuild(); static bool isCoverageBuild(); static bool isProfilingBuild(); static bool isCompetitionBuild(); static std::string getPackageName(); static std::string getVersionString(); static unsigned getVersionMajor(); static unsigned getVersionMinor(); static unsigned getVersionRelease(); static std::string getVersionExtra(); static std::string about(); static bool licenseIsGpl(); static bool isBuiltWithGmp(); static bool isBuiltWithCln(); static bool isBuiltWithGlpk(); static bool isBuiltWithAbc(); static bool isBuiltWithCryptominisat(); static bool isBuiltWithReadline(); static bool isBuiltWithCudd(); static bool isBuiltWithTlsSupport(); /* Return the number of debug tags */ static unsigned getNumDebugTags(); /* Return a sorted array of the debug tags name */ static char const* const* getDebugTags(); /* Test if the given argument is a known debug tag name */ static bool isDebugTag(char const *); /* Return the number of trace tags */ static unsigned getNumTraceTags(); /* Return a sorted array of the trace tags name */ static char const* const* getTraceTags(); /* Test if the given argument is a known trace tag name */ static bool isTraceTag(char const *); static bool isGitBuild(); static const char* getGitBranchName(); static const char* getGitCommit(); static bool hasGitModifications(); static std::string getGitId(); static bool isSubversionBuild(); static const char* getSubversionBranchName(); static unsigned getSubversionRevision(); static bool hasSubversionModifications(); static std::string getSubversionId(); static std::string getCompiler(); static std::string getCompiledDateTime(); };/* class Configuration */ }/* CVC4 namespace */ #endif /* __CVC4__CONFIGURATION_H */ cvc4-1.5/src/base/configuration.i000066400000000000000000000002241313116454100167350ustar00rootroot00000000000000%{ #include "base/configuration.h" %} %apply char **STRING_ARRAY { char const* const* } %include "base/configuration.h" %clear char const* const*; cvc4-1.5/src/base/configuration_private.h000066400000000000000000000115311313116454100204710ustar00rootroot00000000000000/********************* */ /*! \file configuration_private.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Christopher L. Conway, ACSYS ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Provides compile-time configuration information about the ** CVC4 library. **/ #include "cvc4_private.h" #ifndef __CVC4__CONFIGURATION_PRIVATE_H #define __CVC4__CONFIGURATION_PRIVATE_H #include #include "base/configuration.h" namespace CVC4 { #ifdef CVC4_DEBUG # define IS_DEBUG_BUILD true #else /* CVC4_DEBUG */ # define IS_DEBUG_BUILD false #endif /* CVC4_DEBUG */ #ifdef CVC4_STATISTICS_ON # define IS_STATISTICS_BUILD true #else /* CVC4_STATISTICS_ON */ # define IS_STATISTICS_BUILD false #endif /* CVC4_STATISTICS_ON */ #ifdef CVC4_REPLAY # define IS_REPLAY_BUILD true #else /* CVC4_REPLAY */ # define IS_REPLAY_BUILD false #endif /* CVC4_REPLAY */ #ifdef CVC4_TRACING # define IS_TRACING_BUILD true #else /* CVC4_TRACING */ # define IS_TRACING_BUILD false #endif /* CVC4_TRACING */ #ifdef CVC4_DUMPING # define IS_DUMPING_BUILD true #else /* CVC4_DUMPING */ # define IS_DUMPING_BUILD false #endif /* CVC4_DUMPING */ #ifdef CVC4_MUZZLE # define IS_MUZZLED_BUILD true #else /* CVC4_MUZZLE */ # define IS_MUZZLED_BUILD false #endif /* CVC4_MUZZLE */ #ifdef CVC4_ASSERTIONS # define IS_ASSERTIONS_BUILD true #else /* CVC4_ASSERTIONS */ # define IS_ASSERTIONS_BUILD false #endif /* CVC4_ASSERTIONS */ #ifdef CVC4_PROOF # define IS_PROOFS_BUILD true #else /* CVC4_PROOF */ # define IS_PROOFS_BUILD false #endif /* CVC4_PROOF */ #ifdef CVC4_COVERAGE # define IS_COVERAGE_BUILD true #else /* CVC4_COVERAGE */ # define IS_COVERAGE_BUILD false #endif /* CVC4_COVERAGE */ #ifdef CVC4_PROFILING # define IS_PROFILING_BUILD true #else /* CVC4_PROFILING */ # define IS_PROFILING_BUILD false #endif /* CVC4_PROFILING */ #ifdef CVC4_COMPETITION_MODE # define IS_COMPETITION_BUILD true #else /* CVC4_COMPETITION_MODE */ # define IS_COMPETITION_BUILD false #endif /* CVC4_COMPETITION_MODE */ #ifdef CVC4_GMP_IMP # define IS_GMP_BUILD true #else /* CVC4_GMP_IMP */ # define IS_GMP_BUILD false #endif /* CVC4_GMP_IMP */ #ifdef CVC4_CLN_IMP # define IS_CLN_BUILD true #else /* CVC4_CLN_IMP */ # define IS_CLN_BUILD false #endif /* CVC4_CLN_IMP */ #if CVC4_USE_GLPK # define IS_GLPK_BUILD true #else /* CVC4_USE_GLPK */ # define IS_GLPK_BUILD false #endif /* CVC4_USE_GLPK */ #if CVC4_USE_ABC # define IS_ABC_BUILD true #else /* CVC4_USE_ABC */ # define IS_ABC_BUILD false #endif /* CVC4_USE_ABC */ #if CVC4_USE_CRYPTOMINISAT # define IS_CRYPTOMINISAT_BUILD true #else /* CVC4_USE_CRYPTOMINISAT */ # define IS_CRYPTOMINISAT_BUILD false #endif /* CVC4_USE_CRYPTOMINISAT */ #ifdef HAVE_LIBREADLINE # define IS_READLINE_BUILD true #else /* HAVE_LIBREADLINE */ # define IS_READLINE_BUILD false #endif /* HAVE_LIBREADLINE */ #if CVC4_GPL_DEPS # define IS_GPL_BUILD true #else /* CVC4_GPL_DEPS */ # define IS_GPL_BUILD false #endif /* CVC4_GPL_DEPS */ #ifdef TLS # define USING_TLS true #else /* TLS */ # define USING_TLS false #endif /* TLS */ #define CVC4_ABOUT_STRING ( ::std::string("\ This is CVC4 version " CVC4_RELEASE_STRING ) + \ ( ::CVC4::Configuration::isGitBuild() \ ? ( ::std::string(" [") + ::CVC4::Configuration::getGitId() + "]" ) \ : \ ( ::CVC4::Configuration::isSubversionBuild() \ ? ( ::std::string(" [") + ::CVC4::Configuration::getSubversionId() + "]" ) \ : ::std::string("") \ )) + "\n\ compiled with " + ::CVC4::Configuration::getCompiler() + "\n\ on " + ::CVC4::Configuration::getCompiledDateTime() + "\n\n\ Copyright (c) 2009-2017\n\ by the authors and their institutional affiliations listed at \n\ http:\/\/cvc4.cs.stanford.edu/authors\n\n" + \ ( IS_GPL_BUILD ? "\ This build of CVC4 uses GPLed libraries, and is thus covered by the GNU\n\ General Public License (GPL) version 3. Versions of CVC4 are available\n\ that are covered by the (modified) BSD license. If you want to license\n\ CVC4 under this license, please configure CVC4 with the \"--bsd\" option\n\ before building from sources.\n\ " : \ "This CVC4 library uses GMP as its multi-precision arithmetic library.\n\n\ CVC4 is open-source and is covered by the BSD license (modified).\n\n\ " ) + "\ THIS SOFTWARE PROVIDED AS-IS, WITHOUT ANY WARRANTIES. USE AT YOUR OWN RISK.\n\n\ See the file COPYING (distributed with the source code, and with all binaries)\n\ for the full CVC4 copyright, licensing, and (lack of) warranty information.\n" ) }/* CVC4 namespace */ #endif /* __CVC4__CONFIGURATION_PRIVATE_H */ cvc4-1.5/src/base/cvc4_assert.cpp000066400000000000000000000115321313116454100166440ustar00rootroot00000000000000/********************* */ /*! \file cvc4_assert.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Assertion utility classes, functions, and exceptions. ** ** Assertion utility classes, functions, and exceptions. Implementation. **/ #include #include #include #include "base/cvc4_assert.h" #include "base/output.h" using namespace std; namespace CVC4 { #ifdef CVC4_DEBUG //CVC4_THREADLOCAL(const char*) s_debugLastException = NULL; #endif /* CVC4_DEBUG */ void AssertionException::construct(const char* header, const char* extra, const char* function, const char* file, unsigned line, const char* fmt, va_list args) { // try building the exception msg with a smallish buffer first, // then with a larger one if sprintf tells us to. int n = 512; char* buf; buf = new char[n]; for(;;) { int size; if(extra == NULL) { size = snprintf(buf, n, "%s\n%s\n%s:%d\n", header, function, file, line); } else { size = snprintf(buf, n, "%s\n%s\n%s:%d:\n\n %s\n", header, function, file, line, extra); } if(size < n) { va_list args_copy; va_copy(args_copy, args); size += vsnprintf(buf + size, n - size, fmt, args_copy); va_end(args_copy); if(size < n) { break; } } if(size >= n) { // try again with a buffer that's large enough n = size + 1; delete [] buf; buf = new char[n]; } } setMessage(string(buf)); #ifdef CVC4_DEBUG LastExceptionBuffer* buffer = LastExceptionBuffer::getCurrent(); if(buffer != NULL){ if(buffer->getContents() == NULL) { buffer->setContents(buf); } } #endif /* CVC4_DEBUG */ delete [] buf; } void AssertionException::construct(const char* header, const char* extra, const char* function, const char* file, unsigned line) { // try building the exception msg with a smallish buffer first, // then with a larger one if sprintf tells us to. int n = 256; char* buf; for(;;) { buf = new char[n]; int size; if(extra == NULL) { size = snprintf(buf, n, "%s.\n%s\n%s:%d\n", header, function, file, line); } else { size = snprintf(buf, n, "%s.\n%s\n%s:%d:\n\n %s\n", header, function, file, line, extra); } if(size < n) { break; } else { // try again with a buffer that's large enough n = size + 1; delete [] buf; } } setMessage(string(buf)); #ifdef CVC4_DEBUG LastExceptionBuffer* buffer = LastExceptionBuffer::getCurrent(); if(buffer != NULL){ if(buffer->getContents() == NULL) { buffer->setContents(buf); } } #endif /* CVC4_DEBUG */ delete [] buf; } #ifdef CVC4_DEBUG /** * Special assertion failure handling in debug mode; in non-debug * builds, the exception is thrown from the macro. We factor out this * additional logic so as not to bloat the code at every Assert() * expansion. * * Note this name is prefixed with "debug" because it is included in * debug builds only; in debug builds, it handles all assertion * failures (even those that exist in non-debug builds). */ void debugAssertionFailed(const AssertionException& thisException, const char* propagatingException) { static CVC4_THREADLOCAL(bool) alreadyFired = false; if(__builtin_expect( ( !std::uncaught_exception() ), true ) || alreadyFired) { throw thisException; } alreadyFired = true; // propagatingException is the propagating exception, but can be // NULL if the propagating exception is not a CVC4::Exception. Warning() << "===========================================" << std::endl << "An assertion failed during stack unwinding:" << std::endl; if(propagatingException != NULL) { Warning() << "The propagating exception is:" << std::endl << propagatingException << std::endl << "===========================================" << std::endl; Warning() << "The newly-thrown exception is:" << std::endl; } else { Warning() << "The propagating exception is unknown." << std::endl; } Warning() << thisException << std::endl << "===========================================" << std::endl; terminate(); } #endif /* CVC4_DEBUG */ }/* CVC4 namespace */ cvc4-1.5/src/base/cvc4_assert.h000066400000000000000000000312401313116454100163070ustar00rootroot00000000000000/********************* */ /*! \file cvc4_assert.h ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Assertion utility classes, functions, exceptions, and macros. ** ** Assertion utility classes, functions, exceptions, and macros. **/ #include "cvc4_private.h" #ifndef __CVC4__ASSERT_H #define __CVC4__ASSERT_H #include #include #include #include #include #include "base/exception.h" #include "base/tls.h" // output.h not strictly needed for this header, but it _is_ needed to // actually _use_ anything in this header, so let's include it. // Tim : Disabling this and moving it into cvc4_assert.cpp //#include "util/output.h" namespace CVC4 { class AssertionException : public Exception { protected: void construct(const char* header, const char* extra, const char* function, const char* file, unsigned line, const char* fmt, ...) { va_list args; va_start(args, fmt); construct(header, extra, function, file, line, fmt, args); va_end(args); } void construct(const char* header, const char* extra, const char* function, const char* file, unsigned line, const char* fmt, va_list args); void construct(const char* header, const char* extra, const char* function, const char* file, unsigned line); AssertionException() : Exception() {} public: AssertionException(const char* extra, const char* function, const char* file, unsigned line, const char* fmt, ...) : Exception() { va_list args; va_start(args, fmt); construct("Assertion failure", extra, function, file, line, fmt, args); va_end(args); } AssertionException(const char* extra, const char* function, const char* file, unsigned line) : Exception() { construct("Assertion failure", extra, function, file, line); } }; /* class AssertionException */ class UnreachableCodeException : public AssertionException { protected: UnreachableCodeException() : AssertionException() {} public: UnreachableCodeException(const char* function, const char* file, unsigned line, const char* fmt, ...) : AssertionException() { va_list args; va_start(args, fmt); construct("Unreachable code reached", NULL, function, file, line, fmt, args); va_end(args); } UnreachableCodeException(const char* function, const char* file, unsigned line) : AssertionException() { construct("Unreachable code reached", NULL, function, file, line); } }; /* class UnreachableCodeException */ class UnhandledCaseException : public UnreachableCodeException { protected: UnhandledCaseException() : UnreachableCodeException() {} public: UnhandledCaseException(const char* function, const char* file, unsigned line, const char* fmt, ...) : UnreachableCodeException() { va_list args; va_start(args, fmt); construct("Unhandled case encountered", NULL, function, file, line, fmt, args); va_end(args); } template UnhandledCaseException(const char* function, const char* file, unsigned line, T theCase) : UnreachableCodeException() { std::stringstream sb; sb << theCase; construct("Unhandled case encountered", NULL, function, file, line, "The case was: %s", sb.str().c_str()); } UnhandledCaseException(const char* function, const char* file, unsigned line) : UnreachableCodeException() { construct("Unhandled case encountered", NULL, function, file, line); } }; /* class UnhandledCaseException */ class UnimplementedOperationException : public AssertionException { protected: UnimplementedOperationException() : AssertionException() {} public: UnimplementedOperationException(const char* function, const char* file, unsigned line, const char* fmt, ...) : AssertionException() { va_list args; va_start(args, fmt); construct("Unimplemented code encountered", NULL, function, file, line, fmt, args); va_end(args); } UnimplementedOperationException(const char* function, const char* file, unsigned line) : AssertionException() { construct("Unimplemented code encountered", NULL, function, file, line); } }; /* class UnimplementedOperationException */ class AssertArgumentException : public AssertionException { protected: AssertArgumentException() : AssertionException() {} public: AssertArgumentException(const char* argDesc, const char* function, const char* file, unsigned line, const char* fmt, ...) : AssertionException() { va_list args; va_start(args, fmt); construct("Illegal argument detected", (std::string("`") + argDesc + "' is a bad argument").c_str(), function, file, line, fmt, args); va_end(args); } AssertArgumentException(const char* argDesc, const char* function, const char* file, unsigned line) : AssertionException() { construct("Illegal argument detected", (std::string("`") + argDesc + "' is a bad argument").c_str(), function, file, line); } AssertArgumentException(const char* condStr, const char* argDesc, const char* function, const char* file, unsigned line, const char* fmt, ...) : AssertionException() { va_list args; va_start(args, fmt); construct("Illegal argument detected", (std::string("`") + argDesc + "' is a bad argument; expected " + condStr + " to hold") .c_str(), function, file, line, fmt, args); va_end(args); } AssertArgumentException(const char* condStr, const char* argDesc, const char* function, const char* file, unsigned line) : AssertionException() { construct("Illegal argument detected", (std::string("`") + argDesc + "' is a bad argument; expected " + condStr + " to hold") .c_str(), function, file, line); } }; /* class AssertArgumentException */ class InternalErrorException : public AssertionException { protected: InternalErrorException() : AssertionException() {} public: InternalErrorException(const char* function, const char* file, unsigned line) : AssertionException() { construct("Internal error detected", "", function, file, line); } InternalErrorException(const char* function, const char* file, unsigned line, const char* fmt, ...) : AssertionException() { va_list args; va_start(args, fmt); construct("Internal error detected", "", function, file, line, fmt, args); va_end(args); } InternalErrorException(const char* function, const char* file, unsigned line, std::string fmt, ...) : AssertionException() { va_list args; va_start(args, fmt); construct("Internal error detected", "", function, file, line, fmt.c_str(), args); va_end(args); } }; /* class InternalErrorException */ #ifdef CVC4_DEBUG /** * Special assertion failure handling in debug mode; in non-debug * builds, the exception is thrown from the macro. We factor out this * additional logic so as not to bloat the code at every Assert() * expansion. * * Note this name is prefixed with "debug" because it is included in * debug builds only; in debug builds, it handles all assertion * failures (even those that exist in non-debug builds). */ void debugAssertionFailed(const AssertionException& thisException, const char* lastException); // If we're currently handling an exception, print a warning instead; // otherwise std::terminate() is called by the runtime and we lose // details of the exception #define AlwaysAssert(cond, msg...) \ do { \ if (__builtin_expect((!(cond)), false)) { \ /* save the last assertion failure */ \ ::CVC4::LastExceptionBuffer* buffer = \ ::CVC4::LastExceptionBuffer::getCurrent(); \ const char* lastException = \ (buffer == NULL) ? NULL : buffer->getContents(); \ ::CVC4::AssertionException exception(#cond, __PRETTY_FUNCTION__, \ __FILE__, __LINE__, ##msg); \ ::CVC4::debugAssertionFailed(exception, lastException); \ } \ } while (0) #else /* CVC4_DEBUG */ // These simpler (but less useful) versions for non-debug builds fails // will terminate() if thrown during stack unwinding. #define AlwaysAssert(cond, msg...) \ do { \ if (__builtin_expect((!(cond)), false)) { \ throw ::CVC4::AssertionException(#cond, __PRETTY_FUNCTION__, __FILE__, \ __LINE__, ##msg); \ } \ } while (0) #endif /* CVC4_DEBUG */ #define Unreachable(msg...) \ throw ::CVC4::UnreachableCodeException(__PRETTY_FUNCTION__, __FILE__, \ __LINE__, ##msg) #define Unhandled(msg...) \ throw ::CVC4::UnhandledCaseException(__PRETTY_FUNCTION__, __FILE__, \ __LINE__, ##msg) #define Unimplemented(msg...) \ throw ::CVC4::UnimplementedOperationException(__PRETTY_FUNCTION__, __FILE__, \ __LINE__, ##msg) #define InternalError(msg...) \ throw ::CVC4::InternalErrorException(__PRETTY_FUNCTION__, __FILE__, \ __LINE__, ##msg) #define IllegalArgument(arg, msg...) \ throw ::CVC4::IllegalArgumentException( \ "", #arg, __PRETTY_FUNCTION__, \ ::CVC4::IllegalArgumentException::formatVariadic(msg).c_str()); // This cannot use check argument directly as this forces // CheckArgument to use a va_list. This is unsupported in Swig. #define PrettyCheckArgument(cond, arg, msg...) \ do { \ if (__builtin_expect((!(cond)), false)) { \ throw ::CVC4::IllegalArgumentException( \ #cond, #arg, __PRETTY_FUNCTION__, \ ::CVC4::IllegalArgumentException::formatVariadic(msg).c_str()); \ } \ } while (0) #define AlwaysAssertArgument(cond, arg, msg...) \ do { \ if (__builtin_expect((!(cond)), false)) { \ throw ::CVC4::AssertArgumentException(#cond, #arg, __PRETTY_FUNCTION__, \ __FILE__, __LINE__, ##msg); \ } \ } while (0) #ifdef CVC4_ASSERTIONS #define Assert(cond, msg...) AlwaysAssert(cond, ##msg) #define AssertArgument(cond, arg, msg...) AlwaysAssertArgument(cond, arg, ##msg) #define DebugCheckArgument(cond, arg, msg...) CheckArgument(cond, arg, ##msg) #else /* ! CVC4_ASSERTIONS */ #define Assert(cond, msg...) /*__builtin_expect( ( cond ), true )*/ #define AssertArgument(cond, arg, msg...) /*__builtin_expect( ( cond ), true \ )*/ #define DebugCheckArgument(cond, arg, \ msg...) /*__builtin_expect( ( cond ), true )*/ #endif /* CVC4_ASSERTIONS */ } /* CVC4 namespace */ #endif /* __CVC4__ASSERT_H */ cvc4-1.5/src/base/exception.cpp000066400000000000000000000106231313116454100164220ustar00rootroot00000000000000/********************* */ /*! \file exception.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief CVC4's exception base class and some associated utilities ** ** CVC4's exception base class and some associated utilities. **/ #include "base/exception.h" #include #include #include #include #include #include "base/cvc4_assert.h" using namespace std; namespace CVC4 { CVC4_THREADLOCAL(LastExceptionBuffer*) LastExceptionBuffer::s_currentBuffer = NULL; LastExceptionBuffer::LastExceptionBuffer() : d_contents(NULL) {} LastExceptionBuffer::~LastExceptionBuffer() { if(d_contents != NULL){ free(d_contents); d_contents = NULL; } } void LastExceptionBuffer::setContents(const char* string) { if(d_contents != NULL){ free(d_contents); d_contents = NULL; } if(string != NULL){ d_contents = strdup(string); } } const char* IllegalArgumentException::s_header = "Illegal argument detected"; std::string IllegalArgumentException::formatVariadic() { return std::string(); } std::string IllegalArgumentException::formatVariadic(const char* format, ...) { va_list args; va_start(args, format); int n = 512; char* buf = NULL; for (int i = 0; i < 2; ++i){ Assert(n > 0); if(buf != NULL){ delete [] buf; } buf = new char[n]; va_list args_copy; va_copy(args_copy, args); int size = vsnprintf(buf, n, format, args); va_end(args_copy); if(size >= n){ buf[n-1] = '\0'; n = size + 1; } else { break; } } // buf is not NULL is an invariant. // buf is also 0 terminated. Assert(buf != NULL); std::string result(buf); delete [] buf; va_end(args); return result; } std::string IllegalArgumentException::format_extra(const char* condStr, const char* argDesc){ return ( std::string("`") + argDesc + "' is a bad argument" + (*condStr == '\0' ? std::string() : ( std::string("; expected ") + condStr + " to hold" )) ); } void IllegalArgumentException::construct(const char* header, const char* extra, const char* function, const char* tail) { // try building the exception msg with a smallish buffer first, // then with a larger one if sprintf tells us to. int n = 512; char* buf; for(;;) { buf = new char[n]; int size; if(extra == NULL) { size = snprintf(buf, n, "%s\n%s\n%s", header, function, tail); } else { size = snprintf(buf, n, "%s\n%s\n\n %s\n%s", header, function, extra, tail); } if(size < n) { break; } else { // size >= n // try again with a buffer that's large enough n = size + 1; delete [] buf; } } setMessage(string(buf)); #ifdef CVC4_DEBUG LastExceptionBuffer* buffer = LastExceptionBuffer::getCurrent(); if(buffer != NULL){ if(buffer->getContents() == NULL) { buffer->setContents(buf); } } #endif /* CVC4_DEBUG */ delete [] buf; } void IllegalArgumentException::construct(const char* header, const char* extra, const char* function) { // try building the exception msg with a smallish buffer first, // then with a larger one if sprintf tells us to. int n = 256; char* buf; for(;;) { buf = new char[n]; int size; if(extra == NULL) { size = snprintf(buf, n, "%s.\n%s\n", header, function); } else { size = snprintf(buf, n, "%s.\n%s\n\n %s\n", header, function, extra); } if(size < n) { break; } else { // try again with a buffer that's large enough n = size + 1; delete [] buf; } } setMessage(string(buf)); #ifdef CVC4_DEBUG LastExceptionBuffer* buffer = LastExceptionBuffer::getCurrent(); if(buffer != NULL){ if(buffer->getContents() == NULL) { buffer->setContents(buf); } } #endif /* CVC4_DEBUG */ delete [] buf; } } /* namespace CVC4 */ cvc4-1.5/src/base/exception.h000066400000000000000000000124521313116454100160710ustar00rootroot00000000000000/********************* */ /*! \file exception.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief CVC4's exception base class and some associated utilities ** ** CVC4's exception base class and some associated utilities. **/ #include "cvc4_public.h" #ifndef __CVC4__EXCEPTION_H #define __CVC4__EXCEPTION_H #include #include #include #include #include #include #include #include "base/tls.h" namespace CVC4 { class CVC4_PUBLIC Exception : public std::exception { protected: std::string d_msg; public: // Constructors Exception() throw() : d_msg("Unknown exception") {} Exception(const std::string& msg) throw() : d_msg(msg) {} Exception(const char* msg) throw() : d_msg(msg) {} // Destructor virtual ~Exception() throw() {} // NON-VIRTUAL METHOD for setting and printing the error message void setMessage(const std::string& msg) throw() { d_msg = msg; } std::string getMessage() const throw() { return d_msg; } // overridden from base class std::exception virtual const char* what() const throw() { return d_msg.c_str(); } /** * Get this exception as a string. Note that * cout << ex.toString(); * is subtly different from * cout << ex; * which is equivalent to * ex.toStream(cout); * That is because with the latter two, the output language (and * other preferences) for exprs on the stream is respected. In * toString(), there is no stream, so the parameters are default * and you'll get exprs and types printed using the AST language. */ std::string toString() const throw() { std::stringstream ss; toStream(ss); return ss.str(); } /** * Printing: feel free to redefine toStream(). When overridden in * a derived class, it's recommended that this method print the * type of exception before the actual message. */ virtual void toStream(std::ostream& os) const throw() { os << d_msg; } };/* class Exception */ class CVC4_PUBLIC IllegalArgumentException : public Exception { protected: IllegalArgumentException() : Exception() {} void construct(const char* header, const char* extra, const char* function, const char* tail); void construct(const char* header, const char* extra, const char* function); static std::string format_extra(const char* condStr, const char* argDesc); static const char* s_header; public: IllegalArgumentException(const char* condStr, const char* argDesc, const char* function, const char* tail) : Exception() { construct(s_header, format_extra(condStr, argDesc).c_str(), function, tail); } IllegalArgumentException(const char* condStr, const char* argDesc, const char* function) : Exception() { construct(s_header, format_extra(condStr, argDesc).c_str(), function); } /** * This is a convenience function for building usages that are variadic. * * Having IllegalArgumentException itself be variadic is problematic for * making sure calls to IllegalArgumentException clean up memory. */ static std::string formatVariadic(); static std::string formatVariadic(const char* format, ...); };/* class IllegalArgumentException */ inline std::ostream& operator<<(std::ostream& os, const Exception& e) throw() CVC4_PUBLIC; inline std::ostream& operator<<(std::ostream& os, const Exception& e) throw() { e.toStream(os); return os; } template inline void CheckArgument(bool cond, const T& arg, const char* tail) CVC4_PUBLIC; template inline void CheckArgument(bool cond, const T& arg, const char* tail) { if(__builtin_expect( ( !cond ), false )) { \ throw ::CVC4::IllegalArgumentException("", "", ""); \ } \ } template inline void CheckArgument(bool cond, const T& arg) CVC4_PUBLIC; template inline void CheckArgument(bool cond, const T& arg) { if(__builtin_expect( ( !cond ), false )) { \ throw ::CVC4::IllegalArgumentException("", "", ""); \ } \ } class CVC4_PUBLIC LastExceptionBuffer { public: LastExceptionBuffer(); ~LastExceptionBuffer(); void setContents(const char* string); const char* getContents() const { return d_contents; } static LastExceptionBuffer* getCurrent() { return s_currentBuffer; } static void setCurrent(LastExceptionBuffer* buffer) { s_currentBuffer = buffer; } static const char* currentContents() { return (getCurrent() == NULL) ? NULL : getCurrent()->getContents(); } private: /* Disallow copies */ LastExceptionBuffer(const LastExceptionBuffer&) CVC4_UNDEFINED; LastExceptionBuffer& operator=(const LastExceptionBuffer&) CVC4_UNDEFINED; char* d_contents; static CVC4_THREADLOCAL(LastExceptionBuffer*) s_currentBuffer; }; /* class LastExceptionBuffer */ }/* CVC4 namespace */ #endif /* __CVC4__EXCEPTION_H */ cvc4-1.5/src/base/exception.i000066400000000000000000000005041313116454100160650ustar00rootroot00000000000000%{ #include "base/exception.h" %} %ignore CVC4::operator<<(std::ostream&, const Exception&) throw(); %ignore CVC4::Exception::Exception(const char*) throw(); %typemap(javabase) CVC4::Exception "java.lang.RuntimeException"; %rename(CVC4IllegalArgumentException) CVC4::IllegalArgumentException; %include "base/exception.h" cvc4-1.5/src/base/listener.cpp000066400000000000000000000047151313116454100162560ustar00rootroot00000000000000/********************* */ /*! \file listener.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Output utility classes and functions ** ** Output utility classes and functions. **/ #include "base/listener.h" #include #include "base/cvc4_assert.h" namespace CVC4 { Listener::Listener(){} Listener::~Listener(){} ListenerCollection::ListenerCollection() : d_listeners() {} ListenerCollection::~ListenerCollection() { Assert(empty()); } ListenerCollection::iterator ListenerCollection::addListener(Listener* listener) { return d_listeners.insert(d_listeners.end(), listener); } void ListenerCollection::removeListener(iterator position) { d_listeners.erase(position); } void ListenerCollection::notify() { for(iterator i = d_listeners.begin(), iend = d_listeners.end(); i != iend; ++i) { Listener* listener = *i; listener->notify(); } } bool ListenerCollection::empty() const { return d_listeners.empty(); } ListenerCollection::Registration::Registration( ListenerCollection* collection, Listener* listener) : d_listener(listener) , d_position() , d_collection(collection) { d_position = d_collection->addListener(d_listener); } ListenerCollection::Registration::~Registration() { d_collection->removeListener(d_position); delete d_listener; } ListenerCollection::Registration* ListenerCollection::registerListener( Listener* listener) { return new Registration(this, listener); } ListenerRegistrationList::ListenerRegistrationList() : d_registrations() {} ListenerRegistrationList::~ListenerRegistrationList() { clear(); } void ListenerRegistrationList::add( ListenerCollection::Registration* registration) { d_registrations.push_back(registration); } void ListenerRegistrationList::clear(){ typedef std::list::iterator iterator; for(iterator i = d_registrations.begin(), iend = d_registrations.end(); i != iend; ++i) { ListenerCollection::Registration* current = *i; delete current; } d_registrations.clear(); } }/* CVC4 namespace */ cvc4-1.5/src/base/listener.h000066400000000000000000000116401313116454100157160ustar00rootroot00000000000000/********************* */ /*! \file listener.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Utility classes for listeners and collections of listeners. ** ** Utilities for the development of a Listener interface class. This class ** provides a single notification that must be overwritten. This file also ** provides a utility class for a collection of listeners and an RAII style ** Registration class for managing the relationship between Listeners ** and the collection. **/ #include "cvc4_public.h" #ifndef __CVC4__LISTENER_H #define __CVC4__LISTENER_H #include namespace CVC4 { /** * Listener interface class. * * The interface provides a notify() function. */ class CVC4_PUBLIC Listener { public: Listener(); virtual ~Listener(); /** Note that notify may throw arbitrary exceptions. */ virtual void notify() = 0; }; /** * ListenerCollection is a list of Listener instances. * One can add and remove Listeners. * * ListenerCollection does not own the memory of the Listeners. * As a sanity check, it asserted that all of its listeners * have been removed. */ class CVC4_PUBLIC ListenerCollection { public: typedef std::list ListenerList; typedef ListenerList::iterator iterator; /** Creates an empty listener collection. */ ListenerCollection(); /** * Destroys an iterator collection. * If assertions are on, this throws an AssertionException if the collection * is not empty(). */ ~ListenerCollection(); /** * This adds a listener to the current collection and returns * an iterator to the listener in the collection. * The user of the collection must call removeListener() using * this iterator. * The collection does not take over the memory for the listener. */ iterator addListener(Listener* listener); /** * Remove an listener using the iterator distributed when adding the * listener. */ void removeListener(iterator position); /** Calls notify() on all listeners in the collection. */ void notify(); /** Returns true if the collection contains no listeners. */ bool empty() const; /** * Registration is an RAII utility function for using Listener * with ListenerCollection. * * On construction, the Registration takes a ListenerCollection, * collection, * and a Listener*, listener. It takes over the memory for listener. It then * adds listener to collection. On destruction it removes listener and calls * delete on listener. * * Because of this usage, a Registration must be destroyed before the * ListenerCollection it is attached to. */ class CVC4_PUBLIC Registration { public: Registration(ListenerCollection* collection, Listener* listener); ~Registration(); private: Listener* d_listener; ListenerCollection::iterator d_position; ListenerCollection* d_collection; };/* class CVC4::ListenerCollection::Registration */ /** * Returns a new Registration given a Listener that is attached to this * ListenerCollection. Management of the memory is handed to the user of * this function. To remove the listener, call the destructor for the * Registration. */ Registration* registerListener(Listener* listener); private: /** * Disabling the copy-constructor. * The user of the class must be know to remove listeners on the collection. * Allowing copies will only cause confusion. */ ListenerCollection(const ListenerCollection& copy) CVC4_UNDEFINED; /** * Disabling the assignment operator. * The user of the class must be know to remove listeners on the collection. * Allowing copies will only cause confusion. */ ListenerCollection& operator=(const ListenerCollection& copy) CVC4_UNDEFINED; /** A list of the listeners in the collection.*/ ListenerList d_listeners; };/* class CVC4::ListenerCollection */ /** * A list of ListenerCollection::Registration* pointers. * * This list assumes it has control over all of the memory of the registrations. */ class ListenerRegistrationList { public: ListenerRegistrationList(); ~ListenerRegistrationList(); void add(ListenerCollection::Registration* registration); void clear(); private: /** Disallow copying.*/ ListenerRegistrationList(const ListenerRegistrationList&) CVC4_UNDEFINED; /** Disallow assignment.*/ ListenerRegistrationList operator=(const ListenerRegistrationList&) CVC4_UNDEFINED; std::list d_registrations; };/* class CVC4::ListenerRegistrationList */ }/* CVC4 namespace */ #endif /* __CVC4__LISTENER_H */ cvc4-1.5/src/base/mktagheaders000077500000000000000000000007421313116454100163060ustar00rootroot00000000000000#!/bin/bash # # mktagheaders # # The purpose of this script is to generate the *_tag.h header file from the # *_tags file. # # Invocation: # # mktagheaders # # will be the name of the generated array. # each line of this file is turned into a string in the generated # array. TAG_NAME=$1 TAG_FILE=$2 echo 'static char const* const '$TAG_NAME'[] = {'; for tag in `cat $TAG_FILE`; do echo "\"$tag\","; done; echo 'NULL'; echo '};' cvc4-1.5/src/base/mktags000077500000000000000000000024411313116454100151330ustar00rootroot00000000000000#!/bin/bash # # mktags # # The purpose of this script is to create Debug_tags and Trace_tags files. # Note that in the Makefile workflow these are first stored in a *_tags.tmp # file. This file contains a list of all of the strings that occur in things # like Debug("foo") or Debug.isOn("bar") in a given directory. The list is # seperated by newlines. The expected Debug_tags file for the previous two # tags would be: # bar # foo # # Invocation: # # mktags {Debug,Trace} # # is expected to be passed a single space separated list of files. # One can use quotes to achieve this. This is one reason to use "$(...)" # instead of back ticks `...`. DebugOrTrace=$1 InputFiles=$2 grep -h '\<'$DebugOrTrace'\(\.isOn\)* *( *\".*\" *)' \ $InputFiles | \ sed 's/\/\/.*//;s/^'$DebugOrTrace'\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/;s/.*[^a-zA-Z0-9_]'$DebugOrTrace'\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/' | \ LC_ALL=C sort | \ uniq # Reference copy of what this is replacing. # grep -h '\<$(@:_tags.tmp=)\(\.isOn\)* *( *\".*\" *)' \ # `find @srcdir@/../ -name "*.cpp" -o -name "*.h" -o -name "*.cc" -o -name "*.g"` | \ # sed 's/\/\/.*//;s/^$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/;s/.*[^a-zA-Z0-9_]$(@:_tags.tmp=)\(\.isOn\)* *( *\"\([^"]*\)\".*/\2/' | LC_ALL=C sort | uniq cvc4-1.5/src/base/modal_exception.h000066400000000000000000000026131313116454100172430ustar00rootroot00000000000000/********************* */ /*! \file modal_exception.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An exception that is thrown when an interactive-only ** feature while CVC4 is being used in a non-interactive setting ** ** An exception that is thrown when an interactive-only feature while ** CVC4 is being used in a non-interactive setting (for example, the ** "(get-assertions)" command in an SMT-LIBv2 script). **/ #include "cvc4_public.h" #ifndef __CVC4__SMT__MODAL_EXCEPTION_H #define __CVC4__SMT__MODAL_EXCEPTION_H #include "base/exception.h" namespace CVC4 { class CVC4_PUBLIC ModalException : public CVC4::Exception { public: ModalException() : Exception("Feature used while operating in " "incorrect state") { } ModalException(const std::string& msg) : Exception(msg) { } ModalException(const char* msg) : Exception(msg) { } };/* class ModalException */ }/* CVC4 namespace */ #endif /* __CVC4__SMT__MODAL_EXCEPTION_H */ cvc4-1.5/src/base/modal_exception.i000066400000000000000000000002071313116454100172410ustar00rootroot00000000000000%{ #include "base/modal_exception.h" %} %ignore CVC4::ModalException::ModalException(const char*); %include "base/modal_exception.h" cvc4-1.5/src/base/output.cpp000066400000000000000000000106111313116454100157610ustar00rootroot00000000000000/********************* */ /*! \file output.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Output utility classes and functions ** ** Output utility classes and functions. **/ #include "base/output.h" #include using namespace std; namespace CVC4 { /* Definitions of the declared globals from output.h... */ null_streambuf null_sb; ostream null_os(&null_sb); NullC nullCvc4Stream CVC4_PUBLIC; const std::string CVC4ostream::s_tab = " "; const int CVC4ostream::s_indentIosIndex = ios_base::xalloc(); DebugC DebugChannel CVC4_PUBLIC (&cout); WarningC WarningChannel CVC4_PUBLIC (&cerr); MessageC MessageChannel CVC4_PUBLIC (&cout); NoticeC NoticeChannel CVC4_PUBLIC (&null_os); ChatC ChatChannel CVC4_PUBLIC (&null_os); TraceC TraceChannel CVC4_PUBLIC (&cout); std::ostream DumpOutC::dump_cout(cout.rdbuf());// copy cout stream buffer DumpOutC DumpOutChannel CVC4_PUBLIC (&DumpOutC::dump_cout); #ifndef CVC4_MUZZLE # if defined(CVC4_DEBUG) && defined(CVC4_TRACING) int DebugC::printf(const char* tag, const char* fmt, ...) { if(d_tags.find(string(tag)) == d_tags.end()) { return 0; } // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } int DebugC::printf(std::string tag, const char* fmt, ...) { if(d_tags.find(tag) == d_tags.end()) { return 0; } // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } # endif /* CVC4_DEBUG && CVC4_TRACING */ int WarningC::printf(const char* fmt, ...) { // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } int MessageC::printf(const char* fmt, ...) { // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } int NoticeC::printf(const char* fmt, ...) { // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } int ChatC::printf(const char* fmt, ...) { // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } # ifdef CVC4_TRACING int TraceC::printf(const char* tag, const char* fmt, ...) { if(d_tags.find(string(tag)) == d_tags.end()) { return 0; } // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } int TraceC::printf(std::string tag, const char* fmt, ...) { if(d_tags.find(tag) == d_tags.end()) { return 0; } // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } # endif /* CVC4_TRACING */ # ifdef CVC4_DUMPING int DumpOutC::printf(const char* tag, const char* fmt, ...) { if(d_tags.find(string(tag)) == d_tags.end()) { return 0; } // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } int DumpOutC::printf(std::string tag, const char* fmt, ...) { if(d_tags.find(tag) == d_tags.end()) { return 0; } // chop off output after 1024 bytes char buf[1024]; va_list vl; va_start(vl, fmt); int retval = vsnprintf(buf, sizeof(buf), fmt, vl); va_end(vl); *d_os << buf; return retval; } # endif /* CVC4_DUMPING */ #endif /* ! CVC4_MUZZLE */ }/* CVC4 namespace */ cvc4-1.5/src/base/output.h000066400000000000000000000445241313116454100154400ustar00rootroot00000000000000/********************* */ /*! \file output.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Output utility classes and functions ** ** Output utility classes and functions. **/ #include "cvc4_private_library.h" #ifndef __CVC4__OUTPUT_H #define __CVC4__OUTPUT_H #include #include #include #include #include #include #include #include namespace CVC4 { template std::ostream& operator<<(std::ostream& out, const std::pair& p) CVC4_PUBLIC; template std::ostream& operator<<(std::ostream& out, const std::pair& p) { return out << "[" << p.first << "," << p.second << "]"; } /** * A utility class to provide (essentially) a "/dev/null" streambuf. * If debugging support is compiled in, but debugging for * e.g. "parser" is off, then Debug("parser") returns a stream * attached to a null_streambuf instance so that output is directed to * the bit bucket. */ class CVC4_PUBLIC null_streambuf : public std::streambuf { public: /* Overriding overflow() just ensures that EOF isn't returned on the * stream. Perhaps this is not so critical, but recommended; this * way the output stream looks like it's functioning, in a non-error * state. */ int overflow(int c) { return c; } };/* class null_streambuf */ /** A null stream-buffer singleton */ extern null_streambuf null_sb; /** A null output stream singleton */ extern std::ostream null_os CVC4_PUBLIC; class CVC4_PUBLIC CVC4ostream { static const std::string s_tab; static const int s_indentIosIndex; /** The underlying ostream */ std::ostream* d_os; /** Are we in the first column? */ bool d_firstColumn; /** The endl manipulator (why do we need to keep this?) */ std::ostream& (*const d_endl)(std::ostream&); // do not allow use CVC4ostream& operator=(const CVC4ostream&); public: CVC4ostream() : d_os(NULL), d_firstColumn(false), d_endl(&std::endl) { } explicit CVC4ostream(std::ostream* os) : d_os(os), d_firstColumn(true), d_endl(&std::endl) { } void pushIndent() { if(d_os != NULL) { ++d_os->iword(s_indentIosIndex); } } void popIndent() { if(d_os != NULL) { long& indent = d_os->iword(s_indentIosIndex); if(indent > 0) { --indent; } } } CVC4ostream& flush() { if(d_os != NULL) { d_os->flush(); } return *this; } bool isConnected() { return d_os != NULL; } operator std::ostream&() { return isConnected() ? *d_os : null_os; } std::ostream* getStreamPointer() { return d_os; } template CVC4ostream& operator<<(T const& t) CVC4_PUBLIC; // support manipulators, endl, etc.. CVC4ostream& operator<<(std::ostream& (*pf)(std::ostream&)) { if(d_os != NULL) { d_os = &(*d_os << pf); if(pf == d_endl) { d_firstColumn = true; } } return *this; } CVC4ostream& operator<<(std::ios& (*pf)(std::ios&)) { if(d_os != NULL) { d_os = &(*d_os << pf); } return *this; } CVC4ostream& operator<<(std::ios_base& (*pf)(std::ios_base&)) { if(d_os != NULL) { d_os = &(*d_os << pf); } return *this; } CVC4ostream& operator<<(CVC4ostream& (*pf)(CVC4ostream&)) { return pf(*this); } };/* class CVC4ostream */ inline CVC4ostream& push(CVC4ostream& stream) { stream.pushIndent(); return stream; } inline CVC4ostream& pop(CVC4ostream& stream) { stream.popIndent(); return stream; } template CVC4ostream& CVC4ostream::operator<<(T const& t) { if(d_os != NULL) { if(d_firstColumn) { d_firstColumn = false; long indent = d_os->iword(s_indentIosIndex); for(long i = 0; i < indent; ++i) { d_os = &(*d_os << s_tab); } } d_os = &(*d_os << t); } return *this; } /** * Does nothing; designed for compilation of non-debug/non-trace * builds. None of these should ever be called in such builds, but we * offer this to the compiler so it doesn't complain. */ class CVC4_PUBLIC NullC { public: operator bool() { return false; } operator CVC4ostream() { return CVC4ostream(); } operator std::ostream&() { return null_os; } };/* class NullC */ extern NullC nullCvc4Stream CVC4_PUBLIC; /** The debug output class */ class CVC4_PUBLIC DebugC { std::set d_tags; std::ostream* d_os; public: explicit DebugC(std::ostream* os) : d_os(os) {} int printf(const char* tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); int printf(std::string tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); CVC4ostream operator()(const char* tag) { if(!d_tags.empty() && d_tags.find(std::string(tag)) != d_tags.end()) { return CVC4ostream(d_os); } else { return CVC4ostream(); } } CVC4ostream operator()(std::string tag) { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { return CVC4ostream(d_os); } else { return CVC4ostream(); } } bool on (const char* tag) { d_tags.insert(std::string(tag)); return true; } bool on (std::string tag) { d_tags.insert(tag); return true; } bool off(const char* tag) { d_tags.erase (std::string(tag)); return false; } bool off(std::string tag) { d_tags.erase (tag); return false; } bool off() { d_tags.clear(); return false; } bool isOn(const char* tag) { return d_tags.find(std::string(tag)) != d_tags.end(); } bool isOn(std::string tag) { return d_tags.find(tag) != d_tags.end(); } std::ostream& setStream(std::ostream* os) { d_os = os; return *os; } std::ostream& getStream() { return *d_os; } std::ostream* getStreamPointer() { return d_os; } };/* class DebugC */ /** The warning output class */ class CVC4_PUBLIC WarningC { std::set< std::pair > d_alreadyWarned; std::ostream* d_os; public: explicit WarningC(std::ostream* os) : d_os(os) {} int printf(const char* fmt, ...) __attribute__ ((format(printf, 2, 3))); CVC4ostream operator()() { return CVC4ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() { return *d_os; } std::ostream* getStreamPointer() { return d_os; } bool isOn() const { return d_os != &null_os; } // This function supports the WarningOnce() macro, which allows you // to easily indicate that a warning should be emitted, but only // once for a given run of CVC4. bool warnOnce(const char* file, size_t line) { std::pair pr = std::make_pair(file, line); if(d_alreadyWarned.find(pr) != d_alreadyWarned.end()) { // signal caller not to warn again return false; } // okay warn this time, but don't do it again d_alreadyWarned.insert(pr); return true; } };/* class WarningC */ /** The message output class */ class CVC4_PUBLIC MessageC { std::ostream* d_os; public: explicit MessageC(std::ostream* os) : d_os(os) {} int printf(const char* fmt, ...) __attribute__ ((format(printf, 2, 3))); CVC4ostream operator()() { return CVC4ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() { return *d_os; } std::ostream* getStreamPointer() { return d_os; } bool isOn() const { return d_os != &null_os; } };/* class MessageC */ /** The notice output class */ class CVC4_PUBLIC NoticeC { std::ostream* d_os; public: explicit NoticeC(std::ostream* os) : d_os(os) {} int printf(const char* fmt, ...) __attribute__ ((format(printf, 2, 3))); CVC4ostream operator()() { return CVC4ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() { return *d_os; } std::ostream* getStreamPointer() { return d_os; } bool isOn() const { return d_os != &null_os; } };/* class NoticeC */ /** The chat output class */ class CVC4_PUBLIC ChatC { std::ostream* d_os; public: explicit ChatC(std::ostream* os) : d_os(os) {} int printf(const char* fmt, ...) __attribute__ ((format(printf, 2, 3))); CVC4ostream operator()() { return CVC4ostream(d_os); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() { return *d_os; } std::ostream* getStreamPointer() { return d_os; } bool isOn() const { return d_os != &null_os; } };/* class ChatC */ /** The trace output class */ class CVC4_PUBLIC TraceC { std::ostream* d_os; std::set d_tags; public: explicit TraceC(std::ostream* os) : d_os(os) {} int printf(const char* tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); int printf(std::string tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); CVC4ostream operator()(const char* tag) { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { return CVC4ostream(d_os); } else { return CVC4ostream(); } } CVC4ostream operator()(std::string tag) { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { return CVC4ostream(d_os); } else { return CVC4ostream(); } } bool on (const char* tag) { d_tags.insert(std::string(tag)); return true; } bool on (std::string tag) { d_tags.insert(tag); return true; } bool off(const char* tag) { d_tags.erase (std::string(tag)); return false; } bool off(std::string tag) { d_tags.erase (tag); return false; } bool off() { d_tags.clear(); return false; } bool isOn(const char* tag) { return d_tags.find(std::string(tag)) != d_tags.end(); } bool isOn(std::string tag) { return d_tags.find(tag) != d_tags.end(); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() { return *d_os; } std::ostream* getStreamPointer() { return d_os; } };/* class TraceC */ /** The dump output class */ class CVC4_PUBLIC DumpOutC { std::set d_tags; std::ostream* d_os; public: /** * A copy of cout for use by the dumper. This is important because * it has different settings (e.g., the expr printing depth is always * unlimited). */ static std::ostream dump_cout; explicit DumpOutC(std::ostream* os) : d_os(os) {} int printf(const char* tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); int printf(std::string tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); CVC4ostream operator()(const char* tag) { if(!d_tags.empty() && d_tags.find(std::string(tag)) != d_tags.end()) { return CVC4ostream(d_os); } else { return CVC4ostream(); } } CVC4ostream operator()(std::string tag) { if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { return CVC4ostream(d_os); } else { return CVC4ostream(); } } bool on (const char* tag) { d_tags.insert(std::string(tag)); return true; } bool on (std::string tag) { d_tags.insert(tag); return true; } bool off(const char* tag) { d_tags.erase (std::string(tag)); return false; } bool off(std::string tag) { d_tags.erase (tag); return false; } bool off() { d_tags.clear(); return false; } bool isOn(const char* tag) { return d_tags.find(std::string(tag)) != d_tags.end(); } bool isOn(std::string tag) { return d_tags.find(tag) != d_tags.end(); } std::ostream& setStream(std::ostream* os) { d_os = os; return *d_os; } std::ostream& getStream() { return *d_os; } std::ostream* getStreamPointer() { return d_os; } };/* class DumpOutC */ /** The debug output singleton */ extern DebugC DebugChannel CVC4_PUBLIC; /** The warning output singleton */ extern WarningC WarningChannel CVC4_PUBLIC; /** The message output singleton */ extern MessageC MessageChannel CVC4_PUBLIC; /** The notice output singleton */ extern NoticeC NoticeChannel CVC4_PUBLIC; /** The chat output singleton */ extern ChatC ChatChannel CVC4_PUBLIC; /** The trace output singleton */ extern TraceC TraceChannel CVC4_PUBLIC; /** The dump output singleton */ extern DumpOutC DumpOutChannel CVC4_PUBLIC; #ifdef CVC4_MUZZLE # define Debug ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::DebugChannel # define Warning ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::WarningChannel # define WarningOnce ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::WarningChannel # define Message ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::MessageChannel # define Notice ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::NoticeChannel # define Chat ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::ChatChannel # define Trace ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::TraceChannel # define DumpOut ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::DumpOutChannel inline int DebugC::printf(const char* tag, const char* fmt, ...) { return 0; } inline int DebugC::printf(std::string tag, const char* fmt, ...) { return 0; } inline int WarningC::printf(const char* fmt, ...) { return 0; } inline int MessageC::printf(const char* fmt, ...) { return 0; } inline int NoticeC::printf(const char* fmt, ...) { return 0; } inline int ChatC::printf(const char* fmt, ...) { return 0; } inline int TraceC::printf(const char* tag, const char* fmt, ...) { return 0; } inline int TraceC::printf(std::string tag, const char* fmt, ...) { return 0; } inline int DumpOutC::printf(const char* tag, const char* fmt, ...) { return 0; } inline int DumpOutC::printf(std::string tag, const char* fmt, ...) { return 0; } #else /* CVC4_MUZZLE */ # if defined(CVC4_DEBUG) && defined(CVC4_TRACING) # define Debug ::CVC4::DebugChannel # else /* CVC4_DEBUG && CVC4_TRACING */ # define Debug ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::DebugChannel inline int DebugC::printf(const char* tag, const char* fmt, ...) { return 0; } inline int DebugC::printf(std::string tag, const char* fmt, ...) { return 0; } # endif /* CVC4_DEBUG && CVC4_TRACING */ # define Warning (! ::CVC4::WarningChannel.isOn()) ? ::CVC4::nullCvc4Stream : ::CVC4::WarningChannel # define WarningOnce (! ::CVC4::WarningChannel.isOn() || ! ::CVC4::WarningChannel.warnOnce(__FILE__,__LINE__)) ? ::CVC4::nullCvc4Stream : ::CVC4::WarningChannel # define Message (! ::CVC4::MessageChannel.isOn()) ? ::CVC4::nullCvc4Stream : ::CVC4::MessageChannel # define Notice (! ::CVC4::NoticeChannel.isOn()) ? ::CVC4::nullCvc4Stream : ::CVC4::NoticeChannel # define Chat (! ::CVC4::ChatChannel.isOn()) ? ::CVC4::nullCvc4Stream : ::CVC4::ChatChannel # ifdef CVC4_TRACING # define Trace ::CVC4::TraceChannel # else /* CVC4_TRACING */ # define Trace ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::TraceChannel inline int TraceC::printf(const char* tag, const char* fmt, ...) { return 0; } inline int TraceC::printf(std::string tag, const char* fmt, ...) { return 0; } # endif /* CVC4_TRACING */ # ifdef CVC4_DUMPING # define DumpOut ::CVC4::DumpOutChannel # else /* CVC4_DUMPING */ # define DumpOut ::CVC4::__cvc4_true() ? ::CVC4::nullCvc4Stream : ::CVC4::DumpOutChannel inline int DumpOutC::printf(const char* tag, const char* fmt, ...) { return 0; } inline int DumpOutC::printf(std::string tag, const char* fmt, ...) { return 0; } # endif /* CVC4_DUMPING */ #endif /* CVC4_MUZZLE */ // Disallow e.g. !Debug("foo").isOn() forms // because the ! will apply before the ? . // If a compiler error has directed you here, // just parenthesize it e.g. !(Debug("foo").isOn()) class __cvc4_true { void operator!() CVC4_UNUSED; void operator~() CVC4_UNUSED; void operator-() CVC4_UNUSED; void operator+() CVC4_UNUSED; public: inline operator bool() { return true; } };/* __cvc4_true */ #if defined(CVC4_DEBUG) && defined(CVC4_TRACING) class CVC4_PUBLIC ScopedDebug { std::string d_tag; bool d_oldSetting; public: ScopedDebug(std::string tag, bool newSetting = true) : d_tag(tag) { d_oldSetting = Debug.isOn(d_tag); if(newSetting) { Debug.on(d_tag); } else { Debug.off(d_tag); } } ScopedDebug(const char* tag, bool newSetting = true) : d_tag(tag) { d_oldSetting = Debug.isOn(d_tag); if(newSetting) { Debug.on(d_tag); } else { Debug.off(d_tag); } } ~ScopedDebug() { if(d_oldSetting) { Debug.on(d_tag); } else { Debug.off(d_tag); } } };/* class ScopedDebug */ #else /* CVC4_DEBUG && CVC4_TRACING */ class CVC4_PUBLIC ScopedDebug { public: ScopedDebug(std::string tag, bool newSetting = true) {} ScopedDebug(const char* tag, bool newSetting = true) {} };/* class ScopedDebug */ #endif /* CVC4_DEBUG && CVC4_TRACING */ #ifdef CVC4_TRACING class CVC4_PUBLIC ScopedTrace { std::string d_tag; bool d_oldSetting; public: ScopedTrace(std::string tag, bool newSetting = true) : d_tag(tag) { d_oldSetting = Trace.isOn(d_tag); if(newSetting) { Trace.on(d_tag); } else { Trace.off(d_tag); } } ScopedTrace(const char* tag, bool newSetting = true) : d_tag(tag) { d_oldSetting = Trace.isOn(d_tag); if(newSetting) { Trace.on(d_tag); } else { Trace.off(d_tag); } } ~ScopedTrace() { if(d_oldSetting) { Trace.on(d_tag); } else { Trace.off(d_tag); } } };/* class ScopedTrace */ #else /* CVC4_TRACING */ class CVC4_PUBLIC ScopedTrace { public: ScopedTrace(std::string tag, bool newSetting = true) {} ScopedTrace(const char* tag, bool newSetting = true) {} };/* class ScopedTrace */ #endif /* CVC4_TRACING */ /** * Pushes an indentation level on construction, pop on destruction. * Useful for tracing recursive functions especially, but also can be * used for clearly separating different phases of an algorithm, * or iterations of a loop, or... etc. */ class CVC4_PUBLIC IndentedScope { CVC4ostream d_out; public: inline IndentedScope(CVC4ostream out); inline ~IndentedScope(); };/* class IndentedScope */ #if defined(CVC4_DEBUG) && defined(CVC4_TRACING) inline IndentedScope::IndentedScope(CVC4ostream out) : d_out(out) { d_out << push; } inline IndentedScope::~IndentedScope() { d_out << pop; } #else /* CVC4_DEBUG && CVC4_TRACING */ inline IndentedScope::IndentedScope(CVC4ostream out) {} inline IndentedScope::~IndentedScope() {} #endif /* CVC4_DEBUG && CVC4_TRACING */ }/* CVC4 namespace */ #endif /* __CVC4__OUTPUT_H */ cvc4-1.5/src/base/ptr_closer.h000066400000000000000000000043551313116454100162520ustar00rootroot00000000000000/********************* */ /*! \file ptr_closer.h ** \verbatim ** Top contributors (to current version): ** Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A class to close owned pointers in the destructor. ** ** A class to close owned pointers in the destructor. **/ #include "cvc4_public.h" #ifndef __CVC4__PTR_CLOSER_H #define __CVC4__PTR_CLOSER_H namespace CVC4 { /** * A class to close owned pointers in the destructor. This plays a similar role * to unique_ptr, but without move semantics. This is designed to overcome the * lack of having unique_ptr in C++05. * * This is a variant of unique_ptr that is not designed for move semantics. * These are appropriate to own pointer allocations on the stack that should be * deleted when an exception is thrown. These should be used with care within * heap based data structures, and never as the return value of a function. */ template class PtrCloser { public: PtrCloser() : d_pointer(NULL) {} explicit PtrCloser(T* pointer) : d_pointer(pointer) {} ~PtrCloser() { delete d_pointer; } /** Deletes the currently owned copy and takes ownership of pointer. */ void reset(T* pointer = NULL) { delete d_pointer; d_pointer = pointer; } /** Gives up ownership of the pointer to the caller. */ T* release() { T* copy = d_pointer; d_pointer = NULL; return copy; } /** Returns the pointer. */ T* get() const { return d_pointer; } /** Returns the pointer. Undefined if the pointer is null. */ T* operator->() const { return d_pointer; } /** Returns true if the pointer is not-null. */ operator bool() const { return d_pointer != NULL; } private: PtrCloser(const PtrCloser*) CVC4_UNDEFINED; PtrCloser& operator=(const PtrCloser&) CVC4_UNDEFINED; /** An owned pointer object allocated by `new`. Or NULL. */ T* d_pointer; }; /* class PtrCloser */ } /* CVC4 namespace */ #endif /* __CVC4__PTR_CLOSER_H */ cvc4-1.5/src/base/tls.h.in000066400000000000000000000133651313116454100153060ustar00rootroot00000000000000/********************* */ /*! \file tls.h.in ** \verbatim ** Top contributors (to current version): ** Morgan Deters, ACSYS, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Header to define CVC4_THREAD whether or not TLS is ** supported by the compiler/runtime platform ** ** Header to define CVC4_THREAD whether or not TLS is supported by ** the compiler/runtime platform. If not, an implementation based on ** pthread_getspecific() / pthread_setspecific() is given. **/ #include "cvc4_public.h" #ifndef __CVC4__TLS_H #define __CVC4__TLS_H // A bit obnoxious: we have to take varargs to support multi-argument // template types in the threadlocals. // E.g. "CVC4_THREADLOCAL(hash_set*)" fails otherwise, // due to the embedded comma. #if @CVC4_TLS_SUPPORTED@ # define CVC4_THREADLOCAL(__type...) @CVC4_TLS@ __type # define CVC4_THREADLOCAL_PUBLIC(__type...) @CVC4_TLS@ CVC4_PUBLIC __type # define CVC4_THREADLOCAL_TYPE(__type...) __type #else # include # define CVC4_THREADLOCAL(__type...) ::CVC4::ThreadLocal< __type > # define CVC4_THREADLOCAL_PUBLIC(__type...) CVC4_PUBLIC ::CVC4::ThreadLocal< __type > # define CVC4_THREADLOCAL_TYPE(__type...) ::CVC4::ThreadLocal< __type > namespace CVC4 { template class ThreadLocalImpl; template class ThreadLocalImpl { pthread_key_t d_key; static void cleanup(void*) { } public: ThreadLocalImpl() { pthread_key_create(&d_key, ThreadLocalImpl::cleanup); } ThreadLocalImpl(const T& t) { pthread_key_create(&d_key, ThreadLocalImpl::cleanup); pthread_setspecific(d_key, const_cast(reinterpret_cast(t))); } ThreadLocalImpl(const ThreadLocalImpl& tl) { pthread_key_create(&d_key, ThreadLocalImpl::cleanup); pthread_setspecific(d_key, const_cast(reinterpret_cast(static_cast(tl)))); } ThreadLocalImpl& operator=(const T& t) { pthread_setspecific(d_key, const_cast(reinterpret_cast(t))); return *this; } ThreadLocalImpl& operator=(const ThreadLocalImpl& tl) { pthread_setspecific(d_key, const_cast(reinterpret_cast(static_cast(tl)))); return *this; } operator T() const { return static_cast(reinterpret_cast(pthread_getspecific(d_key))); } };/* class ThreadLocalImpl */ template class ThreadLocalImpl { pthread_key_t d_key; static void cleanup(void*) { } public: ThreadLocalImpl() { pthread_key_create(&d_key, ThreadLocalImpl::cleanup); } ThreadLocalImpl(const T* t) { pthread_key_create(&d_key, ThreadLocalImpl::cleanup); pthread_setspecific(d_key, const_cast(reinterpret_cast(t))); } ThreadLocalImpl(const ThreadLocalImpl& tl) { pthread_key_create(&d_key, ThreadLocalImpl::cleanup); pthread_setspecific(d_key, const_cast(reinterpret_cast(static_cast(tl)))); } ThreadLocalImpl& operator=(const T* t) { pthread_setspecific(d_key, const_cast(reinterpret_cast(t))); return *this; } ThreadLocalImpl& operator=(const ThreadLocalImpl& tl) { pthread_setspecific(d_key, const_cast(reinterpret_cast(static_cast(tl)))); return *this; } operator T*() const { return static_cast(pthread_getspecific(d_key)); } T operator*() { return *static_cast(pthread_getspecific(d_key)); } T* operator->() { return static_cast(pthread_getspecific(d_key)); } };/* class ThreadLocalImpl */ template class ThreadLocalImpl { };/* class ThreadLocalImpl */ template class ThreadLocal : public ThreadLocalImpl { typedef ThreadLocalImpl super; public: ThreadLocal() : super() {} ThreadLocal(const T& t) : super(t) {} ThreadLocal(const ThreadLocal& tl) : super(tl) {} ThreadLocal& operator=(const T& t) { return static_cast< ThreadLocal& >(super::operator=(t)); } ThreadLocal& operator=(const ThreadLocal& tl) { return static_cast< ThreadLocal& >(super::operator=(tl)); } };/* class ThreadLocal */ template class ThreadLocal : public ThreadLocalImpl { typedef ThreadLocalImpl super; public: ThreadLocal() : super() {} ThreadLocal(T* t) : super(t) {} ThreadLocal(const ThreadLocal& tl) : super(tl) {} ThreadLocal& operator=(T* t) { return static_cast< ThreadLocal& >(super::operator=(t)); } ThreadLocal& operator=(const ThreadLocal& tl) { return static_cast< ThreadLocal& >(super::operator=(tl)); } // special operators for pointers T& operator*() { return *static_cast(*this); } const T& operator*() const { return *static_cast(*this); } T* operator->() { return static_cast(*this); } const T* operator->() const { return static_cast(*this); } T* operator++() { T* p = *this; *this = ++p; return p; } T* operator++(int) { T* p = *this; *this = p + 1; return p; } T* operator--() { T* p = *this; *this = --p; return p; } T* operator--(int) { T* p = *this; *this = p - 1; return p; } };/* class ThreadLocal */ }/* CVC4 namespace */ #endif /* @CVC4_TLS_SUPPORTED@ */ #endif /* __CVC4__TLS_H */ cvc4-1.5/src/bindings/000077500000000000000000000000001313116454100146015ustar00rootroot00000000000000cvc4-1.5/src/bindings/Makefile.am000066400000000000000000000171021313116454100166360ustar00rootroot00000000000000# LIBCVC4BINDINGS_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4BINDINGS_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall SUBDIRS = compat # any binding-specific flags to pass to swig java_cpp_SWIGFLAGS = -package edu.nyu.acsys.CVC4 lib_LTLIBRARIES = bin_PROGRAMS = javadatadir = $(datadir)/java javalibdir = $(libdir)/jni ocamldatadir = $(libdir)/ocaml/cvc4 ocamllibdir = $(libdir)/ocaml/cvc4 perldatadir = $(datadir)/perl5 perllibdir = $(libdir)/perl5 phpdatadir = $(datadir)/php phplibdir = $(libdir)/php pythondatadir = $(datadir)/pyshared pythonlibdir = $(libdir)/pyshared csharpdatadir = $(datadir)/csharp csharplibdir = $(libdir)/csharp rubylibdir = $(libdir)/ruby tcllibdir = $(libdir)/tcltk javadata_DATA = javalib_LTLIBRARIES= ocamldata_DATA = ocamllib_LTLIBRARIES= perldata_DATA = perllib_LTLIBRARIES = phpdata_DATA = phplib_LTLIBRARIES = pythondata_DATA = pythonlib_LTLIBRARIES = csharpdata_DATA = csharplib_LTLIBRARIES = rubylib_LTLIBRARIES = tcllib_LTLIBRARIES = if CVC4_HAS_SWIG if CVC4_LANGUAGE_BINDING_JAVA javalib_LTLIBRARIES += java/libcvc4jni.la javadata_DATA += CVC4.jar java_libcvc4jni_la_LDFLAGS = \ -module \ -shrext $(CVC4_JAVA_MODULE_EXT) \ -version-info $(LIBCVC4BINDINGS_VERSION) java_libcvc4jni_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la endif if CVC4_LANGUAGE_BINDING_CSHARP csharplib_LTLIBRARIES += csharp/CVC4.la csharp_CVC4_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) csharp_CVC4_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la endif if CVC4_LANGUAGE_BINDING_PERL perllib_LTLIBRARIES += perl/CVC4.la perl_CVC4_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) perl_CVC4_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la perldata_DATA += perl/CVC4.pm endif if CVC4_LANGUAGE_BINDING_PHP phplib_LTLIBRARIES += php/CVC4.la php_CVC4_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) php_CVC4_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la phpdata_DATA += php/CVC4.php endif if CVC4_LANGUAGE_BINDING_PYTHON pythonlib_LTLIBRARIES += python/CVC4.la python_CVC4_la_CXXFLAGS = $(PYTHON_CXXFLAGS) python_CVC4_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) python_CVC4_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la pythondata_DATA += python/CVC4.py endif if CVC4_LANGUAGE_BINDING_OCAML ocamllib_LTLIBRARIES += ocaml/CVC4.la bin_PROGRAMS += cvc4_ocaml_top # We provide a make rule below, but we have to tell automake to lay off, too, # otherwise it tries (and fails) to package the nonexistent cvc4_ocaml_top.c! cvc4_ocaml_top_SOURCES = ocamldata_DATA += ocaml/swig.cmo ocaml/swig.cmi ocaml/swigp4.cmo ocaml/swigp4.cmi ocaml/CVC4.cmo ocaml/CVC4.cmi ocaml_CVC4_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) ocaml_CVC4_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la endif if CVC4_LANGUAGE_BINDING_RUBY rubylib_LTLIBRARIES += ruby/CVC4.la ruby_CVC4_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) ruby_CVC4_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la endif if CVC4_LANGUAGE_BINDING_TCL tcllib_LTLIBRARIES += tcl/CVC4.la tcl_CVC4_la_LDFLAGS = \ -module \ -version-info $(LIBCVC4BINDINGS_VERSION) tcl_CVC4_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la endif # this endif matches the "if CVC4_HAS_SWIG" above endif nodist_java_libcvc4jni_la_SOURCES = java.cpp java_libcvc4jni_la_CXXFLAGS = -Wno-all @FNO_STRICT_ALIASING@ @WNO_UNUSED_VARIABLE@ @WNO_UNINITIALIZED@ nodist_csharp_CVC4_la_SOURCES = csharp.cpp nodist_perl_CVC4_la_SOURCES = perl.cpp nodist_php_CVC4_la_SOURCES = php.cpp nodist_python_CVC4_la_SOURCES = python.cpp nodist_ocaml_CVC4_la_SOURCES = ocaml.cpp nodist_ruby_CVC4_la_SOURCES = ruby.cpp nodist_tcl_CVC4_la_SOURCES = tcl.cpp CLEANFILES = \ java.cpp \ csharp.cpp \ perl.cpp \ php.cpp \ python.cpp \ ocaml.cpp \ ruby.cpp \ tcl.cpp EXTRA_DIST = \ swig.h \ java_iterator_adapter.h \ java_stream_adapters.h MOSTLYCLEANFILES = \ .swig_deps \ $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) \ CVC4.jar java_libcvc4jni_la-java.lo: java.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_CPPFLAGS) $(java_libcvc4jni_la_CXXFLAGS) -o $@ $< java.lo: java.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_CPPFLAGS) $(java_libcvc4jni_la_CXXFLAGS) -o $@ $< CVC4.jar: java.cpp $(AM_V_GEN) \ (cd java && \ rm -fr classes && \ mkdir -p classes && \ $(JAVAC) -source 1.5 -target 1.5 -classpath . -d classes `find . -name '*.java'` && \ cd classes) && \ $(JAR) cf $@ -C java/classes . #java.cpp:; csharp.lo: csharp.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(CSHARP_CPPFLAGS) -o $@ $< #csharp.cpp:; perl.lo: perl.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(PERL_CPPFLAGS) -o $@ $< #perl.cpp:; perl/CVC4.pm: perl.cpp php.lo: php.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(PHP_CPPFLAGS) -Iphp -o $@ $< #php.cpp:; python.lo: python.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(PYTHON_CPPFLAGS) -o $@ $< ocaml.lo: ocaml.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(OCAML_CPPFLAGS) -o $@ $< ocaml/swig.cmo: ocaml/swig.ml ocaml/swig.cmi; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/swig.cmi: ocaml/swig.mli; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/CVC4.cmo: ocaml/CVC4.ml ocaml/CVC4.cmi; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/CVC4.cmi: ocaml/CVC4.mli; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/swigp4.cmo: ocaml/swigp4.ml; $(AM_V_GEN)$(OCAMLFIND) ocamlc -package camlp4 -pp "$(CAMLP4O) pa_extend.cmo q_MLast.cmo" -o $@ -c $< ocaml/swig.ml:; $(AM_V_GEN)cd ocaml && $(SWIG) -ocaml -co swig.ml ocaml/swig.mli:; $(AM_V_GEN)cd ocaml && $(SWIG) -ocaml -co swig.mli ocaml/swigp4.ml:; $(AM_V_GEN)cd ocaml && $(SWIG) -ocaml -co swigp4.ml #ocaml.cpp:; cvc4_ocaml_top$(EXEEXT): ocaml/CVC4.la ocaml/swig.cmo ocaml/swig.cmi ocaml/swigp4.cmo ocaml/CVC4.cmo ocaml/CVC4.cmi $(AM_V_GEN)\ $(OCAMLFIND) ocamlmktop -I $(ocamldatadir) -custom -o cvc4_ocaml_top$(EXEEXT) -package camlp4 dynlink.cma camlp4o.cma ocaml/swig.cmo ocaml/swigp4.cmo ocaml/CVC4.cmo -cclib ocaml/.libs/CVC4.so -cclib -lstdc++ ruby.lo: ruby.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(RUBY_CPPFLAGS) -o $@ $< tcl.lo: tcl.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(TCL_CPPFLAGS) -o $@ $< #tcl.cpp:; if CVC4_HAS_SWIG $(patsubst %,%.cpp,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))): %.cpp: @srcdir@/../cvc4.i $(AM_V_at)mkdir -p $(patsubst %.cpp,%,$@) $(AM_V_GEN)$(SWIG) -Wall -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. -c++ -$(patsubst %.cpp,%,$@) -outdir $(patsubst %.cpp,%,$@) $($(subst .,_,$@)_SWIGFLAGS) -o $@ $< $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))): %.d: @srcdir@/../cvc4.i $(AM_V_GEN)$(SWIG) -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. -c++ -$(patsubst %.d,%,$@) -MM -o $(patsubst %.d,%.cpp,$@) $< # .PHONY so they get rebuilt each time .PHONY: .swig_deps $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) .swig_deps: $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) $(AM_V_GEN)cat $+ $@ @mk_include@ .swig_deps endif clean-local:; rm -fr $(patsubst %.cpp,%,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) cvc4-1.5/src/bindings/Makefile.in000066400000000000000000002170001313116454100166460ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ bin_PROGRAMS = $(am__EXEEXT_1) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_1 = java/libcvc4jni.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_2 = CVC4.jar @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@am__append_3 = csharp/CVC4.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@am__append_4 = perl/CVC4.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@am__append_5 = perl/CVC4.pm @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@am__append_6 = php/CVC4.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@am__append_7 = php/CVC4.php @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@am__append_8 = python/CVC4.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@am__append_9 = python/CVC4.py @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@am__append_10 = ocaml/CVC4.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@am__append_11 = cvc4_ocaml_top @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@am__append_12 = ocaml/swig.cmo ocaml/swig.cmi ocaml/swigp4.cmo ocaml/swigp4.cmi ocaml/CVC4.cmo ocaml/CVC4.cmi @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@am__append_13 = ruby/CVC4.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@am__append_14 = tcl/CVC4.la subdir = src/bindings ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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; }; \ } am__installdirs = "$(DESTDIR)$(csharplibdir)" \ "$(DESTDIR)$(javalibdir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(ocamllibdir)" "$(DESTDIR)$(perllibdir)" \ "$(DESTDIR)$(phplibdir)" "$(DESTDIR)$(pythonlibdir)" \ "$(DESTDIR)$(rubylibdir)" "$(DESTDIR)$(tcllibdir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(csharpdatadir)" \ "$(DESTDIR)$(javadatadir)" "$(DESTDIR)$(ocamldatadir)" \ "$(DESTDIR)$(perldatadir)" "$(DESTDIR)$(phpdatadir)" \ "$(DESTDIR)$(pythondatadir)" LTLIBRARIES = $(csharplib_LTLIBRARIES) $(javalib_LTLIBRARIES) \ $(lib_LTLIBRARIES) $(ocamllib_LTLIBRARIES) \ $(perllib_LTLIBRARIES) $(phplib_LTLIBRARIES) \ $(pythonlib_LTLIBRARIES) $(rubylib_LTLIBRARIES) \ $(tcllib_LTLIBRARIES) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@csharp_CVC4_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_csharp_CVC4_la_OBJECTS = csharp.lo csharp_CVC4_la_OBJECTS = $(nodist_csharp_CVC4_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = csharp_CVC4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(csharp_CVC4_la_LDFLAGS) \ $(LDFLAGS) -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@am_csharp_CVC4_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@ $(csharplibdir) am__dirstamp = $(am__leading_dot)dirstamp @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@java_libcvc4jni_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_java_libcvc4jni_la_OBJECTS = java_libcvc4jni_la-java.lo java_libcvc4jni_la_OBJECTS = $(nodist_java_libcvc4jni_la_OBJECTS) java_libcvc4jni_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(java_libcvc4jni_la_CXXFLAGS) $(CXXFLAGS) \ $(java_libcvc4jni_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@am_java_libcvc4jni_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ $(javalibdir) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ocaml_CVC4_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_ocaml_CVC4_la_OBJECTS = ocaml.lo ocaml_CVC4_la_OBJECTS = $(nodist_ocaml_CVC4_la_OBJECTS) ocaml_CVC4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(ocaml_CVC4_la_LDFLAGS) $(LDFLAGS) \ -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@am_ocaml_CVC4_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ $(ocamllibdir) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@perl_CVC4_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_perl_CVC4_la_OBJECTS = perl.lo perl_CVC4_la_OBJECTS = $(nodist_perl_CVC4_la_OBJECTS) perl_CVC4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(perl_CVC4_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@am_perl_CVC4_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@ $(perllibdir) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@php_CVC4_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_php_CVC4_la_OBJECTS = php.lo php_CVC4_la_OBJECTS = $(nodist_php_CVC4_la_OBJECTS) php_CVC4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(php_CVC4_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@am_php_CVC4_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@ $(phplibdir) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@python_CVC4_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_python_CVC4_la_OBJECTS = python_CVC4_la-python.lo python_CVC4_la_OBJECTS = $(nodist_python_CVC4_la_OBJECTS) python_CVC4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(python_CVC4_la_CXXFLAGS) $(CXXFLAGS) \ $(python_CVC4_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@am_python_CVC4_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@ $(pythonlibdir) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ruby_CVC4_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_ruby_CVC4_la_OBJECTS = ruby.lo ruby_CVC4_la_OBJECTS = $(nodist_ruby_CVC4_la_OBJECTS) ruby_CVC4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(ruby_CVC4_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@am_ruby_CVC4_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ $(rubylibdir) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@tcl_CVC4_la_DEPENDENCIES = @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@ @builddir@/../parser/libcvc4parser.la nodist_tcl_CVC4_la_OBJECTS = tcl.lo tcl_CVC4_la_OBJECTS = $(nodist_tcl_CVC4_la_OBJECTS) tcl_CVC4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(tcl_CVC4_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@am_tcl_CVC4_la_rpath = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@ -rpath \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@ $(tcllibdir) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@am__EXEEXT_1 = cvc4_ocaml_top$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_cvc4_ocaml_top_OBJECTS = cvc4_ocaml_top_OBJECTS = $(am_cvc4_ocaml_top_OBJECTS) cvc4_ocaml_top_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(nodist_csharp_CVC4_la_SOURCES) \ $(nodist_java_libcvc4jni_la_SOURCES) \ $(nodist_ocaml_CVC4_la_SOURCES) $(nodist_perl_CVC4_la_SOURCES) \ $(nodist_php_CVC4_la_SOURCES) $(nodist_python_CVC4_la_SOURCES) \ $(nodist_ruby_CVC4_la_SOURCES) $(nodist_tcl_CVC4_la_SOURCES) \ $(cvc4_ocaml_top_SOURCES) DIST_SOURCES = $(cvc4_ocaml_top_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(csharpdata_DATA) $(javadata_DATA) $(ocamldata_DATA) \ $(perldata_DATA) $(phpdata_DATA) $(pythondata_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ # LIBCVC4BINDINGS_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4BINDINGS_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall SUBDIRS = compat # any binding-specific flags to pass to swig java_cpp_SWIGFLAGS = -package edu.nyu.acsys.CVC4 lib_LTLIBRARIES = javadatadir = $(datadir)/java javalibdir = $(libdir)/jni ocamldatadir = $(libdir)/ocaml/cvc4 ocamllibdir = $(libdir)/ocaml/cvc4 perldatadir = $(datadir)/perl5 perllibdir = $(libdir)/perl5 phpdatadir = $(datadir)/php phplibdir = $(libdir)/php pythondatadir = $(datadir)/pyshared pythonlibdir = $(libdir)/pyshared csharpdatadir = $(datadir)/csharp csharplibdir = $(libdir)/csharp rubylibdir = $(libdir)/ruby tcllibdir = $(libdir)/tcltk javadata_DATA = $(am__append_2) javalib_LTLIBRARIES = $(am__append_1) ocamldata_DATA = $(am__append_12) ocamllib_LTLIBRARIES = $(am__append_10) perldata_DATA = $(am__append_5) perllib_LTLIBRARIES = $(am__append_4) phpdata_DATA = $(am__append_7) phplib_LTLIBRARIES = $(am__append_6) pythondata_DATA = $(am__append_9) pythonlib_LTLIBRARIES = $(am__append_8) csharpdata_DATA = csharplib_LTLIBRARIES = $(am__append_3) rubylib_LTLIBRARIES = $(am__append_13) tcllib_LTLIBRARIES = $(am__append_14) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@java_libcvc4jni_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -shrext $(CVC4_JAVA_MODULE_EXT) \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@java_libcvc4jni_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_JAVA_TRUE@ @builddir@/../parser/libcvc4parser.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@csharp_CVC4_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@csharp_CVC4_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_CSHARP_TRUE@ @builddir@/../parser/libcvc4parser.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@perl_CVC4_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@perl_CVC4_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PERL_TRUE@ @builddir@/../parser/libcvc4parser.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@php_CVC4_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@php_CVC4_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PHP_TRUE@ @builddir@/../parser/libcvc4parser.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@python_CVC4_la_CXXFLAGS = $(PYTHON_CXXFLAGS) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@python_CVC4_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@python_CVC4_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_PYTHON_TRUE@ @builddir@/../parser/libcvc4parser.la # We provide a make rule below, but we have to tell automake to lay off, too, # otherwise it tries (and fails) to package the nonexistent cvc4_ocaml_top.c! @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@cvc4_ocaml_top_SOURCES = @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ocaml_CVC4_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ocaml_CVC4_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_OCAML_TRUE@ @builddir@/../parser/libcvc4parser.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ruby_CVC4_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ruby_CVC4_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_RUBY_TRUE@ @builddir@/../parser/libcvc4parser.la @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@tcl_CVC4_la_LDFLAGS = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@ -module \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@tcl_CVC4_la_LIBADD = \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@ @builddir@/../libcvc4.la \ @CVC4_HAS_SWIG_TRUE@@CVC4_LANGUAGE_BINDING_TCL_TRUE@ @builddir@/../parser/libcvc4parser.la # this endif matches the "if CVC4_HAS_SWIG" above nodist_java_libcvc4jni_la_SOURCES = java.cpp java_libcvc4jni_la_CXXFLAGS = -Wno-all @FNO_STRICT_ALIASING@ @WNO_UNUSED_VARIABLE@ @WNO_UNINITIALIZED@ nodist_csharp_CVC4_la_SOURCES = csharp.cpp nodist_perl_CVC4_la_SOURCES = perl.cpp nodist_php_CVC4_la_SOURCES = php.cpp nodist_python_CVC4_la_SOURCES = python.cpp nodist_ocaml_CVC4_la_SOURCES = ocaml.cpp nodist_ruby_CVC4_la_SOURCES = ruby.cpp nodist_tcl_CVC4_la_SOURCES = tcl.cpp CLEANFILES = \ java.cpp \ csharp.cpp \ perl.cpp \ php.cpp \ python.cpp \ ocaml.cpp \ ruby.cpp \ tcl.cpp EXTRA_DIST = \ swig.h \ java_iterator_adapter.h \ java_stream_adapters.h MOSTLYCLEANFILES = \ .swig_deps \ $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) \ CVC4.jar all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-csharplibLTLIBRARIES: $(csharplib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(csharplib_LTLIBRARIES)'; test -n "$(csharplibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(csharplibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(csharplibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(csharplibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(csharplibdir)"; \ } uninstall-csharplibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(csharplib_LTLIBRARIES)'; test -n "$(csharplibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(csharplibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(csharplibdir)/$$f"; \ done clean-csharplibLTLIBRARIES: -test -z "$(csharplib_LTLIBRARIES)" || rm -f $(csharplib_LTLIBRARIES) @list='$(csharplib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-javalibLTLIBRARIES: $(javalib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(javalib_LTLIBRARIES)'; test -n "$(javalibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(javalibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(javalibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(javalibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(javalibdir)"; \ } uninstall-javalibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(javalib_LTLIBRARIES)'; test -n "$(javalibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(javalibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(javalibdir)/$$f"; \ done clean-javalibLTLIBRARIES: -test -z "$(javalib_LTLIBRARIES)" || rm -f $(javalib_LTLIBRARIES) @list='$(javalib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-ocamllibLTLIBRARIES: $(ocamllib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(ocamllib_LTLIBRARIES)'; test -n "$(ocamllibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(ocamllibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ocamllibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ocamllibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ocamllibdir)"; \ } uninstall-ocamllibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(ocamllib_LTLIBRARIES)'; test -n "$(ocamllibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ocamllibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ocamllibdir)/$$f"; \ done clean-ocamllibLTLIBRARIES: -test -z "$(ocamllib_LTLIBRARIES)" || rm -f $(ocamllib_LTLIBRARIES) @list='$(ocamllib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-perllibLTLIBRARIES: $(perllib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(perllib_LTLIBRARIES)'; test -n "$(perllibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(perllibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(perllibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(perllibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(perllibdir)"; \ } uninstall-perllibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(perllib_LTLIBRARIES)'; test -n "$(perllibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(perllibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(perllibdir)/$$f"; \ done clean-perllibLTLIBRARIES: -test -z "$(perllib_LTLIBRARIES)" || rm -f $(perllib_LTLIBRARIES) @list='$(perllib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-phplibLTLIBRARIES: $(phplib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(phplib_LTLIBRARIES)'; test -n "$(phplibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(phplibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(phplibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(phplibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(phplibdir)"; \ } uninstall-phplibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(phplib_LTLIBRARIES)'; test -n "$(phplibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(phplibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(phplibdir)/$$f"; \ done clean-phplibLTLIBRARIES: -test -z "$(phplib_LTLIBRARIES)" || rm -f $(phplib_LTLIBRARIES) @list='$(phplib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-pythonlibLTLIBRARIES: $(pythonlib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pythonlib_LTLIBRARIES)'; test -n "$(pythonlibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pythonlibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pythonlibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pythonlibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pythonlibdir)"; \ } uninstall-pythonlibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pythonlib_LTLIBRARIES)'; test -n "$(pythonlibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pythonlibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pythonlibdir)/$$f"; \ done clean-pythonlibLTLIBRARIES: -test -z "$(pythonlib_LTLIBRARIES)" || rm -f $(pythonlib_LTLIBRARIES) @list='$(pythonlib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-rubylibLTLIBRARIES: $(rubylib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(rubylib_LTLIBRARIES)'; test -n "$(rubylibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(rubylibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(rubylibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(rubylibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(rubylibdir)"; \ } uninstall-rubylibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(rubylib_LTLIBRARIES)'; test -n "$(rubylibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(rubylibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(rubylibdir)/$$f"; \ done clean-rubylibLTLIBRARIES: -test -z "$(rubylib_LTLIBRARIES)" || rm -f $(rubylib_LTLIBRARIES) @list='$(rubylib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-tcllibLTLIBRARIES: $(tcllib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(tcllib_LTLIBRARIES)'; test -n "$(tcllibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(tcllibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(tcllibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(tcllibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(tcllibdir)"; \ } uninstall-tcllibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(tcllib_LTLIBRARIES)'; test -n "$(tcllibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(tcllibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(tcllibdir)/$$f"; \ done clean-tcllibLTLIBRARIES: -test -z "$(tcllib_LTLIBRARIES)" || rm -f $(tcllib_LTLIBRARIES) @list='$(tcllib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } csharp/$(am__dirstamp): @$(MKDIR_P) csharp @: > csharp/$(am__dirstamp) csharp/CVC4.la: $(csharp_CVC4_la_OBJECTS) $(csharp_CVC4_la_DEPENDENCIES) $(EXTRA_csharp_CVC4_la_DEPENDENCIES) csharp/$(am__dirstamp) $(AM_V_CXXLD)$(csharp_CVC4_la_LINK) $(am_csharp_CVC4_la_rpath) $(csharp_CVC4_la_OBJECTS) $(csharp_CVC4_la_LIBADD) $(LIBS) java/$(am__dirstamp): @$(MKDIR_P) java @: > java/$(am__dirstamp) java/libcvc4jni.la: $(java_libcvc4jni_la_OBJECTS) $(java_libcvc4jni_la_DEPENDENCIES) $(EXTRA_java_libcvc4jni_la_DEPENDENCIES) java/$(am__dirstamp) $(AM_V_CXXLD)$(java_libcvc4jni_la_LINK) $(am_java_libcvc4jni_la_rpath) $(java_libcvc4jni_la_OBJECTS) $(java_libcvc4jni_la_LIBADD) $(LIBS) ocaml/$(am__dirstamp): @$(MKDIR_P) ocaml @: > ocaml/$(am__dirstamp) ocaml/CVC4.la: $(ocaml_CVC4_la_OBJECTS) $(ocaml_CVC4_la_DEPENDENCIES) $(EXTRA_ocaml_CVC4_la_DEPENDENCIES) ocaml/$(am__dirstamp) $(AM_V_CXXLD)$(ocaml_CVC4_la_LINK) $(am_ocaml_CVC4_la_rpath) $(ocaml_CVC4_la_OBJECTS) $(ocaml_CVC4_la_LIBADD) $(LIBS) perl/$(am__dirstamp): @$(MKDIR_P) perl @: > perl/$(am__dirstamp) perl/CVC4.la: $(perl_CVC4_la_OBJECTS) $(perl_CVC4_la_DEPENDENCIES) $(EXTRA_perl_CVC4_la_DEPENDENCIES) perl/$(am__dirstamp) $(AM_V_CXXLD)$(perl_CVC4_la_LINK) $(am_perl_CVC4_la_rpath) $(perl_CVC4_la_OBJECTS) $(perl_CVC4_la_LIBADD) $(LIBS) php/$(am__dirstamp): @$(MKDIR_P) php @: > php/$(am__dirstamp) php/CVC4.la: $(php_CVC4_la_OBJECTS) $(php_CVC4_la_DEPENDENCIES) $(EXTRA_php_CVC4_la_DEPENDENCIES) php/$(am__dirstamp) $(AM_V_CXXLD)$(php_CVC4_la_LINK) $(am_php_CVC4_la_rpath) $(php_CVC4_la_OBJECTS) $(php_CVC4_la_LIBADD) $(LIBS) python/$(am__dirstamp): @$(MKDIR_P) python @: > python/$(am__dirstamp) python/CVC4.la: $(python_CVC4_la_OBJECTS) $(python_CVC4_la_DEPENDENCIES) $(EXTRA_python_CVC4_la_DEPENDENCIES) python/$(am__dirstamp) $(AM_V_CXXLD)$(python_CVC4_la_LINK) $(am_python_CVC4_la_rpath) $(python_CVC4_la_OBJECTS) $(python_CVC4_la_LIBADD) $(LIBS) ruby/$(am__dirstamp): @$(MKDIR_P) ruby @: > ruby/$(am__dirstamp) ruby/CVC4.la: $(ruby_CVC4_la_OBJECTS) $(ruby_CVC4_la_DEPENDENCIES) $(EXTRA_ruby_CVC4_la_DEPENDENCIES) ruby/$(am__dirstamp) $(AM_V_CXXLD)$(ruby_CVC4_la_LINK) $(am_ruby_CVC4_la_rpath) $(ruby_CVC4_la_OBJECTS) $(ruby_CVC4_la_LIBADD) $(LIBS) tcl/$(am__dirstamp): @$(MKDIR_P) tcl @: > tcl/$(am__dirstamp) tcl/CVC4.la: $(tcl_CVC4_la_OBJECTS) $(tcl_CVC4_la_DEPENDENCIES) $(EXTRA_tcl_CVC4_la_DEPENDENCIES) tcl/$(am__dirstamp) $(AM_V_CXXLD)$(tcl_CVC4_la_LINK) $(am_tcl_CVC4_la_rpath) $(tcl_CVC4_la_OBJECTS) $(tcl_CVC4_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; 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 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)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_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 mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csharp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/java_libcvc4jni_la-java.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ocaml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/php.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/python_CVC4_la-python.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ruby.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcl.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< python_CVC4_la-python.lo: python.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(python_CVC4_la_CXXFLAGS) $(CXXFLAGS) -MT python_CVC4_la-python.lo -MD -MP -MF $(DEPDIR)/python_CVC4_la-python.Tpo -c -o python_CVC4_la-python.lo `test -f 'python.cpp' || echo '$(srcdir)/'`python.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/python_CVC4_la-python.Tpo $(DEPDIR)/python_CVC4_la-python.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='python.cpp' object='python_CVC4_la-python.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(python_CVC4_la_CXXFLAGS) $(CXXFLAGS) -c -o python_CVC4_la-python.lo `test -f 'python.cpp' || echo '$(srcdir)/'`python.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf csharp/.libs csharp/_libs -rm -rf java/.libs java/_libs -rm -rf ocaml/.libs ocaml/_libs -rm -rf perl/.libs perl/_libs -rm -rf php/.libs php/_libs -rm -rf python/.libs python/_libs -rm -rf ruby/.libs ruby/_libs -rm -rf tcl/.libs tcl/_libs install-csharpdataDATA: $(csharpdata_DATA) @$(NORMAL_INSTALL) @list='$(csharpdata_DATA)'; test -n "$(csharpdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(csharpdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(csharpdatadir)" || 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)$(csharpdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(csharpdatadir)" || exit $$?; \ done uninstall-csharpdataDATA: @$(NORMAL_UNINSTALL) @list='$(csharpdata_DATA)'; test -n "$(csharpdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(csharpdatadir)'; $(am__uninstall_files_from_dir) install-javadataDATA: $(javadata_DATA) @$(NORMAL_INSTALL) @list='$(javadata_DATA)'; test -n "$(javadatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(javadatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(javadatadir)" || 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)$(javadatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(javadatadir)" || exit $$?; \ done uninstall-javadataDATA: @$(NORMAL_UNINSTALL) @list='$(javadata_DATA)'; test -n "$(javadatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(javadatadir)'; $(am__uninstall_files_from_dir) install-ocamldataDATA: $(ocamldata_DATA) @$(NORMAL_INSTALL) @list='$(ocamldata_DATA)'; test -n "$(ocamldatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ocamldatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ocamldatadir)" || 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)$(ocamldatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ocamldatadir)" || exit $$?; \ done uninstall-ocamldataDATA: @$(NORMAL_UNINSTALL) @list='$(ocamldata_DATA)'; test -n "$(ocamldatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ocamldatadir)'; $(am__uninstall_files_from_dir) install-perldataDATA: $(perldata_DATA) @$(NORMAL_INSTALL) @list='$(perldata_DATA)'; test -n "$(perldatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(perldatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(perldatadir)" || 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)$(perldatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(perldatadir)" || exit $$?; \ done uninstall-perldataDATA: @$(NORMAL_UNINSTALL) @list='$(perldata_DATA)'; test -n "$(perldatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(perldatadir)'; $(am__uninstall_files_from_dir) install-phpdataDATA: $(phpdata_DATA) @$(NORMAL_INSTALL) @list='$(phpdata_DATA)'; test -n "$(phpdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(phpdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(phpdatadir)" || 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)$(phpdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(phpdatadir)" || exit $$?; \ done uninstall-phpdataDATA: @$(NORMAL_UNINSTALL) @list='$(phpdata_DATA)'; test -n "$(phpdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(phpdatadir)'; $(am__uninstall_files_from_dir) install-pythondataDATA: $(pythondata_DATA) @$(NORMAL_INSTALL) @list='$(pythondata_DATA)'; test -n "$(pythondatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pythondatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pythondatadir)" || 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)$(pythondatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pythondatadir)" || exit $$?; \ done uninstall-pythondataDATA: @$(NORMAL_UNINSTALL) @list='$(pythondata_DATA)'; test -n "$(pythondatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pythondatadir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(csharplibdir)" "$(DESTDIR)$(javalibdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(ocamllibdir)" "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(phplibdir)" "$(DESTDIR)$(pythonlibdir)" "$(DESTDIR)$(rubylibdir)" "$(DESTDIR)$(tcllibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(csharpdatadir)" "$(DESTDIR)$(javadatadir)" "$(DESTDIR)$(ocamldatadir)" "$(DESTDIR)$(perldatadir)" "$(DESTDIR)$(phpdatadir)" "$(DESTDIR)$(pythondatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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 csharp/$(am__dirstamp) -rm -f java/$(am__dirstamp) -rm -f ocaml/$(am__dirstamp) -rm -f perl/$(am__dirstamp) -rm -f php/$(am__dirstamp) -rm -f python/$(am__dirstamp) -rm -f ruby/$(am__dirstamp) -rm -f tcl/$(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-recursive clean-am: clean-binPROGRAMS clean-csharplibLTLIBRARIES clean-generic \ clean-javalibLTLIBRARIES clean-libLTLIBRARIES clean-libtool \ clean-local clean-ocamllibLTLIBRARIES clean-perllibLTLIBRARIES \ clean-phplibLTLIBRARIES clean-pythonlibLTLIBRARIES \ clean-rubylibLTLIBRARIES clean-tcllibLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-csharpdataDATA install-csharplibLTLIBRARIES \ install-javadataDATA install-javalibLTLIBRARIES \ install-ocamldataDATA install-ocamllibLTLIBRARIES \ install-perldataDATA install-perllibLTLIBRARIES \ install-phpdataDATA install-phplibLTLIBRARIES \ install-pythondataDATA install-pythonlibLTLIBRARIES \ install-rubylibLTLIBRARIES install-tcllibLTLIBRARIES install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-csharpdataDATA \ uninstall-csharplibLTLIBRARIES uninstall-javadataDATA \ uninstall-javalibLTLIBRARIES uninstall-libLTLIBRARIES \ uninstall-ocamldataDATA uninstall-ocamllibLTLIBRARIES \ uninstall-perldataDATA uninstall-perllibLTLIBRARIES \ uninstall-phpdataDATA uninstall-phplibLTLIBRARIES \ uninstall-pythondataDATA uninstall-pythonlibLTLIBRARIES \ uninstall-rubylibLTLIBRARIES uninstall-tcllibLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-binPROGRAMS clean-csharplibLTLIBRARIES \ clean-generic clean-javalibLTLIBRARIES clean-libLTLIBRARIES \ clean-libtool clean-local clean-ocamllibLTLIBRARIES \ clean-perllibLTLIBRARIES clean-phplibLTLIBRARIES \ clean-pythonlibLTLIBRARIES clean-rubylibLTLIBRARIES \ clean-tcllibLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-csharpdataDATA \ install-csharplibLTLIBRARIES install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-javadataDATA install-javalibLTLIBRARIES \ install-libLTLIBRARIES install-man install-ocamldataDATA \ install-ocamllibLTLIBRARIES install-pdf install-pdf-am \ install-perldataDATA install-perllibLTLIBRARIES \ install-phpdataDATA install-phplibLTLIBRARIES install-ps \ install-ps-am install-pythondataDATA \ install-pythonlibLTLIBRARIES install-rubylibLTLIBRARIES \ install-strip install-tcllibLTLIBRARIES installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-csharpdataDATA uninstall-csharplibLTLIBRARIES \ uninstall-javadataDATA uninstall-javalibLTLIBRARIES \ uninstall-libLTLIBRARIES uninstall-ocamldataDATA \ uninstall-ocamllibLTLIBRARIES uninstall-perldataDATA \ uninstall-perllibLTLIBRARIES uninstall-phpdataDATA \ uninstall-phplibLTLIBRARIES uninstall-pythondataDATA \ uninstall-pythonlibLTLIBRARIES uninstall-rubylibLTLIBRARIES \ uninstall-tcllibLTLIBRARIES .PRECIOUS: Makefile java_libcvc4jni_la-java.lo: java.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_CPPFLAGS) $(java_libcvc4jni_la_CXXFLAGS) -o $@ $< java.lo: java.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_CPPFLAGS) $(java_libcvc4jni_la_CXXFLAGS) -o $@ $< CVC4.jar: java.cpp $(AM_V_GEN) \ (cd java && \ rm -fr classes && \ mkdir -p classes && \ $(JAVAC) -source 1.5 -target 1.5 -classpath . -d classes `find . -name '*.java'` && \ cd classes) && \ $(JAR) cf $@ -C java/classes . #java.cpp:; csharp.lo: csharp.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(CSHARP_CPPFLAGS) -o $@ $< #csharp.cpp:; perl.lo: perl.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(PERL_CPPFLAGS) -o $@ $< #perl.cpp:; perl/CVC4.pm: perl.cpp php.lo: php.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(PHP_CPPFLAGS) -Iphp -o $@ $< #php.cpp:; python.lo: python.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(PYTHON_CPPFLAGS) -o $@ $< ocaml.lo: ocaml.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(OCAML_CPPFLAGS) -o $@ $< ocaml/swig.cmo: ocaml/swig.ml ocaml/swig.cmi; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/swig.cmi: ocaml/swig.mli; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/CVC4.cmo: ocaml/CVC4.ml ocaml/CVC4.cmi; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/CVC4.cmi: ocaml/CVC4.mli; $(AM_V_GEN)$(OCAMLC) -I ocaml -c -o $@ $< ocaml/swigp4.cmo: ocaml/swigp4.ml; $(AM_V_GEN)$(OCAMLFIND) ocamlc -package camlp4 -pp "$(CAMLP4O) pa_extend.cmo q_MLast.cmo" -o $@ -c $< ocaml/swig.ml:; $(AM_V_GEN)cd ocaml && $(SWIG) -ocaml -co swig.ml ocaml/swig.mli:; $(AM_V_GEN)cd ocaml && $(SWIG) -ocaml -co swig.mli ocaml/swigp4.ml:; $(AM_V_GEN)cd ocaml && $(SWIG) -ocaml -co swigp4.ml #ocaml.cpp:; cvc4_ocaml_top$(EXEEXT): ocaml/CVC4.la ocaml/swig.cmo ocaml/swig.cmi ocaml/swigp4.cmo ocaml/CVC4.cmo ocaml/CVC4.cmi $(AM_V_GEN)\ $(OCAMLFIND) ocamlmktop -I $(ocamldatadir) -custom -o cvc4_ocaml_top$(EXEEXT) -package camlp4 dynlink.cma camlp4o.cma ocaml/swig.cmo ocaml/swigp4.cmo ocaml/CVC4.cmo -cclib ocaml/.libs/CVC4.so -cclib -lstdc++ ruby.lo: ruby.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(RUBY_CPPFLAGS) -o $@ $< tcl.lo: tcl.cpp $(AM_V_CXX)$(LTCXXCOMPILE) -c $(TCL_CPPFLAGS) -o $@ $< #tcl.cpp:; @CVC4_HAS_SWIG_TRUE@$(patsubst %,%.cpp,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))): %.cpp: @srcdir@/../cvc4.i @CVC4_HAS_SWIG_TRUE@ $(AM_V_at)mkdir -p $(patsubst %.cpp,%,$@) @CVC4_HAS_SWIG_TRUE@ $(AM_V_GEN)$(SWIG) -Wall -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. -c++ -$(patsubst %.cpp,%,$@) -outdir $(patsubst %.cpp,%,$@) $($(subst .,_,$@)_SWIGFLAGS) -o $@ $< @CVC4_HAS_SWIG_TRUE@$(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))): %.d: @srcdir@/../cvc4.i @CVC4_HAS_SWIG_TRUE@ $(AM_V_GEN)$(SWIG) -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. -c++ -$(patsubst %.d,%,$@) -MM -o $(patsubst %.d,%.cpp,$@) $< # .PHONY so they get rebuilt each time @CVC4_HAS_SWIG_TRUE@.PHONY: .swig_deps $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) @CVC4_HAS_SWIG_TRUE@.swig_deps: $(patsubst %,%.d,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) @CVC4_HAS_SWIG_TRUE@ $(AM_V_GEN)cat $+ $@ @CVC4_HAS_SWIG_TRUE@@mk_include@ .swig_deps clean-local:; rm -fr $(patsubst %.cpp,%,$(filter-out c c++,$(CVC4_LANGUAGE_BINDINGS))) # 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: cvc4-1.5/src/bindings/compat/000077500000000000000000000000001313116454100160645ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/Makefile.am000066400000000000000000000002631313116454100201210ustar00rootroot00000000000000AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/../.. -I@srcdir@/../../include -I@srcdir@/../.. AM_CXXFLAGS = -Wall if CVC4_BUILD_LIBCOMPAT SUBDIRS = c java endif cvc4-1.5/src/bindings/compat/Makefile.in000066400000000000000000000556411313116454100201440ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = src/bindings/compat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = c java am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/../.. -I@srcdir@/../../include -I@srcdir@/../.. AM_CXXFLAGS = -Wall @CVC4_BUILD_LIBCOMPAT_TRUE@SUBDIRS = c java all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/compat/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/compat/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ 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-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: cvc4-1.5/src/bindings/compat/c/000077500000000000000000000000001313116454100163065ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/c/Makefile.am000066400000000000000000000017271313116454100203510ustar00rootroot00000000000000# LIBCVC4BINDINGS_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4BINDINGS_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/../../.. -I@srcdir@/../../../include -I@srcdir@/../../.. AM_CXXFLAGS = -Wall -Wno-return-type lib_LTLIBRARIES = if CVC4_LANGUAGE_BINDING_C lib_LTLIBRARIES += libcvc4bindings_c_compat.la libcvc4bindings_c_compat_la_LDFLAGS = \ -version-info $(LIBCVC4BINDINGS_VERSION) libcvc4bindings_c_compat_la_LIBADD = \ @builddir@/../../../compat/libcvc4compat.la \ @builddir@/../../../libcvc4.la endif libcvc4bindings_c_compat_la_SOURCES = \ c_interface_defs.h \ c_interface.h \ c_interface.cpp cvc4-1.5/src/bindings/compat/c/Makefile.in000066400000000000000000000660121313116454100203600ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ @CVC4_LANGUAGE_BINDING_C_TRUE@am__append_1 = libcvc4bindings_c_compat.la subdir = src/bindings/compat/c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) @CVC4_LANGUAGE_BINDING_C_TRUE@libcvc4bindings_c_compat_la_DEPENDENCIES = @builddir@/../../../compat/libcvc4compat.la \ @CVC4_LANGUAGE_BINDING_C_TRUE@ @builddir@/../../../libcvc4.la am_libcvc4bindings_c_compat_la_OBJECTS = c_interface.lo libcvc4bindings_c_compat_la_OBJECTS = \ $(am_libcvc4bindings_c_compat_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcvc4bindings_c_compat_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) \ $(libcvc4bindings_c_compat_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_LANGUAGE_BINDING_C_TRUE@am_libcvc4bindings_c_compat_la_rpath = \ @CVC4_LANGUAGE_BINDING_C_TRUE@ -rpath $(libdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcvc4bindings_c_compat_la_SOURCES) DIST_SOURCES = $(libcvc4bindings_c_compat_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ # LIBCVC4BINDINGS_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4BINDINGS_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/../../.. -I@srcdir@/../../../include -I@srcdir@/../../.. AM_CXXFLAGS = -Wall -Wno-return-type lib_LTLIBRARIES = $(am__append_1) @CVC4_LANGUAGE_BINDING_C_TRUE@libcvc4bindings_c_compat_la_LDFLAGS = \ @CVC4_LANGUAGE_BINDING_C_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_LANGUAGE_BINDING_C_TRUE@libcvc4bindings_c_compat_la_LIBADD = \ @CVC4_LANGUAGE_BINDING_C_TRUE@ @builddir@/../../../compat/libcvc4compat.la \ @CVC4_LANGUAGE_BINDING_C_TRUE@ @builddir@/../../../libcvc4.la libcvc4bindings_c_compat_la_SOURCES = \ c_interface_defs.h \ c_interface.h \ c_interface.cpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/compat/c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/compat/c/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcvc4bindings_c_compat.la: $(libcvc4bindings_c_compat_la_OBJECTS) $(libcvc4bindings_c_compat_la_DEPENDENCIES) $(EXTRA_libcvc4bindings_c_compat_la_DEPENDENCIES) $(AM_V_CXXLD)$(libcvc4bindings_c_compat_la_LINK) $(am_libcvc4bindings_c_compat_la_rpath) $(libcvc4bindings_c_compat_la_OBJECTS) $(libcvc4bindings_c_compat_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c_interface.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile # 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: cvc4-1.5/src/bindings/compat/c/c_interface.cpp000066400000000000000000002136741313116454100212710ustar00rootroot00000000000000/*****************************************************************************/ /*! * \file c_interface.cpp * * Authors: Clark Barrett * Cristian Cadar * * Created: Thu Jun 5 10:34:02 2003 * *
* * License to use, copy, modify, sell and/or distribute this software * and its documentation for any purpose is hereby granted without * royalty, subject to the terms and conditions defined in the \ref * LICENSE file provided with this distribution. * *
* */ /*****************************************************************************/ #include #include "bindings/compat/c/c_interface_defs.h" #include "compat/cvc3_compat.h" //#include "vc.h" //#include "command_line_flags.h" //#include "parser.h" //#include "vc_cmd.h" //#include "theory_bitvector.h" //#include "fdstream.h" #include #include #include #include #ifdef CVC4_DEBUG # define DebugAssert(cond, str) assert(cond) # define IF_DEBUG(x) x #else # define DebugAssert(...) # define IF_DEBUG(x) #endif using namespace std; // ------------------------------------------------------------------------- // Debugging // ------------------------------------------------------------------------- // + will mean OK // - will mean error int c_interface_error_flag = 1; const int error_int = -100; const char* c_interface_error_message = "An Exception Occured: System in a compromised state."; string c_interface_error_string; // Used to return char* values. Note that the value is only good until // the next call to a function returning char* static string tmpString; void signal_error(const char* message,int flag_val,CVC3::Exception ex){ ostringstream ss; ss << c_interface_error_message << endl; ss << "Message: " << message << endl; ss << "Exception: " << ex << endl; IF_DEBUG(cerr << ss.str();) c_interface_error_string = ss.str(); c_interface_error_flag = flag_val; } extern "C" int vc_get_error_status(){ return c_interface_error_flag; } extern "C" void vc_reset_error_status(){ c_interface_error_flag = 1; c_interface_error_string = ""; } extern "C" char* vc_get_error_string() { return (char*) (c_interface_error_string.c_str()); } // Private to implementation class CInterface { public: static CVC3::Type fromType(Type t); static Type toType(const CVC3::Type& t); static CVC3::Expr fromExpr(Expr e); static Expr toExpr(const CVC3::Expr& e); static CVC3::Op fromOp(Op op); static Op toOp(VC vc, const CVC3::Op& op); // static CVC3::Proof fromProof(Proof proof); // static Proof toProof(const CVC3::Proof& proof); static void deleteExpr(Expr e); static void deleteType(Type t); static void deleteVector(Expr* vec); }; CVC3::Type CInterface::fromType(Type t) { return *(CVC3::Type*)t; } Type CInterface::toType(const CVC3::Type& t) { if(t.isNull()) return NULL; return Type(new CVC3::Type(t)); } CVC3::Expr CInterface::fromExpr(Expr e) { return *(CVC3::Expr*)e; } Expr CInterface::toExpr(const CVC3::Expr& e) { if(e.isNull()) return NULL; return Expr(new CVC3::Expr(e)); } CVC3::Op CInterface::fromOp(Op op) { return *(CVC3::Op*)op; } Op CInterface::toOp(VC vc, const CVC3::Op& op) { if (op.isNull()) return NULL; return Op(new CVC3::Op(op)); } // CVC3::Proof CInterface::fromProof(Proof proof) // { // return CVC3::Proof(fromExpr(proof)); // } // Proof CInterface::toProof(const CVC3::Proof& proof) // { // return toExpr(proof.getExpr()); // } void CInterface::deleteExpr(Expr e) { if (e) delete (CVC3::Expr*)e; } void CInterface::deleteType(Type t) { if (t) delete (CVC3::Type*)t; } void CInterface::deleteVector(Expr* e) { if (e) delete [] e; } static CVC3::Type fromType(Type t) { return CInterface::fromType(t); } static Type toType(const CVC3::Type& t) { return CInterface::toType(t); } static CVC3::Expr fromExpr(Expr e) { return CInterface::fromExpr(e); } static Expr toExpr(const CVC3::Expr& e) { return CInterface::toExpr(e); } static CVC3::Op fromOp(Op op) { return CInterface::fromOp(op); } static Op toOp(VC vc, const CVC3::Op& op) { return CInterface::toOp(vc, op); } // static CVC3::Proof fromProof(Proof proof) { return CInterface::fromProof(proof); } // static Proof toProof(const CVC3::Proof& proof) { return CInterface::toProof(proof); } static char *val_to_binary_str(unsigned nbits, unsigned long val) { char s[65]; assert(nbits < sizeof s); strcpy(s, ""); while(nbits-- > 0) { if((val >> nbits) & 1) strcat(s, "1"); else strcat(s, "0"); } return strdup(s); } /////////////////////////////////////////////////////////////////////////// // Begin implementation of C interface // /////////////////////////////////////////////////////////////////////////// extern "C" VC vc_createValidityChecker(Flags flags) { try{ CVC3::CLFlags f = (flags==NULL)? CVC3::ValidityChecker::createFlags() : *((CVC3::CLFlags*)flags); return (VC)CVC3::ValidityChecker::create(f); } catch (CVC3::Exception ex){ signal_error("vc_createValidityChecker",error_int,ex); return NULL; } } extern "C" Flags vc_createFlags() { try{ return new CVC3::CLFlags(CVC3::ValidityChecker::createFlags()); } catch (CVC3::Exception ex){ signal_error("vc_createFlags",error_int,ex); return NULL; } } extern "C" void vc_destroyValidityChecker(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; delete cvc; } catch (CVC3::Exception ex){ signal_error("vc_destroyVelidityChecker",error_int,ex); } } extern "C" void vc_deleteFlags(Flags flags) { try{ delete ((CVC3::CLFlags*)flags); } catch (CVC3::Exception ex){ signal_error("vc_deleteFlags",error_int,ex); } } extern "C" void vc_deleteExpr(Expr e) { try{ CInterface::deleteExpr(e); } catch (CVC3::Exception ex){ signal_error("vc_deleteExpr",error_int,ex); } } extern "C" void vc_deleteType(Type t) { try{ CInterface::deleteType(t); } catch (CVC3::Exception ex){ signal_error("vc_deleteType",error_int,ex); } } extern "C" void vc_deleteOp(Op op) { vc_deleteExpr(op); } extern "C" void vc_deleteVector(Expr* e) { try{ CInterface::deleteVector(e); } catch (CVC3::Exception ex){ signal_error("vc_deleteVector",error_int,ex); } } extern "C" void vc_deleteTypeVector(Type* e) { vc_deleteVector(e); } extern "C" void vc_setBoolFlag(Flags flags, char* name, int val) { try{ CVC3::CLFlags& f = *((CVC3::CLFlags*)flags); f.setFlag(name, (val!=0)); } catch (CVC3::Exception ex){ signal_error("vc_setBoolFlag",error_int,ex); } } extern "C" void vc_setIntFlag(Flags flags, char* name, int val) { try{ CVC3::CLFlags& f = *((CVC3::CLFlags*)flags); f.setFlag(name, val); } catch (CVC3::Exception ex){ signal_error("vc_setIntFlag",error_int,ex); } } extern "C" void vc_setStringFlag(Flags flags, char* name, char* val) { try{ CVC3::CLFlags& f = *((CVC3::CLFlags*)flags); f.setFlag(name, string(val)); } catch (CVC3::Exception ex){ signal_error("vc_setStringFlag",error_int,ex); } } extern "C" void vc_setStrSeqFlag(Flags flags, char* name, char* str, int val) { try{ CVC3::CLFlags& f = *((CVC3::CLFlags*)flags); f.setFlag(name, pair(string(str), val!=0)); } catch (CVC3::Exception ex){ signal_error("vc_setStrSeqFlag",error_int,ex); } } extern "C" Type vc_boolType(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->boolType()); } catch (CVC3::Exception ex){ signal_error("vc_boolType",error_int,ex); return NULL; } } extern "C" Type vc_realType(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->realType()); }catch (CVC3::Exception ex){ signal_error("vc_realType",error_int,ex); return NULL; } } extern "C" Type vc_intType(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->intType()); }catch (CVC3::Exception ex){ signal_error("vc_intType",error_int,ex); return NULL; } } extern "C" Type vc_subRangeType(VC vc, int lowerEnd, int upperEnd) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->subrangeType(cvc->ratExpr(lowerEnd), cvc->ratExpr(upperEnd))); }catch (CVC3::Exception &ex){ signal_error("vc_subRangeType",error_int,ex); return NULL; } } extern "C" Type vc_subtypeType(VC vc, Expr pred, Expr witness) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->subtypeType(fromExpr(pred), fromExpr(witness))); }catch (CVC3::Exception &ex){ signal_error("vc_subtypeType",error_int,ex); return NULL; } } extern "C" Type vc_tupleType2(VC vc, Type type0, Type type1) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->tupleType(fromType(type0), fromType(type1))); }catch (CVC3::Exception ex){ signal_error("vc_tupleType2",error_int,ex); return NULL; } } extern "C" Type vc_tupleType3(VC vc, Type type0, Type type1, Type type2) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->tupleType(fromType(type0), fromType(type1), fromType(type2))); }catch (CVC3::Exception ex){ signal_error("vc_tupleType3",error_int,ex); return NULL; } } extern "C" Type vc_tupleTypeN(VC vc, Type* types, int numTypes) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcTypes; for (int i = 0; i < numTypes; ++i) { cvcTypes.push_back(fromType(types[i])); } return toType(cvc->tupleType(cvcTypes)); }catch(CVC3::Exception ex){ signal_error("vc_tupleTypeN",error_int,ex); return NULL; } } extern "C" Type vc_recordType1(VC vc, char* field, Type type) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->recordType(field, fromType(type))); }catch(CVC3::Exception ex){ signal_error("vc_recordType1",error_int,ex); return NULL; } } extern "C" Type vc_recordType2(VC vc, char* field0, Type type0, char* field1, Type type1) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->recordType(field0, fromType(type0), field1, fromType(type1))); }catch(CVC3::Exception ex){ signal_error("vc_recordType2",error_int,ex); return NULL; } } extern "C" Type vc_recordType3(VC vc, char* field0, Type type0, char* field1, Type type1, char* field2, Type type2) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->recordType(field0, fromType(type0), field1, fromType(type1), field2, fromType(type2))); }catch(CVC3::Exception ex){ signal_error("vc_recordType3",error_int,ex); return NULL; } } extern "C" Type vc_recordTypeN(VC vc, char** fields, Type* types, int numFields) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcFields; vector cvcTypes; for (int i = 0; i < numFields; ++i) { cvcFields.push_back(fields[i]); cvcTypes.push_back(fromType(types[i])); } return toType(cvc->recordType(cvcFields, cvcTypes)); }catch(CVC3::Exception ex){ signal_error("vc_recordTypeN",error_int,ex); return NULL; } } extern "C" Type vc_dataType1(VC vc, char* name, char* constructor, int arity, char** selectors, Expr* types) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; string cvcName(name); string cvcConstructor(constructor); vector cvcSelectors; vector cvcTypes; for (int i = 0; i < arity; ++i) { cvcSelectors.push_back(selectors[i]); cvcTypes.push_back(fromExpr(types[i])); } return toType(cvc->dataType(cvcName, cvcConstructor, cvcSelectors, cvcTypes)); }catch(CVC3::Exception ex){ signal_error("vc_dataType1",error_int,ex); return NULL; } } extern "C" Type vc_dataTypeN(VC vc, char* name, int numCons, char** constructors, int* arities, char*** selectors, Expr** types) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; string cvcName(name); vector cvcConstructors; vector > cvcSelectors(numCons); vector > cvcTypes(numCons); for (int i = 0; i < numCons; ++i) { cvcConstructors.push_back(constructors[i]); for (int j = 0; j < arities[i]; ++j) { cvcSelectors[i].push_back(selectors[i][j]); cvcTypes[i].push_back(fromExpr(types[i][j])); } } return toType(cvc->dataType(cvcName, cvcConstructors, cvcSelectors, cvcTypes)); }catch(CVC3::Exception ex){ signal_error("vc_dataTypeN",error_int,ex); return NULL; } } extern "C" Type* vc_dataTypeMN(VC vc, int numTypes, char** names, int* numCons, char*** constructors, int** arities, char**** selectors, Expr*** types) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcNames; vector > cvcConstructors(numTypes); vector > > cvcSelectors(numTypes); vector > > cvcTypes(numTypes); int i; for (i = 0; i < numTypes; ++i) { cvcNames.push_back(names[i]); cvcSelectors[i].resize(numCons[i]); cvcTypes[i].resize(numCons[i]); for (int j = 0; i < numCons[i]; ++j) { cvcConstructors[i].push_back(constructors[i][j]); for (int k = 0; k < arities[i][j]; ++k) { cvcSelectors[i][j].push_back(selectors[i][j][k]); cvcTypes[i][j].push_back(fromExpr(types[i][j][k])); } } } vector cvcReturnTypes; cvc->dataType(cvcNames, cvcConstructors, cvcSelectors, cvcTypes, cvcReturnTypes); Type* returnTypes = new Type[numTypes]; for (i = 0; i < numTypes; ++i) { returnTypes[i] = toType(cvcReturnTypes[i]); } return returnTypes; }catch(CVC3::Exception ex){ signal_error("vc_dataTypeN",error_int,ex); return NULL; } } extern "C" Type vc_arrayType(VC vc, Type typeIndex, Type typeData) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->arrayType(fromType(typeIndex), fromType(typeData))); }catch(CVC3::Exception ex){ signal_error("vc_arrayType",error_int,ex); return NULL; } } extern "C" Type vc_bvType(VC vc, int n) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->bitvecType(n)); }catch (CVC3::Exception ex){ signal_error("vc_bvType",error_int,ex); return NULL; } } extern "C" Type vc_funType1(VC vc, Type typeDom, Type typeRan) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->funType(fromType(typeDom), fromType(typeRan))); }catch(CVC3::Exception ex){ signal_error("vc_funType1",error_int,ex); return NULL; } } extern "C" Type vc_funType2(VC vc, Type a1, Type a2, Type typeRan) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector args; args.push_back(fromType(a1)); args.push_back(fromType(a2)); return toType(cvc->funType(args, fromType(typeRan))); }catch(CVC3::Exception ex){ signal_error("vc_funType2",error_int,ex); return NULL; } } extern "C" Type vc_funType3(VC vc, Type a1, Type a2, Type a3, Type typeRan) { try { CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector args; args.push_back(fromType(a1)); args.push_back(fromType(a2)); args.push_back(fromType(a3)); return toType(cvc->funType(args, fromType(typeRan))); } catch(CVC3::Exception ex){ signal_error("vc_funType3",error_int,ex); return NULL; } } extern "C" Type vc_funTypeN(VC vc, Type* a, Type typeRan, int numArgs) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector args; for(int i=0; ifunType(args, fromType(typeRan))); }catch(CVC3::Exception ex){ signal_error("vc_funTypeN",error_int,ex); return NULL; } } extern "C" Type vc_createType(VC vc, char* typeName) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->createType(typeName)); }catch(CVC3::Exception ex){ signal_error("vc_createType",error_int,ex); return NULL; } } extern "C" Type vc_lookupType(VC vc, char* typeName) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->lookupType(typeName)); }catch(CVC3::Exception ex){ signal_error("vc_lookupType",error_int,ex); return NULL; } } ///////////////////////////////////////////////////////////////////////////// // Expr manipulation methods // ///////////////////////////////////////////////////////////////////////////// extern "C" ExprManager vc_getEM(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return (ExprManager)cvc->getEM(); }catch(CVC3::Exception ex){ signal_error("vc_getEM",error_int,ex); return NULL; } } extern "C" Expr vc_varExpr(VC vc, char* name, Type type) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->varExpr(name, fromType(type))); }catch(CVC3::Exception ex){ signal_error("vc_varExpr",error_int,ex); return NULL; } } extern "C" Expr vc_varExprDef(VC vc, char* name, Type type, Expr def) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->varExpr(name, fromType(type), fromExpr(def))); }catch(CVC3::Exception ex){ signal_error("vc_varExprDef",error_int,ex); return NULL; } } extern "C" Expr vc_lookupVar(VC vc, char* name, Type* type) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Type t; Expr e = toExpr(cvc->lookupVar(name, &t)); *type = toType(t); return e; }catch(CVC3::Exception ex){ signal_error("vc_lookupVar",error_int,ex); return NULL; } } extern "C" Type vc_getType(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->getType(fromExpr(e))); }catch(CVC3::Exception ex){ signal_error("vc_getType",error_int,ex); return NULL; } } extern "C" Type vc_getBaseType(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->getBaseType(fromExpr(e))); }catch(CVC3::Exception ex){ signal_error("vc_getBaseType",error_int,ex); return NULL; } } extern "C" Type vc_getBaseTypeOfType(VC vc, Type t) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->getBaseType(fromType(t))); }catch(CVC3::Exception ex){ signal_error("vc_getBaseTypeOfType",error_int,ex); return NULL; } } extern "C" Expr vc_getTypePred(VC vc, Type t, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->getTypePred(fromType(t), fromExpr(e))); }catch(CVC3::Exception ex){ signal_error("vc_getTypePred",error_int,ex); return NULL; } } extern "C" Expr vc_stringExpr(VC vc, char* str) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->stringExpr(str)); }catch(CVC3::Exception ex){ signal_error("vc_stringExpr",error_int,ex); return NULL; } } extern "C" Expr vc_idExpr(VC vc, char* str) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->idExpr(str)); }catch(CVC3::Exception ex){ signal_error("vc_idExpr",error_int,ex); return NULL; } } extern "C" Expr vc_listExpr(VC vc, int numKids, Expr* kids) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector args; for(int i=0; ilistExpr(args)); }catch(CVC3::Exception ex){ signal_error("vc_listExpr",error_int,ex); return NULL; } } extern "C" void vc_printExpr(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->printExpr(fromExpr(e)); }catch(CVC3::Exception ex){ signal_error("vc_printExpr",error_int,ex); } } extern "C" char* vc_printExprString(VC vc, Expr e) { try{ ostringstream os; string aa; char* result; CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->printExpr(fromExpr(e), os); os.flush(); aa=os.str(); result=new char[aa.length()+1]; strcpy(result,aa.c_str()); return result; } catch(CVC3::Exception ex) { signal_error("vc_printExprString",error_int,ex); return NULL; } } extern "C" void vc_deleteString(char* str) { if (str) delete [] str; } extern "C" void vc_printExprFile(VC vc, Expr e, int fd) { try { stringstream ss; CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->printExpr(fromExpr(e), ss); string s = ss.str(); ssize_t e = write(fd, s.c_str(), s.size()); if(e < 0) { IF_DEBUG(cerr << "write() failed, errno == " << errno << endl;) c_interface_error_string = "write() failed"; c_interface_error_flag = errno; } } catch(CVC3::Exception ex) { signal_error("vc_printExpr",error_int,ex); } } extern "C" Expr vc_importExpr(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->importExpr(fromExpr(e))); }catch(CVC3::Exception ex){ signal_error("vc_importExpr",error_int,ex); return NULL; } } extern "C" Type vc_importType(VC vc, Type e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toType(cvc->importType(fromType(e))); }catch(CVC3::Exception ex){ signal_error("vc_importType",error_int,ex); return NULL; } } extern "C" Expr vc_eqExpr(VC vc, Expr child0, Expr child1) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->eqExpr(fromExpr(child0), fromExpr(child1))); }catch(CVC3::Exception ex){ signal_error("vc_eqExpr",error_int,ex); return NULL; } } extern "C" Expr vc_distinctExpr(VC vc, Expr* children, int numChildren) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcExprs; for (int i = 0; i < numChildren; ++i) { cvcExprs.push_back(fromExpr(children[i])); } return toExpr(cvc->distinctExpr(cvcExprs)); }catch(CVC3::Exception ex){ signal_error("vc_distinctExpr",error_int,ex); return NULL; } } extern "C" Expr vc_trueExpr(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->trueExpr()); }catch(CVC3::Exception ex){ signal_error("vc_trueExpr",error_int,ex); return NULL; } } extern "C" Expr vc_falseExpr(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->falseExpr()); }catch(CVC3::Exception ex){ signal_error("vc_falseExpr",error_int,ex); return NULL; } } extern "C" Expr vc_notExpr(VC vc, Expr child) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->notExpr(fromExpr(child))); }catch(CVC3::Exception ex){ signal_error("vc_notExpr",error_int,ex); return NULL; } } extern "C" Expr vc_andExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->andExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_andExpr",error_int,ex); return NULL; } } extern "C" Expr vc_andExprN(VC vc, Expr* children, int numChildren) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcExprs; for (int i = 0; i < numChildren; ++i) { cvcExprs.push_back(fromExpr(children[i])); } return toExpr(cvc->andExpr(cvcExprs)); }catch(CVC3::Exception ex){ signal_error("vc_andExprN",error_int,ex); return NULL; } } extern "C" Expr vc_orExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->orExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_orExpr",error_int,ex); return NULL; } } extern "C" Expr vc_orExprN(VC vc, Expr* children, int numChildren) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcExprs; for (int i = 0; i < numChildren; ++i) { cvcExprs.push_back(fromExpr(children[i])); } return toExpr(cvc->orExpr(cvcExprs)); }catch(CVC3::Exception ex){ signal_error("vc_orExprN",error_int,ex); return NULL; } } extern "C" Expr vc_impliesExpr(VC vc, Expr hyp, Expr conc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->impliesExpr(fromExpr(hyp), fromExpr(conc))); }catch(CVC3::Exception ex){ signal_error("vc_impliesExpr",error_int,ex); return NULL; } } extern "C" Expr vc_iffExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->iffExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_iffExpr",error_int,ex); return NULL; } } extern "C" Expr vc_iteExpr(VC vc, Expr ifpart, Expr thenpart, Expr elsepart) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->iteExpr(fromExpr(ifpart), fromExpr(thenpart), fromExpr(elsepart))); }catch(CVC3::Exception ex){ signal_error("vc_iteExpr",error_int,ex); return NULL; } } extern "C" Expr vc_substExpr(VC vc, Expr e, Expr* oldTerms, int numOldTerms, Expr* newTerms, int numNewTerms) { try{ vector oldExprs, newExprs; CVC3::Expr ex = fromExpr(e); //CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; for (int i = 0; i < numOldTerms; ++i) { oldExprs.push_back(fromExpr(oldTerms[i])); } for (int i = 0; i < numNewTerms; ++i) { newExprs.push_back(fromExpr(newTerms[i])); } return toExpr(ex.substExpr(oldExprs, newExprs)); }catch(CVC3::Exception ex){ signal_error("vc_substExpr",error_int,ex); return NULL; } } extern "C" Op vc_createOp(VC vc, char* name, Type type) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toOp(vc, cvc->createOp(name, fromType(type))); }catch(CVC3::Exception ex){ signal_error("vc_createOp",error_int,ex); return NULL; } } extern "C" Op vc_createOpDef(VC vc, char* name, Type type, Expr def) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toOp(vc, cvc->createOp(name, fromType(type), fromExpr(def))); }catch(CVC3::Exception ex){ signal_error("vc_createOpDef",error_int,ex); return NULL; } } extern "C" Op vc_lookupOp(VC vc, char* name, Type* type) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Type t; Op op = toOp(vc, cvc->lookupOp(name, &t)); *type = toType(t); return op; } catch(CVC3::Exception ex){ signal_error("vc_lookupOp",error_int,ex); return NULL; } } extern "C" Expr vc_funExpr1(VC vc, Op op, Expr child) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->funExpr(fromOp(op), fromExpr(child))); }catch(CVC3::Exception ex){ signal_error("vc_funExpr1",error_int,ex); return NULL; } } extern "C" Expr vc_funExpr2(VC vc, Op op, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->funExpr(fromOp(op), fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_funExpr2",error_int,ex); return NULL; } } extern "C" Expr vc_funExpr3(VC vc, Op op, Expr child0, Expr child1, Expr child2) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->funExpr(fromOp(op), fromExpr(child0), fromExpr(child1), fromExpr(child2))); }catch(CVC3::Exception ex){ signal_error("vc_funExpr3",error_int,ex); return NULL; } } extern "C" Expr vc_funExprN(VC vc, Op op, Expr* children, int numChildren) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcExprs; for (int i = 0; i < numChildren; ++i) { cvcExprs.push_back(fromExpr(children[i])); } return toExpr(cvc->funExpr(fromOp(op), cvcExprs)); }catch(CVC3::Exception ex){ signal_error("vc_funExprN",error_int,ex); return NULL; } } extern "C" Expr vc_ratExpr(VC vc, int n, int d) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->ratExpr(n, d)); }catch(CVC3::Exception ex){ signal_error("vc_ratExpr",error_int,ex); return NULL; } } extern "C" Expr vc_ratExprFromStr(VC vc, char* n, char* d, int base) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->ratExpr(n, d, base)); }catch(CVC3::Exception ex){ signal_error("vc_ratExprFromStr",error_int,ex); return NULL; } } extern "C" Expr vc_ratExprFromStr1(VC vc, char* n, int base) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->ratExpr(n, base)); }catch(CVC3::Exception ex){ signal_error("vc_ratExprFromStr1",error_int,ex); return NULL; } } extern "C" Expr vc_uminusExpr(VC vc, Expr child) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->uminusExpr(fromExpr(child))); }catch(CVC3::Exception ex){ signal_error("vc_uminusExpr",error_int,ex); return NULL; } } extern "C" Expr vc_plusExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->plusExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_plusExpr",error_int,ex); return NULL; } } extern "C" Expr vc_plusExprN(VC vc, Expr* children, int numChildren) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcExprs; for (int i = 0; i < numChildren; ++i) { cvcExprs.push_back(fromExpr(children[i])); } return toExpr(cvc->plusExpr(cvcExprs)); }catch(CVC3::Exception ex){ signal_error("vc_plusExprN",error_int,ex); return NULL; } } extern "C" Expr vc_minusExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->minusExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_minusExpr",error_int,ex); return NULL; } } extern "C" Expr vc_multExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->multExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_multExpr",error_int,ex); return NULL; } } extern "C" Expr vc_powExpr(VC vc, Expr pow, Expr base) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->powExpr(fromExpr(pow), fromExpr(base))); }catch(CVC3::Exception ex){ signal_error("vc_powExpr",error_int,ex); return NULL; } } extern "C" Expr vc_divideExpr(VC vc, Expr numerator, Expr denominator) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->divideExpr(fromExpr(numerator), fromExpr(denominator))); }catch(CVC3::Exception ex){ signal_error("vc_divideExpr",error_int,ex); return NULL; } } extern "C" Expr vc_ltExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->ltExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_ltExpr",error_int,ex); return NULL; } } extern "C" Expr vc_leExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->leExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_leExpr",error_int,ex); return NULL; } } extern "C" Expr vc_gtExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->gtExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_gtExpr",error_int,ex); return NULL; } } extern "C" Expr vc_geExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->geExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_geExpr",error_int,ex); return NULL; } } extern "C" Expr vc_recordExpr1(VC vc, char* field, Expr expr) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->recordExpr(field, fromExpr(expr))); }catch(CVC3::Exception ex){ signal_error("vc_recordExpr1",error_int,ex); return NULL; } } extern "C" Expr vc_recordExpr2(VC vc, char* field0, Expr expr0, char* field1, Expr expr1) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->recordExpr(field0, fromExpr(expr0), field1, fromExpr(expr1))); }catch(CVC3::Exception ex){ signal_error("vc_recordExpr2",error_int,ex); return NULL; } } extern "C" Expr vc_recordExpr3(VC vc, char* field0, Expr expr0, char* field1, Expr expr1, char* field2, Expr expr2) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->recordExpr(field0, fromExpr(expr0), field1, fromExpr(expr1), field2, fromExpr(expr2))); }catch(CVC3::Exception ex){ signal_error("vc_recordExpr3",error_int,ex); return NULL; } } extern "C" Expr vc_recordExprN(VC vc, char** fields, Expr* exprs, int numFields) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcFields; vector cvcExprs; for (int i = 0; i < numFields; ++i) { cvcFields.push_back(fields[i]); cvcExprs.push_back(fromExpr(exprs[i])); } return toExpr(cvc->recordExpr(cvcFields, cvcExprs)); }catch(CVC3::Exception ex){ signal_error("vc_recordExprN",error_int,ex); return NULL; } } extern "C" Expr vc_recSelectExpr(VC vc, Expr record, char* field) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->recSelectExpr(fromExpr(record), field)); }catch(CVC3::Exception ex){ signal_error("vc_recSelectExpr",error_int,ex); return NULL; } } extern "C" Expr vc_recUpdateExpr(VC vc, Expr record, char* field, Expr newValue) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->recUpdateExpr(fromExpr(record), field, fromExpr(newValue))); }catch(CVC3::Exception ex){ signal_error("vc_recUpdateExpr",error_int,ex); return NULL; } } extern "C" Expr vc_readExpr(VC vc, Expr array, Expr index) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->readExpr(fromExpr(array), fromExpr(index))); }catch(CVC3::Exception ex){ signal_error("vc_readExpr",error_int,ex); return NULL; } } extern "C" Expr vc_writeExpr(VC vc, Expr array, Expr index, Expr newValue) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->writeExpr(fromExpr(array), fromExpr(index), fromExpr(newValue))); }catch(CVC3::Exception ex){ signal_error("vc_writeExpr",error_int,ex); return NULL; } } extern "C" Type vc_bv32Type(VC vc) { return vc_bvType(vc, 32); } extern "C" Expr vc_bvConstExprFromStr(VC vc, char* binary_repr) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->parseExpr(cvc->listExpr("_BVCONST", cvc->stringExpr(binary_repr)))); }catch(CVC3::Exception ex){ signal_error("vc_bvConstExpr",error_int, ex); return NULL; } } extern "C" Expr vc_bvConstExprFromInt(VC vc, int n_bits, unsigned int value) { char* s = val_to_binary_str(n_bits, value); return vc_bvConstExprFromStr(vc, s); } extern "C" Expr vc_bv32ConstExprFromInt(VC vc, unsigned int value) { return vc_bvConstExprFromInt(vc, 32, value); } extern "C" Expr vc_bvConstExprFromLL(VC vc, int n_bits, unsigned long value) { char* s = val_to_binary_str(n_bits, value); return vc_bvConstExprFromStr(vc, s); } extern "C" Expr vc_bvConcatExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newConcatExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception &ex){ signal_error("vc_bvConcatExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvConcatExprN(VC vc, Expr* children, int numChildren) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcExprs; for (int i = 0; i < numChildren; ++i) { cvcExprs.push_back(fromExpr(children[i])); } return toExpr(cvc->newConcatExpr(cvcExprs)); }catch(CVC3::Exception &ex){ signal_error("vc_concatExprN",error_int,ex); return NULL; } } extern "C" Expr vc_bvExtract(VC vc, Expr child, int high_bit_no, int low_bit_no) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVExtractExpr(fromExpr(child), high_bit_no, low_bit_no)); }catch(CVC3::Exception ex){ signal_error("vc_bvExtract",error_int,ex); return NULL; } } extern "C" Expr vc_bvBoolExtract(VC vc, Expr child, int bit_no) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Expr lExpr = cvc->listExpr("_BOOLEXTRACT", fromExpr(child), cvc->ratExpr(bit_no)); return toExpr(cvc->parseExpr(lExpr)); }catch(CVC3::Exception ex){ signal_error("vc_bvBoolExtract",error_int,ex); return NULL; } } extern "C" Expr vc_bvNotExpr(VC vc, Expr child) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVNegExpr(fromExpr(child))); }catch(CVC3::Exception ex){ signal_error("vc_bvNotExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvAndExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVAndExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvAndExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvOrExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVOrExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvOrExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvXorExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVXorExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvXorExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvLtExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVLTExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvLtExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvLeExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVLEExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvLeExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvGtExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Expr lExpr = cvc->listExpr("_BVGT", fromExpr(left), fromExpr(right)); return toExpr(cvc->parseExpr(lExpr)); }catch(CVC3::Exception ex){ signal_error("vc_bvGtExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvGeExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Expr lExpr = cvc->listExpr("_BVGE", fromExpr(left), fromExpr(right)); return toExpr(cvc->parseExpr(lExpr)); }catch(CVC3::Exception ex){ signal_error("vc_bvGeExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSLtExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVSLTExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvSLtExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSLeExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVSLEExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvSLeExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSGtExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Expr lExpr = cvc->listExpr("_BVSGT", fromExpr(left), fromExpr(right)); return toExpr(cvc->parseExpr(lExpr)); }catch(CVC3::Exception ex){ signal_error("vc_bvSGtExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSGeExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Expr lExpr = cvc->listExpr("_BVSGE", fromExpr(left), fromExpr(right)); return toExpr(cvc->parseExpr(lExpr)); }catch(CVC3::Exception ex){ signal_error("vc_bvSGeExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSignExtend(VC vc, Expr child, int nbits) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newSXExpr(fromExpr(child), nbits)); }catch(CVC3::Exception ex){ signal_error("vc_bvSignExtend",error_int,ex); return NULL; } } extern "C" Expr vc_bvUMinusExpr(VC vc, Expr child) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVUminusExpr(fromExpr(child))); }catch(CVC3::Exception ex){ signal_error("vc_bvUMinusExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvPlusExpr(VC vc, int n_bits, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector args; args.push_back(fromExpr(left)); args.push_back(fromExpr(right)); return toExpr(cvc->newBVPlusExpr(n_bits, args)); }catch(CVC3::Exception ex){ signal_error("vc_bvPlusExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bv32PlusExpr(VC vc, Expr left, Expr right) { return vc_bvPlusExpr(vc, 32, left, right); } extern "C" Expr vc_bvMinusExpr(VC vc, int n_bits, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::Expr lExpr = cvc->listExpr("_BVSUB", cvc->ratExpr(n_bits), fromExpr(left), fromExpr(right)); return toExpr(cvc->parseExpr(lExpr)); }catch(CVC3::Exception ex){ signal_error("vc_bvMinusExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bv32MinusExpr(VC vc, Expr left, Expr right) { return vc_bvMinusExpr(vc, 32, left, right); } extern "C" Expr vc_bvMultExpr(VC vc, int n_bits, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVMultExpr(n_bits, fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvMultExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bv32MultExpr(VC vc, Expr left, Expr right) { return vc_bvMultExpr(vc, 32, left, right); } extern "C" Expr vc_bvLeftShiftExpr(VC vc, int sh_amt, Expr child) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newFixedLeftShiftExpr(fromExpr(child), sh_amt)); }catch(CVC3::Exception ex){ signal_error("vc_bvLeftShiftExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvRightShiftExpr(VC vc, int sh_amt, Expr child) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newFixedRightShiftExpr(fromExpr(child), sh_amt)); }catch(CVC3::Exception ex){ signal_error("vc_bvRightShiftExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvUDivExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVUDivExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvUDivExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvURemExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVURemExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvURemExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSDivExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVSDivExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvSDivExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSRemExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVSRemExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvSRemExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvSModExpr(VC vc, Expr left, Expr right) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->newBVSModExpr(fromExpr(left), fromExpr(right))); }catch(CVC3::Exception ex){ signal_error("vc_bvSModExpr",error_int,ex); return NULL; } } /* Same as vc_bvLeftShift only that the answer in 32 bits long */ extern "C" Expr vc_bv32LeftShiftExpr(VC vc, int sh_amt, Expr child) { return vc_bvExtract(vc, vc_bvLeftShiftExpr(vc, sh_amt, child), 31, 0); } /* Same as vc_bvRightShift only that the answer in 32 bits long */ extern "C" Expr vc_bv32RightShiftExpr(VC vc, int sh_amt, Expr child) { return vc_bvExtract(vc, vc_bvRightShiftExpr(vc, sh_amt, child), 31, 0); } extern "C" Expr vc_bvVar32LeftShiftExpr(VC vc, Expr sh_amt, Expr child) { try{ Expr ifpart; Expr thenpart; Expr elsepart = vc_trueExpr(vc); Expr ite = vc_trueExpr(vc); for(int count=32; count >= 0; count--){ if(count != 32) { ifpart = vc_eqExpr(vc, sh_amt, vc_bvConstExprFromInt(vc, 32, count)); thenpart = vc_bvExtract(vc, vc_bvLeftShiftExpr(vc, count, child), 31, 0); ite = vc_iteExpr(vc,ifpart,thenpart,elsepart); elsepart = ite; } else { elsepart = vc_bvConstExprFromInt(vc,32, 0); } } return ite; }catch(CVC3::Exception ex){ signal_error("vc_bvVar32LeftShiftExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvVar32DivByPowOfTwoExpr(VC vc, Expr child, Expr rhs) { try{ Expr ifpart; Expr thenpart; Expr elsepart = vc_trueExpr(vc); Expr ite = vc_trueExpr(vc); for(int count=32; count >= 0; count--){ if(count != 32) { ifpart = vc_eqExpr(vc, rhs, vc_bvConstExprFromInt(vc, 32, 1 << count)); thenpart = vc_bvRightShiftExpr(vc, count, child); ite = vc_iteExpr(vc,ifpart,thenpart,elsepart); elsepart = ite; } else { elsepart = vc_bvConstExprFromInt(vc,32, 0); } } return ite; }catch(CVC3::Exception ex){ signal_error("vc_bvVar32DivByPowOfTwoExpr",error_int,ex); return NULL; } } extern "C" Expr vc_bvVar32RightShiftExpr(VC vc, Expr sh_amt, Expr child) { try{ Expr ifpart; Expr thenpart; Expr elsepart = vc_trueExpr(vc); Expr ite = vc_trueExpr(vc); for(int count=32; count >= 0; count--){ if(count != 32) { ifpart = vc_eqExpr(vc, sh_amt, vc_bvConstExprFromInt(vc, 32, count)); thenpart = vc_bvRightShiftExpr(vc, count, child); ite = vc_iteExpr(vc,ifpart,thenpart,elsepart); elsepart = ite; } else { elsepart = vc_bvConstExprFromInt(vc,32, 0); } } return ite; }catch(CVC3::Exception ex){ signal_error("vc_bvVar32LeftShiftExpr",error_int,ex); return NULL; } } /* C pointer support: C interface to support C memory arrays in CVC3 */ extern "C" Expr vc_bvCreateMemoryArray(VC vc, char * arrayName) { Type bv8 = vc_bvType(vc,8); Type bv32 = vc_bvType(vc,32); Type malloced_mem0 = vc_arrayType(vc,bv32,bv8); return vc_varExpr(vc, arrayName, malloced_mem0); } /*OLD VERSIONS C pointer theory functions. DO NOT DELETE */ // //Warning: Type checking needed to ensure that the function is run // //correctly is not being done. it is assumed that the function // //recieves inputs of the correct types // extern "C" Expr vc_bvReadMemoryArray(VC vc, // Expr array, // Expr byteIndex, int newBitsPerElem) { // DebugAssert(newBitsPerElem%8 == 0, // "new bits per element must be a multiple of 8\n"); // Expr numerator = vc_bvMultExpr(vc,32, // vc_bvConstExprFromInt(vc,32,newBitsPerElem), // byteIndex); // int numOfBytes = newBitsPerElem/8; // DebugAssert(numOfBytes > 0, // "numOfBytes must be greater than 0"); // if(numOfBytes == 1) // return vc_readExpr(vc,array,numerator); // else { // int count = 1; // Expr a = vc_readExpr(vc,array,numerator); // while(--numOfBytes > 0) { // Expr b = vc_readExpr(vc,array, // vc_bvPlusExpr(vc,32,numerator,vc_bvConstExprFromInt(vc,32,count))); // a = vc_bvConcatExpr(vc,a,b); // count++; // } // return a; // } // } // extern "C" Expr vc_bvWriteToMemoryArray(VC vc, // Expr array, Expr byteIndex, // Expr element, int newBitsPerElem) { // DebugAssert(newBitsPerElem%8 == 0, // "new bits per element must be a multiple of 8\n"); // Expr numerator = vc_bvMultExpr(vc,32, // vc_bvConstExprFromInt(vc,32,newBitsPerElem), // byteIndex); // int numOfBytes = newBitsPerElem/8; // DebugAssert(numOfBytes > 0, // "numOfBytes must be greater than 0"); // if(numOfBytes == 1) // return vc_writeExpr(vc,array,numerator, element); // else { // int count = 1; // int hi = newBitsPerElem - 1; // int low = newBitsPerElem - 8; // Expr c = vc_bvExtract(vc,element,hi,low); // Expr newarray = vc_writeExpr(vc,array,numerator,c); // while(--numOfBytes > 0) { // hi = low-1; // low = low-8; // c = vc_bvExtract(vc,element,hi,low); // newarray = vc_writeExpr(vc,newarray,numerator,c); // count++; // } // return newarray; // } // } extern "C" Expr vc_bvReadMemoryArray(VC vc, Expr array, Expr byteIndex, int numOfBytes) { DebugAssert(0 < numOfBytes, "number of Bytes must be greater than 0\n"); if(numOfBytes == 1) return vc_readExpr(vc,array,byteIndex); else { int count = 1; Expr a = vc_readExpr(vc,array,byteIndex); while(--numOfBytes > 0) { Expr b = vc_readExpr(vc,array, /*vc_simplify(vc, */ vc_bvPlusExpr(vc, 32, byteIndex, vc_bvConstExprFromInt(vc,32,count)))/*)*/; a = vc_bvConcatExpr(vc,b,a); count++; } return a; } } extern "C" Expr vc_bvWriteToMemoryArray(VC vc, Expr array, Expr byteIndex, Expr element, int numOfBytes) { DebugAssert(numOfBytes > 0, "numOfBytes must be greater than 0"); //int newBitsPerElem = numOfBytes*8; if(numOfBytes == 1) return vc_writeExpr(vc, array, byteIndex, element); else { int count = 1; //int hi = newBitsPerElem - 1; //int low = newBitsPerElem - 8; int low_elem = 0; int hi_elem = low_elem + 7; Expr c = vc_bvExtract(vc, element, hi_elem, low_elem); Expr newarray = vc_writeExpr(vc, array, byteIndex, c); while(--numOfBytes > 0) { //hi = low-1; //low = low-8; low_elem = low_elem + 8; hi_elem = low_elem + 7; c = vc_bvExtract(vc, element, hi_elem, low_elem); newarray = vc_writeExpr(vc, newarray, vc_bvPlusExpr(vc, 32, byteIndex, vc_bvConstExprFromInt(vc,32,count)), c); count++; } return newarray; } } extern "C" Expr vc_tupleExprN(VC vc, Expr* children, int numChildren) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcExprs; for (int i = 0; i < numChildren; ++i) { cvcExprs.push_back(fromExpr(children[i])); } return toExpr(cvc->tupleExpr(cvcExprs)); }catch(CVC3::Exception ex){ signal_error("vc_tupleExprN",error_int,ex); return NULL; } } extern "C" Expr vc_tupleSelectExpr(VC vc, Expr tuple, int index) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->tupleSelectExpr(fromExpr(tuple), index)); }catch(CVC3::Exception ex){ signal_error("vc_tupleSelectExpr",error_int,ex); return NULL; } } extern "C" Expr vc_tupleUpdateExpr(VC vc, Expr tuple, int index, Expr newValue) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->tupleUpdateExpr(fromExpr(tuple), index, fromExpr(newValue))); }catch(CVC3::Exception ex){ signal_error("vc_tupleUpdateExpr",error_int,ex); return NULL; } } extern "C" Expr vc_datatypeConsExpr(VC vc, char* constructor, int numArgs, Expr* args) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcArgs; for (int i = 0; i < numArgs; ++i) { cvcArgs.push_back(fromExpr(args[i])); } return toExpr(cvc->datatypeConsExpr(constructor, cvcArgs)); }catch(CVC3::Exception ex){ signal_error("vc_datatypeConsExpr",error_int,ex); return NULL; } } extern "C" Expr vc_datatypeSelExpr(VC vc, char* selector, Expr arg) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->datatypeSelExpr(selector, fromExpr(arg))); }catch(CVC3::Exception ex){ signal_error("vc_datatypeSelExpr",error_int,ex); return NULL; } } extern "C" Expr vc_datatypeTestExpr(VC vc, char* constructor, Expr arg) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->datatypeTestExpr(constructor, fromExpr(arg))); }catch(CVC3::Exception ex){ signal_error("vc_datatypeTestExpr",error_int,ex); return NULL; } } extern "C" Expr vc_boundVarExpr(VC vc, char* name, char *uid, Type type) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->boundVarExpr(name, uid, fromType(type))); }catch(CVC3::Exception ex){ signal_error("vc_getEM",error_int,ex); return NULL; } } extern "C" Type vc_forallExpr(VC vc, Expr* Bvars, int numBvars, Expr f) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcBvars; for (int i = 0; i < numBvars; ++i) { cvcBvars.push_back(fromExpr(Bvars[i])); } return toExpr(cvc->forallExpr(cvcBvars,fromExpr(f))); }catch(CVC3::Exception ex){ signal_error("vc_forallExpr",error_int,ex); return NULL; } } // triggers must be an array of listExpr // each listExpr represent a trigger // if a listExpr contains more than one Expr, then it is a multi-trigger extern "C" void vc_setTriggers(VC vc, Expr e, int numTrigs, Expr* triggers) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector >cvcTriggers; for (int i = 0; i < numTrigs; ++i) { vector curTrig; CVC3::Expr trigExpr = fromExpr(triggers[i]); if(trigExpr.isRawList()){ for(int j = 0 ; j < trigExpr.arity(); j++){ curTrig.push_back(trigExpr[j]); } } else{ curTrig.push_back(trigExpr); } cvcTriggers.push_back(curTrig); } cvc->setTriggers(fromExpr(e), cvcTriggers); }catch(CVC3::Exception ex){ signal_error("vc_setTriggers",error_int,ex); } } extern "C" Expr vc_existsExpr(VC vc, Expr* Bvars, int numBvars, Expr f) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcBvars; for (int i = 0; i < numBvars; ++i) { cvcBvars.push_back(fromExpr(Bvars[i])); } return toExpr(cvc->existsExpr(cvcBvars,fromExpr(f))); }catch(CVC3::Exception ex){ signal_error("vc_existsExpr",error_int,ex); return NULL; } } extern "C" Op vc_lambdaExpr(VC vc, int numVars, Expr* vars, Expr body) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcVars; for (int i = 0; i < numVars; ++i) { cvcVars.push_back(fromExpr(vars[i])); } return toOp(vc, cvc->lambdaExpr(cvcVars, fromExpr(body))); }catch(CVC3::Exception ex){ signal_error("vc_lambdaExpr",error_int,ex); return NULL; } } ///////////////////////////////////////////////////////////////////////////// // Context-related methods // ///////////////////////////////////////////////////////////////////////////// extern "C" void vc_setResourceLimit(VC vc, unsigned limit) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->setResourceLimit(limit); }catch(CVC3::Exception ex){ signal_error("vc_setResourceLimit",error_int,ex); } } extern "C" void vc_assertFormula(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->assertFormula(fromExpr(e)); }catch(CVC3::Exception ex){ signal_error("vc_assertFormula",error_int,ex); } } extern "C" void vc_registerAtom(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->registerAtom(fromExpr(e)); }catch(CVC3::Exception ex){ signal_error("vc_registerAtom",error_int,ex); } } extern "C" Expr vc_getImpliedLiteral(VC vc) { try { CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->getImpliedLiteral()); } catch(CVC3::Exception ex){ signal_error("vc_getImpliedLiteral",error_int,ex); return NULL; } } extern "C" Expr vc_simplify(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->simplify(fromExpr(e))); }catch(CVC3::Exception ex){ signal_error("vc_simplify",error_int,ex); return NULL; } } extern "C" int vc_query(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return (int)cvc->query(fromExpr(e)); }catch(CVC3::Exception ex){ signal_error("vc_query",error_int,ex); return error_int; } } extern "C" int vc_checkContinue(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return (int)cvc->checkContinue(); }catch(CVC3::Exception ex){ signal_error("vc_checkContinue",error_int,ex); return error_int; } } extern "C" int vc_restart(VC vc, Expr e) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return (int)cvc->restart(fromExpr(e)); }catch(CVC3::Exception ex){ signal_error("vc_restart",error_int,ex); return error_int; } } extern "C" void vc_returnFromCheck(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->returnFromCheck(); }catch(CVC3::Exception ex){ signal_error("vc_returnFromCheck",error_int,ex); } } extern "C" Expr* vc_getUserAssumptions(VC vc, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcAssumptions; cvc->getUserAssumptions(cvcAssumptions); Expr* assumptions = new Expr[cvcAssumptions.size()]; unsigned n = 0; for (; n < cvcAssumptions.size(); ++n) { assumptions[n] = toExpr(cvcAssumptions[n]); } *size = int(n); return assumptions; }catch(CVC3::Exception ex){ signal_error("vc_getUserAssumptions",error_int,ex); return NULL; } } extern "C" Expr* vc_getInternalAssumptions(VC vc, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcAssumptions; cvc->getInternalAssumptions(cvcAssumptions); Expr* assumptions = new Expr[cvcAssumptions.size()]; unsigned n = 0; for (; n < cvcAssumptions.size(); ++n) { assumptions[n] = toExpr(cvcAssumptions[n]); } *size = int(n); return assumptions; }catch(CVC3::Exception ex){ signal_error("vc_getInternalAssumptions",error_int,ex); return NULL; } } extern "C" Expr* vc_getAssumptions(VC vc, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcAssumptions; cvc->getAssumptions(cvcAssumptions); Expr* assumptions = new Expr[cvcAssumptions.size()]; unsigned n = 0; for (; n < cvcAssumptions.size(); ++n) { assumptions[n] = toExpr(cvcAssumptions[n]); } *size = int(n); return assumptions; }catch(CVC3::Exception ex){ signal_error("vc_getAssumptions",error_int,ex); return NULL; } } //yeting, this is for proof translation, extern "C" Expr vc_getProofAssumptions(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcAssumptions; cvc->getUserAssumptions(cvcAssumptions); return toExpr(cvc->listExpr(cvcAssumptions)); }catch(CVC3::Exception ex){ signal_error("vc_getProofAssumptions",error_int,ex); return NULL; } } //yeting, this is for proof translation extern "C" Expr vc_getProofQuery(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->getProofQuery()); }catch(CVC3::Exception ex){ signal_error("vc_getProofQuery",error_int,ex); return NULL; } } extern "C" Expr* vc_getAssumptionsUsed(VC vc, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcAssumptions; cvc->getAssumptionsUsed(cvcAssumptions); Expr* assumptions = new Expr[cvcAssumptions.size()]; unsigned n = 0; for (; n < cvcAssumptions.size(); ++n) { assumptions[n] = toExpr(cvcAssumptions[n]); } *size = int(n); return assumptions; }catch(CVC3::Exception ex){ signal_error("vc_getAssumptionsUsed",error_int,ex); return NULL; } } extern "C" Expr* vc_getCounterExample(VC vc, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcAssumptions; cvc->getCounterExample(cvcAssumptions); Expr* assumptions = new Expr[cvcAssumptions.size()]; unsigned n = 0; for (; n < cvcAssumptions.size(); ++n) { assumptions[n] = toExpr(cvcAssumptions[n]); } *size = int(n); return assumptions; }catch(CVC3::Exception ex){ signal_error("vc_getCounterExample",error_int,ex); return NULL; } } extern "C" Expr* vc_getConcreteModel(VC vc, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; CVC3::ExprMap assertions; cvc->getConcreteModel(assertions); Expr* locAssumptions = new Expr[assertions.size()]; int n = 0; CVC3::ExprMap::iterator it = assertions.begin(), end = assertions.end(); for (; it != end; it++) { locAssumptions[n] = toExpr(cvc->eqExpr(it->first, it->second)); n++; } *size = n; return locAssumptions; }catch(CVC3::Exception ex){ signal_error("vc_getConcreteModel",error_int,ex); return NULL; } } extern "C" int vc_inconsistent(VC vc, Expr** assumptions, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector assertions; bool ret = cvc->inconsistent(assertions); Expr* locAssumptions = new Expr[assertions.size()]; for (unsigned i = 0; i < assertions.size(); ++i) { locAssumptions[i] = toExpr(assertions[i]); } *assumptions = locAssumptions; *size = assertions.size(); return (int)ret; }catch(CVC3::Exception ex){ signal_error("vc_inconsistent",error_int,ex); return 0; } } extern "C" char* vc_incomplete(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector reasons; bool ret = cvc->incomplete(reasons); if (!ret) return NULL; string allReasons = ""; for (unsigned i = 0; i < reasons.size(); ++i) { allReasons += '\n'; allReasons += reasons[i]; } char* retStr = new char[allReasons.length()+1]; allReasons.copy(retStr, allReasons.length()); retStr[allReasons.length()] = '\0'; return retStr; }catch(CVC3::Exception ex){ signal_error("vc_incomplete",error_int,ex); return NULL; } } extern "C" Expr vc_getProof(VC vc) { signal_error("vc_getProofTCC",error_int,CVC3::Exception("Unimplemented")); return NULL; } extern "C" Expr vc_getProofOfFile(VC vc, char* fileName){ signal_error("vc_getProofTCC",error_int,CVC3::Exception("Unimplemented")); return NULL; } extern "C" Expr vc_getTCC(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->getTCC()); }catch(CVC3::Exception ex){ signal_error("vc_getTCC",error_int,ex); return NULL; } } extern "C" Expr* vc_getAssumptionsTCC(VC vc, int* size) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; vector cvcAssumptions; cvc->getAssumptionsTCC(cvcAssumptions); Expr* assumptions = new Expr[cvcAssumptions.size()]; unsigned n = 0; for (; n < cvcAssumptions.size(); ++n) { assumptions[n] = toExpr(cvcAssumptions[n]); } *size = int(n); return assumptions; }catch(CVC3::Exception ex){ signal_error("vc_getAssumptionsTCC",error_int,ex); return NULL; } } extern "C" Expr vc_getProofTCC(VC vc) { signal_error("vc_getProofTCC",error_int,CVC3::Exception("Unimplemented")); return NULL; } extern "C" Expr vc_getClosure(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return toExpr(cvc->getClosure()); }catch(CVC3::Exception ex){ signal_error("vc_getClosure",error_int,ex); return NULL; } } extern "C" Expr vc_getProofClosure(VC vc) { signal_error("vc_getProofTCC",error_int,CVC3::Exception("Unimplemented")); return NULL; } extern "C" int vc_stackLevel(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return cvc->stackLevel(); }catch(CVC3::Exception ex){ signal_error("vc_stackLevel",error_int,ex); return 0; } } extern "C" void vc_push(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->push(); }catch(CVC3::Exception ex){ signal_error("vc_push",error_int,ex); } } extern "C" void vc_pop(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->pop(); }catch(CVC3::Exception ex){ signal_error("vc_pop",error_int,ex); } } extern "C" void vc_popto(VC vc, int stackLevel) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->popto(stackLevel); }catch(CVC3::Exception ex){ signal_error("vc_popto",error_int,ex); } } extern "C" Context vc_getCurrentContext(VC vc) { CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return (Context)cvc->getCurrentContext(); } // ------------------------------------------------------------------------- // Util // ------------------------------------------------------------------------- extern "C" int vc_compare_exprs(Expr e1,Expr e2){ try{ return (compare(fromExpr(e1),fromExpr(e2))); } catch (CVC3::Exception ex){ signal_error("vc_compare_exprs",error_int,ex); return error_int; } } extern "C" const char* vc_exprString(Expr e){ try{ tmpString =(fromExpr(e)).toString(); return tmpString.c_str(); } catch (CVC3::Exception ex){ signal_error("vc_exprString",error_int,ex); return "ERROR"; } } extern "C" const char* vc_typeString(Type t){ try{ tmpString = (fromExpr(t)).toString(); return tmpString.c_str(); } catch (CVC3::Exception ex){ signal_error("vc_typeString",error_int,ex); return "ERROR"; } } extern "C" bool vc_isClosure(Expr e){ signal_error("vc_isClosure",error_int,CVC3::Exception("Unimplemented")); return false; } extern "C" bool vc_isQuantifier(Expr e){ signal_error("vc_isQuantifier",error_int,CVC3::Exception("Unimplemented")); return false; } extern "C" bool vc_isLambda(Expr e){ signal_error("vc_isLambda",error_int,CVC3::Exception("Unimplemented")); return false; } extern "C" bool vc_isVar(Expr e){ try{ return (fromExpr(e)).isVar(); } catch (CVC3::Exception ex){ signal_error("vc_isVar",error_int,ex); return false; } } extern "C" int vc_arity(Expr e){ try{ return (fromExpr(e)).arity(); } catch (CVC3::Exception ex){ signal_error("vc_arity",error_int,ex); return error_int; } } extern "C" int vc_getKind(Expr e){ try{ return (fromExpr(e)).getKind(); } catch (CVC3::Exception ex){ signal_error("vc_getKind",error_int,ex); return error_int; } } extern "C" Expr vc_getChild(Expr e, int i){ try{ return toExpr(((fromExpr(e))[i])); } catch (CVC3::Exception ex){ signal_error("vc_getChild",error_int,ex); return NULL; } } extern "C" int vc_getNumVars(Expr e){ signal_error("vc_getNumVars",error_int,CVC3::Exception("Unimplemented")); return 0; } extern "C" Expr vc_getVar(Expr e, int i){ signal_error("vc_getVar",error_int,CVC3::Exception("Unimplemented")); return 0; } extern "C" Expr vc_getBody(Expr e){ signal_error("vc_getBody",error_int,CVC3::Exception("Unimplemented")); return 0; } extern "C" Expr vc_getExistential(Expr e){ signal_error("vc_getExistential",error_int,CVC3::Exception("Unimplemented")); return 0; } extern "C" Expr vc_getFun(VC vc, Expr e) { try{ return toExpr((fromExpr(e)).getOp().getExpr()); }catch(CVC3::Exception ex){ signal_error("vc_getFun",error_int,ex); return NULL; } } extern "C" Expr vc_toExpr(Type t){ try{ return toExpr(fromExpr(t)); } catch (CVC3::Exception ex){ signal_error("vc_toExpr",error_int,ex); return NULL; } } extern "C" const char* vc_getKindString(VC vc,int kind) { try{ tmpString = CVC4::kind::kindToString(CVC4::Kind(kind)); return tmpString.c_str(); } catch (CVC3::Exception ex){ signal_error("vc_getKindString",error_int,ex); return NULL; } } extern "C" int vc_getKindInt(VC vc,char* kind_name) { signal_error("vc_getKindInt",error_int,CVC3::Exception("Unimplemented")); return 0; } extern "C" int vc_getInt(Expr e){ try{ CVC3::Expr ex = fromExpr(e); return int(ex.getConst().getNumerator().getLong()); } catch (CVC3::Exception ex){ signal_error("vc_getInt",error_int,ex); return error_int; } } extern "C" int vc_getBVInt(VC vc, Expr e){ try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return int(cvc->computeBVConst(fromExpr(e)).getNumerator().getLong()); } catch (CVC3::Exception ex){ signal_error("vc_getBVInt",error_int,ex); return 0; } } extern "C" unsigned int vc_getBVUnsigned(VC vc, Expr e){ try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; return unsigned(cvc->computeBVConst(fromExpr(e)).getNumerator().getUnsignedLong()); } catch (CVC3::Exception ex){ signal_error("vc_getBVUnsigned",error_int,ex); return 0; } } extern "C" void vc_print_statistics(VC vc) { try{ CVC3::ValidityChecker* cvc = (CVC3::ValidityChecker*) vc; cvc->printStatistics(); } catch (CVC3::Exception ex){ signal_error("vc_print_statistics",error_int,ex); } } cvc4-1.5/src/bindings/compat/c/c_interface.h000066400000000000000000000620031313116454100207220ustar00rootroot00000000000000/*****************************************************************************/ /*! * \file c_interface.h * * Authors: Clark Barrett * Cristian Cadar * * Created: Thu Jun 5 10:34:02 2003 * *
* * License to use, copy, modify, sell and/or distribute this software * and its documentation for any purpose is hereby granted without * royalty, subject to the terms and conditions defined in the \ref * COPYING file provided with this distribution. * *
* */ /*****************************************************************************/ #include "cvc4_public.h" #ifndef _cvc3__include__c_interface_h_ #define _cvc3__include__c_interface_h_ #include "bindings/compat/c/c_interface_defs.h" //! Flags can be NULL VC vc_createValidityChecker(Flags flags); //! Create validity checker's flags Flags vc_createFlags(); //! Destroy the validity checker. /*! Must be called after all other objects are deleted, except the flags */ void vc_destroyValidityChecker(VC vc); //! Delete the flags void vc_deleteFlags(Flags flags); //! Delete type void vc_deleteType(Type t); //! Delete expression void vc_deleteExpr(Expr e); //! Delete operator void vc_deleteOp(Op op); //! Delete vector of expressions void vc_deleteVector(Expr* e); //! Delete vector of types void vc_deleteTypeVector(Type* e); // Setting the flags //! Set a boolean flag to true or false void vc_setBoolFlag(Flags flags, char* name, int val); //! Set an integer flag to the given value void vc_setIntFlag(Flags flags, char* name, int val); //! Set a string flag to the given value void vc_setStringFlag(Flags flags, char* name, char* val); //! Add a (string, bool) pair to the multy-string flag void vc_setStrSeqFlag(Flags flags, char* name, char* str, int val); // Basic types Type vc_boolType(VC vc); Type vc_realType(VC vc); Type vc_intType(VC vc); //! Create a subrange type Type vc_subRangeType(VC vc, int lowerEnd, int upperEnd); //! Creates a subtype defined by the given predicate /*! * \param vc the validity checker * * \param pred is a predicate taking one argument of type T and returning * Boolean. The resulting type is a subtype of T whose elements x are those * satisfying the predicate pred(x). * * \param witness is an expression of type T for which pred holds (if a Null * expression is passed as a witness, cvc will try to prove \f$\exists x. pred(x))\f$. * if the witness check fails, a TypecheckException is thrown. */ Type vc_subtypeType(VC vc, Expr pred, Expr witness); // Tuple types Type vc_tupleType2(VC vc, Type type0, Type type1); Type vc_tupleType3(VC vc, Type type0, Type type1, Type type2); //! Create a tuple type. 'types' is an array of types of length numTypes. Type vc_tupleTypeN(VC vc, Type* types, int numTypes); // Record types Type vc_recordType1(VC vc, char* field, Type type); Type vc_recordType2(VC vc, char* field0, Type type0, char* field1, Type type1); Type vc_recordType3(VC vc, char* field0, Type type0, char* field1, Type type1, char* field2, Type type2); //! Create a record type. /*! 'fields' and 'types' are arrays of length numFields. */ Type vc_recordTypeN(VC vc, char** fields, Type* types, int numFields); // Datatypes //! Single datatype, single constructor /*! The types are either type exressions (obtained from a type with * getExpr()) or string expressions containing the name of (one of) the * dataType(s) being defined. */ Type vc_dataType1(VC vc, char* name, char* constructor, int arity, char** selectors, Expr* types); //! Single datatype, multiple constructors /*! The types are either type exressions (obtained from a type with * getExpr()) or string expressions containing the name of (one of) the * dataType(s) being defined. */ Type vc_dataTypeN(VC vc, char* name, int numCons, char** constructors, int* arities, char*** selectors, Expr** types); //! Multiple datatypes /*! The types are either type exressions (obtained from a type with * getExpr()) or string expressions containing the name of (one of) the * dataType(s) being defined. * Returns an array of size numTypes which must be freed by calling * vc_deleteTypeVector. */ Type* vc_dataTypeMN(VC vc, int numTypes, char** names, int* numCons, char*** constructors, int** arities, char**** selectors, Expr*** types); //! Create an array type Type vc_arrayType(VC vc, Type typeIndex, Type typeData); //! Create a bitvector type of length n Type vc_bvType(VC vc, int n); //! Create a function type with 1 argument Type vc_funType1(VC vc, Type a1, Type typeRan); //! Create a function type with 2 arguments Type vc_funType2(VC vc, Type a1, Type a2, Type typeRan); //! Create a function type with 3 arguments Type vc_funType3(VC vc, Type a1, Type a2, Type a3, Type typeRan); //! Create a function type with N arguments Type vc_funTypeN(VC vc, Type* args, Type typeRan, int numArgs); // User-defined types //! Create an uninterpreted named type Type vc_createType(VC vc, char* typeName); //! Lookup a user-defined (uninterpreted) type by name Type vc_lookupType(VC vc, char* typeName); ///////////////////////////////////////////////////////////////////////////// // Expr manipulation methods // ///////////////////////////////////////////////////////////////////////////// //! Return the ExprManager ExprManager* vc_getEM(VC vc); //! Create a variable with a given name and type /*! The type cannot be a function type. */ Expr vc_varExpr(VC vc, char* name, Type type); //! Create a variable with a given name, type, and value Expr vc_varExprDef(VC vc, char* name, Type type, Expr def); //! Get the expression and type associated with a name. /*! If there is no such Expr, a NULL Expr is returned. */ Expr vc_lookupVar(VC vc, char* name, Type* type); //! Get the type of the Expr. Type vc_getType(VC vc, Expr e); //! Get the largest supertype of the Expr. Type vc_getBaseType(VC vc, Expr e); //! Get the largest supertype of the Type. Type vc_getBaseTypeOfType(VC vc, Type t); //! Get the subtype predicate Expr vc_getTypePred(VC vc, Type t, Expr e); //! Create a string Expr Expr vc_stringExpr(VC vc, char* str); //! Create an ID Expr Expr vc_idExpr(VC vc, char* name); //! Create a list Expr /*! Intermediate representation for DP-specific expressions. * Normally, the first element of the list is a string Expr * representing an operator, and the rest of the list are the * arguments. For example, * * kids.push_back(vc->stringExpr("PLUS")); * kids.push_back(x); // x and y are previously created Exprs * kids.push_back(y); * Expr lst = vc->listExpr(kids); * * Or, alternatively (using its overloaded version): * * Expr lst = vc->listExpr("PLUS", x, y); * * or * * vector summands; * summands.push_back(x); summands.push_back(y); ... * Expr lst = vc->listExpr("PLUS", summands); */ Expr vc_listExpr(VC vc, int numKids, Expr* kids); // Expr I/O //! Expr vc_parseExpr(VC vc, char* s); void vc_printExpr(VC vc, Expr e); //! Print e into a char* /*! Note that the ownership of the char* is given to the caller which should free the memory when it is done with it. This can be done by calling vc_deleteString. */ char* vc_printExprString(VC vc, Expr e); //! Delete char* returned by previous function void vc_deleteString(char* str); //! Print 'e' into an open file descriptor void vc_printExprFile(VC vc, Expr e, int fd); //! Import the Expr from another instance of VC /*! When expressions need to be passed among several instances of * VC, they need to be explicitly imported into the * corresponding instance using this method. The return result is * an identical expression that belongs to the current instance of * VC, and can be safely used as part of more complex * expressions from the same instance. \param vc is the instance to be imported into \param e is the expression created using a different (not vc) instance */ Expr vc_importExpr(VC vc, Expr e); //! Import the Type from another instance of VC /*! \sa vc_importExpr() */ Type vc_importType(Type t); //! Create an equality expression. The two children must have the same type. Expr vc_eqExpr(VC vc, Expr child0, Expr child1); //! Create an all distinct expression. All children must ahve the same type. Expr vc_distinctExpr(VC vc, Expr* children, int numChildren); // Boolean expressions // The following functions create Boolean expressions. The children provided // as arguments must be of type Boolean. Expr vc_trueExpr(VC vc); Expr vc_falseExpr(VC vc); Expr vc_notExpr(VC vc, Expr child); Expr vc_andExpr(VC vc, Expr left, Expr right); Expr vc_andExprN(VC vc, Expr* children, int numChildren); Expr vc_orExpr(VC vc, Expr left, Expr right); Expr vc_orExprN(VC vc, Expr* children, int numChildren); Expr vc_impliesExpr(VC vc, Expr hyp, Expr conc); Expr vc_iffExpr(VC vc, Expr left, Expr right); Expr vc_iteExpr(VC vc, Expr ifpart, Expr thenpart, Expr elsepart); // Substitution // Substitutes oldTerms for newTerms in e. // This function doesn't actually exist in ValidityChecker interface, // but it does in Expr, and its functionality is needed in the C interface. // For consistency, it is represented here as if it were in ValidityChecker. Expr vc_substExpr(VC vc, Expr e, Expr* oldTerms, int numOldTerms, Expr* newTerms, int numNewTerms); // User-defined (uninterpreted) functions. //! Create an operator from a function with a given name and type. /*! Name is given as an ID Expr, and the type must be a function type. */ Op vc_createOp(VC vc, char* name, Type type); //! Create a named user-defined function with a given type Op vc_createOpDef(VC vc, char* name, Type type, Expr def); //! Lookup an operator by name. /*! Returns the operator and the type if the operator exists. * Returns NULL otherwise */ Op vc_lookupOp(VC vc, char* name, Type* type); //! Create expressions with a user-defined operator. /*! op must have a function type. */ Expr vc_funExpr1(VC vc, Op op, Expr child); Expr vc_funExpr2(VC vc, Op op, Expr left, Expr right); Expr vc_funExpr3(VC vc, Op op, Expr child0, Expr child1, Expr child2); Expr vc_funExprN(VC vc, Op op, Expr* children, int numChildren); // Arithmetic //! Create a rational number with numerator n and denominator d. /*! d cannot be 0. */ Expr vc_ratExpr(VC vc, int n, int d); //! Create a rational number n/d; n and d are given as strings /*! n and d are converted to arbitrary-precision integers according to * the given base. d cannot be 0. */ Expr vc_ratExprFromStr(VC vc, char* n, char* d, int base); //! Create a rational from a single string. /*! \param vc the validity checker \param n can be a string containing an integer, a pair of integers "nnn/ddd", or a number in the fixed or floating point format. \param base is the base in which to interpret the string. */ Expr vc_ratExprFromStr1(VC vc, char* n, int base); //! Unary minus. Child must have a numeric type. Expr vc_uminusExpr(VC vc, Expr child); // plus, minus, mult. Children must have numeric types. Expr vc_plusExpr(VC vc, Expr left, Expr right); Expr vc_plusExprN(VC vc, Expr* children, int numChildren); Expr vc_minusExpr(VC vc, Expr left, Expr right); Expr vc_multExpr(VC vc, Expr left, Expr right); Expr vc_powExpr(VC vc, Expr pow, Expr base); Expr vc_divideExpr(VC vc, Expr numerator, Expr denominator); // The following functions create less-than, less-than or equal, // greater-than, and greater-than or equal expressions of type Boolean. // Their arguments must be of numeric types. Expr vc_ltExpr(VC vc, Expr left, Expr right); Expr vc_leExpr(VC vc, Expr left, Expr right); Expr vc_gtExpr(VC vc, Expr left, Expr right); Expr vc_geExpr(VC vc, Expr left, Expr right); // Records // Create record literals; Expr vc_recordExpr1(VC vc, char* field, Expr expr); Expr vc_recordExpr2(VC vc, char* field0, Expr expr0, char* field1, Expr expr1); Expr vc_recordExpr3(VC vc, char* field0, Expr expr0, char* field1, Expr expr1, char* field2, Expr expr2); Expr vc_recordExprN(VC vc, char** fields, Expr* exprs, int numFields); //! Create an expression representing the selection of a field from a record. Expr vc_recSelectExpr(VC vc, Expr record, char* field); //! Record update; equivalent to "record WITH .field := newValue" Expr vc_recUpdateExpr(VC vc, Expr record, char* field, Expr newValue); // Arrays //! Create an expression for the value of array at the given index Expr vc_readExpr(VC vc, Expr array, Expr index); //! Array update; equivalent to "array WITH [index] := newValue" Expr vc_writeExpr(VC vc, Expr array, Expr index, Expr newValue); // Bitvectors // Additional type constructor Type vc_bv32Type(VC vc); // Bitvector constants Expr vc_bvConstExprFromStr(VC vc, char* binary_repr); Expr vc_bvConstExprFromInt(VC vc, int n_bits, unsigned int value); Expr vc_bv32ConstExprFromInt(VC vc, unsigned int value); Expr vc_bvConstExprFromLL(VC vc, int n_bits, unsigned long value); // Concat and extract Expr vc_bvConcatExpr(VC vc, Expr left, Expr right); Expr vc_bvConcatExprN(VC vc, Expr* children, int numChildren); Expr vc_bvExtract(VC vc, Expr child, int high_bit_no, int low_bit_no); Expr vc_bvBoolExtract(VC vc, Expr child, int bit_no); // Bitwise Boolean operators: Negation, And, Or, Xor Expr vc_bvNotExpr(VC vc, Expr child); Expr vc_bvAndExpr(VC vc, Expr left, Expr right); Expr vc_bvOrExpr(VC vc, Expr left, Expr right); Expr vc_bvXorExpr(VC vc, Expr left, Expr right); // Unsigned bitvector inequalities Expr vc_bvLtExpr(VC vc, Expr left, Expr right); Expr vc_bvLeExpr(VC vc, Expr left, Expr right); Expr vc_bvGtExpr(VC vc, Expr left, Expr right); Expr vc_bvGeExpr(VC vc, Expr left, Expr right); // Signed bitvector inequalities Expr vc_bvSLtExpr(VC vc, Expr left, Expr right); Expr vc_bvSLeExpr(VC vc, Expr left, Expr right); Expr vc_bvSGtExpr(VC vc, Expr left, Expr right); Expr vc_bvSGeExpr(VC vc, Expr left, Expr right); // Sign-extend child to a total of nbits bits Expr vc_bvSignExtend(VC vc, Expr child, int nbits); // Bitvector arithmetic: unary minus, plus, subtract, multiply Expr vc_bvUMinusExpr(VC vc, Expr child); Expr vc_bvPlusExpr(VC vc, int n_bits, Expr left, Expr right); Expr vc_bv32PlusExpr(VC vc, Expr left, Expr right); Expr vc_bvMinusExpr(VC vc, int n_bits, Expr left, Expr right); Expr vc_bv32MinusExpr(VC vc, Expr left, Expr right); Expr vc_bvMultExpr(VC vc, int n_bits, Expr left, Expr right); Expr vc_bv32MultExpr(VC vc, Expr left, Expr right); Expr vc_bvUDivExpr(VC vc, Expr left, Expr right); Expr vc_bvURemExpr(VC vc, Expr left, Expr right); Expr vc_bvSDivExpr(VC vc, Expr left, Expr right); Expr vc_bvSRemExpr(VC vc, Expr left, Expr right); Expr vc_bvSModExpr(VC vc, Expr left, Expr right); // Shift operators Expr vc_bvLeftShiftExpr(VC vc, int sh_amt, Expr child); Expr vc_bvRightShiftExpr(VC vc, int sh_amt, Expr child); Expr vc_bv32LeftShiftExpr(VC vc, int sh_amt, Expr child); Expr vc_bv32RightShiftExpr(VC vc, int sh_amt, Expr child); Expr vc_bvVar32LeftShiftExpr(VC vc, Expr sh_amt, Expr child); Expr vc_bvVar32RightShiftExpr(VC vc, Expr sh_amt, Expr child); Expr vc_bvVar32DivByPowOfTwoExpr(VC vc, Expr child, Expr rhs); /*C pointer support: C interface to support C memory arrays in CVC3 */ Expr vc_bvCreateMemoryArray(VC vc, char * arrayName); Expr vc_bvReadMemoryArray(VC vc, Expr array, Expr byteIndex, int numOfBytes); Expr vc_bvWriteToMemoryArray(VC vc, Expr array, Expr byteIndex, Expr element, int numOfBytes); // Tuples //! Create a tuple expression /*! 'children' is an array of elements of length numChildren */ Expr vc_tupleExprN(VC vc, Expr* children, int numChildren); //! Tuple select; equivalent to "tuple.n", where n is an numeral (e.g. tup.5) Expr vc_tupleSelectExpr(VC vc, Expr tuple, int index); //! Tuple update; equivalent to "tuple WITH index := newValue" Expr vc_tupleUpdateExpr(VC vc, Expr tuple, int index, Expr newValue); // Datatypes //! Datatype constructor expression Expr vc_datatypeConsExpr(VC vc, char* constructor, int numArgs, Expr* args); //! Datatype selector expression Expr vc_datatypeSelExpr(VC vc, char* selector, Expr arg); //! Datatype tester expression Expr vc_datatypeTestExpr(VC vc, char* constructor, Expr arg); // Quantifiers //! Create a bound variable. /*! \param vc the validity checker * \param name * \param uid is a fresh unique string to distinguish this variable * from other bound variables with the same name * \param type */ Expr vc_boundVarExpr(VC vc, char* name, char *uid, Type type); //! Create a FORALL quantifier. /*! Bvars is an array of bound variables of length numBvars. */ Type vc_forallExpr(VC vc, Expr* Bvars, int numBvars, Expr f); //! Set triggers for a forallExpr void vc_setTriggers(VC vc, Expr e, int numTrigs, Expr* triggers); //! Create an EXISTS quantifier. /*! Bvars is an array of bound variables of length numBvars. */ Expr vc_existsExpr(VC vc, Expr* Bvars, int numBvars, Expr f); //! Lambda-expression Op vc_lambdaExpr(VC vc, int numVars, Expr* vars, Expr body); ///////////////////////////////////////////////////////////////////////////// // Context-related methods // ///////////////////////////////////////////////////////////////////////////// //! Set the resource limit (0==unlimited, 1==exhausted). /*! Currently, the limit is the total number of processed facts. */ void vc_setResourceLimit(VC vc, unsigned limit); //! Assert a new formula in the current context. /*! The formula must have Boolean type. */ void vc_assertFormula(VC vc, Expr e); //! Register an atomic formula of interest. /*! Registered atoms are tracked by the decision procedures. If one of them is deduced to be true or false, it is added to a list of implied literals. Implied literals can be retrieved with the getImpliedLiteral function */ void vc_registerAtom(VC vc, Expr e); //! Return next literal implied by last assertion. Null if none. /*! Returned literals are either registered atomic formulas or their negation */ Expr vc_getImpliedLiteral(VC vc); //! Simplify e with respect to the current context Expr vc_simplify(VC vc, Expr e); //! Check validity of e in the current context. /*! Possible results are: 0 = invalid, 1 = valid, 2 = abort, 3 = unknown, * -100 = exception (type error, internal error, etc). * If the result is 1, then the resulting context is the same as * the starting context. If the result is 0 or 3, then the resulting * context is a context in which e is false (though the context may be * inconsistent in the case of an unknown result). e must have Boolean * type. In the case of a result of -100, refer to vc_get_error_string() * to see what went wrong. */ int vc_query(VC vc, Expr e); //! Get the next model /*! This method should only be called after a query which returns 0. Its return values are as for vc_query(). */ int vc_checkContinue(VC vc); //! Restart the most recent query with e as an additional assertion. /*! This method should only be called after a query which returns 0. Its return values are as for vc_query(). */ int vc_restart(VC vc, Expr e); //! Returns to context immediately before last invalid query. /*! This method should only be called after a query which returns 0. */ void vc_returnFromCheck(VC vc); //! Get assumptions made by the user in this and all previous contexts. /*! User assumptions are created either by calls to assertFormula or by a * call to query. In the latter case, the negated query is added as an * assumption. The caller is responsible for freeing the array when * finished with it. */ Expr* vc_getUserAssumptions(VC vc, int* size); //! Get assumptions made internally in this and all previous contexts. /*! Internal assumptions are literals assumed by the sat solver. * The caller is responsible for freeing the array when finished with it by * calling vc_deleteVector. */ Expr* vc_getInternalAssumptions(VC vc, int* size); //! Get all assumptions made in this and all previous contexts. /*! * The caller is responsible for freeing the array when finished with it by * calling vc_deleteVector. */ Expr* vc_getAssumptions(VC vc, int* size); //yeting, for proof translation, get the assumptions used. //the assumptions used are different from the user assumptions. //the assumptions used are preprocessed if 'preprocess' is ena Expr vc_getProofAssumptions(VC vc); //yeting, for proof translation, Expr vc_getProofQuery(VC vc); //! Returns the set of assumptions used in the proof of queried formula. /*! It returns a subset of getAssumptions(). If the last query was false * or there has not yet been a query, it does nothing. * The caller is responsible for freeing the array when finished with it by * calling vc_deleteVector. */ Expr* vc_getAssumptionsUsed(VC vc, int* size); //! Return the counterexample after a failed query. /*! This method should only be called after a query which returns * false. It will try to return the simplest possible set of * assertions which are sufficient to make the queried expression * false. The caller is responsible for freeing the array when finished with * it by calling vc_deleteVector. */ Expr* vc_getCounterExample(VC vc, int* size); //! Will assign concrete values to all user created variables /*! This function should only be called after a query which return false. * Returns an array of Exprs with size *size. * The caller is responsible for freeing the array when finished with it by * calling vc_deleteVector. */ Expr* vc_getConcreteModel(VC vc, int* size); // Returns true if the current context is inconsistent. /*! Also returns a minimal set of assertions used to determine the * inconsistency. The caller is responsible for freeing the array when finished * with it by calling vc_deleteVector. */ int vc_inconsistent(VC vc, Expr** assumptions, int* size); //! Returns non-NULL if the invalid result from last query() is imprecise /*! * The return value is filled with the reasons for incompleteness (it * is intended to be shown to the end user). The caller is responsible for * freeing the string returned by calling vc_deleteString. */ char* vc_incomplete(VC vc); //! Returns the proof for the last proven query Expr vc_getProof(VC vc); //! Returns the proof of a .cvc file, if it is valid. Expr vc_getProofOfFile(VC vc, char * filename); //! Returns the TCC of the last assumption or query /*! Returns Null Expr if no assumptions or queries were performed. */ Expr vc_getTCC(VC vc); //! Return the set of assumptions used in the proof of the last TCC /*! The caller is responsible for freeing the array when finished with it by * calling vc_deleteVector. */ Expr* vc_getAssumptionsTCC(VC vc, int* size); //! Returns the proof of TCC of the last assumption or query /*! Returns Null Expr if no assumptions or queries were performed. */ Expr vc_getProofTCC(VC vc); //! After successful query, return its closure |- Gamma => phi /*! Turn a valid query Gamma |- phi into an implication * |- Gamma => phi. * * Returns Null Expr if last query was invalid. */ Expr vc_getClosure(VC vc); //! Construct a proof of the query closure |- Gamma => phi /*! Returns Null if last query was Invalid. */ Expr vc_getProofClosure(VC vc); //! Returns the current stack level. Initial level is 0. int vc_stackLevel(VC vc); //! Checkpoint the current context and increase the scope level void vc_push(VC vc); //! Restore the current context to its state at the last checkpoint void vc_pop(VC vc); //! Restore the current context to the given stackLevel. /*! stackLevel must be less than or equal to the current stack level. */ void vc_popto(VC vc, int stackLevel); //! Get the current context Context* vc_getCurrentContext(VC vc); /* ---------------------------------------------------------------------- */ /* Util */ /* ---------------------------------------------------------------------- */ // Order //! Compares two expressions /*! If e1 < e2, e1==e2, and e1 > e2, it returns -1, 0, 1 * respectively. A return value of -100 signals an error (refer to * vc_get_error_string() for details). * * Can't be 'compare' because already defined in ocaml */ int vc_compare_exprs(Expr e1,Expr e2); // Printing //! Convert Expr to string char* vc_exprString(Expr e); //! Convert Type to string char* vc_typeString(Type t); // What kind of Expr? int vc_isClosure(Expr e); int vc_isQuantifier(Expr e); int vc_isLambda(Expr e); Expr vc_isVar(Expr e); int vc_arity(Expr e); int vc_getKind(Expr e); Expr vc_getChild(Expr e, int i); int vc_getNumVars(Expr e); Expr vc_getVar(Expr e, int i); Expr vc_getBody(Expr e); Expr vc_getExistential(Expr e); Expr vc_getFun(VC vc, Expr e); Expr vc_toExpr(Type t); //! Translate a kind int to a string const char* vc_getKindString(VC vc,int kind); //! Translate a kind string to an int int vc_getKindInt(VC vc,char* kind_name); //! Return an int from a rational expression int vc_getInt(Expr e); //! Return an int from a constant bitvector expression int vc_getBVInt(VC vc, Expr e); //! Return an unsigned int from a constant bitvector expression unsigned int vc_getBVUnsigned(VC vc, Expr e); // Debug int vc_get_error_status(); void vc_reset_error_status(); char* vc_get_error_string(); //! Print statistics void vc_print_statistics(VC vc); #endif cvc4-1.5/src/bindings/compat/c/c_interface_defs.h000066400000000000000000000024521313116454100217250ustar00rootroot00000000000000/*****************************************************************************/ /*! * \file c_interface_defs.h * * Author: Clark Barrett * * Created: Thu Jun 5 13:16:26 2003 * *
* * License to use, copy, modify, sell and/or distribute this software * and its documentation for any purpose is hereby granted without * royalty, subject to the terms and conditions defined in the \ref * COPYING file provided with this distribution. * *
* */ /*****************************************************************************/ #include "cvc4_public.h" #ifndef _cvc3__include__c_interface_defs_h_ #define _cvc3__include__c_interface_defs_h_ //#include "kinds.h" #ifdef CVC3_STRONG_TYPING typedef struct _cvc_VC *VC; typedef struct _cvc_Context *Context; typedef struct _cvc_ExprManager *ExprManager; typedef struct _cvc_Flags *Flags; typedef struct _cvc_Expr * Expr; typedef struct _cvc_Op * Op; typedef struct _cvc_Type* Type; #else //This gives absolutely no static pointer typing. typedef void* VC; typedef void* Context; typedef void* ExprManager; typedef void* Flags; typedef void* Expr; typedef void* Op; typedef void* Type; typedef void* Proof; #endif #endif cvc4-1.5/src/bindings/compat/java/000077500000000000000000000000001313116454100170055ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/java/Cvc3_manifest000066400000000000000000000000561313116454100214150ustar00rootroot00000000000000Main-Class: cvc3/Cvc3 Class-Path: libcvc3.jar cvc4-1.5/src/bindings/compat/java/Makefile.am000066400000000000000000000074471313116454100210550ustar00rootroot00000000000000# LIBCVC4BINDINGS_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4BINDINGS_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/../../.. -I@srcdir@/../../../include -I@srcdir@/../../.. \ -I@builddir@/cvc3 -I@srcdir@/include/cvc3 AM_CXXFLAGS = -Wall -Wno-unused-variable javadatadir = $(datadir)/java javalibdir = $(libdir)/jni javadata_DATA = javalib_LTLIBRARIES= BUILT_SOURCES = if CVC4_LANGUAGE_BINDING_JAVA javalib_LTLIBRARIES += libcvc4compatjni.la javadata_DATA += CVC4compat.jar libcvc4compatjni_la_LDFLAGS = \ -module \ -shrext $(CVC4_JAVA_MODULE_EXT) \ -version-info $(LIBCVC4BINDINGS_VERSION) libcvc4compatjni_la_LIBADD = \ @builddir@/../../../compat/libcvc4compat.la \ @builddir@/../../../libcvc4.la BUILT_SOURCES += $(JNI_CPP_FILES) endif # source files # java files of the library wrapper LIB_FILES = \ Cvc3Exception \ TypecheckException \ SoundException \ EvalException \ CLException \ ParserException \ SmtlibException \ DebugException \ Embedded \ EmbeddedManager \ InputLanguage \ QueryResult \ SatResult \ FormulaValue \ Expr \ ExprMut \ ExprManager \ ExprManagerMut \ Type \ TypeMut \ Op \ OpMut \ Rational \ RationalMut \ Theorem \ TheoremMut \ Proof \ ProofMut \ Context \ ContextMut \ Flag \ Flags \ FlagsMut \ Statistics \ StatisticsMut \ ValidityChecker # java files of the test program TEST_FILES = Test # java files of the stand alone program PROG_FILES = TimeoutHandler Cvc3 # all java files, library and stand alone JAVA_FILES = JniUtils $(LIB_FILES) $(TEST_FILES) $(PROG_FILES) # generated files JNI_CPP_FILES = \ EmbeddedManager.cpp \ Expr.cpp \ ExprMut.cpp \ ExprManager.cpp \ ValidityChecker.cpp # Type.cpp \ # TypeMut.cpp \ # Op.cpp \ # OpMut.cpp \ # Rational.cpp \ # RationalMut.cpp \ # Theorem.cpp \ # TheoremMut.cpp \ # Proof.cpp \ # ProofMut.cpp \ # Context.cpp \ # ContextMut.cpp \ # Flag.cpp \ # Flags.cpp \ # FlagsMut.cpp \ # Statistics.cpp \ # StatisticsMut.cpp \ # non-generated files SRC_CPP_FILES = src/cvc3/JniUtils.cpp # all cpp files (to compile) CPP_FILES = $(SRC_CPP_FILES) $(JNI_CPP_FILES) dist_libcvc4compatjni_la_SOURCES = $(SRC_CPP_FILES) include/cvc3/JniUtils.h nodist_libcvc4compatjni_la_SOURCES = $(JNI_CPP_FILES) EXTRA_DIST = \ formula_value.h \ create_impl.py \ Cvc3_manifest \ $(JNI_CPP_FILES:%.cpp=src/cvc3/%_impl.cpp) \ $(JAVA_FILES:%=src/cvc3/%.java) # compile each cpp file $(JNI_CPP_FILES): %.cpp: src/cvc3/%_impl.cpp $(builddir)/cvc3/%.h include/cvc3/JniUtils.h $(AM_V_GEN)$(PYTHON) $(srcdir)/create_impl.py \ cvc3/$*.h \ $(srcdir)/src/cvc3/$*_impl.cpp \ $*.cpp JniUtils.lo: src/cvc3/JniUtils.cpp .headers $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_INCLUDES) $(JAVA_CPPFLAGS) -I . -o $@ $< %.lo: %.cpp .headers $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_INCLUDES) $(JAVA_CPPFLAGS) -I . -o $@ $< $(LIB_FILES:%=classes/cvc3/%.class) classes/cvc3/JniUtils.class: .classes .classes: $(AM_V_GEN)mkdir -p classes && $(JAVAC) -source 1.4 -target 1.4 -sourcepath $(srcdir)/src -d classes $(LIB_FILES:%=$(srcdir)/src/cvc3/%.java) @touch .classes .headers: $(LIB_FILES:%=cvc3/%.h) @touch .headers $(LIB_FILES:%=cvc3/%.h): %.h: classes/%.class .cvc3dir $(AM_V_GEN)$(JAVAH) -jni -force -classpath classes -o $@ cvc3.$(@:cvc3/%.h=%) .cvc3dir: @mkdir -p cvc3 && touch $@ CVC4compat.jar: $(LIB_FILES:%=classes/cvc3/%.class) classes/cvc3/JniUtils.class $(AM_V_GEN)$(JAR) cf $@ -C classes . clean-local: rm -fr classes cvc3 MOSTLYCLEANFILES = .cvc3dir .classes .headers CVC4compat.jar $(JNI_CPP_FILES) cvc4-1.5/src/bindings/compat/java/Makefile.in000066400000000000000000001006121313116454100210520ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_1 = libcvc4compatjni.la @CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_2 = CVC4compat.jar @CVC4_LANGUAGE_BINDING_JAVA_TRUE@am__append_3 = $(JNI_CPP_FILES) subdir = src/bindings/compat/java ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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; }; \ } am__installdirs = "$(DESTDIR)$(javalibdir)" "$(DESTDIR)$(javadatadir)" LTLIBRARIES = $(javalib_LTLIBRARIES) @CVC4_LANGUAGE_BINDING_JAVA_TRUE@libcvc4compatjni_la_DEPENDENCIES = @builddir@/../../../compat/libcvc4compat.la \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ @builddir@/../../../libcvc4.la am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = src/cvc3/JniUtils.lo dist_libcvc4compatjni_la_OBJECTS = $(am__objects_1) am__objects_2 = EmbeddedManager.lo Expr.lo ExprMut.lo ExprManager.lo \ ValidityChecker.lo nodist_libcvc4compatjni_la_OBJECTS = $(am__objects_2) libcvc4compatjni_la_OBJECTS = $(dist_libcvc4compatjni_la_OBJECTS) \ $(nodist_libcvc4compatjni_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcvc4compatjni_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libcvc4compatjni_la_LDFLAGS) \ $(LDFLAGS) -o $@ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@am_libcvc4compatjni_la_rpath = \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -rpath $(javalibdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dist_libcvc4compatjni_la_SOURCES) \ $(nodist_libcvc4compatjni_la_SOURCES) DIST_SOURCES = $(dist_libcvc4compatjni_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(javadata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ # LIBCVC4BINDINGS_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4BINDINGS_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4BINDINGSLIB \ -I@builddir@/../../.. -I@srcdir@/../../../include -I@srcdir@/../../.. \ -I@builddir@/cvc3 -I@srcdir@/include/cvc3 AM_CXXFLAGS = -Wall -Wno-unused-variable javadatadir = $(datadir)/java javalibdir = $(libdir)/jni javadata_DATA = $(am__append_2) javalib_LTLIBRARIES = $(am__append_1) BUILT_SOURCES = $(am__append_3) @CVC4_LANGUAGE_BINDING_JAVA_TRUE@libcvc4compatjni_la_LDFLAGS = \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -module \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -shrext $(CVC4_JAVA_MODULE_EXT) \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ -version-info $(LIBCVC4BINDINGS_VERSION) @CVC4_LANGUAGE_BINDING_JAVA_TRUE@libcvc4compatjni_la_LIBADD = \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ @builddir@/../../../compat/libcvc4compat.la \ @CVC4_LANGUAGE_BINDING_JAVA_TRUE@ @builddir@/../../../libcvc4.la # source files # java files of the library wrapper LIB_FILES = \ Cvc3Exception \ TypecheckException \ SoundException \ EvalException \ CLException \ ParserException \ SmtlibException \ DebugException \ Embedded \ EmbeddedManager \ InputLanguage \ QueryResult \ SatResult \ FormulaValue \ Expr \ ExprMut \ ExprManager \ ExprManagerMut \ Type \ TypeMut \ Op \ OpMut \ Rational \ RationalMut \ Theorem \ TheoremMut \ Proof \ ProofMut \ Context \ ContextMut \ Flag \ Flags \ FlagsMut \ Statistics \ StatisticsMut \ ValidityChecker # java files of the test program TEST_FILES = Test # java files of the stand alone program PROG_FILES = TimeoutHandler Cvc3 # all java files, library and stand alone JAVA_FILES = JniUtils $(LIB_FILES) $(TEST_FILES) $(PROG_FILES) # generated files JNI_CPP_FILES = \ EmbeddedManager.cpp \ Expr.cpp \ ExprMut.cpp \ ExprManager.cpp \ ValidityChecker.cpp # Type.cpp \ # TypeMut.cpp \ # Op.cpp \ # OpMut.cpp \ # Rational.cpp \ # RationalMut.cpp \ # Theorem.cpp \ # TheoremMut.cpp \ # Proof.cpp \ # ProofMut.cpp \ # Context.cpp \ # ContextMut.cpp \ # Flag.cpp \ # Flags.cpp \ # FlagsMut.cpp \ # Statistics.cpp \ # StatisticsMut.cpp \ # non-generated files SRC_CPP_FILES = src/cvc3/JniUtils.cpp # all cpp files (to compile) CPP_FILES = $(SRC_CPP_FILES) $(JNI_CPP_FILES) dist_libcvc4compatjni_la_SOURCES = $(SRC_CPP_FILES) include/cvc3/JniUtils.h nodist_libcvc4compatjni_la_SOURCES = $(JNI_CPP_FILES) EXTRA_DIST = \ formula_value.h \ create_impl.py \ Cvc3_manifest \ $(JNI_CPP_FILES:%.cpp=src/cvc3/%_impl.cpp) \ $(JAVA_FILES:%=src/cvc3/%.java) MOSTLYCLEANFILES = .cvc3dir .classes .headers CVC4compat.jar $(JNI_CPP_FILES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/compat/java/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/compat/java/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-javalibLTLIBRARIES: $(javalib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(javalib_LTLIBRARIES)'; test -n "$(javalibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(javalibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(javalibdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(javalibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(javalibdir)"; \ } uninstall-javalibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(javalib_LTLIBRARIES)'; test -n "$(javalibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(javalibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(javalibdir)/$$f"; \ done clean-javalibLTLIBRARIES: -test -z "$(javalib_LTLIBRARIES)" || rm -f $(javalib_LTLIBRARIES) @list='$(javalib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } src/cvc3/$(am__dirstamp): @$(MKDIR_P) src/cvc3 @: > src/cvc3/$(am__dirstamp) src/cvc3/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/cvc3/$(DEPDIR) @: > src/cvc3/$(DEPDIR)/$(am__dirstamp) src/cvc3/JniUtils.lo: src/cvc3/$(am__dirstamp) \ src/cvc3/$(DEPDIR)/$(am__dirstamp) libcvc4compatjni.la: $(libcvc4compatjni_la_OBJECTS) $(libcvc4compatjni_la_DEPENDENCIES) $(EXTRA_libcvc4compatjni_la_DEPENDENCIES) $(AM_V_CXXLD)$(libcvc4compatjni_la_LINK) $(am_libcvc4compatjni_la_rpath) $(libcvc4compatjni_la_OBJECTS) $(libcvc4compatjni_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/cvc3/*.$(OBJEXT) -rm -f src/cvc3/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EmbeddedManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Expr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExprManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExprMut.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ValidityChecker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/cvc3/$(DEPDIR)/JniUtils.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf src/cvc3/.libs src/cvc3/_libs install-javadataDATA: $(javadata_DATA) @$(NORMAL_INSTALL) @list='$(javadata_DATA)'; test -n "$(javadatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(javadatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(javadatadir)" || 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)$(javadatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(javadatadir)" || exit $$?; \ done uninstall-javadataDATA: @$(NORMAL_UNINSTALL) @list='$(javadata_DATA)'; test -n "$(javadatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(javadatadir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(javalibdir)" "$(DESTDIR)$(javadatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) 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/cvc3/$(DEPDIR)/$(am__dirstamp) -rm -f src/cvc3/$(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." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-javalibLTLIBRARIES clean-libtool \ clean-local mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) src/cvc3/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-javadataDATA install-javalibLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) src/cvc3/$(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-javadataDATA uninstall-javalibLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-javalibLTLIBRARIES clean-libtool clean-local \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-javadataDATA \ install-javalibLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-javadataDATA \ uninstall-javalibLTLIBRARIES .PRECIOUS: Makefile # compile each cpp file $(JNI_CPP_FILES): %.cpp: src/cvc3/%_impl.cpp $(builddir)/cvc3/%.h include/cvc3/JniUtils.h $(AM_V_GEN)$(PYTHON) $(srcdir)/create_impl.py \ cvc3/$*.h \ $(srcdir)/src/cvc3/$*_impl.cpp \ $*.cpp JniUtils.lo: src/cvc3/JniUtils.cpp .headers $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_INCLUDES) $(JAVA_CPPFLAGS) -I . -o $@ $< %.lo: %.cpp .headers $(AM_V_CXX)$(LTCXXCOMPILE) -c $(JAVA_INCLUDES) $(JAVA_CPPFLAGS) -I . -o $@ $< $(LIB_FILES:%=classes/cvc3/%.class) classes/cvc3/JniUtils.class: .classes .classes: $(AM_V_GEN)mkdir -p classes && $(JAVAC) -source 1.4 -target 1.4 -sourcepath $(srcdir)/src -d classes $(LIB_FILES:%=$(srcdir)/src/cvc3/%.java) @touch .classes .headers: $(LIB_FILES:%=cvc3/%.h) @touch .headers $(LIB_FILES:%=cvc3/%.h): %.h: classes/%.class .cvc3dir $(AM_V_GEN)$(JAVAH) -jni -force -classpath classes -o $@ cvc3.$(@:cvc3/%.h=%) .cvc3dir: @mkdir -p cvc3 && touch $@ CVC4compat.jar: $(LIB_FILES:%=classes/cvc3/%.class) classes/cvc3/JniUtils.class $(AM_V_GEN)$(JAR) cf $@ -C classes . clean-local: rm -fr classes cvc3 # 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: cvc4-1.5/src/bindings/compat/java/create_impl.py000066400000000000000000000347101313116454100216500ustar00rootroot00000000000000#!/usr/bin/env python import sys import os import re ### output cpp file # qualifiers: # c : embedded constant # m : embedded mutable # n : native # plus: # v : vector # vv : vector vector # vvv : vector vector vector # types: # - native: void, bool, int, string # - objects: the rest def is_native(arg_qual): return (arg_qual[0] == 'n') def is_mutable(arg_qual): return (arg_qual[0] == 'm') def is_const(arg_qual): return (arg_qual[0] == 'c') def forall(p, s): for x in s: if not p(s): return False return True def check_arg_qual(arg_qual): return \ (is_native(arg_qual) or is_mutable(arg_qual) or is_const(arg_qual)) \ and \ forall(lambda q: q == 'v', arg_qual[1:]) def is_vector(arg_qual): return (len(arg_qual) > 1 and arg_qual[1] == 'v') def is_vector2(arg_qual): return (is_vector(arg_qual) and len(arg_qual) > 2 and arg_qual[2] == 'v') def is_vector3(arg_qual): return (is_vector2(arg_qual) and len(arg_qual) > 3 and arg_qual[3] == 'v') # returns the jni type corresponding to the pseudo type signature def arg_type_to_java((arg_qual, arg_type, arg_name)): check_arg_qual(arg_qual); if arg_type == "jobject": if (not is_native(arg_qual)) or is_vector(arg_qual): print("Error: native defined in implementation with qualifier: " + arg_qual) sys.exit(1) return "jobject" elif arg_type == "bool": if not is_native(arg_qual): print("Error: bool defined in implementation with qualifier: " + arg_qual) sys.exit(1) if is_vector(arg_qual): return "jbooleanArray" else: return "jboolean" elif arg_type == "int": if not is_native(arg_qual): print("Error: int defined in implementation with qualifier: " + arg_qual) sys.exit(1) if is_vector(arg_qual): return "jintArray" else: return "jint" elif arg_type == "string": if not is_native(arg_qual): print("Error: string defined in implementation with qualifier: " + arg_qual) sys.exit(1) if is_vector(arg_qual): return "jobjectArray" else: return "jstring" else: if is_vector(arg_qual): return "jobjectArray" else: return "jobject" def print_unembed_arg(cpp_file, (arg_qual, arg_type, arg_name)): check_arg_qual(arg_qual); if arg_type == "jobject": () elif arg_type == "bool": if is_vector3(arg_qual): cpp_file.write(" vector > > " + arg_name \ + "(toCppVVV(env, j" + arg_name + "));\n"); elif is_vector2(arg_qual): cpp_file.write(" vector > " + arg_name \ + "(toCppVV(env, j" + arg_name + "));\n"); elif is_vector(arg_qual): cpp_file.write(" vector " + arg_name \ + "(toCppV(env, j" + arg_name + "));\n"); else: cpp_file.write(" bool " + arg_name + "(j" + arg_name + ");\n"); elif arg_type == "int": if is_vector3(arg_qual): cpp_file.write(" vector > > " + arg_name \ + "(toCppVVV(env, j" + arg_name + "));\n"); elif is_vector2(arg_qual): cpp_file.write(" vector > " + arg_name \ + "(toCppVV(env, j" + arg_name + "));\n"); elif is_vector(arg_qual): cpp_file.write(" vector " + arg_name \ + "(toCppV(env, j" + arg_name + "));\n"); else: cpp_file.write(" int " + arg_name + "(j" + arg_name + ");\n"); elif arg_type == "string": if is_vector3(arg_qual): cpp_file.write(" vector > > " + arg_name \ + "(toCppVVV(env, j" + arg_name + "));\n"); elif is_vector2(arg_qual): cpp_file.write(" vector > " + arg_name \ + "(toCppVV(env, j" + arg_name + "));\n"); elif is_vector(arg_qual): cpp_file.write(" vector " + arg_name \ + "(toCppV(env, j" + arg_name + "));\n"); else: cpp_file.write(" string " + arg_name + "(toCpp(env, j" + arg_name + "));\n"); else: if is_vector3(arg_qual): cpp_file.write(" vector > > " + arg_name \ + "(toCppVVV<" + arg_type + ">(env, j" + arg_name + "));\n"); elif is_vector2(arg_qual): cpp_file.write(" vector > " + arg_name \ + "(toCppVV<" + arg_type + ">(env, j" + arg_name + "));\n"); elif is_vector(arg_qual): cpp_file.write(" vector<" + arg_type + "> " + arg_name \ + "(toCppV<" + arg_type + ">(env, j" + arg_name + "));\n"); elif is_const(arg_qual): cpp_file.write(" const " + arg_type + "* " + arg_name \ + " = unembed_const<" + arg_type + ">(env, j" + arg_name + ");\n"); else: cpp_file.write(" " + arg_type + "* " + arg_name \ + " = unembed_mut<" + arg_type + ">(env, j" + arg_name + ");\n"); def print_unembed_args(cpp_file, args): for arg in args: print_unembed_arg(cpp_file, arg) # check hat declaration and definition signatures match def match_signatures((decl_result, decl_args), (def_result, def_args, _)): if decl_result != def_result or len(decl_args) != len(def_args): return False for i in xrange(0, len(decl_args)): java_type = arg_type_to_java(def_args[i]) #print java_type if decl_args[i] != java_type: return False return True def print_header(cpp_file, includes): cpp_file.writelines(map(lambda name: "#include " + name + "\n", includes)) cpp_file.writelines( [ "#include \"JniUtils.h\"\n", "\n", "using namespace std;\n", "using namespace Java_cvc3_JniUtils;\n", "using namespace CVC3;\n", "\n" ]) def print_signature(cpp_file, name, result, args): arg_strings = ["JNIEnv* env", "jclass"] arg_strings.extend( \ map(lambda (argQual, argType, argName): \ arg_type_to_java((argQual, argType, argName)) \ + " j" + argName, args)) cpp_file.writelines([ "JNIEXPORT " + result + " JNICALL " + name + "\n", "(" + ", ".join(arg_strings) + ")\n"]) def print_definition(cpp_file, name, (result, args, body)): cpp_file.writelines(["extern \"C\"\n"]) print_signature(cpp_file, name, result, args) cpp_file.writelines([ "{\n", " try {\n"]) print_unembed_args(cpp_file, args) cpp_file.writelines([ " " + " ".join(body), " } catch (const Exception& e) {\n", " toJava(env, e);\n"]) if result in [ "jobject", "jobjectArray", "jstring" ]: cpp_file.writelines([" return NULL;\n"]) elif result == "jboolean": cpp_file.writelines([" return false;\n"]) elif result == "jint": cpp_file.writelines([" return -1;\n"]) elif result <> "void": print("BUG: return type " + result + " is not handled in print_definition") sys.exit(1) cpp_file.writelines([" };\n", "}\n\n"]) def print_cpp(cpp_name, declarations, definitions, includes): try: cpp_file = open(cpp_name, 'w') print_header(cpp_file, includes) #names = declarations.keys() #names.sort() for name in declarations[0]: if not definitions.has_key(name): #continue print("Error: " + name + " is declared in header" \ + " but not defined in implementation.") sys.exit(1) declaration = declarations[1][name] definition = definitions[name] definitions.pop(name) if not match_signatures(declaration, definition): print("Error: signature for " + name \ + " in definition and implementation do not match:") print declaration print (definition[0], definition[1]) sys.exit(1) print_definition(cpp_file, name, definition) if not len(definitions) == 0: print("Error: found definitions in implementation" \ " without declaration in header file:") print definitions sys.exit(1) except IOError, (error_nr, error_string): print ("Couldn't open " + cpp_name + ": " + error_string) sys.exit(0) ### header file function declarations # header file function declaration: # - name: function name # - result: result type # - args: list of argument types, except for the first two (JNIEnv*, jclass) def register_declaration(declarations, name, result, args): assert(not declarations[1].has_key(name)); declarations[0].append(name) declarations[1][name] = (result, args) # extract function signatures from generated JNI header file def read_header(header_name): # 0.: names of declared functions in same order as in input # 1.: map from names to signature declarations = ([], {}) try: header_file = open(header_name) line = header_file.readline() while (line): # look for start of signature # declaration will look like: # JNIEXPORT JNICALL (JNIENV *env, jclass, jobject); # with an optional linebreak before the parameter list, and # perhaps missing the "env" if re.search("^JNIEXPORT", line): # extract name and return type elements = re.sub('[,();]+',' ',line).split(); assert(elements[0] == "JNIEXPORT"); assert(elements[2] == "JNICALL"); name = elements[3] result = elements[1] # If there are no more elements on this line, # read and tokenize the next line if len(elements) > 4: elements = elements[4:] else: line = header_file.readline () elements = re.sub('[,();]+',' ',line).split(); # extract argument types assert(elements[0] == "JNIEnv"); assert(elements[1] == "*" or elements[1] == "*env"); assert(elements[2] == "jclass") args = elements[3:] register_declaration(declarations, name, result, args) line = header_file.readline () header_file.close() except IOError, (error_nr, error_string): print ("Couldn't open " + header_name + ": " + error_string) sys.exit(0) return declarations # function definitions: # cpp file function definition: # - name: function name # - result: result type # - args: list of pairs of argument types and argument names, # except for the first two (JNIEnv*, jclass) def register_definition(definitions, name, result, args, body): if definitions.has_key(name): print("Error: redefinition of " + name + " in implementation.") sys.exit(1) definitions[name] = (result, args, body) #print_definition(name, declarations[name]) # extract function definition from implementation file def read_impl(impl_name): definitions = {} includes = [] try: impl_file = open(impl_name) line = impl_file.readline() while (line): # look for include if re.search("^INCLUDE:", line): elements = line.split(); assert(len(elements) == 2); assert(elements[0] == "INCLUDE:") includes.append(elements[1]) line = impl_file.readline() #print line # look for start of definition elif re.search("^DEFINITION:", line): #print line, # get name elements = line.split(); if not (len(elements) == 2): print("Error: misformed signature: " + line) sys.exit(1) assert(elements[0] == "DEFINITION:") name = elements[1] # get signature line = impl_file.readline () elements = line.split(); assert(len(elements) > 0); if not (len(elements) % 3 == 1): print("Error: misformed signature for: " + name) print(line) sys.exit(1) result = elements.pop(0) args = [] while len(elements) > 0: argQual = elements.pop(0) argType = elements.pop(0) argName = elements.pop(0) args.append((argQual, argType, argName)) # get body body = [] line = impl_file.readline () while line and not re.search("^DEFINITION:", line): body.append(line) line = impl_file.readline() while body and body[len(body) - 1] == "\n": body.pop(len(body) - 1) assert(len(body) > 0) register_definition(definitions, name, result, args, body) else: line = impl_file.readline() impl_file.close() except IOError, (error_nr, error_string): print ("Couldn't open " + impl_name + ": " + error_string) sys.exit(0) return definitions, includes # read name of input file if (len(sys.argv) != 4): print("Expected path to header, implementation, and target file.") print("") print("./create_impl.py ") sys.exit(0) else: #print(sys.argv) header_name = sys.argv[1] impl_name = sys.argv[2] cpp_file = sys.argv[3] # extract information from header declarations = read_header(header_name) #print declarations # extract information from template definitions, includes = read_impl(impl_name) #print definitions # create implementation print_cpp(cpp_file, declarations, definitions, includes) cvc4-1.5/src/bindings/compat/java/formula_value.h000066400000000000000000000017321313116454100220220ustar00rootroot00000000000000/*****************************************************************************/ /*! *\file formula_value.h *\brief enumerated type for value of formulas * * Author: Alexander Fuchs * * Created: Fri Dec 07 08:00:00 2007 * *
* * License to use, copy, modify, sell and/or distribute this software * and its documentation for any purpose is hereby granted without * royalty, subject to the terms and conditions defined in the \ref * LICENSE file provided with this distribution. * *
*/ /*****************************************************************************/ #ifndef _cvc3__include__formulavalue_h_ #define _cvc3__include__formulavalue_h_ namespace CVC3 { /*****************************************************************************/ /* * Type for truth value of formulas. */ /*****************************************************************************/ typedef enum FormulaValue { TRUE_VAL, FALSE_VAL, UNKNOWN_VAL } FormulaValue; } #endif cvc4-1.5/src/bindings/compat/java/include/000077500000000000000000000000001313116454100204305ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/java/include/cvc3/000077500000000000000000000000001313116454100212665ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/java/include/cvc3/JniUtils.h000066400000000000000000000220211313116454100231750ustar00rootroot00000000000000#ifndef _java__cvc3__jni_utils_h_ #define _java__cvc3__jni_utils_h_ #include #include #include #include #include "compat/cvc3_compat.h" //#include "vcl.h" //#include "hash_map.h" //#include "exception.h" #define DebugAssert(cond, str) assert(cond) namespace Java_cvc3_JniUtils { /// Embedding of c++ objects in java objects // generic delete function for any type T template class DeleteEmbedded { public: static void deleteEmbedded(void* cobj) { delete (T*) cobj; } }; typedef void (*TDeleteEmbedded)(void*); // Encapsulates a c++ object so that: // - (un)embedding casting is type safe // - deallocation is automatic (if needed) // This has probably quit a bit of overhead, because now for each // wrapper object (even if only a temporary reference) an instance // of Embedded is created. // But considering the above two benefits it should be worth it // because it should simplify maintenance quite a bit, // as changes in the cvc API should lead to assertion failures // instead of strange bugs. class Embedded { private: // the actual embedded c++ object, // as void* to make Embedded independent of its type void* d_cobj; // the type info of d_cobj, // to make sure that later unembeddings are type safe // actually only needed in debugging, so might be guarded with IF_DEBUG const std::type_info& d_typeInfo; // the type correct delete function for d_cobj, // or NULL if this embedding is merely a reference // and not responsible for its deallocation TDeleteEmbedded d_delete; public: Embedded(void* cobj, const std::type_info& ti, TDeleteEmbedded del) : d_cobj(cobj), d_typeInfo(ti), d_delete(del) { assert(d_cobj != NULL); } ~Embedded() { assert(d_cobj != NULL); if (d_delete != NULL) d_delete(d_cobj); } const void* getCObj() const { return d_cobj; } const std::type_info& getType() const { return d_typeInfo; } }; // embed functions // embeds a c++ object of type T into a jobject // by first wrapping it into an Embedded object. template jobject embed(JNIEnv* env, T* cobj, const std::type_info& ti, TDeleteEmbedded del) { DebugAssert(cobj != NULL, "JniUtils::embed: null object given"); Embedded* embedded = new Embedded((void*)cobj, ti, del); return (jobject)env->NewDirectByteBuffer(embedded, sizeof(Embedded)); } // embeds a constant reference to a c++ object into a jobject template jobject embed_const_ref(JNIEnv* env, const T* cobj) { DebugAssert(cobj != NULL, "JniUtils::embed_const: null object given"); return embed(env, (T*) cobj, typeid(cobj), NULL); } // embeds a mutable reference to a c++ object into a jobject template jobject embed_mut_ref(JNIEnv* env, T* cobj) { DebugAssert(cobj != NULL, "JniUtils::embed_mut_ref: null object given"); return embed(env, (T*) cobj, typeid(cobj), NULL); } // embeds a fresh copy of a (probably temporary) c++ object into a jobject template jobject embed_copy(JNIEnv* env, const T& cobj) { DebugAssert(&cobj != NULL, "JniUtils::embed_copy: null object given"); T* copy = new T(cobj); assert(copy != NULL); return embed(env, copy, typeid(copy), &DeleteEmbedded::deleteEmbedded); } // embeds a c++ object into a jobject, // and takes over the responsibility to deallocate it template jobject embed_own(JNIEnv* env, T* cobj) { DebugAssert(cobj != NULL, "JniUtils::embed_own: null object given"); return embed(env, cobj, typeid(cobj), &DeleteEmbedded::deleteEmbedded); } // unembed functions // extract Embedded* from a jobject Embedded* unembed(JNIEnv* env, jobject jobj); // extract a constant c++ object of type T from a jobject template const T* unembed_const(JNIEnv* env, jobject jobj) { Embedded* embedded = unembed(env, jobj); return (const T*) embedded->getCObj(); } // extract a mutable c++ object of type T from a jobject template T* unembed_mut(JNIEnv* env, jobject jobj) { Embedded* embedded = unembed(env, jobj); // check that the wrapped object is not const DebugAssert(embedded->getType() == typeid(T*), "JniUtils::unembed_mut: type mismatch"); return (T*) embedded->getCObj(); } // delete embedded // delete the Embedded object contained in a jobject, // and also destruct the wrapped c++ object if necessary. void deleteEmbedded(JNIEnv* env, jobject jobj); /// Conversions between c++ and java // bool bool toCpp(jboolean j); // string jstring toJava(JNIEnv* env, const std::string& cstring); jstring toJava(JNIEnv* env, const char* cstring); std::string toCpp(JNIEnv* env, const jstring& string); // enums jstring toJava(JNIEnv* env, CVC3::QueryResult result); jstring toJava(JNIEnv* env, CVC3::FormulaValue result); jstring toJava(JNIEnv* env, CVC3::InputLanguage result); CVC3::InputLanguage toCppInputLanguage(JNIEnv* env, const std::string& lang); // exceptions void toJava(JNIEnv* env, const CVC3::Exception& e); // vectors template jobjectArray toJavaVCopy(JNIEnv* env, const std::vector& v) { jobjectArray jarray = (jobjectArray) env->NewObjectArray( v.size(), env->FindClass("java/lang/Object"), NULL); for (size_t i = 0; i < v.size(); ++i) { env->SetObjectArrayElement(jarray, i, embed_copy(env, v[i])); } return jarray; } template jobjectArray toJavaVConstRef(JNIEnv* env, const std::vector& v) { jobjectArray jarray = (jobjectArray) env->NewObjectArray( v.size(), env->FindClass("java/lang/Object"), NULL); for (size_t i = 0; i < v.size(); ++i) { env->SetObjectArrayElement(jarray, i, embed_const_ref(env, &v[i])); } return jarray; } template jobjectArray toJavaVVConstRef(JNIEnv* env, const std::vector >& v) { jobjectArray jarray = (jobjectArray) env->NewObjectArray(v.size(), env->FindClass("[Ljava/lang/Object;"), NULL); for (size_t i = 0; i < v.size(); ++i) { env->SetObjectArrayElement(jarray, i, toJavaVConstRef(env, v[i])); } return jarray; } template std::vector toCppV(JNIEnv* env, const jobjectArray& jarray) { std::vector v; int length = env->GetArrayLength(jarray); for (int i = 0; i < length; ++i) { v.push_back(*unembed_const(env, env->GetObjectArrayElement(jarray, i))); } return v; } template std::vector > toCppVV(JNIEnv* env, const jobjectArray& jarray) { std::vector > v; int length = env->GetArrayLength(jarray); for (int i = 0; i < length; ++i) { jobjectArray jsub = static_cast(env->GetObjectArrayElement(jarray, i)); v.push_back(toCppV(env, jsub)); } return v; } template std::vector > > toCppVVV(JNIEnv* env, const jobjectArray& jarray) { std::vector > > v; int length = env->GetArrayLength(jarray); for (int i = 0; i < length; ++i) { jobjectArray jsub = static_cast(env->GetObjectArrayElement(jarray, i)); v.push_back(toCppVV(env, jsub)); } return v; } // string vectors std::vector toCppV(JNIEnv* env, const jobjectArray& jarray); std::vector > toCppVV(JNIEnv* env, const jobjectArray& jarray); std::vector > > toCppVVV(JNIEnv* env, const jobjectArray& jarray); jobjectArray toJavaV(JNIEnv* env, const std::vector& v); // primitive vectors std::vector toCppV(JNIEnv* env, const jbooleanArray& jarray); // hash map /*template jobjectArray toJavaHCopy(JNIEnv* env, const Hash::hash_map& hm) { jobjectArray jarray = (jobjectArray) env->NewObjectArray( hm.size() * 2, env->FindClass("java/lang/Object"), NULL); int i = 0; typename Hash::hash_map::const_iterator it; for (it = hm.begin(); it != hm.end(); ++it) { assert(i < env->GetArrayLength(jarray)); env->SetObjectArrayElement(jarray, i, embed_copy(env, it->first)); ++i; assert(i < env->GetArrayLength(jarray)); env->SetObjectArrayElement(jarray, i, embed_copy(env, it->second)); ++i; } return jarray; }*/ template jobjectArray toJavaHCopy(JNIEnv* env, const CVC3::ExprMap& hm) { jobjectArray jarray = (jobjectArray) env->NewObjectArray( hm.size() * 2, env->FindClass("java/lang/Object"), NULL); int i = 0; typename CVC3::ExprMap::const_iterator it; for (it = hm.begin(); it != hm.end(); ++it) { assert(i < env->GetArrayLength(jarray)); env->SetObjectArrayElement(jarray, i, embed_copy(env, it->first)); ++i; assert(i < env->GetArrayLength(jarray)); env->SetObjectArrayElement(jarray, i, embed_copy(env, it->second)); ++i; } return jarray; } } #endif cvc4-1.5/src/bindings/compat/java/src/000077500000000000000000000000001313116454100175745ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/java/src/cvc3/000077500000000000000000000000001313116454100204325ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/java/src/cvc3/CLException.java000066400000000000000000000003501313116454100234500ustar00rootroot00000000000000package cvc3; import java.util.*; /** mirrors CVC3::CLException */ class CLException extends Cvc3Exception { private final static long serialVersionUID = 1L; public CLException(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Context.java000066400000000000000000000004001313116454100227130ustar00rootroot00000000000000package cvc3; import java.util.*; public class Context extends Embedded { // jni methods /// Constructor public Context(Object Context, EmbeddedManager embeddedManager) { super(Context, embeddedManager); } /// API (immutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/ContextMut.java000066400000000000000000000004631313116454100234120ustar00rootroot00000000000000package cvc3; import java.util.*; public class ContextMut extends Context { // jni methods /// Constructor // create embedded object public ContextMut(Object ContextMut, EmbeddedManager embeddedManager) { super(ContextMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/Cvc3.java000066400000000000000000000151751313116454100221040ustar00rootroot00000000000000package cvc3; import java.util.*; class Cvc3 { static boolean useObjManager = false; static void timeoutHandler(Object o) { System.out.println("self-timeout."); System.exit(1); } public static void main(String args[]) throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); // parse input String fileName = ""; try { fileName = parse_args(args, flags); } catch(CLException e) { System.err.print("*** " + e); System.err.println("\n\nRun with -help option for usage information."); System.exit(1); } // Set the timeout, if given in the command line options int timeout = flags.getFlag("timeout").getInt(); if (timeout > 0) { new Timer().schedule(new TimeoutHandler(), timeout * 1000); } /* * Create and run the validity checker */ // Debugging code may throw an exception vc = ValidityChecker.create(flags); flags.delete(); // -h flag sets "help" to false (+h would make it true, but that's // not what the user normally types in). if(!vc.getFlags().getFlag("help").getBool()) { String programName = "cvc3"; //:TODO: printUsage(vc.getFlags(), programName); System.exit(0); } // Similarly, -version sets the flag "version" to false if(!vc.getFlags().getFlag("version").getBool()) { System.out.println("This is CVC3 version " + "UNKNOWN"); //:TODO: System.out.println("Copyright (C) 2003-2006 by the Board of Trustees of Leland Stanford Junior"); System.out.println("University, New York University, and the University of Iowa."); System.out.println(); System.out.print("THIS SOFTWARE PROVIDED AS-IS, WITHOUT ANY WARRANTIES. "); System.out.println("USE IT AT YOUR OWN RISK."); System.out.println(); System.exit(0); } // Test if the output language is correctly specified; if not, an // exception will be thrown vc.getExprManager().getOutputLanguage(); // Read the input file vc.loadFile(fileName, vc.getExprManager().getInputLanguage()); // Print statistics if (vc.getFlags().getFlag("stats").getBool()) { vc.printStatistics(); } } catch (Cvc3Exception e) { System.err.println("*** Fatal exception: " + e); System.exit(1); } finally { if (flags != null) flags.delete(); if (vc != null) vc.delete(); } // to avoid waiting for timer to finish System.exit(0); } // evaluates command line flags, returns problem file name public static String parse_args(String[] args, FlagsMut flags) throws Cvc3Exception { // keep track that exactly one file name is given String fileName = ""; boolean seenFileName = false; // iterate over the arguments for (int i = 0; i < args.length; ++i) { String arg = args[i]; // A command-line option if (arg.startsWith("-") || arg.startsWith("+")) { List names = flags.getFlags(arg.substring(1)); // no match if (names.size() == 0) throw new CLException(arg + " does not match any known option"); // ambiguous else if (names.size() > 1) { StringBuffer s = new StringBuffer(); s.append(arg + " is ambiguous. Possible matches are:\n"); for (Iterator name = names.iterator(); name.hasNext(); ) { s.append(" " + name.next() + "\n"); } throw new CLException(s.toString()); } // Single match; process the option by name, type, and parameters else { String name = (String) names.iterator().next(); boolean val = arg.startsWith("+"); Flag flag = flags.getFlag(name); if (flag.isBool()) { flags.setFlag(name, val); } else if (flag.isInt()) { ++i; if (i >= args.length) throw new CLException (arg + " (-" + name + ") expects an integer argument."); int parameter = Integer.parseInt(args[i]); flags.setFlag(name, parameter); } else if (flag.isString()) { ++i; if (i >= args.length) throw new CLException (arg + " (-" + name + ") expects a string argument."); flags.setFlag(name, args[i]); } // else if (flag.isStringVec()) // { // bool hasMore = iter.MoveNext(); // if (!hasMore) // { // throw new CLException // (arg + " (-" + name + ") expects a string argument."); // } // flags.setFlag(name, (string)iter.Current, val); // } else { throw new CLException("parse_args: Bad flag : " + name); } } } // no flag, so should be a file name // second no flag argument else if(seenFileName) { throw new CLException("More than one file name given: " + fileName + " and " + arg); } // first no flag argument else { fileName = arg; seenFileName = true; } } return fileName; } public static void printUsage(Flags flags, String programName) throws Cvc3Exception { System.out.println("Usage: " + programName + " [options]"); System.out.println(programName + " will read the input from STDIN and "); System.out.println("print the result on STDOUT."); System.out.println("Boolean (b) options are set 'on' by +option and 'off' by -option"); System.out.println("(for instance, +sat or -sat)."); System.out.println("Integer (i), string (s) and vector (v) options "); System.out.println("require a parameter, e.g. -width 80"); System.out.println("Also, (v) options can appear multiple times setting args on and off,"); System.out.println("as in +trace \"enable this\" -trace \"disable that\"."); System.out.println("Option names can be abbreviated to the shortest unambiguous prefix."); System.out.println(); System.out.println("The options are:"); // Get all the names of options (they all match the empty string) List names = flags.getFlags(""); for (Iterator i = names.iterator(); i.hasNext(); ) { String name = (String) i.next(); Flag flag = flags.getFlag(name); String prefix = ""; if (flag.isNull()) { prefix = " (null)"; } else if (flag.isBool()) { String enabled = flag.getBool() ? "+" : "-"; prefix = " (b) " + enabled + name; } else if (flag.isInt()) { prefix = " (i) -" + name + " " + flag.getInt(); } else if (flag.isString()) { prefix = " (s) -" + name + " " + flag.getString(); } else if (flag.isStringVec()) { prefix = " (s) -" + name; } else { assert(false); } while (prefix.length() < 21) { prefix += " "; } System.out.println(prefix + " " + flag.getHelp()); } System.out.println(); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Cvc3Exception.java000066400000000000000000000003401313116454100237470ustar00rootroot00000000000000package cvc3; /** mirrors CVC3::Exception */ public class Cvc3Exception extends RuntimeException { private final static long serialVersionUID = 1L; public Cvc3Exception(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/DebugException.java000066400000000000000000000003701313116454100242020ustar00rootroot00000000000000package cvc3; import java.util.*; /** mirrors CVC3::DebugException */ public class DebugException extends Cvc3Exception { private final static long serialVersionUID = 1L; public DebugException(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Embedded.java000066400000000000000000000056641313116454100230010ustar00rootroot00000000000000package cvc3; import java.util.*; import java.io.*; /** Wrapper for a c++ object as a java Object. see README for details on garbage collection, i.e. interplay of delete, finalize, and EmbeddedManager to destruct the embedded c++ object. */ public abstract class Embedded { // load jni c++ library static { System.loadLibrary("cvc4"); System.loadLibrary("cvc4parser"); System.loadLibrary("cvc4compatjni"); /* // for debugging: stop here by waiting for a key press, // and attach c++ debugger System.out.println("Loadded cvc3jni"); try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br.readLine(); } catch (IOException ioe) { } */ } /// Attributes // embedded object protected Object d_embedded; // embedded object manager private final EmbeddedManager d_embeddedManager; /// Constructor // initialize with embedded object and EmbeddedManager // if EmbeddedManager is null then delete must be called before // Embedded is garbage collected protected Embedded(Object Embedded, EmbeddedManager embeddedManager) { //System.out.println("Create: Embedded"); assert(Embedded != null); d_embedded = Embedded; d_embeddedManager = embeddedManager; } // access to embedded c++ object public synchronized Object embedded() { return d_embedded; } // access to EmbeddedManager (might be null if none used) public EmbeddedManager embeddedManager() { return d_embeddedManager; } // check if already destructed // (or queued for destruction in embeddedManager) public synchronized boolean isDeleted() { return (d_embedded == null); } // delete embedded object or enqueue it for deletion public synchronized void delete() throws Cvc3Exception { if (isDeleted()) return; // no embedded manager, so should be in main thread: // destruct right away if (d_embeddedManager == null) { EmbeddedManager.jniDelete(d_embedded); } // could be in finalizer, so queue in embeddedManager; // unless the embeddedManager is already deleted, // then its (and this') ValidityChecker has been delete. // assuming this is an Expr or a Theorem it's embedded object // has then already been deleted as well. else { synchronized(d_embeddedManager) { if (!d_embeddedManager.isDeleted()) { d_embeddedManager.register(this); } } } d_embedded = null; } // ensure that delete is called if finalization occurs public void finalize() throws Throwable { try { // no embeddedManager, so deleted should have been called if (d_embeddedManager == null) { if (d_embedded != null) { assert(false); // System.out.println("Embedded.Finalizer: should never be called"); throw new Error("Embedded.Finalizer: should never be called"); } } else if (!d_embeddedManager.isDeleted()) { delete(); } } finally { super.finalize(); } } } cvc4-1.5/src/bindings/compat/java/src/cvc3/EmbeddedManager.java000066400000000000000000000040761313116454100242700ustar00rootroot00000000000000package cvc3; import java.util.*; /** Helps to enforce deallocation of a set of embedded objects See also Embedded.java Cvc3 requires on the C++ level that the ValidityChecker is destructed last, after all other Cvc3 objects (i.e. subclasses of Embedded). A 'simple' (but not too cheap) way to achieve this effect of deterministic deallocation in Java without introducing much error prone code is to register all embedded objects (except for the ValidityChecker) with an EmbeddedManager. When the ValidityChecker is deleted/finalized it uses the EmbeddedManager to destruct all other Cvc3 objects first. */ public class EmbeddedManager { // jni methods // call the destructor of the c++ object public static native void jniDelete(Object Embedded) throws Cvc3Exception; // c++ objects which have been registered for deletion private List d_deleted; /// Constructor // delete must be called before EmbeddedManager is garbage collected public EmbeddedManager() { d_deleted = new ArrayList(); } /// Methods // true iff delete has been called public synchronized boolean isDeleted() { return (d_deleted == null); } // signals that the ValidityChecker destructs itself public synchronized void delete() throws Cvc3Exception { d_deleted = null; } // registers a c++ object for deletion public synchronized void register(Embedded embedded) { d_deleted.add(embedded.embedded()); } // destruct all registered objects public synchronized void cleanUp() throws Cvc3Exception { assert(!isDeleted()); Iterator i = d_deleted.iterator(); while (i.hasNext()) { jniDelete(i.next()); } d_deleted.clear(); } // ensure that all embedded objects are deallocated eventually public void finalize() throws Throwable { try { if (!isDeleted()) { assert(false); // System.out.println("EmbeddedManager.Finalizer: should never be called"); throw new Error("EmbeddedManager.Finalizer: should never be called"); } } finally { super.finalize(); } } } cvc4-1.5/src/bindings/compat/java/src/cvc3/EmbeddedManager_impl.cpp000066400000000000000000000001361313116454100251430ustar00rootroot00000000000000DEFINITION: Java_cvc3_EmbeddedManager_jniDelete void n jobject obj deleteEmbedded(env, jobj); cvc4-1.5/src/bindings/compat/java/src/cvc3/EvalException.java000066400000000000000000000003651313116454100240470ustar00rootroot00000000000000package cvc3; import java.util.*; /** mirrors CVC3::EvalException */ public class EvalException extends Cvc3Exception { private final static long serialVersionUID = 1L; public EvalException(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Expr.java000066400000000000000000000400021313116454100222070ustar00rootroot00000000000000package cvc3; import java.util.*; public class Expr extends Embedded { // jni methods private static native boolean jniEquals(Object Expr1, Object Expr2) throws Cvc3Exception; private static native String jniToString(Object Expr) throws Cvc3Exception; private static native void jniPrint(Object Expr, String InputLanguage, boolean dagify) throws Cvc3Exception; private static native int jniHash(Object Expr) throws Cvc3Exception; private static native String jniGetKind(Object Expr) throws Cvc3Exception; private static native boolean jniIsFalse(Object Expr) throws Cvc3Exception; private static native boolean jniIsTrue(Object Expr) throws Cvc3Exception; private static native boolean jniIsBoolConst(Object Expr) throws Cvc3Exception; private static native boolean jniIsVar(Object Expr) throws Cvc3Exception; private static native boolean jniIsBoundVar(Object Expr) throws Cvc3Exception; private static native boolean jniIsString(Object Expr) throws Cvc3Exception; private static native boolean jniIsClosure(Object Expr) throws Cvc3Exception; private static native boolean jniIsQuantifier(Object Expr) throws Cvc3Exception; private static native boolean jniIsLambda(Object Expr) throws Cvc3Exception; private static native boolean jniIsApply(Object Expr) throws Cvc3Exception; private static native boolean jniIsSymbol(Object Expr) throws Cvc3Exception; private static native boolean jniIsTheorem(Object Expr) throws Cvc3Exception; private static native boolean jniIsType(Object Expr) throws Cvc3Exception; private static native boolean jniIsTerm(Object Expr) throws Cvc3Exception; private static native boolean jniIsAtomic(Object Expr) throws Cvc3Exception; private static native boolean jniIsAtomicFormula(Object Expr) throws Cvc3Exception; private static native boolean jniIsAbsAtomicFormula(Object Expr) throws Cvc3Exception; private static native boolean jniIsLiteral(Object Expr) throws Cvc3Exception; private static native boolean jniIsAbsLiteral(Object Expr) throws Cvc3Exception; private static native boolean jniIsBoolConnective(Object Expr) throws Cvc3Exception; private static native boolean jniIsPropAtom(Object Expr) throws Cvc3Exception; private static native boolean jniIsPropLiteral(Object Expr) throws Cvc3Exception; private static native boolean jniIsArrayLiteral(Object Expr) throws Cvc3Exception; private static native boolean jniIsEq(Object Expr) throws Cvc3Exception; private static native boolean jniIsNot(Object Expr) throws Cvc3Exception; private static native boolean jniIsAnd(Object Expr) throws Cvc3Exception; private static native boolean jniIsOr(Object Expr) throws Cvc3Exception; private static native boolean jniIsITE(Object Expr) throws Cvc3Exception; private static native boolean jniIsIff(Object Expr) throws Cvc3Exception; private static native boolean jniIsImpl(Object Expr) throws Cvc3Exception; private static native boolean jniIsXor(Object Expr) throws Cvc3Exception; private static native boolean jniIsForall(Object Expr) throws Cvc3Exception; private static native boolean jniIsExists(Object Expr) throws Cvc3Exception; private static native boolean jniIsRational(Object Expr) throws Cvc3Exception; private static native boolean jniIsUminus(Object Expr) throws Cvc3Exception; private static native boolean jniIsPlus(Object Expr) throws Cvc3Exception; private static native boolean jniIsMinus(Object Expr) throws Cvc3Exception; private static native boolean jniIsMult(Object Expr) throws Cvc3Exception; private static native boolean jniIsPow(Object Expr) throws Cvc3Exception; private static native boolean jniIsDivide(Object Expr) throws Cvc3Exception; private static native boolean jniIsLt(Object Expr) throws Cvc3Exception; private static native boolean jniIsLe(Object Expr) throws Cvc3Exception; private static native boolean jniIsGt(Object Expr) throws Cvc3Exception; private static native boolean jniIsGe(Object Expr) throws Cvc3Exception; private static native boolean jniIsSkolem(Object Expr) throws Cvc3Exception; private static native boolean jniIsRead(Object Expr) throws Cvc3Exception; private static native boolean jniIsWrite(Object Expr) throws Cvc3Exception; private static native String jniGetName(Object Expr) throws Cvc3Exception; private static native String jniGetUid(Object Expr) throws Cvc3Exception; private static native String jniGetString(Object Expr) throws Cvc3Exception; private static native Object[] jniGetVars(Object Expr) throws Cvc3Exception; private static native Object jniGetExistential(Object Expr) throws Cvc3Exception; private static native int jniGetBoundIndex(Object Expr) throws Cvc3Exception; private static native Object jniGetBody(Object Expr) throws Cvc3Exception; private static native Object jniGetRational(Object Expr) throws Cvc3Exception; private static native Object[][] jniGetTriggers(Object Expr) throws Cvc3Exception; private static native Object jniGetTheorem(Object Expr) throws Cvc3Exception; private static native Object jniGetType(Object Expr) throws Cvc3Exception; private static native Object jniMkOp(Object Expr) throws Cvc3Exception; private static native Object jniGetOp(Object Expr) throws Cvc3Exception; private static native Object jniGetOpExpr(Object Expr) throws Cvc3Exception; private static native boolean jniIsNull(Object Expr) throws Cvc3Exception; private static native int jniArity(Object Expr) throws Cvc3Exception; private static native Object jniGetKid(Object Expr, int i) throws Cvc3Exception; private static native Object[] jniGetKids(Object Expr) throws Cvc3Exception; private static native Object jniSubstExpr(Object Expr, Object[] oldExprs, Object[] newExprs) throws Cvc3Exception; private static native boolean jniIsBvLt(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvLe(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvGt(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvGe(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvPlus(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvSub(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvConst(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvExtract(Object Expr) throws Cvc3Exception; private static native boolean jniIsBvConcat(Object Expr) throws Cvc3Exception; /// Constructor public Expr(Object Expr, EmbeddedManager embeddedManager) { super(Expr, embeddedManager); } /// API (immutable) // 'Problem' with equals/hashCode: // this is based on the wrapped c++ expressions. // as a consequence two Expr objects are equal iff // the wrapped expression is equal, // and are indistinguishable for example in a HashMap. public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Expr)) return false; boolean result = false; try { result = jniEquals(embedded(), ((Embedded)o).embedded()); } catch (Cvc3Exception e) { assert(false); } return result; } // must return the same hash code for two objects if equals returns true public int hashCode() { try { if (!jniIsNull(embedded())) { return jniHash(embedded()); } } catch (Cvc3Exception e) { assert(false); } assert(false); return 0; } public Expr subst(List oldExprs, List newExprs) throws Cvc3Exception { assert(JniUtils.listInstanceof(oldExprs, Expr.class)); assert(JniUtils.listInstanceof(newExprs, Expr.class)); return new Expr(jniSubstExpr(embedded(), JniUtils.unembedList(oldExprs), JniUtils.unembedList(newExprs)), embeddedManager()); } public String toString() { String result = ""; try { result = jniToString(embedded()); } catch (Cvc3Exception e) { assert(false); } return result; } public void print(InputLanguage lang, boolean dagify) throws Cvc3Exception { jniPrint(embedded(), lang.toString(), dagify); } public void print(boolean dagify) throws Cvc3Exception { print(InputLanguage.PRESENTATION, dagify); } public void print() throws Cvc3Exception { print(false); } public String getKind() throws Cvc3Exception { return jniGetKind(embedded()); } // Core expression testers public boolean isFalse() throws Cvc3Exception { return jniIsFalse(embedded()); } public boolean isTrue() throws Cvc3Exception { return jniIsTrue(embedded()); } public boolean isBooleanConst() throws Cvc3Exception { return jniIsBoolConst(embedded()); } public boolean isVar() throws Cvc3Exception { return jniIsVar(embedded()); } public boolean isBoundVar() throws Cvc3Exception { return jniIsBoundVar(embedded()); } public boolean isString() throws Cvc3Exception { return jniIsString(embedded()); } public boolean isClosure() throws Cvc3Exception { return jniIsClosure(embedded()); } public boolean isQuantifier() throws Cvc3Exception { return jniIsQuantifier(embedded()); } public boolean isLambda() throws Cvc3Exception { return jniIsLambda(embedded()); } public boolean isApply() throws Cvc3Exception { return jniIsApply(embedded()); } public boolean isSymbol() throws Cvc3Exception { return jniIsSymbol(embedded()); } public boolean isTheorem() throws Cvc3Exception { return jniIsTheorem(embedded()); } public boolean isType() throws Cvc3Exception { return jniIsType(embedded()); } public boolean isTerm() throws Cvc3Exception { return jniIsTerm(embedded()); } public boolean isAtomic() throws Cvc3Exception { return jniIsAtomic(embedded()); } public boolean isAtomicFormula() throws Cvc3Exception { return jniIsAtomicFormula(embedded()); } public boolean isAbsAtomicFormula() throws Cvc3Exception { return jniIsAbsAtomicFormula(embedded()); } public boolean isLiteral() throws Cvc3Exception { return jniIsLiteral(embedded()); } public boolean isAbsLiteral() throws Cvc3Exception { return jniIsAbsLiteral(embedded()); } public boolean isBoolConnective() throws Cvc3Exception { return jniIsBoolConnective(embedded()); } public boolean isPropAtom() throws Cvc3Exception { return jniIsPropAtom(embedded()); } public boolean isPropLiteral() throws Cvc3Exception { return jniIsPropLiteral(embedded()); } public boolean isArrayLiteral() throws Cvc3Exception { return jniIsArrayLiteral(embedded()); } public boolean isEq() throws Cvc3Exception { return jniIsEq(embedded()); } public boolean isNot() throws Cvc3Exception { return jniIsNot(embedded()); } public boolean isAnd() throws Cvc3Exception { return jniIsAnd(embedded()); } public boolean isOr() throws Cvc3Exception { return jniIsOr(embedded()); } public boolean isITE() throws Cvc3Exception { return jniIsITE(embedded()); } public boolean isIff() throws Cvc3Exception { return jniIsIff(embedded()); } public boolean isImpl() throws Cvc3Exception { return jniIsImpl(embedded()); } public boolean isXor() throws Cvc3Exception { return jniIsXor(embedded()); } public boolean isForall() throws Cvc3Exception { return jniIsForall(embedded()); } public boolean isExists() throws Cvc3Exception { return jniIsExists(embedded()); } public boolean isRational() throws Cvc3Exception { return jniIsRational(embedded()); } public boolean isUminus() throws Cvc3Exception { return jniIsUminus(embedded()); } public boolean isPlus() throws Cvc3Exception { return jniIsPlus(embedded()); } public boolean isMinus() throws Cvc3Exception { return jniIsMinus(embedded()); } public boolean isMult() throws Cvc3Exception { return jniIsMult(embedded()); } public boolean isPow() throws Cvc3Exception { return jniIsPow(embedded()); } public boolean isDivide() throws Cvc3Exception { return jniIsDivide(embedded()); } public boolean isLt() throws Cvc3Exception { return jniIsLt(embedded()); } public boolean isLe() throws Cvc3Exception { return jniIsLe(embedded()); } public boolean isGt() throws Cvc3Exception { return jniIsGt(embedded()); } public boolean isGe() throws Cvc3Exception { return jniIsGe(embedded()); } public boolean isSkolem() throws Cvc3Exception { return jniIsSkolem(embedded()); } public boolean isRead() throws Cvc3Exception { return jniIsRead(embedded()); } public boolean isWrite() throws Cvc3Exception { return jniIsWrite(embedded()); } public boolean isBvLe() throws Cvc3Exception { return jniIsBvLe(embedded()); } public boolean isBvLt() throws Cvc3Exception { return jniIsBvLt(embedded()); } public boolean isBvGe() throws Cvc3Exception { return jniIsBvGe(embedded()); } public boolean isBvGt() throws Cvc3Exception { return jniIsBvGt(embedded()); } public boolean isBvPlus() throws Cvc3Exception { return jniIsBvPlus(embedded()); } public boolean isBvSub() throws Cvc3Exception { return jniIsBvSub(embedded()); } public boolean isBvConstant() throws Cvc3Exception { return jniIsBvConst(embedded()); } public boolean isBvConcat() throws Cvc3Exception { return jniIsBvConcat(embedded()); } public boolean isBvExtract() throws Cvc3Exception { return jniIsBvExtract(embedded()); } public String getName() throws Cvc3Exception { assert(!jniIsNull(embedded())); return jniGetName(embedded()); } public String getUid() throws Cvc3Exception { assert(jniIsBoundVar(embedded())); return jniGetUid(embedded()); } public String getString() throws Cvc3Exception { assert(jniIsString(embedded())); return jniGetString(embedded()); } public List getVars() throws Cvc3Exception { assert(jniIsClosure(embedded())); Object[] vars = jniGetVars(embedded()); return JniUtils.embedList(vars, Expr.class, embeddedManager()); } public List getTriggers() throws Cvc3Exception { assert (jniIsClosure(embedded())); return JniUtils.embedListList(jniGetTriggers(embedded()), Expr.class, embeddedManager()); } public Expr getExistential() throws Cvc3Exception { assert(jniIsSkolem(embedded())); return new Expr(jniGetExistential(embedded()), embeddedManager()); } public int getBoundIndex() throws Cvc3Exception { assert(jniIsSkolem(embedded())); return jniGetBoundIndex(embedded()); } public Expr getBody() throws Cvc3Exception { assert(jniIsClosure(embedded())); return new Expr(jniGetBody(embedded()), embeddedManager()); } public Rational getRational() throws Cvc3Exception { assert(isRational()); return new Rational(jniGetRational(embedded()), embeddedManager()); } public Theorem getTheorem() throws Cvc3Exception { assert(jniIsTheorem(embedded())); return new Theorem(jniGetTheorem(embedded()), embeddedManager()); } public TypeMut getType() throws Cvc3Exception { return new TypeMut(jniGetType(embedded()), embeddedManager()); } public OpMut mkOp() throws Cvc3Exception { return new OpMut(jniMkOp(embedded()), embeddedManager()); } public OpMut getOp() throws Cvc3Exception { return new OpMut(jniGetOp(embedded()), embeddedManager()); } public ExprMut getOpExpr() throws Cvc3Exception { return new ExprMut(jniGetOpExpr(embedded()), embeddedManager()); } public boolean isNull() throws Cvc3Exception { return jniIsNull(embedded()); } public int arity() throws Cvc3Exception { return jniArity(embedded()); } public Expr getChild(int i) throws Cvc3Exception { assert(i >= 0 && i < arity()); return new Expr(jniGetKid(embedded(), i), embeddedManager()); } public List getChildren() throws Cvc3Exception { return JniUtils.embedList(jniGetKids(embedded()), Expr.class, embeddedManager()); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/ExprManager.java000066400000000000000000000013341313116454100235070ustar00rootroot00000000000000package cvc3; import java.util.*; public class ExprManager extends Embedded { // jni methods private static native String jniGetInputLanguage(Object ExprManager) throws Cvc3Exception; private static native String jniGetOutputLanguage(Object ExprManager) throws Cvc3Exception; /// Constructor public ExprManager(Object ExprManager, EmbeddedManager embeddedManager) { super(ExprManager, embeddedManager); } /// API (immutable) public InputLanguage getInputLanguage() throws Cvc3Exception { return InputLanguage.get(jniGetInputLanguage(embedded())); } public InputLanguage getOutputLanguage() throws Cvc3Exception { return InputLanguage.get(jniGetOutputLanguage(embedded())); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/ExprManagerMut.java000066400000000000000000000004341313116454100241750ustar00rootroot00000000000000package cvc3; import java.util.*; public class ExprManagerMut extends ExprManager { // jni methods /// Constructor public ExprManagerMut(Object ExprManagerMut, EmbeddedManager embeddedManager) { super(ExprManagerMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/ExprManager_impl.cpp000066400000000000000000000004251313116454100243710ustar00rootroot00000000000000DEFINITION: Java_cvc3_ExprManager_jniGetInputLanguage jstring c ExprManager exprManager return toJava(env, exprManager->getInputLang()); DEFINITION: Java_cvc3_ExprManager_jniGetOutputLanguage jstring c ExprManager exprManager return toJava(env, exprManager->getOutputLang()); cvc4-1.5/src/bindings/compat/java/src/cvc3/ExprMut.java000066400000000000000000000004441313116454100227030ustar00rootroot00000000000000package cvc3; import java.util.*; public class ExprMut extends Expr { // jni methods /// Constructor // create embedded object public ExprMut(Object ExprMut, EmbeddedManager embeddedManager) { super(ExprMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/ExprMut_impl.cpp000066400000000000000000000000001313116454100235510ustar00rootroot00000000000000cvc4-1.5/src/bindings/compat/java/src/cvc3/Expr_impl.cpp000066400000000000000000000167301313116454100231040ustar00rootroot00000000000000//INCLUDE: //INCLUDE: //INCLUDE: //INCLUDE: DEFINITION: Java_cvc3_Expr_jniEquals jboolean c Expr expr1 c Expr expr2 return *expr1 == *expr2; DEFINITION: Java_cvc3_Expr_jniToString jstring c Expr expr return toJava(env, expr->toString()); DEFINITION: Java_cvc3_Expr_jniPrint void c Expr expr n string lang n bool dagify dagify ? expr->pprint() : expr->pprintnodag(); DEFINITION: Java_cvc3_Expr_jniHash jint c Expr expr return expr->hash(); DEFINITION: Java_cvc3_Expr_jniGetKind jstring c Expr expr return toJava(env, expr->getEM()->getKindName( expr->getKind() )); DEFINITION: Java_cvc3_Expr_jniIsFalse jboolean c Expr expr return expr->isFalse(); DEFINITION: Java_cvc3_Expr_jniIsTrue jboolean c Expr expr return expr->isTrue(); DEFINITION: Java_cvc3_Expr_jniIsBoolConst jboolean c Expr expr return expr->isBoolConst(); DEFINITION: Java_cvc3_Expr_jniIsVar jboolean c Expr expr return expr->isVar(); DEFINITION: Java_cvc3_Expr_jniIsBoundVar jboolean c Expr expr return expr->isBoundVar(); DEFINITION: Java_cvc3_Expr_jniIsString jboolean c Expr expr return expr->isString(); DEFINITION: Java_cvc3_Expr_jniIsClosure jboolean c Expr expr return expr->isClosure(); DEFINITION: Java_cvc3_Expr_jniIsQuantifier jboolean c Expr expr return expr->isQuantifier(); DEFINITION: Java_cvc3_Expr_jniIsLambda jboolean c Expr expr return expr->isLambda(); DEFINITION: Java_cvc3_Expr_jniIsApply jboolean c Expr expr return expr->isApply(); DEFINITION: Java_cvc3_Expr_jniIsSymbol jboolean c Expr expr return expr->isSymbol(); DEFINITION: Java_cvc3_Expr_jniIsTheorem jboolean c Expr expr return expr->isTheorem(); DEFINITION: Java_cvc3_Expr_jniIsType jboolean c Expr expr return expr->isType(); DEFINITION: Java_cvc3_Expr_jniIsTerm jboolean c Expr expr return expr->isTerm(); DEFINITION: Java_cvc3_Expr_jniIsAtomic jboolean c Expr expr return expr->isAtomic(); DEFINITION: Java_cvc3_Expr_jniIsAtomicFormula jboolean c Expr expr return expr->isAtomicFormula(); DEFINITION: Java_cvc3_Expr_jniIsAbsAtomicFormula jboolean c Expr expr return expr->isAbsAtomicFormula(); DEFINITION: Java_cvc3_Expr_jniIsLiteral jboolean c Expr expr return expr->isLiteral(); DEFINITION: Java_cvc3_Expr_jniIsAbsLiteral jboolean c Expr expr return expr->isAbsLiteral(); DEFINITION: Java_cvc3_Expr_jniIsBoolConnective jboolean c Expr expr return expr->isBoolConnective(); DEFINITION: Java_cvc3_Expr_jniIsPropAtom jboolean c Expr expr return expr->isPropAtom(); DEFINITION: Java_cvc3_Expr_jniIsPropLiteral jboolean c Expr expr return expr->isPropLiteral(); DEFINITION: Java_cvc3_Expr_jniIsArrayLiteral jboolean c Expr expr return CVC3::isArrayLiteral(*expr); DEFINITION: Java_cvc3_Expr_jniIsEq jboolean c Expr expr return expr->isEq(); DEFINITION: Java_cvc3_Expr_jniIsNot jboolean c Expr expr return expr->isNot(); DEFINITION: Java_cvc3_Expr_jniIsAnd jboolean c Expr expr return expr->isAnd(); DEFINITION: Java_cvc3_Expr_jniIsOr jboolean c Expr expr return expr->isOr(); DEFINITION: Java_cvc3_Expr_jniIsITE jboolean c Expr expr return expr->isITE(); DEFINITION: Java_cvc3_Expr_jniIsIff jboolean c Expr expr return expr->isIff(); DEFINITION: Java_cvc3_Expr_jniIsImpl jboolean c Expr expr return expr->isImpl(); DEFINITION: Java_cvc3_Expr_jniIsXor jboolean c Expr expr return expr->isXor(); DEFINITION: Java_cvc3_Expr_jniIsForall jboolean c Expr expr return expr->isForall(); DEFINITION: Java_cvc3_Expr_jniIsExists jboolean c Expr expr return expr->isExists(); DEFINITION: Java_cvc3_Expr_jniIsRational jboolean c Expr expr return expr->isRational(); DEFINITION: Java_cvc3_Expr_jniIsUminus jboolean c Expr expr return expr->getKind() == UMINUS; DEFINITION: Java_cvc3_Expr_jniIsPlus jboolean c Expr expr return expr->getKind() == PLUS; DEFINITION: Java_cvc3_Expr_jniIsMinus jboolean c Expr expr return expr->getKind() == MINUS; DEFINITION: Java_cvc3_Expr_jniIsMult jboolean c Expr expr return expr->getKind() == MULT; DEFINITION: Java_cvc3_Expr_jniIsPow jboolean c Expr expr return expr->getKind() == POW; DEFINITION: Java_cvc3_Expr_jniIsDivide jboolean c Expr expr return expr->getKind() == DIVIDE; DEFINITION: Java_cvc3_Expr_jniIsLt jboolean c Expr expr return expr->getKind() == LT; DEFINITION: Java_cvc3_Expr_jniIsLe jboolean c Expr expr return expr->getKind() == LE; DEFINITION: Java_cvc3_Expr_jniIsGt jboolean c Expr expr return expr->getKind() == GT; DEFINITION: Java_cvc3_Expr_jniIsGe jboolean c Expr expr return expr->getKind() == GE; DEFINITION: Java_cvc3_Expr_jniIsSkolem jboolean c Expr expr return expr->isSkolem(); DEFINITION: Java_cvc3_Expr_jniIsRead jboolean c Expr expr return expr->getKind() == READ; DEFINITION: Java_cvc3_Expr_jniIsWrite jboolean c Expr expr return expr->getKind() == WRITE; DEFINITION: Java_cvc3_Expr_jniGetName jstring c Expr expr return toJava(env, expr->getName()); DEFINITION: Java_cvc3_Expr_jniGetUid jstring c Expr expr return toJava(env, expr->getUid()); DEFINITION: Java_cvc3_Expr_jniGetString jstring c Expr expr return toJava(env, expr->getString()); DEFINITION: Java_cvc3_Expr_jniGetVars jobjectArray c Expr expr return toJavaVConstRef(env, expr->getVars()); DEFINITION: Java_cvc3_Expr_jniGetExistential jobject c Expr expr return embed_copy(env, expr->getExistential()); DEFINITION: Java_cvc3_Expr_jniGetBoundIndex jint c Expr expr return expr->getBoundIndex(); DEFINITION: Java_cvc3_Expr_jniGetBody jobject c Expr expr return embed_copy(env, expr->getBody()); DEFINITION: Java_cvc3_Expr_jniGetRational jobject c Expr expr return embed_const_ref(env, &expr->getRational()); DEFINITION: Java_cvc3_Expr_jniGetTriggers jobjectArray c Expr expr return toJavaVVConstRef(env, expr->getTriggers()); DEFINITION: Java_cvc3_Expr_jniGetTheorem jobject c Expr expr return embed_copy(env, expr->getTheorem()); DEFINITION: Java_cvc3_Expr_jniGetType jobject c Expr expr return embed_copy(env, expr->getType()); DEFINITION: Java_cvc3_Expr_jniMkOp jobject c Expr expr return embed_copy(env, expr->mkOp()); DEFINITION: Java_cvc3_Expr_jniGetOp jobject c Expr expr return embed_copy(env, expr->getOp()); DEFINITION: Java_cvc3_Expr_jniGetOpExpr jobject c Expr expr return embed_copy(env, expr->getOpExpr()); DEFINITION: Java_cvc3_Expr_jniIsNull jboolean c Expr expr return expr->isNull(); DEFINITION: Java_cvc3_Expr_jniArity jint c Expr expr return expr->arity(); DEFINITION: Java_cvc3_Expr_jniGetKid jobject c Expr expr n int i return embed_copy(env, (*expr)[ji]); DEFINITION: Java_cvc3_Expr_jniGetKids jobjectArray c Expr expr return toJavaVConstRef(env, expr->getKids()); DEFINITION: Java_cvc3_Expr_jniSubstExpr jobject c Expr e cv Expr oldExprs cv Expr newExprs return embed_copy(env, e->substExpr(oldExprs,newExprs)); DEFINITION: Java_cvc3_Expr_jniIsBvLt jboolean c Expr expr return expr->getKind() == BVLT; DEFINITION: Java_cvc3_Expr_jniIsBvLe jboolean c Expr expr return expr->getKind() == BVLE; DEFINITION: Java_cvc3_Expr_jniIsBvGt jboolean c Expr expr return expr->getKind() == BVGT; DEFINITION: Java_cvc3_Expr_jniIsBvGe jboolean c Expr expr return expr->getKind() == BVGE; DEFINITION: Java_cvc3_Expr_jniIsBvPlus jboolean c Expr expr return expr->getKind() == BVPLUS; DEFINITION: Java_cvc3_Expr_jniIsBvSub jboolean c Expr expr return expr->getKind() == BVSUB; DEFINITION: Java_cvc3_Expr_jniIsBvConst jboolean c Expr expr return expr->getKind() == BVCONST; DEFINITION: Java_cvc3_Expr_jniIsBvExtract jboolean c Expr expr return expr->getKind() == EXTRACT; DEFINITION: Java_cvc3_Expr_jniIsBvConcat jboolean c Expr expr return expr->getKind() == CONCAT; cvc4-1.5/src/bindings/compat/java/src/cvc3/Flag.java000066400000000000000000000033411313116454100221470ustar00rootroot00000000000000package cvc3; import java.util.*; public class Flag extends Embedded { // jni methods private static native boolean jniIsNull(Object Flag) throws Cvc3Exception; private static native boolean jniIsBool(Object Flag) throws Cvc3Exception; private static native boolean jniIsInt(Object Flag) throws Cvc3Exception; private static native boolean jniIsString(Object Flag) throws Cvc3Exception; private static native boolean jniIsStringVec(Object Flag) throws Cvc3Exception; private static native boolean jniGetBool(Object Flag) throws Cvc3Exception; private static native int jniGetInt(Object Flag) throws Cvc3Exception; private static native String jniGetString(Object Flag) throws Cvc3Exception; private static native String jniGetHelp(Object Flag) throws Cvc3Exception; /// Constructor // create embedded object public Flag(Object Flag, EmbeddedManager embeddedManager) { super(Flag, embeddedManager); } /// API immutable boolean isNull() throws Cvc3Exception { return jniIsNull(embedded()); } boolean isBool() throws Cvc3Exception { return jniIsBool(embedded()); } boolean isInt() throws Cvc3Exception { return jniIsInt(embedded()); } boolean isString() throws Cvc3Exception { return jniIsString(embedded()); } boolean isStringVec() throws Cvc3Exception { return jniIsStringVec(embedded()); } boolean getBool() throws Cvc3Exception { return jniGetBool(embedded()); } int getInt() throws Cvc3Exception { return jniGetInt(embedded()); } String getString() throws Cvc3Exception { return jniGetString(embedded()); } String getHelp() throws Cvc3Exception { return jniGetHelp(embedded()); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Flags.java000066400000000000000000000016161313116454100223350ustar00rootroot00000000000000package cvc3; import java.util.*; public abstract class Flags extends Embedded { // jni methods private static native Object[] jniGetFlags(Object Flags, String prefix) throws Cvc3Exception; private static native Object jniGetFlag(Object Flags, String name) throws Cvc3Exception; /// Constructor // create embedded object public Flags(Object Flags, EmbeddedManager embeddedManager) { super(Flags, embeddedManager); } /// API (immutable) // get names of all flags starting with prefix public List getFlags(String prefix) throws Cvc3Exception { Object[] flags = jniGetFlags(embedded(), prefix); assert(flags instanceof String[]); return Arrays.asList(flags); } // get the value of a flag by name (without prefix -/+) public Flag getFlag(String name) throws Cvc3Exception { return new Flag(jniGetFlag(embedded(), name), embeddedManager()); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/FlagsMut.java000066400000000000000000000024341313116454100230220ustar00rootroot00000000000000package cvc3; import java.util.*; public class FlagsMut extends Flags { // jni methods private static native void jniSetFlag1(Object Flags, String name, boolean value) throws Cvc3Exception; private static native void jniSetFlag2(Object Flags, String name, int value) throws Cvc3Exception; private static native void jniSetFlag3(Object Flags, String name, String value) throws Cvc3Exception; private static native void jniSetFlag4(Object Flags, String map, String name, boolean value) throws Cvc3Exception; /// Constructor // create embedded object public FlagsMut(Object FlagsMut, EmbeddedManager embeddedManager) { super(FlagsMut, embeddedManager); } /// API (mutable) public void setFlag(String name, boolean value) throws Cvc3Exception { jniSetFlag1(embedded(), name, value); } public void setFlag(String name, int value) throws Cvc3Exception { jniSetFlag2(embedded(), name, value); } public void setFlag(String name, String value) throws Cvc3Exception { jniSetFlag3(embedded(), name, value); } // flag representing set of options, e.g. trace public void setFlag(String map, String name, boolean value) throws Cvc3Exception { jniSetFlag4(embedded(), map, name, value); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/FormulaValue.java000066400000000000000000000017561313116454100237100ustar00rootroot00000000000000package cvc3; import java.util.*; /** A truth value of a formula. */ public class FormulaValue { private final String d_result; protected FormulaValue(String result) { d_result = result; } // names of c++ enum values public static final FormulaValue TRUE = new FormulaValue("TRUE_VAL"); public static final FormulaValue FALSE = new FormulaValue("FALSE_VAL"); public static final FormulaValue UNKNOWN = new FormulaValue("UNKNOWN_VAL"); // the FormulaValue corresponding to a c++ enum value by name public static FormulaValue get(String value) throws DebugException { if (value.equals(TRUE.toString())) { return TRUE; } else if (value.equals(FALSE.toString())) { return FALSE; } else if (value.equals(UNKNOWN.toString())) { return UNKNOWN; } else { throw new DebugException("FormulaValue.constructor: unknown enum value: " + value); } } // the FormulaValue's c++ enum value public String toString() { return d_result; } } cvc4-1.5/src/bindings/compat/java/src/cvc3/InputLanguage.java000066400000000000000000000020321313116454100240350ustar00rootroot00000000000000package cvc3; import java.util.*; /** See comments about mapping c++ enums to java in QueryResult */ public class InputLanguage { private final String d_lang; private InputLanguage(String lang) { d_lang = lang; } // names of c++ enum values public static final InputLanguage PRESENTATION = new InputLanguage("PRESENTATION"); public static final InputLanguage SMTLIB = new InputLanguage("SMTLIB"); public static final InputLanguage LISP = new InputLanguage("LISP"); // the InputLanguage corresponding to a c++ enum value by name public static InputLanguage get(String value) throws DebugException { if (value.equals(PRESENTATION.toString())) { return PRESENTATION; } else if (value.equals(SMTLIB.toString())) { return SMTLIB; } else if (value.equals(LISP.toString())) { return LISP; } else { throw new DebugException("InputLanguage.constructor: unknown enum value: " + value); } } // the InputLanguage's c++ enum value public String toString() { return d_lang; } } cvc4-1.5/src/bindings/compat/java/src/cvc3/JniUtils.cpp000066400000000000000000000137361313116454100227110ustar00rootroot00000000000000#include "JniUtils.h" // for CVC4: removed; don't need these //#include //#include //#include //#include //#include //#include // for CVC4: need these for compatibility layer #include "compat/cvc3_compat.h" #include "Embedded.h" using namespace std; using namespace CVC3; namespace Java_cvc3_JniUtils { /// Embedding of c++ objects in java objects Embedded* unembed(JNIEnv* env, jobject jobj) { Embedded* embedded = (Embedded*) env->GetDirectBufferAddress(jobj); DebugAssert(embedded != NULL, "JniUtils::unembed: embedded object is NULL"); return embedded; } void deleteEmbedded(JNIEnv* env, jobject jobj) { Embedded* embedded = unembed(env, jobj); DebugAssert(embedded != NULL, "JniUtils::deleteEmbedded: embedded object is NULL"); delete embedded; } /// Conversions between c++ and java bool toCpp(jboolean j) { return (bool)j; } jstring toJava(JNIEnv* env, const string& cstring) { return env->NewStringUTF(cstring.c_str()); } jstring toJava(JNIEnv* env, const char* cstring) { return env->NewStringUTF(cstring); } string toCpp(JNIEnv* env, const jstring& jstring) { const char* cstring = env->GetStringUTFChars(jstring, NULL); string string(cstring); env->ReleaseStringUTFChars(jstring, cstring); return string; } jstring toJava(JNIEnv* env, CVC3::QueryResult result) { switch (result) { case SATISFIABLE: return toJava(env, "SATISFIABLE"); case UNSATISFIABLE: return toJava(env, "UNSATISFIABLE"); case ABORT: return toJava(env, "ABORT"); case UNKNOWN: return toJava(env, "UNKNOWN"); } DebugAssert(false, "JniUtils::toJava(QueryResult): unreachable"); return toJava(env, ""); // to avoid compiler warning } jstring toJava(JNIEnv* env, CVC3::FormulaValue result) { switch (result) { case TRUE_VAL: return toJava(env, "TRUE_VAL"); case FALSE_VAL: return toJava(env, "FALSE_VAL"); case UNKNOWN_VAL: return toJava(env, "UNKNOWN_VAL"); } DebugAssert(false, "JniUtils::toJava(FormulaValue): unreachable"); return toJava(env, "UNDEFINED"); } jstring toJava(JNIEnv* env, CVC3::InputLanguage lang) { switch (lang) { case PRESENTATION_LANG: return toJava(env, "PRESENTATION"); case SMTLIB_LANG: return toJava(env, "SMTLIB"); case SMTLIB_V2_LANG: return toJava(env, "SMTLIB_V2"); //case LISP_LANG: return toJava(env, "LISP"); default: /* fall through */; } DebugAssert(false, "JniUtils::toJava(InputLanguage): unreachable"); return toJava(env, "UNDEFINED"); } InputLanguage toCppInputLanguage(JNIEnv* env, const string& lang) { if (lang.compare("PRESENTATION") == 0) { return PRESENTATION_LANG; } else if (lang.compare("SMTLIB") == 0) { return SMTLIB_LANG; } else if (lang.compare("SMTLIB_V2") == 0) { return SMTLIB_V2_LANG; /* } else if (lang.compare("LISP") == 0) { return LISP_LANG; */ } DebugAssert(false, "JniUtils::toCpp(InputLanguage): unreachable"); return CVC4::language::input::LANG_MAX; } void toJava(JNIEnv* env, const Exception& e) { /* for CVC4: don't worry about legacy exception mapping string exceptionName("cvc3/"); if (dynamic_cast(&e) != NULL) { exceptionName += "TypecheckException"; } else if (dynamic_cast(&e) != NULL) { exceptionName += "SoundException"; } else if (dynamic_cast(&e) != NULL) { exceptionName += "EvalException"; } else if (dynamic_cast(&e) != NULL) { exceptionName += "CLException"; } else if (dynamic_cast(&e) != NULL) { exceptionName += "ParserException"; } else if (dynamic_cast(&e) != NULL) { exceptionName += "SmtlibException"; } else if (dynamic_cast(&e) != NULL) { exceptionName += "DebugException"; } else { exceptionName += "Cvc3Exception"; } */ jclass exceptionClass = env->FindClass("java/lang/RuntimeException"); // queues up the exception in the Java layer env->ThrowNew(exceptionClass, e.toString().c_str()); } vector toCppV(JNIEnv* env, const jobjectArray& jarray) { vector v; int length = env->GetArrayLength(jarray); for (int i = 0; i < length; ++i) { v.push_back(toCpp(env, (jstring)env->GetObjectArrayElement(jarray, i))); } return v; } vector > toCppVV(JNIEnv* env, const jobjectArray& jarray) { vector > v; int length = env->GetArrayLength(jarray); for (int i = 0; i < length; ++i) { jobjectArray jsub = static_cast(env->GetObjectArrayElement(jarray, i)); v.push_back(toCppV(env, jsub)); } return v; } vector > > toCppVVV(JNIEnv* env, const jobjectArray& jarray) { vector > > v; int length = env->GetArrayLength(jarray); for (int i = 0; i < length; ++i) { jobjectArray jsub = static_cast(env->GetObjectArrayElement(jarray, i)); v.push_back(toCppVV(env, jsub)); } return v; } jobjectArray toJavaV(JNIEnv* env, const vector& v) { jobjectArray jarray = (jobjectArray) env->NewObjectArray( v.size(), env->FindClass("java/lang/String"), env->NewStringUTF("")); for(unsigned i = 0; i < v.size(); ++i) { env->SetObjectArrayElement(jarray, i, toJava(env, v[i])); } return jarray; } vector toCppV(JNIEnv* env, const jbooleanArray& jarray) { int length = env->GetArrayLength(jarray); jboolean* jboolean = env->GetBooleanArrayElements(jarray, NULL); vector v; for (int i = 0; i < length; ++i) { v.push_back(jboolean[i]); } env->ReleaseBooleanArrayElements(jarray, jboolean, JNI_ABORT); return v; } } cvc4-1.5/src/bindings/compat/java/src/cvc3/JniUtils.java000066400000000000000000000141361313116454100230430ustar00rootroot00000000000000package cvc3; import java.util.*; import java.lang.reflect.Constructor; public class JniUtils { // check that list is an instance of a class - // generics would avoid that public static boolean listInstanceof(List list, Class c) { Iterator i = list.iterator(); while (i.hasNext()) { if (!(c.isInstance(i.next()))) return false; } return true; } public static boolean listListInstanceof(List listList, Class c) { Iterator i = listList.iterator(); while (i.hasNext()) { Object list = i.next(); assert(list instanceof List); if (!(listInstanceof((List)list, c))) return false; } return true; } public static boolean listListListInstanceof(List listListList, Class c) { Iterator i = listListList.iterator(); while (i.hasNext()) { Object list = i.next(); assert(list instanceof List); if (!(listListInstanceof((List)list, c))) return false; } return true; } // embed an array of c++ objects in a list public static List embedList(Object[] cobjects, Class c, EmbeddedManager embeddedManager) { List embedded = new ArrayList(); try { Class[] argsC = new Class[2]; argsC[0] = Object.class; argsC[1] = EmbeddedManager.class; Constructor constr = c.getConstructor(argsC); Object[] args = new Object[2]; for (int i = 0; i < cobjects.length; ++i) { args[0] = cobjects[i]; args[1] = embeddedManager; embedded.add(constr.newInstance(args)); } } catch (NoSuchMethodException e) { System.out.println(e); assert(false); } catch (InstantiationException e) { System.out.println(e); assert(false); } catch (IllegalAccessException e) { System.out.println(e); assert(false); } catch (java.lang.reflect.InvocationTargetException e) { System.out.println(e); assert(false); } return embedded; } public static List embedListList(Object[][] cobjects, Class c, EmbeddedManager embeddedManager) { List embedded = new ArrayList(cobjects.length); for (int i = 0; i < cobjects.length; ++i) { Object[] cobject = cobjects[i]; embedded.add( embedList(cobject,c,embeddedManager) ); } return embedded; } // embed an array of c++ objects in a hash map public static HashMap embedHashMap(Object[] cobjects, Class ck, Class cv, EmbeddedManager embeddedManager) { HashMap embedded = new HashMap(cobjects.length / 2); try { Class[] argsCK = new Class[2]; argsCK[0] = Object.class; argsCK[1] = EmbeddedManager.class; Constructor constrK = ck.getConstructor(argsCK); Class[] argsCV = new Class[2]; argsCV[0] = Object.class; argsCV[1] = EmbeddedManager.class; Constructor constrV = cv.getConstructor(argsCV); Object[] argsK = new Object[2]; Object[] argsV = new Object[2]; for (int i = 0; i < cobjects.length; ++i) { argsK[0] = cobjects[i]; argsK[1] = embeddedManager; ++i; assert(i < cobjects.length); argsV[0] = cobjects[i]; argsV[1] = embeddedManager; embedded.put(constrK.newInstance(argsK), constrV.newInstance(argsV)); } } catch (NoSuchMethodException e) { System.out.println(e); assert(false); } catch (InstantiationException e) { System.out.println(e); assert(false); } catch (IllegalAccessException e) { System.out.println(e); assert(false); } catch (java.lang.reflect.InvocationTargetException e) { System.out.println(e); assert(false); } return embedded; } // unembed a list of Embedded objects to a list public static Object[] unembedList(List embedded) { Object[] unembedded = new Object[embedded.size()]; for (int i = 0; i < embedded.size(); ++i) { assert(embedded.get(i) instanceof Embedded); unembedded[i] = ((Embedded)embedded.get(i)).embedded(); } return unembedded; } public static Object[][] unembedListList(List embedded) { Object[][] unembedded = new Object[embedded.size()][]; for (int i = 0; i < embedded.size(); ++i) { Object list = embedded.get(i); assert(list instanceof List); unembedded[i] = unembedList((List)list); } return unembedded; } public static Object[][][] unembedListListList(List embedded) { Object[][][] unembedded = new Object[embedded.size()][][]; for (int i = 0; i < embedded.size(); ++i) { Object list = embedded.get(i); assert(list instanceof List); unembedded[i] = unembedListList((List)list); } return unembedded; } // unembed a list of Embedded objects to a list public static Object[] unembedArray(Object[] embedded) { Object[] unembedded = new Object[embedded.length]; for (int i = 0; i < embedded.length; ++i) { assert(embedded[i] instanceof Embedded); unembedded[i] = ((Embedded)embedded[i]).embedded(); } return unembedded; } public static Object[] unembedArrayArray(Object[][] embedded) { Object[] unembedded = new Object[embedded.length]; for (int i = 0; i < embedded.length; ++i) { unembedded[i] = unembedArray(embedded[i]); } return unembedded; } public static Object[] unembedArrayArrayArray(Object[][][] embedded) { Object[] unembedded = new Object[embedded.length]; for (int i = 0; i < embedded.length; ++i) { unembedded[i] = unembedArrayArray(embedded[i]); } return unembedded; } // copy a list of strings to a list public static Object[] toArray(List list) { assert(listInstanceof(list, String.class)); assert(list.isEmpty() || !listInstanceof(list, Embedded.class)); return list.toArray(); } public static Object[] toArrayArray(List listList) { Object[] arrayArray = new Object[listList.size()]; for (int i = 0; i < listList.size(); ++i) { Object list = listList.get(i); assert(list instanceof List); arrayArray[i] = toArray(((List)list)); } return arrayArray; } public static Object[] toArrayArrayArray(List listListList) { Object[] arrayArrayArray = new Object[listListList.size()]; for (int i = 0; i < listListList.size(); ++i) { Object list = listListList.get(i); assert(list instanceof List); arrayArrayArray[i] = toArrayArray((List)list); } return arrayArrayArray; } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Op.java000066400000000000000000000026551313116454100216630ustar00rootroot00000000000000package cvc3; import java.util.*; public class Op extends Embedded { // jni methods private static native boolean jniEquals(Object Expr1, Object Expr2) throws Cvc3Exception; private static native String jniToString(Object Expr) throws Cvc3Exception; private static native Object jniGetExpr(Object op) throws Cvc3Exception; private static native boolean jniIsNull(Object Op) throws Cvc3Exception; /// Constructor public Op(Object Op, EmbeddedManager embeddedManager) { super(Op, embeddedManager); } /// API (immutable) public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Op)) return false; boolean result = false; try { result = jniEquals(embedded(), ((Embedded)o).embedded()); } catch (Cvc3Exception e) { assert(false); } return result; } // must return the same hash code for two objects if equals returns true public int hashCode() { try { return getExpr().hashCode(); } catch (Cvc3Exception e) { assert(false); } return 0; } public String toString() { String result = ""; try { result = jniToString(embedded()); } catch (Cvc3Exception e) { assert(false); } return result; } public ExprMut getExpr() throws Cvc3Exception { return new ExprMut(jniGetExpr(embedded()), embeddedManager()); } public boolean isNull() throws Cvc3Exception { return jniIsNull(embedded()); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/OpMut.java000066400000000000000000000004321313116454100223400ustar00rootroot00000000000000package cvc3; import java.util.*; public class OpMut extends Op { // jni methods /// Constructor // create embedded object public OpMut(Object OpMut, EmbeddedManager embeddedManager) { super(OpMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/ParserException.java000066400000000000000000000003731313116454100244130ustar00rootroot00000000000000package cvc3; import java.util.*; /** mirrors CVC3::ParserException */ public class ParserException extends Cvc3Exception { private final static long serialVersionUID = 1L; public ParserException(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Proof.java000066400000000000000000000003701313116454100223620ustar00rootroot00000000000000package cvc3; import java.util.*; public class Proof extends Embedded { // jni methods /// Constructor public Proof(Object Proof, EmbeddedManager embeddedManager) { super(Proof, embeddedManager); } /// API (immutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/ProofMut.java000066400000000000000000000004511313116454100230500ustar00rootroot00000000000000package cvc3; import java.util.*; public class ProofMut extends Proof { // jni methods /// Constructor // create embedded object public ProofMut(Object ProofMut, EmbeddedManager embeddedManager) { super(ProofMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/QueryResult.java000066400000000000000000000030471313116454100236050ustar00rootroot00000000000000package cvc3; import java.util.*; /** * QueryResult is an enum in Cvc3, but as we have to use java 1.4 we have to * use one of the usual tricks instead of java's Enum. * * To be independent of changes of the actual values of the c++ enum elements * they are passed by name from the JNI interface, so that changing them will * violently break the code (though unfortunately only at runtime). */ public class QueryResult { private final String d_result; private QueryResult(String result) { d_result = result; } // value constants public static final QueryResult INVALID = new QueryResult("INVALID"); public static final QueryResult VALID = new QueryResult("VALID"); public static final QueryResult ABORT = new QueryResult("ABORT"); public static final QueryResult UNKNOWN = new QueryResult("UNKNOWN"); // names of c++ enum values, CVC3 maps INVALID->SAT and VALID->UNSAT private static Map valueMap = new HashMap() { { put("SATISFIABLE", INVALID); put("UNSATISFIABLE", VALID); put("UNKNOWN", UNKNOWN); put("ABORT", ABORT); } public static final long serialVersionUID = 1L; }; // the QueryResult corresponding to a c++ enum value by name public static QueryResult get(String value) throws DebugException { QueryResult queryResult = (QueryResult) valueMap.get(value); if (queryResult == null) { throw new DebugException("QueryResult.constructor: unknown enum value: " + value); } return queryResult; } public String toString() { return d_result; } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Rational.java000066400000000000000000000147361313116454100230610ustar00rootroot00000000000000package cvc3; import java.util.*; public class Rational extends Embedded { // jni methods private static native Object jniRational1(int n, int d) throws Cvc3Exception; private static native Object jniRational2(String n, int base) throws Cvc3Exception; private static native Object jniRational3(String n, String d, int base) throws Cvc3Exception; private static native boolean jniEquals(Object Rational1, Object Rational2) throws Cvc3Exception; private static native String jniToString(Object Rational) throws Cvc3Exception; private static native int jniHash(Object Rational) throws Cvc3Exception; private static native boolean jniIsLe(Object Rational1, Object Rational2) throws Cvc3Exception; private static native boolean jniIsLt(Object Rational1, Object Rational2) throws Cvc3Exception; private static native boolean jniIsGe(Object Rational1, Object Rational2) throws Cvc3Exception; private static native boolean jniIsGt(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniPlus(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniMinus(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniMult(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniDivide(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniMod(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniGetNumerator(Object Rational) throws Cvc3Exception; private static native Object jniGetDenominator(Object Rational) throws Cvc3Exception; private static native boolean jniIsInteger(Object Rational) throws Cvc3Exception; private static native int jniGetInteger(Object Rational) throws Cvc3Exception; private static native Object jniGcd(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniLcm(Object Rational1, Object Rational2) throws Cvc3Exception; private static native Object jniAbs(Object Rational) throws Cvc3Exception; private static native Object jniFloor(Object Rational) throws Cvc3Exception; private static native Object jniCeil(Object Rational) throws Cvc3Exception; /// Constructor public Rational(Object Rational, EmbeddedManager embeddedManager) { super(Rational, embeddedManager); } public Rational(int n, EmbeddedManager embeddedManager) throws Cvc3Exception { this(jniRational1(n, 10), embeddedManager); } public Rational(int n, int d, EmbeddedManager embeddedManager) throws Cvc3Exception { this(jniRational1(n, d), embeddedManager); } public Rational(String n, EmbeddedManager embeddedManager) throws Cvc3Exception { this(jniRational2(n, 10), embeddedManager); } public Rational(String n, int base, EmbeddedManager embeddedManager) throws Cvc3Exception { this(jniRational2(n, base), embeddedManager); } public Rational(String n, String d, EmbeddedManager embeddedManager) throws Cvc3Exception { this(jniRational3(n, d, 10), embeddedManager); } public Rational(String n, String d, int base, EmbeddedManager embeddedManager) throws Cvc3Exception { this(jniRational3(n, d, base), embeddedManager); } /// API (immutable) // 'Problem' with equals/hashCode: // this is based on the wrapped c++ expressions. // as a consequence two Expr objects are equal iff // the wrapped expression is equal, // and are indistinguishable for example in a HashMap. public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Rational)) return false; boolean result = false; try { result = jniEquals(embedded(), ((Embedded)o).embedded()); } catch (Cvc3Exception e) { assert(false); } return result; } // must return the same hash code for two objects if equals returns true public int hashCode() { try { return jniHash(embedded()); } catch (Cvc3Exception e) { assert(false); } assert(false); return 0; } public String toString() { String result = ""; try { result = jniToString(embedded()); } catch (Cvc3Exception e) { assert(false); } return result; } public boolean isLt(Rational r) throws Cvc3Exception { return jniIsLt(embedded(), r.embedded()); } public boolean isLe(Rational r) throws Cvc3Exception { return jniIsLe(embedded(), r.embedded()); } public boolean isGt(Rational r) throws Cvc3Exception { return jniIsGt(embedded(), r.embedded()); } public boolean isGe(Rational r) throws Cvc3Exception { return jniIsGe(embedded(), r.embedded()); } public Rational plus(Rational r) throws Cvc3Exception { return new Rational(jniPlus(embedded(), r.embedded()), embeddedManager()); } public Rational minus(Rational r) throws Cvc3Exception { return new Rational(jniPlus(embedded(), r.embedded()), embeddedManager()); } public Rational mult(Rational r) throws Cvc3Exception { return new Rational(jniPlus(embedded(), r.embedded()), embeddedManager()); } public Rational divide(Rational r) throws Cvc3Exception { return new Rational(jniPlus(embedded(), r.embedded()), embeddedManager()); } public Rational mod(Rational r) throws Cvc3Exception { return new Rational(jniPlus(embedded(), r.embedded()), embeddedManager()); } public Rational getNumerator() throws Cvc3Exception { return new Rational(jniGetNumerator(embedded()), embeddedManager()); } public Rational getDenominator() throws Cvc3Exception { return new Rational(jniGetDenominator(embedded()), embeddedManager()); } public boolean isInteger() throws Cvc3Exception { return jniIsInteger(embedded()); } public int getInteger() throws Cvc3Exception { assert(isInteger()); return jniGetInteger(embedded()); } public Rational gcd(Rational r) throws Cvc3Exception { return new Rational(jniGcd(embedded(), r.embedded()), embeddedManager()); } public Rational lcm(Rational r) throws Cvc3Exception { return new Rational(jniLcm(embedded(), r.embedded()), embeddedManager()); } public Rational abs() throws Cvc3Exception { return new Rational(jniAbs(embedded()), embeddedManager()); } public Rational floor() throws Cvc3Exception { return new Rational(jniFloor(embedded()), embeddedManager()); } public Rational ceil() throws Cvc3Exception { return new Rational(jniCeil(embedded()), embeddedManager()); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/RationalMut.java000066400000000000000000000004701313116454100235350ustar00rootroot00000000000000package cvc3; import java.util.*; public class RationalMut extends Rational { // jni methods /// Constructor // create embedded object public RationalMut(Object RationalMut, EmbeddedManager embeddedManager) { super(RationalMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/SatResult.java000066400000000000000000000027521313116454100232310ustar00rootroot00000000000000package cvc3; import java.util.*; /** * SatResult is derived from the QueryResult enum in Cvc3, but as we have to * use java 1.4 we have to use one of the usual tricks instead of java's Enum. * * To be independent of changes of the actual values of the c++ enum elements * they are passed by name from the JNI interface, so that changing them will * violently break the code (though unfortunately only at runtime). */ public class SatResult { private final String d_result; private SatResult(String result) { d_result = result; } // names of c++ enum values public static final SatResult SATISFIABLE = new SatResult("SATISFIABLE"); public static final SatResult UNSATISFIABLE = new SatResult("UNSATISFIABLE"); public static final SatResult ABORT = new SatResult("ABORT"); public static final SatResult UNKNOWN = new SatResult("UNKNOWN"); // the SatResult corresponding to a c++ enum value by name public static SatResult get(String value) throws DebugException { if (value.equals(SATISFIABLE.toString())) { return SATISFIABLE; } else if (value.equals(UNSATISFIABLE.toString())) { return UNSATISFIABLE; } else if (value.equals(ABORT.toString())) { return ABORT; } else if (value.equals(UNKNOWN.toString())) { return UNKNOWN; } else { throw new DebugException("SatResult.constructor: unknown enum value: " + value); } } // the SatResult's c++ enum value public String toString() { return d_result; } } cvc4-1.5/src/bindings/compat/java/src/cvc3/SmtlibException.java000066400000000000000000000003731313116454100244110ustar00rootroot00000000000000package cvc3; import java.util.*; /** mirrors CVC3::SmtlibException */ public class SmtlibException extends Cvc3Exception { private final static long serialVersionUID = 1L; public SmtlibException(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/SoundException.java000066400000000000000000000003701313116454100242440ustar00rootroot00000000000000package cvc3; import java.util.*; /** mirrors CVC3::SoundException */ public class SoundException extends Cvc3Exception { private final static long serialVersionUID = 1L; public SoundException(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Statistics.java000066400000000000000000000004141313116454100234260ustar00rootroot00000000000000package cvc3; import java.util.*; public class Statistics extends Embedded { // jni methods /// Constructor public Statistics(Object Statistics, EmbeddedManager embeddedManager) { super(Statistics, embeddedManager); } /// API (immutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/StatisticsMut.java000066400000000000000000000005021313116454100241120ustar00rootroot00000000000000package cvc3; import java.util.*; public class StatisticsMut extends Statistics { // jni methods /// Constructor // create embedded object public StatisticsMut(Object StatisticsMut, EmbeddedManager embeddedManager) { super(StatisticsMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/Test.java000066400000000000000000001735531313116454100222320ustar00rootroot00000000000000package cvc3; import java.util.*; class Test { public static void main(String args[]) { int regressLevel = 3; if (args.length > 1) { regressLevel = Integer.parseInt(args[0]); } boolean allPassed = true; System.out.println("Running API test, regress level = " + regressLevel); try { System.out.println("\ntest():"); allPassed = test() && allPassed; System.out.println("\n}\ntest1():"); allPassed = test1() && allPassed; System.out.println("\n}\ntest2():"); allPassed = test2() && allPassed; System.out.println("\n}\ntest3():"); allPassed = test3() && allPassed; System.out.println("\n}\ntest4():"); allPassed = test4() && allPassed; if (regressLevel > 0) { System.out.println("\n}\n\ntest5():"); allPassed = test5() && allPassed; } System.out.println("\n}\ntest6():"); allPassed = test6() && allPassed; System.out.println("\n}\ntest7():"); allPassed = test7() && allPassed; System.out.println("\n}\ntest8():"); allPassed = test8() && allPassed; System.out.println("\n}\ntest9():"); allPassed = test9(10 * regressLevel + 10) && allPassed; System.out.println("\n}\nbvtest9():"); allPassed = bvtest9(regressLevel*3+2) && allPassed; // Test for obvious memory leaks int limit = 100 * regressLevel + 10; for (int i = 0; i < limit; ++i) { if (i % 100 == 0) System.out.println("test10[" + i + "]"); allPassed = test10() && allPassed; } System.out.println("\n}\ntest11():"); allPassed = test11() && allPassed; System.out.println("\n}\ntest12():"); allPassed = test12() && allPassed; System.out.println("\n}\ntest13():"); allPassed = test13() && allPassed; System.out.println("\n}\ntest14():"); allPassed = test14() && allPassed; System.out.println("\n}\ntest15():"); allPassed = test15() && allPassed; System.out.println("\n}\ntest16():"); allPassed = test16() && allPassed; System.out.println("\n}\ntest17():"); allPassed = test17() && allPassed; System.out.println("\n}\ntest18():"); allPassed = test18() && allPassed; System.out.println("\n}\ntest19():"); allPassed = test19() && allPassed; System.out.println("\n}\ntest22():"); allPassed = test22() && allPassed; System.out.println("\n}\ntest23():"); allPassed = test23() && allPassed; /* :TODO: if (regressLevel > 1) { System.out.println("\n}\ntestgeorge1():"); George.testgeorge1(); System.out.println("\n}\ntestgeorge2():"); George.testgeorge2(); System.out.println("\n}\ntestgeorge3():"); George.testgeorge3(); System.out.println("\n}\ntestgeorge4():"); George.testgeorge4(); System.out.println("\n}\ntestgeorge5():"); George.testgeorge5(); } */ System.out.println("\n}\ntestNonlinearBV():"); allPassed = testNonlinearBV() && allPassed; System.out.println("\n}\ntestDistinct():"); allPassed = testDistinct() && allPassed; System.out.println("\n}"); } catch (Exception e) { System.out.println("*** Exception caught: \n" + e); e.printStackTrace(System.out); allPassed = false; } if (allPassed) { System.out.println("Program exits successfully."); } else { System.out.println("Program exits with error status = " + allPassed + "."); } System.exit(allPassed ? 0 : 1); } public static void DebugAssert(boolean condition, String message) throws Cvc3Exception { if (!condition) { throw new DebugException(message); } } // Check whether e is valid public static boolean check(ValidityChecker vc, Expr e) throws Cvc3Exception { return check(vc, e, true); } public static boolean check(ValidityChecker vc, Expr e, boolean verbose) throws Cvc3Exception { if(verbose) { System.out.println("Query: " + e.toString()); } QueryResult result = vc.query(e); if (result == QueryResult.VALID) { if (verbose) System.out.println("Valid\n"); return true; } else if (result == QueryResult.INVALID) { if (verbose) System.out.println("Invalid\n"); return false; } if (verbose) System.out.println("Returned neither valid nor invalid\n"); return false; } public static void printResult(QueryResult result) throws Cvc3Exception { if (result == QueryResult.VALID) { System.out.println("Result Valid"); } else if (result == QueryResult.INVALID) { System.out.println("Result Invalid"); } else if (result == QueryResult.UNKNOWN) { System.out.println("Result Unknown"); } else if (result == QueryResult.ABORT) { System.out.println("Aborted"); } else { assert(false); } } // Make a new assertion - disposes expression public static void newAssertion(ValidityChecker vc, Expr e) throws Cvc3Exception { System.out.println("Assert: " + e); vc.assertFormula(e); } public static boolean test() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Type it = vc.intType(); //int Op f = vc.createOp("f", vc.funType(it, it)); Expr z = vc.varExpr("z", it); Expr e = vc.funExpr(f, vc.funExpr(f, z)); e = e.getChild(0); Expr f2 = vc.funExpr(f, e); Expr f3 = vc.funExpr(f, f2); DebugAssert(!e.equals(f2) && !e.equals(f3), "Refcount problems"); Expr x = vc.boundVarExpr("x", "0", it); //x0:int List xs = new ArrayList(); xs.add(x); // Op lxsx = vc.lambdaExpr(xs, x); //\. x0:int Expr y = vc.ratExpr(1, 1); //1 List ys = new ArrayList(); ys.add(y); //<1> Expr lxsxy = vc.funExpr(lxsx, y); //(\. x0:int)1 Expr lxsxys = vc.funExpr(lxsx, ys); //(\. x0:int)<1> System.out.println("Lambda application: " + lxsxy); System.out.println("Simplified: " + vc.simplify(lxsxy)); return true; } catch (Exception e) { System.out.println("*** Exception caught in test(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test1() throws Cvc3Exception { // It is important that all Expr objects are deleted before vc is // deleted. Therefore, we enclose them in a scope of try{ }catch // block. // // Also, vc methods may throw an Exception, and we want to delete vc // even in those exceptional cases. ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); flags.setFlag("dump-log", ".test1.cvc"); vc = ValidityChecker.create(flags); boolean b = check(vc, vc.trueExpr()); DebugAssert(b, "Should be valid"); vc.push(); b = check(vc, vc.falseExpr()); DebugAssert(!b, "Should be invalid"); vc.pop(); // Check p OR ~p Expr p = vc.varExpr("p", vc.boolType()); Expr e = vc.orExpr(p, vc.notExpr(p)); b = check(vc, e); DebugAssert(b, "Should be valid"); // Check x = y . f(x) = f(y) Expr x = vc.varExpr("x", vc.realType()); Expr y = vc.varExpr("y", vc.realType()); Type real2real = vc.funType(vc.realType(), vc.realType()); Op f = vc.createOp("f", real2real); Expr fx = vc.funExpr(f, x); Expr fy = vc.funExpr(f, y); e = vc.impliesExpr(vc.eqExpr(x,y),vc.eqExpr(fx, fy)); b = check(vc, e); DebugAssert(b, "Should be valid"); // Check f(x) = f(y) . x = y e = vc.impliesExpr(vc.eqExpr(fx,fy),vc.eqExpr(x, y)); int scopeLevel = vc.scopeLevel(); vc.push(); b = check(vc, e); DebugAssert(!b, "Should be invalid"); // Get counter-example System.out.println("Scope level: " + vc.scopeLevel()); System.out.println("Counter-example:"); List assertions = vc.getCounterExample(); for (int i = 0; i < assertions.size(); ++i) { System.out.println((Expr)assertions.get(i)); } System.out.println("End of counter-example"); System.out.println(); // Reset to initial scope System.out.println("Resetting"); vc.pop(); DebugAssert(scopeLevel == vc.scopeLevel(), "scope error"); System.out.println("Scope level: " + vc.scopeLevel()); System.out.println(); // Check w = x & x = y & y = z & f(x) = f(y) & x = 1 & z = 2 Expr w = vc.varExpr("w", vc.realType()); Expr z = vc.varExpr("z", vc.realType()); System.out.println("Push Scope"); System.out.println(); vc.push(); newAssertion(vc, vc.eqExpr(w, x)); newAssertion(vc, vc.eqExpr(x, y)); newAssertion(vc, vc.eqExpr(y, z)); newAssertion(vc, vc.eqExpr(fx, fy)); newAssertion(vc, vc.eqExpr(x, vc.ratExpr(1))); System.out.println("simplify(w) = " + vc.simplify(w)); DebugAssert(vc.simplify(w).equals(vc.ratExpr(1)), "Expected simplify(w) = 1"); newAssertion(vc, vc.eqExpr(z, vc.ratExpr(2))); System.out.println("Inconsistent?: " + vc.inconsistent()); System.out.println("Assumptions Used:"); assertions = vc.inconsistentReasons(); for (int i = 0; i < assertions.size(); ++i) { System.out.println((Expr)assertions.get(i)); } System.out.println("Pop Scope"); System.out.println(); vc.pop(); System.out.println("simplify(w) = " + vc.simplify(w)); DebugAssert(vc.simplify(w).equals(w), "Expected simplify(w) = w"); System.out.println("Inconsistent?: " + vc.inconsistent()); return true; } catch (Exception e) { System.out.println("*** Exception caught in test1(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static boolean test2() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); vc = ValidityChecker.create(flags); Expr bexpr = vc.varExpr("b", vc.intType()); vc.assertFormula(vc.ltExpr(bexpr, vc.ratExpr(10))); Expr c = vc.varExpr("c", vc.intType()); vc.assertFormula(vc.orExpr(vc.eqExpr(c, vc.ratExpr(0)), vc.eqExpr(c, vc.ratExpr(1)))); boolean b = check(vc, vc.leExpr(bexpr, vc.ratExpr(10))); DebugAssert(b, "Should be valid"); b = check(vc, vc.falseExpr()); DebugAssert(!b, "Should be invalid"); vc.returnFromCheck(); // Check x = y . g(x,y) = g(y,x) Expr x = vc.varExpr("x", vc.realType()); Expr y = vc.varExpr("y", vc.realType()); Type real = vc.realType(); List RxR = new ArrayList(); RxR.add(real); RxR.add(real); Type realxreal2real = vc.funType(RxR, real); Op g = vc.createOp("g", realxreal2real); Expr gxy = vc.funExpr(g, x, y); Expr gyx = vc.funExpr(g, y, x); Expr e = vc.impliesExpr(vc.eqExpr(x,y),vc.eqExpr(gxy, gyx)); b = check(vc, e); DebugAssert(b, "Should be valid"); Op h = vc.createOp("h", realxreal2real); Expr hxy = vc.funExpr(h, x, y); Expr hyx = vc.funExpr(h, y, x); e = vc.impliesExpr(vc.eqExpr(x,y),vc.eqExpr(hxy, hyx)); b = check(vc, e); DebugAssert(b, "Should be valid"); return true; } catch (Exception e) { System.out.println("*** Exception caught in test2(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static ExprMut ltLex(ValidityChecker vc, Expr i1, Expr i2, Expr j1, Expr j2) throws Cvc3Exception { Expr res = vc.ltExpr(i1, j1); return vc.orExpr(res, vc.andExpr(vc.eqExpr(i1, j1), vc.ltExpr(i2, j2))); } public static ExprMut createTestFormula(ValidityChecker vc, Expr i1, Expr i2, Expr r1, Expr r2) throws Cvc3Exception { Expr lt1 = ltLex(vc, r1, r2, i1, i2); Expr lt2 = ltLex(vc, i2, i1, r2, r1); return vc.andExpr(lt1, lt2); } public static boolean test3() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); vc = ValidityChecker.create(flags); Expr i = vc.varExpr("i", vc.realType()); Expr j = vc.varExpr("j", vc.realType()); Expr k = vc.varExpr("k", vc.realType()); Expr one = vc.ratExpr(1); Expr test = createTestFormula(vc, i, j, vc.minusExpr(i, one), vc.minusExpr(j, k)); System.out.println("Trying test: " + test); vc.push(); QueryResult result = vc.query(test); if (result == QueryResult.VALID) { System.out.println("Test Valid"); vc.pop(); } else { List assertions = vc.getCounterExample(); System.out.println("Test Invalid Under Conditions:"); for (int index = 0; index < assertions.size(); ++index) { System.out.println(assertions.get(index)); } // Try assertions one by one for (int index = 0; index < assertions.size(); ++index) { Expr condition = vc.notExpr((Expr)assertions.get(index)); System.out.println("Trying test under condition: " + condition); vc.pop(); vc.push(); printResult(vc.query(vc.impliesExpr(condition, test))); } } return true; } catch (Exception e) { System.out.println("*** Exception caught in test3(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static boolean test4() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); vc = ValidityChecker.create(flags); Expr i = vc.varExpr("i", vc.realType()); Expr j = vc.varExpr("j", vc.realType()); Expr k = vc.varExpr("k", vc.realType()); Expr one = vc.ratExpr(1); Expr test = createTestFormula(vc, i, j, vc.minusExpr(i, one), vc.minusExpr(j, k)); System.out.println("Trying test: " + test); vc.push(); QueryResult result = vc.query(test); if (result == QueryResult.VALID) { System.out.println("Test Valid"); } else { List assertions = vc.getCounterExample(); System.out.println("Test Invalid Under Conditions:"); for (int index = 0; index < assertions.size(); ++index) { System.out.println(assertions.get(index)); } // Try assertions one by one for (int index = 0; index < assertions.size(); ++index) { Expr condition = vc.notExpr((Expr)assertions.get(index)); System.out.println("Trying test under condition: " + condition); vc.pop(); vc.push(); printResult(vc.query(vc.impliesExpr(condition, test))); } } return true; } catch (Exception e) { System.out.println("*** Exception caught in test4(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static void findLeaves(Expr e, List l) throws Cvc3Exception { int ar = e.arity(); if (ar > 0) { for (int i = 0; i < ar; ++i) { findLeaves(e.getChild(i), l); } return; } l.add(e); } public static boolean hasij(Expr e, Expr i, Expr j) throws Cvc3Exception { int ar = e.arity(); if (ar > 0) { for (int k = 0; k < ar; ++k) if (hasij(e.getChild(k), i, j)) return true; return false; } if (e.equals(i) || e.equals(j)) return true; return false; } public static Expr plusExpr(ValidityChecker vc, List kids) throws Cvc3Exception { if (kids.size() == 0) return vc.ratExpr(0); else if (kids.size() == 1) return (Expr)kids.get(0); else if (kids.size() == 2) return vc.plusExpr((Expr)kids.get(0), (Expr)kids.get(1)); else { Expr r = (Expr)kids.get(kids.size() - 1); kids.remove(kids.size() - 1); return vc.plusExpr(plusExpr(vc, kids), r); } } public static boolean test5() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); vc = ValidityChecker.create(flags); Expr i = vc.varExpr("i1", vc.realType()); Expr j = vc.varExpr("i2", vc.realType()); Expr p = vc.varExpr("p", vc.realType()); Expr q = vc.varExpr("q", vc.realType()); Expr r = vc.varExpr("r", vc.realType()); Expr a = vc.varExpr("arb_addr", vc.realType()); Expr N = vc.varExpr("N", vc.realType()); Expr M = vc.varExpr("M", vc.arrayType(vc.realType(), vc.realType())); Expr M2 = vc.writeExpr(M, vc.plusExpr(q, i), vc.readExpr(M, vc.plusExpr(r, i))); Expr M1 = vc.writeExpr(M, vc.plusExpr(p, j), vc.readExpr(M, vc.plusExpr(r, j))); Expr e = vc.eqExpr(vc.readExpr(vc.writeExpr(M2, vc.plusExpr(p, j), vc.readExpr(M2, vc.plusExpr(r, j))), a), vc.readExpr(vc.writeExpr(M1, vc.plusExpr(q, i), vc.readExpr(M1, vc.plusExpr(r, i))), a)); Expr one = vc.ratExpr(1); Expr zero = vc.ratExpr(0); Expr qmp = vc.minusExpr(q, p); Expr qmr = vc.minusExpr(q, r); List hyp = new ArrayList(); hyp.add(vc.ltExpr(i, j)); // hyp.add(vc.orExpr(vc.geExpr(qmp, N), vc.leExpr(qmp, zero))); // hyp.add(vc.orExpr(vc.geExpr(qmr, N), vc.leExpr(qmr, zero))); Expr test = vc.impliesExpr(vc.andExpr(hyp), e); Expr query; System.out.println("Checking verification condition:" + test); vc.push(); QueryResult result = vc.query(test); if (result == QueryResult.VALID) { System.out.println("Test Valid"); } else { List conditions = new ArrayList(); int req; List assertions = vc.getCounterExample(); System.out.println("Invalid Under Conditions:"); for (int index = 0; index < assertions.size(); ++index) { if (((Expr)assertions.get(index)).equals(vc.notExpr(test))) { for (; index < assertions.size()-1; ++index) { assertions.set(index, assertions.get(index+1)); } assertions.remove(assertions.size() - 1); break; } } for (int index = 0; index < assertions.size(); ++index) { System.out.println(assertions.get(index)); } System.out.println(); // Try assertions one by one for (int index = 0; index < assertions.size(); ++index) { e = (Expr)assertions.get(index); // Check condition for eligibility if (e.isNot()) { System.out.println("Condition ineligible: negation: " + e); System.out.println(); continue; } if (e.isEq()) { req = 2; } else req = 1; List leaves = new ArrayList(); findLeaves(e, leaves); for (int index2 = 0; index2 < leaves.size(); ++index2) { if (!((Expr)leaves.get(index2)).isVar() || ((Expr)leaves.get(index2)).equals(i) || ((Expr)leaves.get(index2)).equals(j) || ((Expr)leaves.get(index2)).equals(a)) continue; req--; } if (req > 0) { System.out.println("Condition ineligible: not enough non-loop variables: " + e); System.out.println(); continue; } System.out.println("Condition selected: " + e); System.out.println(); conditions.add(vc.notExpr(e)); System.out.println("Trying verification condition with hypothesis: " + vc.andExpr(conditions)); vc.pop(); vc.push(); query = vc.impliesExpr(vc.andExpr(conditions), test); result = vc.query(test); if (result == QueryResult.VALID) { System.out.println("Result Valid"); break; } else { assertions = vc.getCounterExample(); System.out.println("Invalid Under Conditions:"); for (int index2 = 0; index2 < assertions.size(); ++index2) { if (((Expr)assertions.get(index2)).equals(vc.notExpr(query))) { for (; index2 < assertions.size()-1; ++index2) { assertions.set(index2, assertions.get(index2+1)); } assertions.remove(assertions.size() - 1); break; } } for (int index2 = 0; index2 < assertions.size(); ++index2) { System.out.println(assertions.get(index2)); } System.out.println(); index = assertions.size(); } } System.out.println(); System.out.println("Attempting to remove loop variables"); // replace loop variables in conditions List newConditions = new ArrayList(); List newPlus = new ArrayList(); boolean foundi, foundj, negi, negj; Expr minusone = vc.ratExpr(-1); int index; for (index = 0; index < conditions.size(); ++index) { if (((Expr)conditions.get(index)).getChild(0).isEq()) { e = vc.simplify( vc.minusExpr(((Expr)conditions.get(index)).getChild(0).getChild(0), ((Expr)conditions.get(index)).getChild(0).getChild(1))); if (hasij(e, i, j)) { if (e.isPlus()) { newPlus.clear(); newPlus.add(e.getChild(0)); foundi = foundj = negi = negj = false; for (int index2 = 1; index2 < e.arity(); index2++) { Expr term = e.getChild(index2); if (term.equals(i) && !foundi) foundi = true; else if (term.equals(j) && !foundj) { foundj = true; negj = true; } else if (term.isMult() && term.getChild(0).equals(minusone) && term.getChild(1).equals(i) && !foundi) { foundi = true; negi = true; } else if (term.isMult() && term.getChild(0).equals(minusone) && term.getChild(1).equals(j) && !foundj) foundj = true; else newPlus.add(term); } if (foundi && foundj && (negi && negj || (!negi && !negj))) { e = plusExpr(vc, newPlus); if (negi && negj) e = vc.uminusExpr(e); e = vc.simplify(e); if (!hasij(e, i, j)) { newConditions.add(vc.orExpr(vc.geExpr(e, N), vc.leExpr(e, zero))); continue; } } } System.out.println("Unable to remove loop variables:" + e); break; } } newConditions.add(conditions.get(index)); } if (index == conditions.size()) { System.out.println("Loop variables successfully removed:"); Expr cond = (newConditions.size()>0)? vc.andExpr(newConditions) : vc.trueExpr(); System.out.println(cond); List loopConditions = new ArrayList(); loopConditions.add(cond); loopConditions.add(vc.geExpr(i, one)); loopConditions.add(vc.geExpr(j, one)); loopConditions.add(vc.leExpr(i, N)); loopConditions.add(vc.leExpr(j, N)); vc.pop(); vc.push(); System.out.println("Final query"); printResult(vc.query(vc.impliesExpr(vc.andExpr(loopConditions), test))); } } return true; } catch (Exception e) { System.out.println("*** Exception caught in test5(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static boolean test6() throws Cvc3Exception { ValidityChecker vc1 = null; ValidityChecker vc2 = null; try { vc1 = ValidityChecker.create(); vc2 = ValidityChecker.create(); Type real1 = vc1.realType(); Expr x1 = vc1.varExpr("x", real1); Expr y1 = vc1.boundVarExpr("y", "0", real1); System.out.println("vc1 variables: " + x1 + ", " + y1); Expr x2 = vc2.varExpr("x", vc2.importType(real1)); Expr y2 = vc2.boundVarExpr("y", "0", vc2.realType()); System.out.println("vc2 variables: " + x2 + ", " + y2); System.out.println("vars imported to vc2 from vc1: " + vc2.importExpr(x1) + ", " + vc2.importExpr(y1)); Expr t1 = vc1.trueExpr(); Expr and1 = vc1.andExpr(t1, vc1.falseExpr()); Op f1 = vc1.createOp("f", vc1.funType(real1, real1)); Expr fx1 = vc1.funExpr(f1, x1); Expr f5_1 = vc1.funExpr(f1, vc1.ratExpr(5,1)); Type rt1 = vc1.recordType("foo", real1, "bar", real1); Expr r1 = vc1.recordExpr("foo", fx1, "bar", f5_1); Expr r1_eq = vc1.eqExpr(r1, vc1.recUpdateExpr(r1, "foo", f5_1)); Type art1 = vc1.arrayType(real1, rt1); Expr ar1 = vc1.varExpr("ar", art1); Expr ar_eq1 = vc1.eqExpr(vc1.writeExpr(ar1, x1, r1), ar1); Expr query1 = vc1.eqExpr(vc1.recSelectExpr(vc1.readExpr(ar1, x1), "foo"), vc1.recSelectExpr(r1, "bar")); System.out.println("*** VC #1:"); newAssertion(vc1, r1_eq); newAssertion(vc1, ar_eq1); check(vc1, query1); System.out.println("*** VC #2:"); newAssertion(vc2, vc2.importExpr(r1_eq)); newAssertion(vc2, vc2.importExpr(ar_eq1)); check(vc2, vc2.importExpr(query1)); return true; } catch (Exception e) { System.out.println("*** Exception caught in test6(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc1 != null) vc1.delete(); if (vc2 != null) vc2.delete(); } } public static boolean test7() throws Cvc3Exception { ValidityChecker vc1 = null; ValidityChecker vc2 = null; try { vc1 = ValidityChecker.create(); vc2 = ValidityChecker.create(); Expr e1 = vc1.varExpr("e1", vc1.realType()); Expr e2 = vc2.varExpr("e2", vc2.realType()); newAssertion(vc2, vc2.eqExpr(vc2.importExpr(e1), e2)); return true; } catch (Exception e) { System.out.println("*** Exception caught in test7(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc1 != null) vc1.delete(); if (vc2 != null) vc2.delete(); } } public static boolean test8() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); List vec = new ArrayList(); vec.add(vc.boundVarExpr("x", "x", vc.realType())); Expr lambda = vc.lambdaExpr(vec, vc.falseExpr()).getExpr(); try { Type t = vc.subtypeType(lambda, vc.nullExpr()); DebugAssert(false, "Typechecking exception expected"); } catch(TypecheckException e) { // fall through } return true; } catch (Exception e) { System.out.println("*** Exception caught in test5(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static ExprMut adder(ValidityChecker vc, Expr a, Expr b, Expr c) throws Cvc3Exception { return vc.notExpr(vc.iffExpr(vc.notExpr(vc.iffExpr(a,b)),c)); } public static ExprMut carry(ValidityChecker vc, Expr a, Expr b, Expr c) throws Cvc3Exception { return vc.orExpr(vc.andExpr(a,b), vc.orExpr(vc.andExpr(b,c),vc.andExpr(a,c))); } public static List add(ValidityChecker vc, List a, List b) throws Cvc3Exception { int N = a.size(); Expr c = vc.falseExpr(); List sum = new ArrayList(); for (int i = 0; i < N; i++) { sum.add(adder(vc,(Expr)a.get(i),(Expr)b.get(i),c)); c = carry(vc,(Expr)a.get(i),(Expr)b.get(i),c); } return sum; } public static ExprMut vectorEq(ValidityChecker vc, List a, List b) throws Cvc3Exception { int N = a.size(); ExprMut result = vc.trueExpr(); for (int i = 0; i < N; i++) { result = vc.andExpr(result, vc.iffExpr((Expr)a.get(i), (Expr)b.get(i))); } return result; } public static boolean test9(int N) throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); int i; List a = new ArrayList(); List b = new ArrayList(); for (i=0; i < N; i++) { a.add(vc.varExpr("a" + Integer.toString(i), vc.boolType())); b.add(vc.varExpr("b" + Integer.toString(i), vc.boolType())); } List sum1 = add(vc,a,b); List sum2 = add(vc,b,a); Expr q = vectorEq(vc,sum1,sum2); check(vc, q); // Proof p = vc.getProof(); return true; } catch (Exception e) { System.out.println("*** Exception caught in test9(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test22() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Type intType = vc.intType(); Type fType = vc.funType(intType, intType); Op f = vc.createOp("f", fType); Expr x = vc.varExpr("x", intType); Expr fx = vc.exprFromString("f(x)"); Expr p = vc.exprFromString("FORALL (x:INT) : x < f(x)"); List patternvv = new ArrayList(); List patternv = new ArrayList(); patternv.add(fx); patternvv.add(patternv); vc.setTriggers(p, patternv); DebugAssert(patternvv.equals(p.getTriggers()), "Expected p.getTriggers() == patternvv: " + p.toString()); vc.setMultiTriggers(p, patternvv); DebugAssert(patternvv.equals(p.getTriggers()), "Expected p.getTriggers() == patternvv: " + p.toString()); List vars = new ArrayList(); vars.add(x); Expr r = vc.forallExpr(vars, vc.ltExpr(x, fx), patternv); DebugAssert(patternvv.equals(r.getTriggers()), "Expected r.getTriggers() == patternvv: " + r.toString()); Expr s = vc.exprFromString("FORALL (x:INT) : x > f(x)"); vc.setTrigger(s, fx); List trigsvv = s.getTriggers(); DebugAssert(trigsvv.size() == 1, "Expected s.getTriggers().size() == 1: " + trigsvv.size()); List trigsv = (List)trigsvv.get(0); DebugAssert(trigsv.size() == 1, "Expected s.getTriggers()[0].size() == 1: " + trigsv.size()); DebugAssert(fx.equals(trigsv.get(0)), "Expected s.getTriggers()[0][0] == fx: " + (trigsv.get(0))); Expr t = vc.exprFromString("FORALL (x:INT) : x > f(x)"); vc.setMultiTrigger(t, patternv); trigsvv = t.getTriggers(); DebugAssert(trigsvv.size() == 1, "Expected t.getTriggers().size() == 1: " + trigsvv.size()); trigsv = (List)trigsvv.get(0); DebugAssert(trigsv.size() == 1, "Expected t.getTriggers()[0].size() == 1: " + trigsv.size()); DebugAssert(fx.equals(trigsv.get(0)), "Expected t.getTriggers()[0][0] == fx: " + (trigsv.get(0))); Expr u = vc.forallExprMultiTriggers(vars, vc.ltExpr(x, fx), patternvv); DebugAssert(patternvv.equals(u.getTriggers()), "Expected u.getTriggers() == patternvv: " + u.toString()); } catch (Exception e) { System.out.println("*** Exception caught in test22(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } return true; } private static boolean test23() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Type intType = vc.intType(); Expr x = vc.varExpr("x",intType); Expr y= vc.varExpr("y",intType); Expr a = vc.varExpr("a",intType); Expr b = vc.varExpr("b",intType); Expr s = vc.exprFromString("x < y"); Expr t = vc.exprFromString("a < b"); System.out.println( "s=" + s + "\nt=" + t ); List oldExprs = new ArrayList(), newExprs = new ArrayList(); oldExprs.add(x); oldExprs.add(y); newExprs.add(a); newExprs.add(b); Expr u = s.subst(oldExprs,newExprs); System.out.println( "u=" + u ); DebugAssert( t.equals(u), "Expected t==u" ); } catch(Throwable e) { System.out.println( "*** Exception caught in test23(): "); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } return true; } public static ExprMut bvadder(ValidityChecker vc, Expr a, Expr b, Expr c) throws Cvc3Exception { return vc.newBVXorExpr(a, vc.newBVXorExpr(b, c)); } public static ExprMut bvcarry(ValidityChecker vc, Expr a, Expr b, Expr c) throws Cvc3Exception { return vc.newBVOrExpr(vc.newBVAndExpr(a,b), vc.newBVOrExpr(vc.newBVAndExpr(b,c),vc.newBVAndExpr(a,c))); } public static List bvadd(ValidityChecker vc, List a, List b) throws Cvc3Exception { int N=a.size(); Expr c = vc.newBVConstExpr(new Rational(0, vc.embeddedManager()), 1); List sum = new ArrayList(); for (int i = 0; i < N; i++) { sum.add(bvadder(vc,(Expr)a.get(i),(Expr)b.get(i),c)); c = bvcarry(vc,(Expr)a.get(i),(Expr)b.get(i),c); } return sum; } public static ExprMut bvvectorEq(ValidityChecker vc, List a, List b) throws Cvc3Exception { int N = a.size(); ExprMut result = vc.newBVConstExpr("1"); for (int i = 0; i < N; i++) { result = vc.newBVAndExpr(result, vc.newBVXnorExpr((Expr)a.get(i), (Expr)b.get(i))); } return result; } public static boolean bvtest9(int N) throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Expr a, b, sum1; a = vc.varExpr("a", vc.bitvecType(N)); b = vc.varExpr("b", vc.bitvecType(N)); List kids = new ArrayList(); kids.add(a); kids.add(b); sum1 = vc.newBVPlusExpr(N, kids); List avec = new ArrayList(); List bvec = new ArrayList(); List sum1vec = new ArrayList(); for (int i = 0; i < N; i++) { avec.add(vc.newBVExtractExpr(a, i, i)); bvec.add(vc.newBVExtractExpr(b, i, i)); sum1vec.add(vc.newBVExtractExpr(sum1, i, i)); } List sum2 = bvadd(vc,avec,bvec); Expr q = bvvectorEq(vc,sum1vec,sum2); check(vc, vc.eqExpr(q,vc.newBVConstExpr("1"))); return true; } catch (Exception e) { System.out.println("*** Exception caught in bvtest9(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test10() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Expr x = vc.varExpr("x", vc.realType()); Expr y = vc.varExpr("y", vc.realType()); Type real = vc.realType(); List RxR = new ArrayList(); RxR.add(real); RxR.add(real); Type realxreal2real = vc.funType(RxR, real); Op g = vc.createOp("g", realxreal2real); Expr gxy = vc.funExpr(g, x, y); Expr gyx = vc.funExpr(g, y, x); Expr ia = vc.eqExpr(x,y); Expr ib = vc.eqExpr(gxy, gyx); Expr e = vc.impliesExpr(vc.eqExpr(x,y),vc.eqExpr(gxy, gyx)); check(vc, e, false); Op h = vc.createOp("h", realxreal2real); Expr hxy = vc.funExpr(h, x, y); Expr hyx = vc.funExpr(h, y, x); e = vc.impliesExpr(vc.eqExpr(x,y),vc.eqExpr(hxy, hyx)); check(vc, e, false); return true; } catch (Exception e) { System.out.println("*** Exception caught in test10(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static int printImpliedLiterals(ValidityChecker vc) throws Cvc3Exception { int count = 0; System.out.println("Implied Literals:"); Expr impLit = vc.getImpliedLiteral(); while (!impLit.isNull()) { ++count; System.out.println(impLit); impLit = vc.getImpliedLiteral(); } return count; } public static boolean test11() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Expr x = vc.varExpr("x", vc.realType()); Expr y = vc.varExpr("y", vc.realType()); Expr z = vc.varExpr("z", vc.realType()); Type real = vc.realType(); Type real2real = vc.funType(real, real); Type real2bool = vc.funType(real, vc.boolType()); Op f = vc.createOp("f", real2real); Op p = vc.createOp("p", real2bool); Expr fx = vc.funExpr(f, x); Expr fy = vc.funExpr(f, y); Expr px = vc.funExpr(p, x); Expr py = vc.funExpr(p, y); Expr xeqy = vc.eqExpr(x, y); Expr yeqx = vc.eqExpr(y, x); Expr xeqz = vc.eqExpr(x, z); Expr zeqx = vc.eqExpr(z, x); Expr yeqz = vc.eqExpr(y, z); Expr zeqy = vc.eqExpr(z, y); int c; vc.registerAtom(vc.eqExpr(x,vc.ratExpr(0,1))); vc.registerAtom(xeqy); vc.registerAtom(yeqx); vc.registerAtom(xeqz); vc.registerAtom(zeqx); vc.registerAtom(yeqz); vc.registerAtom(zeqy); vc.registerAtom(px); vc.registerAtom(py); vc.registerAtom(vc.eqExpr(fx, fy)); System.out.println("Push"); vc.push(); System.out.println("Assert x = y"); vc.assertFormula(xeqy); c = printImpliedLiterals(vc); DebugAssert(c==3,"Implied literal error 0"); System.out.println("Push"); vc.push(); System.out.println("Assert x /= z"); vc.assertFormula(vc.notExpr(xeqz)); c = printImpliedLiterals(vc); DebugAssert(c==4,"Implied literal error 1"); System.out.println("Pop"); vc.pop(); System.out.println("Push"); vc.push(); System.out.println("Assert y /= z"); vc.assertFormula(vc.notExpr(yeqz)); c = printImpliedLiterals(vc); DebugAssert(c==4,"Implied literal error 2"); System.out.println("Pop"); vc.pop(); System.out.println("Push"); vc.push(); System.out.println("Assert p(x)"); vc.assertFormula(px); c = printImpliedLiterals(vc); DebugAssert(c==2,"Implied literal error 3"); System.out.println("Pop"); vc.pop(); System.out.println("Push"); vc.push(); System.out.println("Assert p(y)"); vc.assertFormula(py); c = printImpliedLiterals(vc); DebugAssert(c==2,"Implied literal error 4"); System.out.println("Pop"); vc.pop(); System.out.println("Pop"); vc.pop(); System.out.println("Push"); vc.push(); System.out.println("Assert y = x"); vc.assertFormula(yeqx); c = printImpliedLiterals(vc); DebugAssert(c==3,"Implied literal error 5"); System.out.println("Pop"); vc.pop(); System.out.println("Push"); vc.push(); System.out.println("Assert p(x)"); vc.assertFormula(px); c = printImpliedLiterals(vc); DebugAssert(c==1,"Implied literal error 6"); System.out.println("Assert x = y"); vc.assertFormula(xeqy); c = printImpliedLiterals(vc); DebugAssert(c==4,"Implied literal error 7"); System.out.println("Pop"); vc.pop(); System.out.println("Push"); vc.push(); System.out.println("Assert NOT p(x)"); vc.assertFormula(vc.notExpr(px)); c = printImpliedLiterals(vc); DebugAssert(c==1,"Implied literal error 8"); System.out.println("Assert x = y"); vc.assertFormula(xeqy); c = printImpliedLiterals(vc); DebugAssert(c==4,"Implied literal error 9"); System.out.println("Pop"); vc.pop(); return true; } catch (Exception e) { System.out.println("*** Exception caught in test11(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test12() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Type realType = vc.realType(); Type intType = vc.intType(); Type boolType = vc.boolType(); vc.push(); int initial_layer = vc.stackLevel(); int initial_scope = vc.scopeLevel(); Expr exprObj_trueID = vc.trueExpr(); Expr exprObj_falseID = vc.notExpr(vc.trueExpr()); vc.popTo(initial_layer); DebugAssert(vc.scopeLevel() == initial_scope, "Expected no change"); DebugAssert(vc.stackLevel() == initial_layer, "Expected no change"); // TODO: what happens if we push and then popscope? return true; } catch (Exception e) { System.out.println("*** Exception caught in test12(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test13() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); flags.setFlag("dump-log", ".test13.cvc"); vc = ValidityChecker.create(flags); Expr rat_one = vc.ratExpr(1); Expr rat_two = vc.ratExpr(2); Expr rat_minus_one = vc.ratExpr(-1); QueryResult query_result; query_result = vc.query(vc.eqExpr(rat_two,rat_one)); System.out.println("2=1 " + query_result); query_result = vc.query(vc.eqExpr(rat_two,rat_minus_one)); System.out.println("2=-1 " + query_result); return true; } catch (Exception e) { System.out.println("*** Exception caught in test13(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static Expr func1(ValidityChecker vc) throws Cvc3Exception { // local Expr 'tmp' Expr tmp = vc.varExpr("tmp", vc.boolType()); return vc.trueExpr(); } public static boolean test14() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); // func call: ok Expr test1 = func1(vc); // func call: fail Expr test2 = func1(vc); return true; } catch (Exception e) { System.out.println("*** Exception caught in test13(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test15() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); vc = ValidityChecker.create(flags); /***************************************************** * array declaration * *****************************************************/ // array: index type Type index_type = vc.subrangeType(vc.ratExpr(0), vc.ratExpr(3)); // array: data type Type data_type = vc.subrangeType(vc.ratExpr(0), vc.ratExpr(3)); // array type: [0 .. 3] of 0 .. 3 Type array_type = vc.arrayType(index_type, data_type); Expr arr = vc.varExpr("array", array_type); // array: [1,1,0,0] arr = vc.writeExpr(arr, vc.ratExpr(0), vc.ratExpr(1)); arr = vc.writeExpr(arr, vc.ratExpr(1), vc.ratExpr(1)); arr = vc.writeExpr(arr, vc.ratExpr(2), vc.ratExpr(0)); arr = vc.writeExpr(arr, vc.ratExpr(3), vc.ratExpr(0)); /***************************************************** * forall Expr * *****************************************************/ // for loop: index Expr id = vc.boundVarExpr("id", "0", vc.subrangeType(vc.ratExpr(0), vc.ratExpr(2))); List vars = new ArrayList(); vars.add(id); // for loop: body Expr for_body = vc.leExpr(vc.readExpr(arr, id), vc.readExpr(arr, vc.plusExpr(id, vc.ratExpr(1)))); // forall expr Expr forall_expr = vc.forallExpr(vars, for_body); vc.push(); check(vc, forall_expr); System.out.println("Scope level: " + vc.scopeLevel()); System.out.println("Counter-example:"); List assertions = vc.getCounterExample(); for (int i = 0; i < assertions.size(); ++i) { System.out.println(assertions.get(i)); } System.out.println("End of counter-example"); System.out.println(""); vc.pop(); /***************************************************** * manual expansion * *****************************************************/ Expr e1 = vc.leExpr(vc.readExpr(arr, vc.ratExpr(0)), vc.readExpr(arr, vc.ratExpr(1))); Expr e2 = vc.leExpr(vc.readExpr(arr, vc.ratExpr(1)), vc.readExpr(arr, vc.ratExpr(2))); Expr e3 = vc.leExpr(vc.readExpr(arr, vc.ratExpr(2)), vc.readExpr(arr, vc.ratExpr(3))); Expr manual_expr = vc.andExpr(e1, vc.andExpr(e2, e3)); /***************************************************** * exists Expr * *****************************************************/ // exists: index Expr id_ex = vc.varExpr("id_ex", vc.subrangeType(vc.ratExpr(0), vc.ratExpr(2))); List vars_ex = new ArrayList(); vars_ex.add(id_ex); // exists: body Expr ex_body = vc.gtExpr(vc.readExpr(arr, id_ex), vc.readExpr(arr, vc.plusExpr(id_ex, vc.ratExpr(1)))); // exists expr Expr ex_expr = vc.existsExpr(vars_ex, ex_body); /***************************************************** * ??? forall <==> manual expansion * *****************************************************/ System.out.println("Checking forallExpr <==> manual expansion ..."); if (vc.query(vc.iffExpr(forall_expr, manual_expr)) == QueryResult.VALID) System.out.println(" -- yes."); else { System.out.println(" -- no, with counter examples as "); List assert1 = vc.getCounterExample(); for (int i = 0; i < assert1.size(); i ++) System.out.println(assert1.get(i)); } System.out.println(); /***************************************************** * ??? !forall <==> existsExpr * *****************************************************/ System.out.println(); System.out.println("Checking !forallExpr <==> existsExpr ..."); if (vc.query(vc.iffExpr(vc.notExpr(forall_expr), ex_expr)) == QueryResult.VALID) System.out.println(" -- yes."); else if (vc.incomplete()) { System.out.println(" -- incomplete:"); List reasons = vc.incompleteReasons(); for (int i = 0; i < reasons.size(); ++i) System.out.println(reasons.get(i)); } else { System.out.println(" -- no, with counter examples as "); List assert2 = vc.getCounterExample(); for (int i = 0; i < assert2.size(); i ++) System.out.println(assert2.get(i)); } System.out.println(); System.out.println("End of testcases."); System.out.println(); return true; } catch (Exception e) { System.out.println("*** Exception caught in test15(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static boolean test16() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); Type zto100 = vc.subrangeType(vc.ratExpr(0), vc.ratExpr(100)); Expr mem = vc.varExpr("mem", vc.arrayType(zto100, vc.intType())); Expr a = vc.varExpr("a", zto100); Expr b = vc.varExpr("b", zto100); Expr lhs = vc.readExpr(vc.writeExpr(mem, a, vc.ratExpr(30)), b); Expr rhs = vc.readExpr(vc.writeExpr(mem, b, vc.ratExpr(40)), a); Expr q = vc.impliesExpr(vc.notExpr(vc.eqExpr(a, b)), vc.eqExpr(lhs, rhs)); check(vc, q); System.out.println("Scope level: " + vc.scopeLevel()); System.out.println("Counter-example:"); List assertions = vc.getCounterExample(); DebugAssert(assertions.size() > 0, "Expected non-empty counter-example"); for (int i = 0; i < assertions.size(); ++i) { System.out.println(assertions.get(i)); } System.out.println("End of counter-example"); System.out.println(); HashMap m = vc.getConcreteModel(); if(m.isEmpty()) System.out.println(" Did not find concrete model for any vars"); else { System.out.println("%Satisfiable Variable Assignment: %"); Iterator it = m.entrySet().iterator(); while(it.hasNext()) { Map.Entry next = (Map.Entry)it.next(); Expr eq; Expr key = (Expr)next.getKey(); Expr value = (Expr)next.getValue(); if (key.getType().isBoolean()) { DebugAssert(value.isBooleanConst(), "Bad variable assignement: e = "+ key +"\n\n val = "+ value); if(value.isTrue()) eq = key; else eq = vc.notExpr(key); } else eq = vc.eqExpr(key, value); //:TODO:System.out.println(Expr(ASSERT, eq)); System.out.println(eq); } } return true; } catch (Exception e) { System.out.println("*** Exception caught in test16(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test17() throws Cvc3Exception { ValidityChecker vc = null; try { vc = ValidityChecker.create(); try { List selectors = new ArrayList(); List types = new ArrayList(); selectors.add("car"); types.add(vc.intType().getExpr()); selectors.add("cdr"); types.add(vc.stringExpr("list")); Type badList = vc.dataType("list", "cons", selectors, types); DebugAssert(false, "Typechecking exception expected"); } catch(TypecheckException e) { // fall through } vc.delete(); vc = ValidityChecker.create(); { List constructors = new ArrayList(); List selectors = new ArrayList(); List selectors0 = new ArrayList(); List selectors1 = new ArrayList(); selectors.add(selectors0); selectors.add(selectors1); List types = new ArrayList(); List types0 = new ArrayList(); List types1 = new ArrayList(); types.add(types0); types.add(types1); constructors.add("cons"); selectors0.add("car"); types0.add(vc.intType().getExpr()); selectors0.add("cdr"); types0.add(vc.stringExpr("list")); constructors.add("null"); Type list = vc.dataType("list", constructors, selectors, types); Expr x = vc.varExpr("x", vc.intType()); Expr y = vc.varExpr("y", list); List args = new ArrayList(); args.add(x); args.add(y); Expr cons = vc.datatypeConsExpr("cons", args); Expr sel = vc.datatypeSelExpr("car", cons); boolean b = check(vc, vc.eqExpr(sel, x)); DebugAssert(b, "Should be valid"); } vc.delete(); vc = ValidityChecker.create(); try { List names = new ArrayList(); List constructors = new ArrayList(); List constructors0 = new ArrayList(); List constructors1 = new ArrayList(); constructors.add(constructors0); constructors.add(constructors1); List selectors = new ArrayList(); List selectors0 = new ArrayList(); List selectors1 = new ArrayList(); List selectors00 = new ArrayList(); List selectors10 = new ArrayList(); selectors.add(selectors0); selectors0.add(selectors00); selectors.add(selectors1); selectors1.add(selectors10); List types = new ArrayList(); List types0 = new ArrayList(); List types1 = new ArrayList(); List types00 = new ArrayList(); List types10 = new ArrayList(); types.add(types0); types0.add(types00); types.add(types1); types1.add(types10); names.add("list1"); constructors0.add("cons1"); selectors00.add("car1"); types00.add(vc.intType().getExpr()); selectors00.add("cdr1"); types00.add(vc.stringExpr("list2")); names.add("list2"); constructors1.add("cons2"); selectors10.add("car2"); types10.add(vc.intType().getExpr()); selectors10.add("cdr2"); types10.add(vc.stringExpr("list1")); constructors1.add("null"); List returnTypes = vc.dataType(names, constructors, selectors, types); Type list1 = (Type)returnTypes.get(0); Type list2 = (Type)returnTypes.get(1); Expr x = vc.varExpr("x", vc.intType()); Expr y = vc.varExpr("y", list2); Expr z = vc.varExpr("z", list1); List args = new ArrayList(); args.add(x); args.add(y); Expr cons1 = vc.datatypeConsExpr("cons1", args); Expr isnull = vc.datatypeTestExpr("null", y); Expr hyp = vc.andExpr(vc.eqExpr(z, cons1), isnull); Expr nullE = vc.datatypeConsExpr("null", new ArrayList()); args = new ArrayList(); args.add(x); args.add(nullE); Expr cons1_2 = vc.datatypeConsExpr("cons1", args); boolean b = check(vc, vc.impliesExpr(hyp, vc.eqExpr(z, cons1_2))); DebugAssert(b, "Should be valid"); } catch(TypecheckException e) { // fall through } vc.delete(); vc = ValidityChecker.create(); { List constructors = new ArrayList(); List selectors = new ArrayList(); selectors.add(new ArrayList()); selectors.add(new ArrayList()); List types = new ArrayList(); types.add(new ArrayList()); types.add(new ArrayList()); constructors.add("A"); constructors.add("B"); Type two = vc.dataType("two", constructors, selectors, types); Expr x = vc.varExpr("x", two); Expr y = vc.varExpr("y", two); Expr z = vc.varExpr("z", two); List args = new ArrayList(); args.add(vc.notExpr(vc.eqExpr(x,y))); args.add(vc.notExpr(vc.eqExpr(y,z))); args.add(vc.notExpr(vc.eqExpr(x,z))); boolean b = check(vc, vc.notExpr(vc.andExpr(args))); DebugAssert(b, "Should be valid"); } return true; } catch (Exception e) { System.out.println("*** Exception caught in test17(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); } } public static boolean test18() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("tcc", true); vc = ValidityChecker.create(flags); List names = new ArrayList(); List constructors = new ArrayList(); List constructors0 = new ArrayList(); List constructors1 = new ArrayList(); List constructors2 = new ArrayList(); constructors.add(constructors0); constructors.add(constructors1); constructors.add(constructors2); List selectors = new ArrayList(); List selectors0 = new ArrayList(); List selectors1 = new ArrayList(); List selectors2 = new ArrayList(); List selectors00 = new ArrayList(); List selectors01 = new ArrayList(); List selectors10 = new ArrayList(); List selectors11 = new ArrayList(); List selectors20 = new ArrayList(); List selectors21 = new ArrayList(); selectors.add(selectors0); selectors0.add(selectors00); selectors0.add(selectors01); selectors.add(selectors1); selectors1.add(selectors10); selectors1.add(selectors11); selectors.add(selectors2); selectors2.add(selectors20); selectors2.add(selectors21); List types = new ArrayList(); List types0 = new ArrayList(); List types1 = new ArrayList(); List types2 = new ArrayList(); List types00 = new ArrayList(); List types01 = new ArrayList(); List types10 = new ArrayList(); List types11 = new ArrayList(); List types20 = new ArrayList(); List types21 = new ArrayList(); types.add(types0); types0.add(types00); types0.add(types01); types.add(types1); types1.add(types10); types1.add(types11); types.add(types2); types2.add(types20); types2.add(types21); names.add("nat"); constructors0.add("zero"); constructors0.add("succ"); selectors01.add("pred"); types01.add(vc.stringExpr("nat")); names.add("list"); constructors1.add("cons"); selectors10.add("car"); types10.add(vc.stringExpr("tree")); selectors10.add("cdr"); types10.add(vc.stringExpr("list")); constructors1.add("null"); names.add("tree"); constructors2.add("leaf"); constructors2.add("node"); selectors21.add("data"); types21.add(vc.stringExpr("nat")); selectors21.add("children"); types21.add(vc.stringExpr("list")); List returnTypes = vc.dataType(names, constructors, selectors, types); Type nat = (Type)returnTypes.get(0); Type listType = (Type)returnTypes.get(1); Type tree = (Type)returnTypes.get(2); Expr x = vc.varExpr("x", nat); List args = new ArrayList(); Expr zero = vc.datatypeConsExpr("zero", args); Expr nullE = vc.datatypeConsExpr("null", args); Expr leaf = vc.datatypeConsExpr("leaf", args); vc.push(); try { check(vc, vc.notExpr(vc.eqExpr(zero, nullE))); DebugAssert(false, "Should have caught tcc exception"); } catch (TypecheckException e) { } vc.pop(); args.add(vc.datatypeSelExpr("pred",x)); Expr spx = vc.datatypeConsExpr("succ", args); Expr spxeqx = vc.eqExpr(spx, x); vc.push(); try { check(vc, spxeqx); DebugAssert(false, "Should have caught tcc exception"); } catch(TypecheckException e) { } vc.pop(); boolean b = check(vc, vc.impliesExpr(vc.datatypeTestExpr("succ", x), spxeqx)); DebugAssert(b, "Should be valid"); b = check(vc, vc.orExpr(vc.datatypeTestExpr("zero", x), vc.datatypeTestExpr("succ", x))); DebugAssert(b, "Should be valid"); Expr y = vc.varExpr("y", nat); Expr xeqy = vc.eqExpr(x, y); args.clear(); args.add(x); Expr sx = vc.datatypeConsExpr("succ", args); args.clear(); args.add(y); Expr sy = vc.datatypeConsExpr("succ", args); Expr sxeqsy = vc.eqExpr(sx,sy); b = check(vc, vc.impliesExpr(xeqy, sxeqsy)); DebugAssert(b, "Should be valid"); b = check(vc, vc.notExpr(vc.eqExpr(sx, zero))); DebugAssert(b, "Should be valid"); b = check(vc, vc.impliesExpr(sxeqsy, xeqy)); DebugAssert(b, "Should be valid"); b = check(vc, vc.notExpr(vc.eqExpr(sx, x))); DebugAssert(b, "Should be valid"); return true; } catch (Exception e) { System.out.println("*** Exception caught in test18(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static boolean test19() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); vc = ValidityChecker.create(flags); Type RealType= vc.realType(); Type IntType= vc.intType(); Type BoolType= vc.boolType(); Type PtrType = RealType; Type HeapType = vc.arrayType(PtrType, RealType); // ----------------- //ASSERT(FORALL (CVCi: REAL): (Hs[CVCi] = Ht[CVCi])); //QUERY(Hs[(t6 + (3 * 1))] = Ht[(t6 + (3 * 1))]); Expr Ad = vc.boundVarExpr("CVCi", "CVCi", RealType); Expr Hs = vc.varExpr("Hs", HeapType); Expr Ht = vc.varExpr("Ht", HeapType); Expr t6 = vc.varExpr("t6", RealType); List Vars = new ArrayList(); Vars.add(Ad); // Body = (Hs[Ad] = Ht[Ad]) Expr Body = vc.eqExpr(vc.readExpr(Hs, Ad), vc.readExpr(Ht, Ad)); //A = forall (~i:REAL): Body Expr A = vc.forallExpr(Vars, Body); // Q = (Hs[t6] = Ht[t6]) Expr Q = vc.eqExpr(vc.readExpr(Hs, t6), vc.readExpr(Ht, t6)); // ----------- CHECK A . Q vc.push(); vc.assertFormula(A); System.out.println("Checking formula " + Q); System.out.println(" in context " + A); QueryResult Succ = vc.query(Q); DebugAssert(Succ == QueryResult.VALID, "Expected valid formula"); return true; } catch (Exception e) { System.out.println("*** Exception caught in test19(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static boolean testNonlinearBV() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); flags.setFlag("dagify-exprs",false); vc = ValidityChecker.create(flags); int bvLength = 8; Rational zero = new Rational(0, vc.embeddedManager()); Expr x = vc.varExpr("x", vc.bitvecType(bvLength)); Expr y = vc.varExpr("y", vc.bitvecType(bvLength)); Expr bv0 = vc.newBVConstExpr(zero, bvLength); // BVUDIV vc.push(); System.out.println("Checking BVUDIV:"); Expr udiv = vc.newBVUDivExpr(x, y); Expr umult = vc.newBVMultExpr(bvLength, udiv, y); Expr test = vc.eqExpr(bv0, y); boolean result = check(vc, vc.impliesExpr(vc.notExpr(test), vc.newBVLEExpr(umult, x)), true); DebugAssert(result, "Expected valid formula"); vc.pop(); // BVUREM vc.push(); System.out.println("Checking BVUREM:"); Expr urem = vc.newBVURemExpr(x, y); result = check(vc, vc.impliesExpr(vc.notExpr(test), vc.newBVLTExpr(urem, y)), true); DebugAssert(result, "Expected valid formula"); vc.pop(); // BVSDIV vc.push(); System.out.println("Checking BVSDIV:"); Expr sdiv = vc.newBVSDivExpr(x, y); Expr smult = vc.newBVMultExpr(bvLength, sdiv, y); Expr signed_test = vc.newBVSLEExpr(bv0, x); signed_test = vc.andExpr(signed_test, vc.newBVSLTExpr(bv0, y)); result = check(vc, vc.impliesExpr(signed_test, vc.newBVSLEExpr(smult, x)), true); DebugAssert(result, "Expected valid formula"); vc.pop(); // BVSREM vc.push(); System.out.println("Checking BVSREM:"); Expr srem = vc.newBVSRemExpr(x, y); result = check(vc, vc.impliesExpr(signed_test, vc.newBVLTExpr(srem, y)), true); DebugAssert(result, "Expected valid formula"); vc.pop(); // BVSMOD vc.push(); System.out.println("Checking BVSMOD:"); Expr smod = vc.newBVSModExpr(x, y); result = check(vc, vc.impliesExpr(signed_test, vc.newBVLTExpr(smod, y)), true); DebugAssert(result, "Expected valid formula"); vc.pop(); return true; } catch (Exception e) { System.out.println("*** Exception caught in test19(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } public static boolean testDistinct() throws Cvc3Exception { ValidityChecker vc = null; FlagsMut flags = null; try { flags = ValidityChecker.createFlags(null); vc = ValidityChecker.create(flags); int bvLength = 2; int elements_count = bvLength*bvLength + 1; List elements = new ArrayList(); for (int i = 0; i < elements_count; i ++) elements.add(vc.varExpr("x" + i, vc.bitvecType(bvLength))); Expr distinct = vc.distinctExpr(elements); boolean result = check(vc, vc.notExpr(distinct), true); DebugAssert(result, "Expected valid formula"); return true; } catch (Exception e) { System.out.println("*** Exception caught in test19(): \n" + e); e.printStackTrace(System.out); return false; } finally { if (vc != null) vc.delete(); if (flags != null) flags.delete(); } } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Theorem.java000066400000000000000000000004001313116454100226720ustar00rootroot00000000000000package cvc3; import java.util.*; public class Theorem extends Embedded { // jni methods /// Constructor public Theorem(Object Theorem, EmbeddedManager embeddedManager) { super(Theorem, embeddedManager); } /// API (immutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/TheoremMut.java000066400000000000000000000004631313116454100233710ustar00rootroot00000000000000package cvc3; import java.util.*; public class TheoremMut extends Theorem { // jni methods /// Constructor // create embedded object public TheoremMut(Object TheoremMut, EmbeddedManager embeddedManager) { super(TheoremMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/TimeoutHandler.java000066400000000000000000000003151313116454100242200ustar00rootroot00000000000000package cvc3; import java.util.*; // used to enforce timeout in class Cvc3 class TimeoutHandler extends TimerTask { public void run() { System.out.println("self-timeout."); System.exit(1); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/Type.java000066400000000000000000000065261313116454100222270ustar00rootroot00000000000000package cvc3; public class Type extends Embedded { // jni methods private static native boolean jniIsAny(Object Type) throws Cvc3Exception; private static native boolean jniIsArray(Object Type) throws Cvc3Exception; private static native boolean jniIsBitvector(Object Type) throws Cvc3Exception; private static native boolean jniIsBool(Object Type) throws Cvc3Exception; private static native boolean jniIsDatatype(Object Type) throws Cvc3Exception; private static native boolean jniIsFunction(Object Type) throws Cvc3Exception; private static native boolean jniIsNull(Object Type) throws Cvc3Exception; private static native boolean jniIsSubtype(Object Type) throws Cvc3Exception; private static native Object jniGetExpr(Object Type) throws Cvc3Exception; private static native int jniArity(Object Type) throws Cvc3Exception; private static native Type jniGetChild(Object Type, int i) throws Cvc3Exception; private static native boolean jniEquals(Object Type1, Object Type2) throws Cvc3Exception; private static native String jniToString(Object Type) throws Cvc3Exception; private static native Object jniConstr(Object expr) throws Cvc3Exception; public static Type valueOf(Expr expr) throws Cvc3Exception { return new Type(jniConstr(expr.embedded()), expr.embeddedManager()); } /// Constructor public Type(Object Type, EmbeddedManager embeddedManager) { super(Type, embeddedManager); } /// API (immutable) public boolean isAny() throws Cvc3Exception { return jniIsAny(embedded()); } public boolean isArray() throws Cvc3Exception { return jniIsArray(embedded()); } public boolean isBitvector() throws Cvc3Exception { return jniIsBitvector(embedded()); } public boolean isBoolean() throws Cvc3Exception { return jniIsBool(embedded()); } public boolean isDatatype() throws Cvc3Exception { return jniIsDatatype(embedded()); } public boolean isFunction() throws Cvc3Exception { return jniIsFunction(embedded()); } public boolean isNull() throws Cvc3Exception { return jniIsNull(embedded()); } public boolean isSubtype() throws Cvc3Exception { return jniIsSubtype(embedded()); } public Expr getExpr() throws Cvc3Exception { return new Expr(jniGetExpr(embedded()), embeddedManager()); } public int arity() throws Cvc3Exception { return jniArity(embedded()); } public Type getChild(int i) throws Cvc3Exception { assert(i >= 0 && i < arity()); return new Type(jniGetChild(embedded(), i), embeddedManager()); } // Printing public String toString() { String result = ""; try { result = jniToString(embedded()); } catch (Cvc3Exception e) { System.out.println(e); assert(false); } return result; } public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Type)) return false; boolean result = false; try { result = jniEquals(embedded(), ((Embedded)o).embedded()); } catch (Cvc3Exception e) { assert(false); } return result; } // must return the same hash code for two exprs if equals returns true public int hashCode() { try { return getExpr().hashCode(); } catch (Cvc3Exception e) { assert(false); } assert(false); return 0; } } cvc4-1.5/src/bindings/compat/java/src/cvc3/TypeMut.java000066400000000000000000000004441313116454100227060ustar00rootroot00000000000000package cvc3; import java.util.*; public class TypeMut extends Type { // jni methods /// Constructor // create embedded object public TypeMut(Object TypeMut, EmbeddedManager embeddedManager) { super(TypeMut, embeddedManager); } /// API (mutable) } cvc4-1.5/src/bindings/compat/java/src/cvc3/TypecheckException.java000066400000000000000000000004041313116454100250710ustar00rootroot00000000000000package cvc3; import java.util.*; /** mirrors CVC3::TypecheckException */ public class TypecheckException extends Cvc3Exception { private final static long serialVersionUID = 1L; public TypecheckException(String message) { super(message); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/ValidityChecker.java000066400000000000000000001757711313116454100243710ustar00rootroot00000000000000package cvc3; import java.util.*; import cvc3.Expr; import cvc3.JniUtils; public class ValidityChecker extends Embedded { // jni methods private static native Object jniCreate1() throws Cvc3Exception; private static native Object jniCreate2(Object Flags) throws Cvc3Exception; private static native Object jniCreateFlags() throws Cvc3Exception; private static native Object jniGetFlags(Object ValidityChecker) throws Cvc3Exception; private static native Object jniBoolType(Object ValidityChecker) throws Cvc3Exception; private static native Object jniRealType(Object ValidityChecker) throws Cvc3Exception; private static native Object jniIntType(Object ValidityChecker) throws Cvc3Exception; private static native Object jniSubrangeType(Object ValidityChecker, Object lExpr, Object rExpr) throws Cvc3Exception; private static native Object jniSubtypeType(Object ValidityChecker, Object predExpr, Object witnessExpr) throws Cvc3Exception; private static native Object jniTupleType1(Object ValidityChecker, Object Type0, Object Type1) throws Cvc3Exception; private static native Object jniTupleType2(Object ValidityChecker, Object Type0, Object Type1, Object Type2) throws Cvc3Exception; private static native Object jniTupleType3(Object ValidityChecker, Object[] Types) throws Cvc3Exception; private static native Object jniRecordType1(Object ValidityChecker, String field, Object Type) throws Cvc3Exception; private static native Object jniRecordType2(Object ValidityChecker, String field0, Object Type0, String field1, Object Type1) throws Cvc3Exception; private static native Object jniRecordType3(Object ValidityChecker, String field0, Object Type0, String field1, Object Type1, String field2, Object Type2) throws Cvc3Exception; private static native Object jniRecordType4(Object ValidityChecker, Object[] fields, Object[] types) throws Cvc3Exception; private static native Object jniDataType1(Object ValidityChecker, String name, String constructor, Object[] selectors, Object[] types) throws Cvc3Exception; private static native Object jniDataType2(Object ValidityChecker, String name, Object[] constructors, Object[] selectors, Object[] types) throws Cvc3Exception; private static native Object[] jniDataType3(Object ValidityChecker, Object[] names, Object[] constructors, Object[] selectors, Object[] types) throws Cvc3Exception; private static native Object jniAnyType(Object ValidityChecker) throws Cvc3Exception; private static native Object jniArrayLiteral(Object ValidityChecker, Object indexVar, Object bodyExpr) throws Cvc3Exception; private static native Object jniArrayType(Object ValidityChecker, Object TypeIndex, Object TypeData) throws Cvc3Exception; private static native Object jniBitvecType(Object ValidityChecker, int n) throws Cvc3Exception; private static native Object jniFunType1(Object ValidityChecker, Object typeDom, Object TypeRan) throws Cvc3Exception; private static native Object jniFunType2(Object ValidityChecker, Object[] typeDom, Object TypeRan) throws Cvc3Exception; private static native Object jniCreateType1(Object ValidityChecker, String typeName) throws Cvc3Exception; private static native Object jniCreateType2(Object ValidityChecker, String typeName, Object TypeDef) throws Cvc3Exception; private static native Object jniLookupType(Object ValidityChecker, String typeName) throws Cvc3Exception; private static native Object jniGetExprManager(Object ValidityChecker) throws Cvc3Exception; private static native Object jniNullExpr(Object ValidityChecker) throws Cvc3Exception; private static native Object jniVarExpr1(Object ValidityChecker, String name, Object Type) throws Cvc3Exception; private static native Object jniVarExpr2(Object ValidityChecker, String name, Object Type, Object defExpr) throws Cvc3Exception; private static native Object jniBoundVarExpr(Object ValidityChecker, String name, String uid, Object Type) throws Cvc3Exception; /*private static native Object jniBoundVarExpr2(Object ValidityChecker, Object Type) throws Cvc3Exception; */ private static native Object jniLookupVar(Object ValidityChecker, String name) throws Cvc3Exception; private static native Object jniLookupOp(Object ValidityChecker, String name) throws Cvc3Exception; private static native Object jniGetType(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniGetBaseType1(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniGetBaseType2(Object ValidityChecker, Object Type) throws Cvc3Exception; private static native Object jniGetTypePred(Object ValidityChecker, Object Type, Object Expr) throws Cvc3Exception; private static native Object jniStringExpr(Object ValidityChecker, String str) throws Cvc3Exception; private static native Object jniIdExpr(Object ValidityChecker, String name) throws Cvc3Exception; private static native Object jniListExpr1(Object ValidityChecker, Object[] kids) throws Cvc3Exception; private static native Object jniListExpr2(Object ValidityChecker, Object Expr1) throws Cvc3Exception; private static native Object jniListExpr3(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniListExpr4(Object ValidityChecker, Object Expr1, Object Expr2, Object Expr3) throws Cvc3Exception; private static native Object jniListExpr5(Object ValidityChecker, String op, Object[] kids) throws Cvc3Exception; private static native Object jniListExpr6(Object ValidityChecker, String op, Object Expr1) throws Cvc3Exception; private static native Object jniListExpr7(Object ValidityChecker, String op, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniListExpr8(Object ValidityChecker, String op, Object Expr1, Object Expr2, Object Expr3) throws Cvc3Exception; private static native void jniPrintExpr(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniParseExpr(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniParseType(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniImportExpr(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniImportType(Object ValidityChecker, Object Type) throws Cvc3Exception; private static native void jniCmdsFromString(Object ValidityChecker, String s) throws Cvc3Exception; private static native Object jniExprFromString(Object ValidityChecker, String s) throws Cvc3Exception; private static native Object jniTrueExpr(Object ValidityChecker) throws Cvc3Exception; private static native Object jniFalseExpr(Object ValidityChecker) throws Cvc3Exception; private static native Object jniNotExpr(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniAndExpr1(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniAndExpr2(Object ValidityChecker, Object[] ExprChildren) throws Cvc3Exception; private static native Object jniOrExpr1(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniOrExpr2(Object ValidityChecker, Object[] Exprchildren) throws Cvc3Exception; private static native Object jniImpliesExpr(Object ValidityChecker, Object ExprHyp, Object ExprConc) throws Cvc3Exception; private static native Object jniIffExpr(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniEqExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniDistinctExpr(Object ValidityChecker, Object[] ExprChildren) throws Cvc3Exception; private static native Object jniIteExpr(Object ValidityChecker, Object ExprIf, Object ExprThen, Object ExprElse) throws Cvc3Exception; private static native Object jniCreateOp1(Object ValidityChecker, String name, Object Type) throws Cvc3Exception; private static native Object jniCreateOp2(Object ValidityChecker, String name, Object Type, Object ExprDef) throws Cvc3Exception; private static native Object jniEqOp() throws Cvc3Exception; private static native Object jniLtOp() throws Cvc3Exception; private static native Object jniLeOp() throws Cvc3Exception; private static native Object jniGtOp() throws Cvc3Exception; private static native Object jniGeOp() throws Cvc3Exception; private static native Object jniPlusOp() throws Cvc3Exception; private static native Object jniMinusOp() throws Cvc3Exception; private static native Object jniMultOp() throws Cvc3Exception; private static native Object jniDivideOp() throws Cvc3Exception; private static native Object jniFunExpr1(Object ValidityChecker, Object Op, Object Expr) throws Cvc3Exception; private static native Object jniFunExpr2(Object ValidityChecker, Object Op, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniFunExpr3(Object ValidityChecker, Object Op, Object Expr1, Object Expr2, Object Expr3) throws Cvc3Exception; private static native Object jniFunExpr4(Object ValidityChecker, Object Op, Object[] ExprChildren) throws Cvc3Exception; private static native Object jniRatExpr1(Object ValidityChecker, int n, int d) throws Cvc3Exception; private static native Object jniRatExpr2(Object ValidityChecker, String n, String d, int base) throws Cvc3Exception; private static native Object jniRatExpr3(Object ValidityChecker, String n, int base) throws Cvc3Exception; private static native Object jniUminusExpr(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniPlusExpr1(Object ValidityChecker, Object Exprleft, Object ExprRight) throws Cvc3Exception; private static native Object jniPlusExpr2(Object ValidityChecker, Object[] kids) throws Cvc3Exception; private static native Object jniMinusExpr(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniMultExpr(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniPowExpr(Object ValidityChecker, Object ExprX, Object ExprN) throws Cvc3Exception; private static native Object jniDivideExpr(Object ValidityChecker, Object ExprNumerator, Object ExprDenominator) throws Cvc3Exception; private static native Object jniLtExpr(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniLeExpr(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniGtExpr(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniGeExpr(Object ValidityChecker, Object ExprLeft, Object ExprRight) throws Cvc3Exception; private static native Object jniRecordExpr1(Object ValidityChecker, String field, Object Expr) throws Cvc3Exception; private static native Object jniRecordExpr2(Object ValidityChecker, String field1, Object Expr1, String field2, Object Expr2) throws Cvc3Exception; private static native Object jniRecordExpr3(Object ValidityChecker, String field1, Object Expr1, String field2, Object Expr2, String field3, Object Expr3) throws Cvc3Exception; private static native Object jniRecordExpr4(Object ValidityChecker, Object[] StringFields, Object[] Exprs) throws Cvc3Exception; private static native Object jniRecSelectExpr(Object ValidityChecker, Object ExprRecord, String field) throws Cvc3Exception; private static native Object jniRecUpdateExpr(Object ValidityChecker, Object ExprRecord, String field, Object ExprNewValue) throws Cvc3Exception; private static native Object jniReadExpr(Object ValidityChecker, Object ExprArray, Object ExprIndex) throws Cvc3Exception; private static native Object jniWriteExpr(Object ValidityChecker, Object ExprArray, Object ExprIndex, Object ExprNewValue) throws Cvc3Exception; private static native Object jniNewBVConstExpr1(Object ValidityChecker, String s, int base) throws Cvc3Exception; private static native Object jniNewBVConstExpr2(Object ValidityChecker, boolean[] bits) throws Cvc3Exception; private static native Object jniNewBVConstExpr3(Object ValidityChecker, Object RationalR, int len) throws Cvc3Exception; private static native Object jniNewConcatExpr1(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewConcatExpr2(Object ValidityChecker, Object[] Exprkids) throws Cvc3Exception; private static native Object jniNewBVExtractExpr(Object ValidityChecker, Object ExprE, int hi, int low) throws Cvc3Exception; private static native Object jniNewBVNegExpr(Object ValidityChecker, Object Expr1) throws Cvc3Exception; private static native Object jniNewBVAndExpr1(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVAndExpr2(Object ValidityChecker, Object[] ExprKids) throws Cvc3Exception; private static native Object jniNewBVOrExpr1(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVOrExpr2(Object ValidityChecker, Object[] ExprKids) throws Cvc3Exception; private static native Object jniNewBVXorExpr1(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVXorExpr2(Object ValidityChecker, Object[] ExprKids) throws Cvc3Exception; private static native Object jniNewBVXnorExpr1(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVXnorExpr2(Object ValidityChecker, Object[] ExprKids) throws Cvc3Exception; private static native Object jniNewBVNandExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVNorExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVLTExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVLEExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVSLTExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVSLEExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewSXExpr(Object ValidityChecker, Object Expr1, int len) throws Cvc3Exception; private static native Object jniNewBVUminusExpr(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniNewBVSubExpr(Object ValidityChecker, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVPlusExpr(Object ValidityChecker, int numbits, Object[] ExprK) throws Cvc3Exception; private static native Object jniNewBVMultExpr(Object ValidityChecker, int numbits, Object Expr1, Object Expr2) throws Cvc3Exception; private static native Object jniNewBVUDivExpr(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewBVURemExpr(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewBVSDivExpr(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewBVSRemExpr(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewBVSModExpr(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewBVSHL(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewBVLSHR(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewBVASHR(Object ValidityChecker, Object left, Object right) throws Cvc3Exception; private static native Object jniNewFixedLeftShiftExpr(Object ValidityChecker, Object Expr1, int r) throws Cvc3Exception; private static native Object jniNewFixedConstWidthLeftShiftExpr(Object ValidityChecker, Object Expr1, int r) throws Cvc3Exception; private static native Object jniNewFixedRightShiftExpr(Object ValidityChecker, Object Expr1, int r) throws Cvc3Exception; private static native Object jniComputeBVConst(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniTupleExpr(Object ValidityChecker, Object[] Exprs) throws Cvc3Exception; private static native Object jniTupleSelectExpr(Object ValidityChecker, Object ExprTuple, int index) throws Cvc3Exception; private static native Object jniTupleUpdateExpr(Object ValidityChecker, Object ExprTuple, int index, Object ExprNewValue) throws Cvc3Exception; private static native Object jniDatatypeConsExpr(Object ValidityChecker, String constructor, Object[] ExprArgs) throws Cvc3Exception; private static native Object jniDatatypeSelExpr(Object ValidityChecker, String selector, Object ExprArg) throws Cvc3Exception; private static native Object jniDatatypeTestExpr(Object ValidityChecker, String constructor, Object ExprArg) throws Cvc3Exception; private static native Object jniForallExpr1(Object ValidityChecker, Object[] ExprVars, Object ExprBody) throws Cvc3Exception; private static native Object jniForallExpr2(Object ValidityChecker, Object[] ExprVars, Object ExprBody, Object ExprTrigger) throws Cvc3Exception; private static native Object jniForallExpr3(Object ValidityChecker, Object[] ExprVars, Object ExprBody, Object[] ExprTriggers) throws Cvc3Exception; private static native Object jniForallExpr4(Object ValidityChecker, Object[] ExprVars, Object ExprBody, Object[][] ExprTriggers) throws Cvc3Exception; private static native void jniSetTrigger(Object ValidityChecker, Object ExprClosure, Object ExprTrigger) throws Cvc3Exception; private static native void jniSetTriggers(Object ValidityChecker, Object ExprClosure, Object[] ExprTriggers) throws Cvc3Exception; private static native void jniSetTriggers2(Object ValidityChecker, Object ExprClosure, Object[][] ExprTriggers) throws Cvc3Exception; private static native void jniSetMultiTrigger(Object ValidityChecker, Object ExprClosure, Object[] ExprMultiTrigger) throws Cvc3Exception; private static native Object jniExistsExpr(Object ValidityChecker, Object[] ExprVars, Object ExprBody) throws Cvc3Exception; private static native Object jniLambdaExpr(Object ValidityChecker, Object[] ExprVars, Object ExprBody) throws Cvc3Exception; private static native Object jniTransClosure(Object ValidityChecker, Object Op) throws Cvc3Exception; private static native Object jniSimulateExpr(Object ValidityChecker, Object ExprF, Object ExprS, Object[] ExprInputs, Object ExprN) throws Cvc3Exception; private static native void jniSetResourceLimit(Object ValidityChecker, int limit) throws Cvc3Exception; private static native void jniAssertFormula(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native void jniRegisterAtom(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native Object jniGetImpliedLiteral(Object ValidityChecker) throws Cvc3Exception; private static native Object jniSimplify(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native String jniQuery(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native String jniCheckUnsat(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native String jniCheckContinue(Object ValidityChecker) throws Cvc3Exception; private static native String jniRestart(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native void jniReturnFromCheck(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniGetUserAssumptions(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniGetInternalAssumptions(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniGetAssumptions(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniGetAssumptionsUsed(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniGetCounterExample(Object ValidityChecker, boolean inOrder) throws Cvc3Exception; private static native Object[] jniGetConcreteModel(Object ValidityChecker) throws Cvc3Exception; private static native Object jniGetValue(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native String jniValue(Object ValidityChecker, Object Expr) throws Cvc3Exception; private static native boolean jniInconsistent1(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniInconsistent2(Object ValidityChecker) throws Cvc3Exception; private static native boolean jniIncomplete1(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniIncomplete2(Object ValidityChecker) throws Cvc3Exception; private static native Object jniGetProof(Object ValidityChecker) throws Cvc3Exception; private static native Object jniGetTCC(Object ValidityChecker) throws Cvc3Exception; private static native Object[] jniGetAssumptionsTCC(Object ValidityChecker) throws Cvc3Exception; private static native Object jniGetProofTCC(Object ValidityChecker) throws Cvc3Exception; private static native Object jniGetClosure(Object ValidityChecker) throws Cvc3Exception; private static native Object jniGetProofClosure(Object ValidityChecker) throws Cvc3Exception; private static native int jniStackLevel(Object ValidityChecker) throws Cvc3Exception; private static native void jniPush(Object ValidityChecker) throws Cvc3Exception; private static native void jniPop(Object ValidityChecker) throws Cvc3Exception; private static native void jniPopTo(Object ValidityChecker, int stackLevel) throws Cvc3Exception; private static native int jniScopeLevel(Object ValidityChecker) throws Cvc3Exception; private static native void jniPushScope(Object ValidityChecker) throws Cvc3Exception; private static native void jniPopScope(Object ValidityChecker) throws Cvc3Exception; private static native void jniPopToScope(Object ValidityChecker, int scopeLevel) throws Cvc3Exception; private static native Object jniGetCurrentContext(Object ValidityChecker) throws Cvc3Exception; private static native void jniLoadFile1(Object ValidityChecker, String fileName, String lang) throws Cvc3Exception; private static native Object jniGetStatistics(Object ValidityChecker) throws Cvc3Exception; private static native void jniPrintStatistics(Object ValidityChecker) throws Cvc3Exception; private static native void jniSetTimeLimit(Object ValidityChecker, int limit) throws Cvc3Exception; // delete ValidityChecker, all expressions created using it, // and all embedded objects registered with its embeddedManager public synchronized void delete() throws Cvc3Exception { if (isDeleted()) return; //:TEST: embeddedManager().cleanUp(); embeddedManager().delete(); EmbeddedManager.jniDelete(embedded()); d_embedded = null; } // ensure that all embedded objects are deallocated eventually public void finalize() throws Throwable { try { if (!isDeleted()) { assert(false); // System.out.println("ValidityChecker.Finalizer: should never be called"); throw new Error("ValidityChecker.Finalizer: should never be called"); } } finally { super.finalize(); } } /// Constructor // create embedded object protected ValidityChecker(Object ValidityChecker) { super(ValidityChecker, new EmbeddedManager()); } /// API: ValidityChecker // Creation // delete must be called before ValidityChecker is garbage collected public static ValidityChecker create() throws Cvc3Exception { return new ValidityChecker(jniCreate1()); } // delete must be called before ValidityChecker is garbage collected public static ValidityChecker create(Flags flags) throws Cvc3Exception { return new ValidityChecker(jniCreate2(flags.embedded())); } // Flags // if embeddedManger is null then delete must be called before // the returned Flags is garbage collected public static FlagsMut createFlags(EmbeddedManager embeddedManager) throws Cvc3Exception { return new FlagsMut(jniCreateFlags(), embeddedManager); } public FlagsMut getFlags() throws Cvc3Exception { return new FlagsMut(jniGetFlags(embedded()), embeddedManager()); } // Type-related methods public TypeMut boolType() throws Cvc3Exception { return new TypeMut(jniBoolType(embedded()), embeddedManager()); } public TypeMut realType() throws Cvc3Exception { return new TypeMut(jniRealType(embedded()), embeddedManager()); } public TypeMut intType() throws Cvc3Exception { return new TypeMut(jniIntType(embedded()), embeddedManager()); } public TypeMut subrangeType(Expr l, Expr r) throws Cvc3Exception { return new TypeMut( jniSubrangeType(embedded(), l.embedded(), r.embedded()), embeddedManager()); } public TypeMut subtypeType(Expr pred, Expr witness) throws Cvc3Exception { return new TypeMut( jniSubtypeType(embedded(), pred.embedded(), witness.embedded()), embeddedManager()); } public TypeMut tupleType(Type type0, Type type1) throws Cvc3Exception { return new TypeMut( jniTupleType1(embedded(), type0.embedded(), type1.embedded()), embeddedManager()); } public TypeMut tupleType(Type type0, Type type1, Type type2) throws Cvc3Exception { return new TypeMut( jniTupleType2(embedded(), type0.embedded(), type1.embedded(), type2.embedded()), embeddedManager()); } public TypeMut tupleType(List types) throws Cvc3Exception { return new TypeMut( jniTupleType3(embedded(), JniUtils.unembedList(types)), embeddedManager()); } public TypeMut recordType(String field, Type type) throws Cvc3Exception { return new TypeMut( jniRecordType1(embedded(), field, type.embedded()), embeddedManager()); } public TypeMut recordType(String field0, Type type0, String field1, Type type1) throws Cvc3Exception { return new TypeMut( jniRecordType2(embedded(), field0, type0.embedded(), field1, type1.embedded()), embeddedManager()); } public TypeMut recordType(String field0, Type type0, String field1, Type type1, String field2, Type type2) throws Cvc3Exception { return new TypeMut( jniRecordType3(embedded(), field0, type0.embedded(), field1, type1.embedded(), field2, type2.embedded()), embeddedManager()); } public TypeMut recordType(List fields, List types) throws Cvc3Exception { assert(JniUtils.listInstanceof(fields, String.class)); return new TypeMut( jniRecordType4(embedded(), JniUtils.toArray(fields), JniUtils.unembedList(types)), embeddedManager()); } public TypeMut dataType(String name, String constructor, List selectors, List types) throws Cvc3Exception { assert(JniUtils.listInstanceof(selectors, String.class)); assert(JniUtils.listInstanceof(types, Expr.class)); return new TypeMut( jniDataType1(embedded(), name, constructor, JniUtils.toArray(selectors), JniUtils.unembedList(types)), embeddedManager()); } public TypeMut dataType(String name, String[] constructors, String[][] selectors, Expr[][] types) throws Cvc3Exception { return new TypeMut( jniDataType2(embedded(), name, constructors, selectors, JniUtils.unembedArrayArray(types)), embeddedManager()); } public TypeMut dataType(String name, List constructors, List selectors, List types) throws Cvc3Exception { assert(JniUtils.listInstanceof(constructors, String.class)); assert(JniUtils.listListInstanceof(selectors, String.class)); assert(JniUtils.listListInstanceof(types, Expr.class)); return new TypeMut( jniDataType2(embedded(), name, JniUtils.toArray(constructors), JniUtils.toArrayArray(selectors), JniUtils.unembedListList(types)), embeddedManager()); } public List dataType(List names, List constructors, List selectors, List types) throws Cvc3Exception { assert(JniUtils.listInstanceof(names, String.class)); assert(JniUtils.listListInstanceof(constructors, String.class)); assert(JniUtils.listListListInstanceof(selectors, String.class)); assert(JniUtils.listListListInstanceof(types, Expr.class)); Object[] dataTypes = jniDataType3(embedded(), JniUtils.toArray(names), JniUtils.toArrayArray(constructors), JniUtils.toArrayArrayArray(selectors), JniUtils.unembedListListList(types)); return JniUtils.embedList(dataTypes, TypeMut.class, embeddedManager()); } public ExprMut arrayLiteral(Expr var, Expr body) throws Cvc3Exception { return new ExprMut(jniArrayLiteral(embedded(), var.embedded(), body.embedded()),embeddedManager()); } public TypeMut anyType() throws Cvc3Exception { return new TypeMut(jniAnyType(embedded()),embeddedManager()); } public TypeMut arrayType(Type typeIndex, Type typeData) throws Cvc3Exception { return new TypeMut( jniArrayType(embedded(), typeIndex.embedded(), typeData.embedded()), embeddedManager()); } public TypeMut bitvecType(int n) throws Cvc3Exception { return new TypeMut( jniBitvecType(embedded(), n), embeddedManager()); } public TypeMut funType(Type typeDom, Type typeRange) throws Cvc3Exception { return new TypeMut( jniFunType1(embedded(), typeDom.embedded(), typeRange.embedded()), embeddedManager()); } public TypeMut funType(List typeDom, Type typeRange) throws Cvc3Exception { assert(JniUtils.listInstanceof(typeDom, Type.class)); return new TypeMut( jniFunType2(embedded(), JniUtils.unembedList(typeDom), typeRange.embedded()), embeddedManager()); } public TypeMut createType(String typeName) throws Cvc3Exception { return new TypeMut( jniCreateType1(embedded(), typeName), embeddedManager()); } public TypeMut createType(String typeName, Type typeDef) throws Cvc3Exception { return new TypeMut( jniCreateType2(embedded(), typeName, typeDef.embedded()), embeddedManager()); } public TypeMut lookupType(String typeName) throws Cvc3Exception { return new TypeMut( jniLookupType(embedded(), typeName), embeddedManager()); } // Expressions public ExprManagerMut getExprManager() throws Cvc3Exception { return new ExprManagerMut(jniGetExprManager(embedded()), embeddedManager()); } public Expr nullExpr() throws Cvc3Exception { return new Expr(jniNullExpr(embedded()), embeddedManager()); } public ExprMut varExpr(String name, Type type) throws Cvc3Exception { return new ExprMut( jniVarExpr1(embedded(), name, type.embedded()), embeddedManager()); } public ExprMut varExpr(String name, Type type, Expr def) throws Cvc3Exception { return new ExprMut( jniVarExpr2(embedded(), name, type.embedded(), def.embedded()), embeddedManager()); } public ExprMut boundVarExpr(String name, String uid, Type type) throws Cvc3Exception { return new ExprMut( jniBoundVarExpr(embedded(), name, uid, type.embedded()), embeddedManager()); } /* public ExprMut boundVarExpr(Type type) throws Cvc3Exception { return new ExprMut( jniBoundVarExpr(embedded(), type.embedded()), embeddedManager()); }*/ public ExprMut lookupVar(String name) throws Cvc3Exception { return new ExprMut( jniLookupVar(embedded(), name), embeddedManager()); } public OpMut lookupOp(String name) throws Cvc3Exception { return new OpMut( jniLookupOp(embedded(), name), embeddedManager()); } public TypeMut getType(Expr expr) throws Cvc3Exception { return new TypeMut( jniGetType(embedded(), expr.embedded()), embeddedManager()); } public TypeMut getBaseType(Expr expr) throws Cvc3Exception { return new TypeMut( jniGetBaseType1(embedded(), expr.embedded()), embeddedManager()); } public TypeMut getBaseType(Type type) throws Cvc3Exception { return new TypeMut( jniGetBaseType2(embedded(), type.embedded()), embeddedManager()); } public ExprMut getTypePred(Type type, Expr expr) throws Cvc3Exception { return new ExprMut( jniGetTypePred(embedded(), type.embedded(), expr.embedded()), embeddedManager()); } public ExprMut stringExpr(String str) throws Cvc3Exception { return new ExprMut( jniStringExpr(embedded(), str), embeddedManager()); } public ExprMut idExpr(String name) throws Cvc3Exception { return new ExprMut( jniIdExpr(embedded(), name), embeddedManager()); } public ExprMut listExpr(List kids) throws Cvc3Exception { assert(JniUtils.listInstanceof(kids, Expr.class)); return new ExprMut( jniListExpr1(embedded(), JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut listExpr(Expr expr1) throws Cvc3Exception { return new ExprMut( jniListExpr2(embedded(), expr1.embedded()), embeddedManager()); } public ExprMut listExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniListExpr3(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut listExpr(Expr expr1, Expr expr2, Expr expr3) throws Cvc3Exception { return new ExprMut( jniListExpr4(embedded(), expr1.embedded(), expr2.embedded(), expr3.embedded()), embeddedManager()); } public ExprMut listExpr(String op, List kids) throws Cvc3Exception { assert(JniUtils.listInstanceof(kids, Expr.class)); return new ExprMut( jniListExpr5(embedded(), op, JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut listExpr(String op, Expr expr1) throws Cvc3Exception { return new ExprMut( jniListExpr6(embedded(), op, expr1.embedded()), embeddedManager()); } public ExprMut listExpr(String op, Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniListExpr7(embedded(), op, expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut listExpr(String op, Expr expr1, Expr expr2, Expr expr3) throws Cvc3Exception { return new ExprMut( jniListExpr8(embedded(), op, expr1.embedded(), expr2.embedded(), expr3.embedded()), embeddedManager()); } public void printExpr(Expr expr) throws Cvc3Exception { jniPrintExpr(embedded(), expr.embedded()); } public ExprMut parseExpr(Expr expr) throws Cvc3Exception { return new ExprMut( jniParseExpr(embedded(), expr.embedded()), embeddedManager()); } public TypeMut parseType(Expr expr) throws Cvc3Exception { return new TypeMut( jniParseType(embedded(), expr.embedded()), embeddedManager()); } public ExprMut importExpr(Expr expr) throws Cvc3Exception { return new ExprMut( jniImportExpr(embedded(), expr.embedded()), embeddedManager()); } public TypeMut importType(Type type) throws Cvc3Exception { return new TypeMut( jniImportType(embedded(), type.embedded()), embeddedManager()); } public void cmdsFromString(String s) throws Cvc3Exception { jniCmdsFromString(embedded(), s); } public ExprMut exprFromString(String s) throws Cvc3Exception { return new ExprMut( jniExprFromString(embedded(), s), embeddedManager() ); } public ExprMut trueExpr() throws Cvc3Exception { return new ExprMut(jniTrueExpr(embedded()), embeddedManager()); } public ExprMut falseExpr() throws Cvc3Exception { return new ExprMut(jniFalseExpr(embedded()), embeddedManager()); } public ExprMut notExpr(Expr expr) throws Cvc3Exception { return new ExprMut( jniNotExpr(embedded(), expr.embedded()), embeddedManager()); } public ExprMut andExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniAndExpr1(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut andExpr(List children) throws Cvc3Exception { assert(JniUtils.listInstanceof(children, Expr.class)); return new ExprMut( jniAndExpr2(embedded(), JniUtils.unembedList(children)), embeddedManager()); } public ExprMut orExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniOrExpr1(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut orExpr(List children) throws Cvc3Exception { assert(JniUtils.listInstanceof(children, Expr.class)); return new ExprMut( jniOrExpr2(embedded(), JniUtils.unembedList(children)), embeddedManager()); } public ExprMut impliesExpr(Expr hyp, Expr conc) throws Cvc3Exception { return new ExprMut( jniImpliesExpr(embedded(), hyp.embedded(), conc.embedded()), embeddedManager()); } public ExprMut iffExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniIffExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut eqExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniEqExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut distinctExpr(List children) throws Cvc3Exception { assert(JniUtils.listInstanceof(children, Expr.class)); return new ExprMut( jniDistinctExpr(embedded(), JniUtils.unembedList(children)), embeddedManager()); } public ExprMut iteExpr(Expr ifPart, Expr thenPart, Expr elsePart) throws Cvc3Exception { return new ExprMut( jniIteExpr(embedded(), ifPart.embedded(), thenPart.embedded(), elsePart.embedded()), embeddedManager()); } public OpMut createOp(String name, Type type) throws Cvc3Exception { return new OpMut( jniCreateOp1(embedded(), name, type.embedded()), embeddedManager()); } public OpMut createOp(String name, Type type, Expr expr) throws Cvc3Exception { return new OpMut( jniCreateOp2(embedded(), name, type.embedded(), expr.embedded()), embeddedManager()); } // '=' public OpMut eqOp() throws Cvc3Exception { return new OpMut(jniEqOp(), embeddedManager()); } // '<' public OpMut ltOp() throws Cvc3Exception { return new OpMut(jniLtOp(), embeddedManager()); } // '<=' public OpMut leOp() throws Cvc3Exception { return new OpMut(jniLeOp(), embeddedManager()); } // '>' public OpMut gtOp() throws Cvc3Exception { return new OpMut(jniGtOp(), embeddedManager()); } // '>=' public OpMut geOp() throws Cvc3Exception { return new OpMut(jniGeOp(), embeddedManager()); } // '+' public OpMut plusOp() throws Cvc3Exception { return new OpMut(jniPlusOp(), embeddedManager()); } // '-' public OpMut minusOp() throws Cvc3Exception { return new OpMut(jniMinusOp(), embeddedManager()); } // '*' public OpMut multOp() throws Cvc3Exception { return new OpMut(jniMultOp(), embeddedManager()); } // '/' for rationals public OpMut divideOp() throws Cvc3Exception { return new OpMut(jniDivideOp(), embeddedManager()); } public ExprMut funExpr(Op op, Expr expr1) throws Cvc3Exception { return new ExprMut( jniFunExpr1(embedded(), op.embedded(), expr1.embedded()), embeddedManager()); } public ExprMut funExpr(Op op, Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniFunExpr2(embedded(), op.embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut funExpr(Op op, Expr expr1, Expr expr2, Expr expr3) throws Cvc3Exception { return new ExprMut( jniFunExpr3(embedded(), op.embedded(), expr1.embedded(), expr2.embedded(), expr3.embedded()), embeddedManager()); } public ExprMut funExpr(Op op, List children) throws Cvc3Exception { assert(JniUtils.listInstanceof(children, Expr.class)); return new ExprMut( jniFunExpr4(embedded(), op.embedded(), JniUtils.unembedList(children)), embeddedManager()); } public ExprMut ratExpr(int n) throws Cvc3Exception { return ratExpr(n, 1); } public ExprMut ratExpr(int n, int d) throws Cvc3Exception { return new ExprMut( jniRatExpr1(embedded(), n, d), embeddedManager()); } public ExprMut ratExpr(String n, String d, int base) throws Cvc3Exception { return new ExprMut( jniRatExpr2(embedded(), n, d, base), embeddedManager()); } public ExprMut ratExpr(String n) throws Cvc3Exception { return ratExpr(n, 10); } public ExprMut ratExpr(String n, int base) throws Cvc3Exception { return new ExprMut( jniRatExpr3(embedded(), n, base), embeddedManager()); } public ExprMut uminusExpr(Expr expr) throws Cvc3Exception { return new ExprMut( jniUminusExpr(embedded(), expr.embedded()), embeddedManager()); } public ExprMut plusExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniPlusExpr1(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut plusExpr(List kids) throws Cvc3Exception { return new ExprMut( jniPlusExpr2(embedded(), JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut minusExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniMinusExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut multExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniMultExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut powExpr(Expr x, Expr n) throws Cvc3Exception { return new ExprMut( jniPowExpr(embedded(), x.embedded(), n.embedded()), embeddedManager()); } public ExprMut divideExpr(Expr numerator, Expr denominator) throws Cvc3Exception { return new ExprMut( jniDivideExpr(embedded(), numerator.embedded(), denominator.embedded()), embeddedManager()); } public ExprMut ltExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniLtExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut leExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniLeExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut gtExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniGtExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut geExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniGeExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut recordExpr(String field, Expr expr) throws Cvc3Exception { return new ExprMut( jniRecordExpr1(embedded(), field, expr.embedded()), embeddedManager()); } public ExprMut recordExpr(String field1, Expr expr1, String field2, Expr expr2) throws Cvc3Exception { return new ExprMut( jniRecordExpr2(embedded(), field1, expr1.embedded(), field2, expr2.embedded()), embeddedManager()); } public ExprMut recordExpr(String field1, Expr expr1, String field2, Expr expr2, String field3, Expr expr3) throws Cvc3Exception { return new ExprMut( jniRecordExpr3(embedded(), field1, expr1.embedded(), field2, expr2.embedded(), field3, expr3.embedded()), embeddedManager()); } public ExprMut recordExpr(List fields, List exprs) throws Cvc3Exception { assert(JniUtils.listInstanceof(fields, String.class)); assert(JniUtils.listInstanceof(exprs, Expr.class)); return new ExprMut( jniRecordExpr4(embedded(), JniUtils.toArray(fields), JniUtils.unembedList(exprs)), embeddedManager()); } public ExprMut recSelectExpr(Expr record, String field) throws Cvc3Exception { return new ExprMut( jniRecSelectExpr(embedded(), record.embedded(), field), embeddedManager()); } public ExprMut recUpdateExpr(Expr record, String field, Expr newValue) throws Cvc3Exception { return new ExprMut( jniRecUpdateExpr(embedded(), record.embedded(), field, newValue.embedded()), embeddedManager()); } public ExprMut readExpr(Expr array, Expr index) throws Cvc3Exception { return new ExprMut( jniReadExpr(embedded(), array.embedded(), index.embedded()), embeddedManager()); } public ExprMut writeExpr(Expr array, Expr index, Expr newValue) throws Cvc3Exception { return new ExprMut( jniWriteExpr(embedded(), array.embedded(), index.embedded(), newValue.embedded()), embeddedManager()); } public ExprMut newBVConstExpr(String s) throws Cvc3Exception { return newBVConstExpr(s, 2); } public ExprMut newBVConstExpr(String s, int base) throws Cvc3Exception { return new ExprMut( jniNewBVConstExpr1(embedded(), s, base), embeddedManager()); } public ExprMut newBVConstExpr(boolean[] bits) throws Cvc3Exception { return new ExprMut( jniNewBVConstExpr2(embedded(), bits), embeddedManager()); } public ExprMut newBVConstExpr(Rational r, int len) throws Cvc3Exception { return new ExprMut( jniNewBVConstExpr3(embedded(), r.embedded(), len), embeddedManager()); } public ExprMut newConcatExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewConcatExpr1(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newConcatExpr(List kids) throws Cvc3Exception { assert(JniUtils.listInstanceof(kids, Expr.class)); return new ExprMut( jniNewConcatExpr2(embedded(), JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut newBVExtractExpr(Expr e, int hi, int low) throws Cvc3Exception { return new ExprMut( jniNewBVExtractExpr(embedded(), e.embedded(), hi, low), embeddedManager()); } public ExprMut newBVNegExpr(Expr expr) throws Cvc3Exception { return new ExprMut( jniNewBVNegExpr(embedded(), expr.embedded()), embeddedManager()); } public ExprMut newBVAndExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVAndExpr1(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVAndExpr(List kids) throws Cvc3Exception { assert(JniUtils.listInstanceof(kids, Expr.class)); return new ExprMut( jniNewBVAndExpr2(embedded(), JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut newBVOrExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVOrExpr1(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVOrExpr(List kids) throws Cvc3Exception { assert(JniUtils.listInstanceof(kids, Expr.class)); return new ExprMut( jniNewBVOrExpr2(embedded(), JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut newBVXorExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVXorExpr1(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVXorExpr(List kids) throws Cvc3Exception { assert(JniUtils.listInstanceof(kids, Expr.class)); return new ExprMut( jniNewBVXorExpr2(embedded(), JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut newBVXnorExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVXnorExpr1(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVXnorExpr(List kids) throws Cvc3Exception { assert(JniUtils.listInstanceof(kids, Expr.class)); return new ExprMut( jniNewBVXnorExpr2(embedded(), JniUtils.unembedList(kids)), embeddedManager()); } public ExprMut newBVNandExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVNandExpr(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVNorExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVNorExpr(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVLTExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVLTExpr(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVLEExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVLEExpr(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVSLTExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVSLTExpr(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVSLEExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVSLEExpr(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newSXExpr(Expr expr, int len) throws Cvc3Exception { return new ExprMut( jniNewSXExpr(embedded(), expr.embedded(), len), embeddedManager()); } public ExprMut newBVUminusExpr(Expr expr) throws Cvc3Exception { return new ExprMut( jniNewBVUminusExpr(embedded(), expr.embedded()), embeddedManager()); } public ExprMut newBVSubExpr(Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVSubExpr(embedded(), expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVPlusExpr(int numbits, List exprs) throws Cvc3Exception { assert(JniUtils.listInstanceof(exprs, Expr.class)); return new ExprMut( jniNewBVPlusExpr(embedded(), numbits, JniUtils.unembedList(exprs)), embeddedManager()); } public ExprMut newBVMultExpr(int numbits, Expr expr1, Expr expr2) throws Cvc3Exception { return new ExprMut( jniNewBVMultExpr(embedded(), numbits, expr1.embedded(), expr2.embedded()), embeddedManager()); } public ExprMut newBVUDivExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVUDivExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newBVURemExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVURemExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newBVSDivExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVSDivExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newBVSRemExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVSRemExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newBVSModExpr(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVSModExpr(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newBVSHL(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVSHL(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newBVLSHR(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVLSHR(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newBVASHR(Expr left, Expr right) throws Cvc3Exception { return new ExprMut( jniNewBVASHR(embedded(), left.embedded(), right.embedded()), embeddedManager()); } public ExprMut newFixedLeftShiftExpr(Expr expr, int r) throws Cvc3Exception { return new ExprMut( jniNewFixedLeftShiftExpr(embedded(), expr.embedded(), r), embeddedManager()); } public ExprMut newFixedConstWidthLeftShiftExpr(Expr expr, int r) throws Cvc3Exception { return new ExprMut( jniNewFixedConstWidthLeftShiftExpr(embedded(), expr.embedded(), r), embeddedManager()); } public ExprMut newFixedRightShiftExpr(Expr expr, int r) throws Cvc3Exception { return new ExprMut( jniNewFixedRightShiftExpr(embedded(), expr.embedded(), r), embeddedManager()); } public Rational computeBVConst(Expr expr) { Rational rat = new Rational( jniComputeBVConst(embedded(),expr.embedded()), embeddedManager()); assert( rat.isInteger() ); return rat; } public ExprMut tupleExpr(List exprs) throws Cvc3Exception { assert(JniUtils.listInstanceof(exprs, Expr.class)); return new ExprMut( jniTupleExpr(embedded(), JniUtils.unembedList(exprs)), embeddedManager()); } public ExprMut tupleSelectExpr(Expr tuple, int index) throws Cvc3Exception { return new ExprMut( jniTupleSelectExpr(embedded(), tuple.embedded(), index), embeddedManager()); } public ExprMut tupleUpdateExpr(Expr tuple, int index, Expr newValue) throws Cvc3Exception { return new ExprMut( jniTupleUpdateExpr(embedded(), tuple.embedded(), index, newValue.embedded()), embeddedManager()); } public ExprMut datatypeConsExpr(String constructor, List exprs) throws Cvc3Exception { assert(JniUtils.listInstanceof(exprs, Expr.class)); return new ExprMut( jniDatatypeConsExpr(embedded(), constructor, JniUtils.unembedList(exprs)), embeddedManager()); } public ExprMut datatypeSelExpr(String selector, Expr arg) throws Cvc3Exception { return new ExprMut( jniDatatypeSelExpr(embedded(), selector, arg.embedded()), embeddedManager()); } public ExprMut datatypeTestExpr(String constructor, Expr arg) throws Cvc3Exception { return new ExprMut( jniDatatypeTestExpr(embedded(), constructor, arg.embedded()), embeddedManager()); } public ExprMut forallExpr(List vars, Expr body) throws Cvc3Exception { assert(JniUtils.listInstanceof(vars, Expr.class)); return new ExprMut( jniForallExpr1(embedded(), JniUtils.unembedList(vars), body.embedded()), embeddedManager()); } public ExprMut forallExpr(List vars, Expr body, Expr trigger) throws Cvc3Exception { assert(JniUtils.listInstanceof(vars, Expr.class)); return new ExprMut( jniForallExpr2(embedded(), JniUtils.unembedList(vars), body.embedded(), trigger.embedded()), embeddedManager()); } public ExprMut forallExpr(List vars, Expr body, List triggers) throws Cvc3Exception { assert(JniUtils.listInstanceof(vars, Expr.class)); assert(JniUtils.listInstanceof(triggers, Expr.class)); return new ExprMut( jniForallExpr3(embedded(), JniUtils.unembedList(vars), body.embedded(), JniUtils.unembedList(triggers)), embeddedManager()); } public ExprMut forallExprMultiTriggers(List vars, Expr body, List multiTriggers) throws Cvc3Exception { assert (JniUtils.listInstanceof(vars, Expr.class)); assert (JniUtils.listListInstanceof(multiTriggers, Expr.class)); return new ExprMut(jniForallExpr4(embedded(), JniUtils.unembedList(vars), body.embedded(), JniUtils.unembedListList(multiTriggers)), embeddedManager()); } public void setTrigger(Expr closure, Expr trigger) throws Cvc3Exception { jniSetTrigger(embedded(), closure.embedded(), trigger.embedded()); } public void setTriggers(Expr closure, List triggers) throws Cvc3Exception { jniSetTriggers(embedded(), closure.embedded(), JniUtils.unembedList(triggers)); } public void setMultiTrigger(Expr closure, List multiTrigger) throws Cvc3Exception { jniSetMultiTrigger(embedded(), closure.embedded(), JniUtils.unembedList(multiTrigger)); } public void setMultiTriggers(Expr closure, List triggers) throws Cvc3Exception { jniSetTriggers2(embedded(), closure.embedded(), JniUtils.unembedListList(triggers)); } public ExprMut existsExpr(List vars, Expr body) throws Cvc3Exception { assert(JniUtils.listInstanceof(vars, Expr.class)); return new ExprMut( jniExistsExpr(embedded(), JniUtils.unembedList(vars), body.embedded()), embeddedManager()); } public OpMut lambdaExpr(List vars, Expr body) throws Cvc3Exception { assert(JniUtils.listInstanceof(vars, Expr.class)); return new OpMut( jniLambdaExpr(embedded(), JniUtils.unembedList(vars), body.embedded()), embeddedManager()); } public OpMut transClosure(Op p) throws Cvc3Exception { return new OpMut( jniTransClosure(embedded(), p.embedded()), embeddedManager()); } public ExprMut simulateExpr(Expr f, Expr s, List inputs, Expr n) throws Cvc3Exception { assert(JniUtils.listInstanceof(inputs, Expr.class)); return new ExprMut( jniSimulateExpr(embedded(), f.embedded(), s.embedded(), JniUtils.unembedList(inputs), n.embedded()), embeddedManager()); } public void setResourceLimit(int limit) throws Cvc3Exception { jniSetResourceLimit(embedded(), limit); } // Validity checking methods public void assertFormula(Expr expr) throws Cvc3Exception { embeddedManager().cleanUp(); jniAssertFormula(embedded(), expr.embedded()); embeddedManager().cleanUp(); } public void registerAtom(Expr expr) throws Cvc3Exception { jniRegisterAtom(embedded(), expr.embedded()); } public ExprMut getImpliedLiteral() throws Cvc3Exception { return new ExprMut( jniGetImpliedLiteral(embedded()), embeddedManager()); } public ExprMut simplify(Expr expr) throws Cvc3Exception { return new ExprMut( jniSimplify(embedded(), expr.embedded()), embeddedManager()); } public QueryResult query(Expr expr) throws Cvc3Exception { embeddedManager().cleanUp(); QueryResult result = QueryResult.get(jniQuery(embedded(), expr.embedded())); //:TEST: embeddedManager().cleanUp(); return result; } public SatResult checkUnsat(Expr expr) throws Cvc3Exception { embeddedManager().cleanUp(); SatResult result = SatResult.get(jniCheckUnsat(embedded(), expr.embedded())); //:TEST: embeddedManager().cleanUp(); return result; } public QueryResult checkContinue() throws Cvc3Exception { embeddedManager().cleanUp(); QueryResult result = QueryResult.get(jniCheckContinue(embedded())); //:TEST: embeddedManager().cleanUp(); return result; } public QueryResult restart(Expr expr) throws Cvc3Exception { embeddedManager().cleanUp(); QueryResult result = QueryResult.get(jniRestart(embedded(), expr.embedded())); //:TEST: embeddedManager().cleanUp(); return result; } public void returnFromCheck() throws Cvc3Exception { jniReturnFromCheck(embedded()); //:TEST: embeddedManager().cleanUp(); } public List getUserAssumptions() throws Cvc3Exception { Object[] assumptions = jniGetUserAssumptions(embedded()); return JniUtils.embedList(assumptions, ExprMut.class, embeddedManager()); } public List getInternalAssumptions() throws Cvc3Exception { Object[] assumptions = jniGetInternalAssumptions(embedded()); return JniUtils.embedList(assumptions, ExprMut.class, embeddedManager()); } public List getAssumptions() throws Cvc3Exception { Object[] assumptions = jniGetAssumptions(embedded()); return JniUtils.embedList(assumptions, ExprMut.class, embeddedManager()); } public List getAssumptionsUsed() throws Cvc3Exception { Object[] assumptions = jniGetAssumptionsUsed(embedded()); return JniUtils.embedList(assumptions, ExprMut.class, embeddedManager()); } public List getCounterExample() throws Cvc3Exception { return getCounterExample(true); } public List getCounterExample(boolean inOrder) throws Cvc3Exception { Object[] assumptions = jniGetCounterExample(embedded(), inOrder); return JniUtils.embedList(assumptions, ExprMut.class, embeddedManager()); } public HashMap getConcreteModel() throws Cvc3Exception { Object[] model = jniGetConcreteModel(embedded()); return JniUtils.embedHashMap(model, Expr.class, Expr.class, embeddedManager()); } public FormulaValue value(Expr expr) throws Cvc3Exception { return FormulaValue.get(jniValue(embedded(), expr.embedded())); } public Expr getValue(Expr expr) throws Cvc3Exception { return new ExprMut( jniGetValue(embedded(), expr.embedded()), embeddedManager()); } public boolean inconsistent() throws Cvc3Exception { return jniInconsistent1(embedded()); } // makes only sense if inconsistent is true public List inconsistentReasons() throws Cvc3Exception { Object[] assumptions = jniInconsistent2(embedded()); return JniUtils.embedList(assumptions, ExprMut.class, embeddedManager()); } public boolean incomplete() throws Cvc3Exception { return jniIncomplete1(embedded()); } // makes only sense if incomplete is true public List incompleteReasons() throws Cvc3Exception { Object[] assumptions = jniIncomplete2(embedded()); return JniUtils.embedList(assumptions, String.class, embeddedManager()); } public ProofMut getProof() throws Cvc3Exception { return new ProofMut( jniGetProof(embedded()), embeddedManager()); } public ExprMut getTCC() throws Cvc3Exception { return new ExprMut( jniGetTCC(embedded()), embeddedManager()); } public List getAssumptionsTCC() throws Cvc3Exception { Object[] assumptions = jniGetAssumptionsTCC(embedded()); return JniUtils.embedList(assumptions, ExprMut.class, embeddedManager()); } public ProofMut getProofTCC() throws Cvc3Exception { return new ProofMut( jniGetProofTCC(embedded()), embeddedManager()); } public ExprMut getClosure() throws Cvc3Exception { return new ExprMut( jniGetClosure(embedded()), embeddedManager()); } public ProofMut getProofClosure() throws Cvc3Exception { return new ProofMut( jniGetProofClosure(embedded()), embeddedManager()); } // Context Methods public int stackLevel() throws Cvc3Exception { return jniStackLevel(embedded()); } public void push() throws Cvc3Exception { jniPush(embedded()); } public void pop() throws Cvc3Exception { jniPop(embedded()); //:TEST: embeddedManager().cleanUp(); } public void popTo(int stackLevel) throws Cvc3Exception { jniPopTo(embedded(), stackLevel); //:TEST: embeddedManager().cleanUp(); } public int scopeLevel() throws Cvc3Exception { return jniScopeLevel(embedded()); } public void pushScope() throws Cvc3Exception { jniPushScope(embedded()); } public void popScope() throws Cvc3Exception { jniPopScope(embedded()); } public void popToScope(int scopeLevel) throws Cvc3Exception { jniPopToScope(embedded(), scopeLevel); } public ContextMut getCurrentContext() throws Cvc3Exception { return new ContextMut( jniGetCurrentContext(embedded()), embeddedManager()); } // Reading Files public void loadFile(String fileName) throws Cvc3Exception { loadFile(fileName, InputLanguage.PRESENTATION); } public void loadFile(String fileName, InputLanguage lang) throws Cvc3Exception { jniLoadFile1(embedded(), fileName, lang.toString()); } // Reporting Statistics public void printStatistics() throws Cvc3Exception { jniPrintStatistics(embedded()); } public StatisticsMut getStatistics() throws Cvc3Exception { return new StatisticsMut( jniGetStatistics(embedded()), embeddedManager()); } public void setTimeLimit(int limit) throws Cvc3Exception { jniSetTimeLimit(embedded(), limit); } } cvc4-1.5/src/bindings/compat/java/src/cvc3/ValidityChecker_impl.cpp000066400000000000000000000747131313116454100252450ustar00rootroot00000000000000INCLUDE: //INCLUDE: //INCLUDE: DEFINITION: Java_cvc3_ValidityChecker_jniCreate1 jobject return embed_own(env, ValidityChecker::create()); DEFINITION: Java_cvc3_ValidityChecker_jniCreate2 jobject c CLFlags flags return embed_own(env, ValidityChecker::create(*flags)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateFlags jobject return embed_copy(env, ValidityChecker::createFlags()); DEFINITION: Java_cvc3_ValidityChecker_jniGetFlags jobject c ValidityChecker vc return embed_mut_ref(env, &vc->getFlags()); DEFINITION: Java_cvc3_ValidityChecker_jniBoolType jobject m ValidityChecker vc return embed_copy(env, vc->boolType()); DEFINITION: Java_cvc3_ValidityChecker_jniRealType jobject m ValidityChecker vc return embed_copy(env, vc->realType()); DEFINITION: Java_cvc3_ValidityChecker_jniIntType jobject m ValidityChecker vc return embed_copy(env, vc->intType()); DEFINITION: Java_cvc3_ValidityChecker_jniSubrangeType jobject m ValidityChecker vc c Expr l c Expr r return embed_copy(env, vc->subrangeType(*l, *r)); DEFINITION: Java_cvc3_ValidityChecker_jniSubtypeType jobject m ValidityChecker vc c Expr pred c Expr witness return embed_copy(env, vc->subtypeType(*pred, *witness)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleType1 jobject m ValidityChecker vc c Type type0 c Type type1 return embed_copy(env, vc->tupleType(*type0, *type1)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleType2 jobject m ValidityChecker vc c Type type0 c Type type1 c Type type2 return embed_copy(env, vc->tupleType(*type0, *type1, *type2)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleType3 jobject m ValidityChecker vc cv Type types return embed_copy(env, vc->tupleType(types)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType1 jobject m ValidityChecker vc n string field c Type type return embed_copy(env, vc->recordType(field, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType2 jobject m ValidityChecker vc n string field0 c Type type0 n string field1 c Type type1 return embed_copy(env, vc->recordType(field0, *type0, field1, *type1)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType3 jobject m ValidityChecker vc n string field0 c Type type0 n string field1 c Type type1 n string field2 c Type type2 return embed_copy(env, vc->recordType(field0, *type0, field1, *type1, field2, *type2)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType4 jobject m ValidityChecker vc nv string fields cv Type types return embed_copy(env, vc->recordType(fields, types)); DEFINITION: Java_cvc3_ValidityChecker_jniDataType1 jobject m ValidityChecker vc n string name n string constructor nv string selectors cv Expr types return embed_copy(env, vc->dataType(name, constructor, selectors, types)); DEFINITION: Java_cvc3_ValidityChecker_jniDataType2 jobject m ValidityChecker vc n string name nv string constructors nvv string selectors cvv Expr types return embed_copy(env, vc->dataType(name, constructors, selectors, types)); DEFINITION: Java_cvc3_ValidityChecker_jniDataType3 jobjectArray m ValidityChecker vc nv string names nvv string constructors nvvv string selectors cvvv Expr types vector result; vc->dataType(names, constructors, selectors, types, result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniAnyType jobject m ValidityChecker vc assert(false);// Unimplemented return NULL; DEFINITION: Java_cvc3_ValidityChecker_jniArrayLiteral jobject m ValidityChecker vc c Expr indexVar c Expr bodyExpr assert(false);// Unimplemented return NULL; DEFINITION: Java_cvc3_ValidityChecker_jniArrayType jobject m ValidityChecker vc c Type typeIndex c Type typeData return embed_copy(env, vc->arrayType(*typeIndex, *typeData)); DEFINITION: Java_cvc3_ValidityChecker_jniBitvecType jobject m ValidityChecker vc n int n return embed_copy(env, vc->bitvecType(n)); DEFINITION: Java_cvc3_ValidityChecker_jniFunType1 jobject m ValidityChecker vc c Type typeDom c Type typeRange return embed_copy(env, vc->funType(*typeDom, *typeRange)); DEFINITION: Java_cvc3_ValidityChecker_jniFunType2 jobject m ValidityChecker vc cv Type typeDom c Type typeRange return embed_copy(env, vc->funType(typeDom, *typeRange)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateType1 jobject m ValidityChecker vc n string typeName return embed_copy(env, vc->createType(typeName)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateType2 jobject m ValidityChecker vc n string typeName c Type typeDef return embed_copy(env, vc->createType(typeName, *typeDef)); DEFINITION: Java_cvc3_ValidityChecker_jniLookupType jobject m ValidityChecker vc n string typeName return embed_copy(env, vc->lookupType(typeName)); DEFINITION: Java_cvc3_ValidityChecker_jniGetExprManager jobject m ValidityChecker vc return embed_mut_ref(env, vc->getEM()); DEFINITION: Java_cvc3_ValidityChecker_jniNullExpr jobject m ValidityChecker vc return embed_copy(env, Expr()); DEFINITION: Java_cvc3_ValidityChecker_jniVarExpr1 jobject m ValidityChecker vc n string name c Type type return embed_copy(env, vc->varExpr(name, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniVarExpr2 jobject m ValidityChecker vc n string name c Type type c Expr def return embed_copy(env, vc->varExpr(name, *type, *def)); DEFINITION: Java_cvc3_ValidityChecker_jniBoundVarExpr jobject m ValidityChecker vc n string name n string uid c Type type return embed_copy(env, vc->boundVarExpr(name, uid, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniLookupVar jobject m ValidityChecker vc n string name Type* type = new Type; jobject result = embed_copy(env, vc->lookupVar(name, type)); delete type; return result; DEFINITION: Java_cvc3_ValidityChecker_jniLookupOp jobject m ValidityChecker vc n string name Type* type = new Type; jobject result = embed_copy(env, vc->lookupOp(name, type)); delete type; return result; DEFINITION: Java_cvc3_ValidityChecker_jniGetType jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->getType(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniGetBaseType1 jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->getBaseType(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniGetBaseType2 jobject m ValidityChecker vc c Type type return embed_copy(env, vc->getBaseType(*type)); DEFINITION: Java_cvc3_ValidityChecker_jniGetTypePred jobject m ValidityChecker vc c Type type c Expr expr return embed_copy(env, vc->getTypePred(*type, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniStringExpr jobject m ValidityChecker vc n string str return embed_copy(env, vc->stringExpr(str)); DEFINITION: Java_cvc3_ValidityChecker_jniIdExpr jobject m ValidityChecker vc n string name return embed_copy(env, vc->idExpr(name)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr1 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->listExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr2 jobject m ValidityChecker vc c Expr expr1 return embed_copy(env, vc->listExpr(*expr1)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr3 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->listExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr4 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->listExpr(*expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr5 jobject m ValidityChecker vc n string op cv Expr kids return embed_copy(env, vc->listExpr(op, kids)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr6 jobject m ValidityChecker vc n string op c Expr expr1 return embed_copy(env, vc->listExpr(op, *expr1)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr7 jobject m ValidityChecker vc n string op c Expr expr1 c Expr expr2 return embed_copy(env, vc->listExpr(op, *expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr8 jobject m ValidityChecker vc n string op c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->listExpr(op, *expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniPrintExpr void m ValidityChecker vc c Expr expr vc->printExpr(*expr); DEFINITION: Java_cvc3_ValidityChecker_jniParseExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->parseExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniParseType jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->parseType(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniImportExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->importExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniImportType jobject m ValidityChecker vc c Type type return embed_copy(env, vc->importType(*type)); DEFINITION: Java_cvc3_ValidityChecker_jniCmdsFromString void m ValidityChecker vc n string s vc->cmdsFromString(s); DEFINITION: Java_cvc3_ValidityChecker_jniExprFromString jobject m ValidityChecker vc n string s return embed_copy(env, vc->exprFromString(s)); DEFINITION: Java_cvc3_ValidityChecker_jniTrueExpr jobject m ValidityChecker vc return embed_copy(env, vc->trueExpr()); DEFINITION: Java_cvc3_ValidityChecker_jniFalseExpr jobject m ValidityChecker vc return embed_copy(env, vc->falseExpr()); DEFINITION: Java_cvc3_ValidityChecker_jniNotExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->notExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniAndExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->andExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniAndExpr2 jobject m ValidityChecker vc cv Expr children return embed_copy(env, vc->andExpr(children)); DEFINITION: Java_cvc3_ValidityChecker_jniOrExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->orExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniOrExpr2 jobject m ValidityChecker vc cv Expr children return embed_copy(env, vc->orExpr(children)); DEFINITION: Java_cvc3_ValidityChecker_jniImpliesExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->impliesExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniIffExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->iffExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniEqExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->eqExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniDistinctExpr jobject m ValidityChecker vc cv Expr children return embed_copy(env, vc->distinctExpr(children)); DEFINITION: Java_cvc3_ValidityChecker_jniIteExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->iteExpr(*expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateOp1 jobject m ValidityChecker vc n string name c Type type return embed_copy(env, vc->createOp(name, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateOp2 jobject m ValidityChecker vc n string name c Type type c Expr expr return embed_copy(env, vc->createOp(name, *type, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniEqOp jobject return embed_copy(env, Op(EQ)); DEFINITION: Java_cvc3_ValidityChecker_jniLtOp jobject return embed_copy(env, Op(LT)); DEFINITION: Java_cvc3_ValidityChecker_jniLeOp jobject return embed_copy(env, Op(LE)); DEFINITION: Java_cvc3_ValidityChecker_jniGtOp jobject return embed_copy(env, Op(GT)); DEFINITION: Java_cvc3_ValidityChecker_jniGeOp jobject return embed_copy(env, Op(GE)); DEFINITION: Java_cvc3_ValidityChecker_jniPlusOp jobject return embed_copy(env, Op(PLUS)); DEFINITION: Java_cvc3_ValidityChecker_jniMinusOp jobject return embed_copy(env, Op(MINUS)); DEFINITION: Java_cvc3_ValidityChecker_jniMultOp jobject return embed_copy(env, Op(MULT)); DEFINITION: Java_cvc3_ValidityChecker_jniDivideOp jobject return embed_copy(env, Op(DIVIDE)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr1 jobject m ValidityChecker vc c Op op c Expr expr1 return embed_copy(env, vc->funExpr(*op, *expr1)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr2 jobject m ValidityChecker vc c Op op c Expr expr1 c Expr expr2 return embed_copy(env, vc->funExpr(*op, *expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr3 jobject m ValidityChecker vc c Op op c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->funExpr(*op, *expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr4 jobject m ValidityChecker vc c Op op cv Expr children return embed_copy(env, vc->funExpr(*op, children)); DEFINITION: Java_cvc3_ValidityChecker_jniRatExpr1 jobject m ValidityChecker vc n int n n int d return embed_copy(env, vc->ratExpr(n, d)); DEFINITION: Java_cvc3_ValidityChecker_jniRatExpr2 jobject m ValidityChecker vc n string n n string d n int base return embed_copy(env, vc->ratExpr(n, d, base)); DEFINITION: Java_cvc3_ValidityChecker_jniRatExpr3 jobject m ValidityChecker vc n string n n int base return embed_copy(env, vc->ratExpr(n, base)); DEFINITION: Java_cvc3_ValidityChecker_jniUminusExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->uminusExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniPlusExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->plusExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniPlusExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->plusExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniMinusExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->minusExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniMultExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->multExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniPowExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->powExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniDivideExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->divideExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniLtExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->ltExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniLeExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->leExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniGtExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->gtExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniGeExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->geExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr1 jobject m ValidityChecker vc n string field c Expr expr return embed_copy(env, vc->recordExpr(field, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr2 jobject m ValidityChecker vc n string field1 c Expr expr1 n string field2 c Expr expr2 return embed_copy(env, vc->recordExpr(field1, *expr1, field2, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr3 jobject m ValidityChecker vc n string field1 c Expr expr1 n string field2 c Expr expr2 n string field3 c Expr expr3 return embed_copy(env, vc->recordExpr(field1, *expr1, field2, *expr2, field3, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr4 jobject m ValidityChecker vc nv string fields cv Expr exprs return embed_copy(env, vc->recordExpr(fields, exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniRecSelectExpr jobject m ValidityChecker vc c Expr record n string field return embed_copy(env, vc->recSelectExpr(*record, field)); DEFINITION: Java_cvc3_ValidityChecker_jniRecUpdateExpr jobject m ValidityChecker vc c Expr record n string field c Expr update return embed_copy(env, vc->recUpdateExpr(*record, field, *update)); DEFINITION: Java_cvc3_ValidityChecker_jniReadExpr jobject m ValidityChecker vc c Expr array c Expr index return embed_copy(env, vc->readExpr(*array, *index)); DEFINITION: Java_cvc3_ValidityChecker_jniWriteExpr jobject m ValidityChecker vc c Expr array c Expr index c Expr value return embed_copy(env, vc->writeExpr(*array, *index, *value)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVConstExpr1 jobject m ValidityChecker vc n string s n int base return embed_copy(env, vc->newBVConstExpr(s, jbase)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVConstExpr2 jobject m ValidityChecker vc nv bool bits return embed_copy(env, vc->newBVConstExpr(bits)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVConstExpr3 jobject m ValidityChecker vc c Rational rational n int len return embed_copy(env, vc->newBVConstExpr(*rational, len)); DEFINITION: Java_cvc3_ValidityChecker_jniNewConcatExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newConcatExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewConcatExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newConcatExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVExtractExpr jobject m ValidityChecker vc c Expr expr n int hi n int low return embed_copy(env, vc->newBVExtractExpr(*expr, hi, low)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVNegExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->newBVNegExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVAndExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVAndExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVAndExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVAndExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVOrExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVOrExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVOrExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVOrExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXorExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVXorExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXorExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVXorExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXnorExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVXnorExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXnorExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVXnorExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVNandExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVNandExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVNorExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVNorExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVLTExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVLTExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVLEExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVLEExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSLTExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSLTExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSLEExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSLEExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewSXExpr jobject m ValidityChecker vc c Expr expr n int len return embed_copy(env, vc->newSXExpr(*expr, len)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVUminusExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->newBVUminusExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSubExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSubExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVPlusExpr jobject m ValidityChecker vc n int numbits cv Expr exprs return embed_copy(env, vc->newBVPlusExpr(numbits, exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVMultExpr jobject m ValidityChecker vc n int numbits c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVMultExpr(numbits, *expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVUDivExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVUDivExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVURemExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVURemExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSDivExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSDivExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSRemExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSRemExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSModExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSModExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSHL jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSHL(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVLSHR jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVLSHR(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVASHR jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVASHR(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewFixedLeftShiftExpr jobject m ValidityChecker vc c Expr expr n int r return embed_copy(env, vc->newFixedLeftShiftExpr(*expr, r)); DEFINITION: Java_cvc3_ValidityChecker_jniNewFixedConstWidthLeftShiftExpr jobject m ValidityChecker vc c Expr expr n int r return embed_copy(env, vc->newFixedConstWidthLeftShiftExpr(*expr, r)); DEFINITION: Java_cvc3_ValidityChecker_jniNewFixedRightShiftExpr jobject m ValidityChecker vc c Expr expr n int r return embed_copy(env, vc->newFixedRightShiftExpr(*expr, r)); DEFINITION: Java_cvc3_ValidityChecker_jniComputeBVConst jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->computeBVConst(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleExpr jobject m ValidityChecker vc cv Expr exprs return embed_copy(env, vc->tupleExpr(exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleSelectExpr jobject m ValidityChecker vc c Expr tuple n int index return embed_copy(env, vc->tupleSelectExpr(*tuple, index)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleUpdateExpr jobject m ValidityChecker vc c Expr tuple n int index c Expr value return embed_copy(env, vc->tupleUpdateExpr(*tuple, index, *value)); DEFINITION: Java_cvc3_ValidityChecker_jniDatatypeConsExpr jobject m ValidityChecker vc n string constructor cv Expr exprs return embed_copy(env, vc->datatypeConsExpr(constructor, exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniDatatypeSelExpr jobject m ValidityChecker vc n string selector c Expr expr return embed_copy(env, vc->datatypeSelExpr(selector, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniDatatypeTestExpr jobject m ValidityChecker vc n string constructor c Expr expr return embed_copy(env, vc->datatypeTestExpr(constructor, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniForallExpr1 jobject m ValidityChecker vc cv Expr vars c Expr body return embed_copy(env, vc->forallExpr(vars, *body)); DEFINITION: Java_cvc3_ValidityChecker_jniForallExpr2 jobject m ValidityChecker vc cv Expr vars c Expr body c Expr trigger return embed_copy(env, vc->forallExpr(vars, *body, *trigger)); DEFINITION: Java_cvc3_ValidityChecker_jniForallExpr3 jobject m ValidityChecker vc cv Expr vars c Expr body cv Expr triggers return embed_copy(env, vc->forallExpr(vars, *body, triggers)); DEFINITION: Java_cvc3_ValidityChecker_jniForallExpr4 jobject m ValidityChecker vc cv Expr vars c Expr body cvv Expr triggers return embed_copy(env, vc->forallExpr(vars, *body, triggers)); DEFINITION: Java_cvc3_ValidityChecker_jniSetTrigger void m ValidityChecker vc c Expr closure c Expr trigger vc->setTrigger(*closure, *trigger); DEFINITION: Java_cvc3_ValidityChecker_jniSetTriggers void m ValidityChecker vc c Expr closure cv Expr triggers vc->setTriggers(*closure, triggers); DEFINITION: Java_cvc3_ValidityChecker_jniSetTriggers2 void m ValidityChecker vc c Expr closure cvv Expr triggers vc->setTriggers(*closure, triggers); DEFINITION: Java_cvc3_ValidityChecker_jniSetMultiTrigger void m ValidityChecker vc c Expr closure cv Expr multiTrigger vc->setMultiTrigger(*closure, multiTrigger); DEFINITION: Java_cvc3_ValidityChecker_jniExistsExpr jobject m ValidityChecker vc cv Expr vars c Expr body return embed_copy(env, vc->existsExpr(vars, *body)); DEFINITION: Java_cvc3_ValidityChecker_jniLambdaExpr jobject m ValidityChecker vc cv Expr vars c Expr body return embed_copy(env, vc->lambdaExpr(vars, *body)); DEFINITION: Java_cvc3_ValidityChecker_jniTransClosure jobject m ValidityChecker vc c Op p return embed_copy(env, vc->transClosure(*p)); DEFINITION: Java_cvc3_ValidityChecker_jniSimulateExpr jobject m ValidityChecker vc c Expr f c Expr s cv Expr inputs c Expr n return embed_copy(env, vc->simulateExpr(*f, *s, inputs, *n)); DEFINITION: Java_cvc3_ValidityChecker_jniSetResourceLimit void m ValidityChecker vc n int limit vc->setResourceLimit(limit); DEFINITION: Java_cvc3_ValidityChecker_jniAssertFormula void m ValidityChecker vc c Expr expr vc->assertFormula(*expr); DEFINITION: Java_cvc3_ValidityChecker_jniRegisterAtom void m ValidityChecker vc c Expr expr vc->registerAtom(*expr); DEFINITION: Java_cvc3_ValidityChecker_jniGetImpliedLiteral jobject m ValidityChecker vc return embed_copy(env, vc->getImpliedLiteral()); DEFINITION: Java_cvc3_ValidityChecker_jniSimplify jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->simplify(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniQuery jstring m ValidityChecker vc c Expr expr return toJava(env, vc->query(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniCheckUnsat jstring m ValidityChecker vc c Expr expr return toJava(env, vc->checkUnsat(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniCheckContinue jstring m ValidityChecker vc return toJava(env, vc->checkContinue()); DEFINITION: Java_cvc3_ValidityChecker_jniRestart jstring m ValidityChecker vc c Expr expr return toJava(env, vc->restart(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniReturnFromCheck void m ValidityChecker vc vc->returnFromCheck(); DEFINITION: Java_cvc3_ValidityChecker_jniGetUserAssumptions jobjectArray m ValidityChecker vc vector result; vc->getUserAssumptions(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetInternalAssumptions jobjectArray m ValidityChecker vc vector result; vc->getInternalAssumptions(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetAssumptions jobjectArray m ValidityChecker vc vector result; vc->getAssumptions(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetAssumptionsUsed jobjectArray m ValidityChecker vc vector result; vc->getAssumptionsUsed(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetCounterExample jobjectArray m ValidityChecker vc n bool inOrder vector result; vc->getCounterExample(result, inOrder); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniValue jstring m ValidityChecker vc c Expr expr return toJava(env, vc->value(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniGetValue jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->getValue(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniGetConcreteModel jobjectArray m ValidityChecker vc ExprMap result; vc->getConcreteModel(result); return toJavaHCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniInconsistent1 jboolean m ValidityChecker vc return vc->inconsistent(); DEFINITION: Java_cvc3_ValidityChecker_jniInconsistent2 jobjectArray m ValidityChecker vc vector result; bool inconsistent = vc->inconsistent(result); assert(inconsistent); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniIncomplete1 jboolean m ValidityChecker vc return vc->incomplete(); DEFINITION: Java_cvc3_ValidityChecker_jniIncomplete2 jobjectArray m ValidityChecker vc vector result; bool incomplete = vc->incomplete(result); assert(incomplete); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetProof jobject m ValidityChecker vc return embed_copy(env, vc->getProof()); DEFINITION: Java_cvc3_ValidityChecker_jniGetTCC jobject m ValidityChecker vc return embed_copy(env, vc->getTCC()); DEFINITION: Java_cvc3_ValidityChecker_jniGetAssumptionsTCC jobjectArray m ValidityChecker vc vector result; vc->getAssumptionsTCC(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetProofTCC jobject m ValidityChecker vc return embed_copy(env, vc->getProofTCC()); DEFINITION: Java_cvc3_ValidityChecker_jniGetClosure jobject m ValidityChecker vc return embed_copy(env, vc->getClosure()); DEFINITION: Java_cvc3_ValidityChecker_jniGetProofClosure jobject m ValidityChecker vc return embed_copy(env, vc->getProofClosure()); DEFINITION: Java_cvc3_ValidityChecker_jniStackLevel jint m ValidityChecker vc return vc->stackLevel(); DEFINITION: Java_cvc3_ValidityChecker_jniPush void m ValidityChecker vc vc->push(); DEFINITION: Java_cvc3_ValidityChecker_jniPop void m ValidityChecker vc vc->pop(); DEFINITION: Java_cvc3_ValidityChecker_jniPopTo void m ValidityChecker vc n int stackLevel vc->popto(stackLevel); DEFINITION: Java_cvc3_ValidityChecker_jniScopeLevel jint m ValidityChecker vc return vc->scopeLevel(); DEFINITION: Java_cvc3_ValidityChecker_jniPushScope void m ValidityChecker vc vc->pushScope(); DEFINITION: Java_cvc3_ValidityChecker_jniPopScope void m ValidityChecker vc vc->popScope(); DEFINITION: Java_cvc3_ValidityChecker_jniPopToScope void m ValidityChecker vc n int stackLevel vc->poptoScope(stackLevel); DEFINITION: Java_cvc3_ValidityChecker_jniGetCurrentContext jobject m ValidityChecker vc return embed_mut_ref(env, vc->getCurrentContext()); DEFINITION: Java_cvc3_ValidityChecker_jniLoadFile1 void m ValidityChecker vc n string fileName n string lang vc->loadFile(fileName, toCppInputLanguage(env, lang), false); DEFINITION: Java_cvc3_ValidityChecker_jniGetStatistics jobject m ValidityChecker vc return embed_copy(env, vc->getStatistics()); DEFINITION: Java_cvc3_ValidityChecker_jniPrintStatistics void m ValidityChecker vc vc->printStatistics(); DEFINITION: Java_cvc3_ValidityChecker_jniSetTimeLimit void m ValidityChecker vc n int n vc->setTimeLimit((unsigned int)n); cvc4-1.5/src/bindings/java_iterator_adapter.h000066400000000000000000000034741313116454100213140ustar00rootroot00000000000000/********************* */ /*! \file java_iterator_adapter.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An iterator adapter for the Java bindings, giving Java iterators ** the ability to access elements from STL iterators. ** ** An iterator adapter for the Java bindings, giving Java iterators the ** ability to access elements from STL iterators. This class is mapped ** into Java by SWIG, where it implements Iterator (some additional ** Java-side functions are added by the SWIG layer to implement the full ** interface). ** ** The functionality requires significant assistance from the ".i" SWIG ** interface files, applying a variety of typemaps. **/ // private to the bindings layer #ifndef SWIGJAVA # error This should only be included from the Java bindings layer. #endif /* SWIGJAVA */ #ifndef __CVC4__BINDINGS__JAVA_ITERATOR_ADAPTER_H #define __CVC4__BINDINGS__JAVA_ITERATOR_ADAPTER_H namespace CVC4 { template class JavaIteratorAdapter { const T& d_t; typename T::const_iterator d_it; public: JavaIteratorAdapter(const T& t) : d_t(t), d_it(d_t.begin()) { } bool hasNext() { return d_it != d_t.end(); } typename T::const_iterator::value_type getNext() { typename T::const_iterator::value_type ret = *d_it; ++d_it; return ret; } };/* class JavaIteratorAdapter */ }/* CVC4 namespace */ #endif /* __CVC4__BINDINGS__JAVA_ITERATOR_ADAPTER_H */ cvc4-1.5/src/bindings/java_stream_adapters.h000066400000000000000000000075021313116454100211350ustar00rootroot00000000000000/********************* */ /*! \file java_stream_adapters.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An OutputStream adapter for the Java bindings ** ** An OutputStream adapter for the Java bindings. This works with a lot ** of help from SWIG, and custom typemaps in the ".i" SWIG interface files ** for CVC4. The basic idea is that, when a CVC4 function with a ** std::ostream& parameter is called, a Java-side binding is generated ** taking a java.io.OutputStream. Now, the problem is that std::ostream ** has no Java equivalent, and java.io.OutputStream has no C++ equivalent, ** so we use this class (which exists on both sides) as the go-between. ** The wrapper connecting the Java function (taking an OutputStream) and ** the C++ function (taking an ostream) creates a JavaOutputStreamAdapter, ** and call the C++ function with the stringstream inside. After the call, ** the generated stream material is collected and output to the Java-side ** OutputStream. **/ // private to the bindings layer #ifndef SWIGJAVA # error This should only be included from the Java bindings layer. #endif /* SWIGJAVA */ #include #include #include #include #include #include #ifndef __CVC4__BINDINGS__JAVA_STREAM_ADAPTERS_H #define __CVC4__BINDINGS__JAVA_STREAM_ADAPTERS_H namespace CVC4 { class JavaOutputStreamAdapter : public std::ostringstream { public: std::string toString() { return str(); } };/* class JavaOutputStreamAdapter */ class JavaInputStreamAdapter : public std::stringstream { static std::set s_adapters; jobject inputStream; JavaInputStreamAdapter& operator=(const JavaInputStreamAdapter&); JavaInputStreamAdapter(const JavaInputStreamAdapter&); public: JavaInputStreamAdapter(jobject inputStream) : inputStream(inputStream) { s_adapters.insert(this); } ~JavaInputStreamAdapter() { s_adapters.erase(this); } static void pullAdapters(JNIEnv* jenv) { for(std::set::iterator i = s_adapters.begin(); i != s_adapters.end(); ++i) { (*i)->pull(jenv); } } jobject getInputStream() const { return inputStream; } void pull(JNIEnv* jenv) { if(fail() || eof()) { clear(); } jclass clazz = jenv->FindClass("java/io/InputStream"); assert(clazz != NULL && jenv->ExceptionOccurred() == NULL); jmethodID method = jenv->GetMethodID(clazz, "available", "()I"); assert(method != NULL && jenv->ExceptionOccurred() == NULL); jint available = jenv->CallIntMethod(inputStream, method); assert(jenv->ExceptionOccurred() == NULL); jbyteArray bytes = jenv->NewByteArray(available); assert(bytes != NULL && jenv->ExceptionOccurred() == NULL); method = jenv->GetMethodID(clazz, "read", "([B)I"); assert(method != NULL && jenv->ExceptionOccurred() == NULL); jint nread = jenv->CallIntMethod(inputStream, method, bytes); assert(jenv->ExceptionOccurred() == NULL); jbyte* bptr = jenv->GetByteArrayElements(bytes, NULL); assert(jenv->ExceptionOccurred() == NULL); std::copy(bptr, bptr + nread, std::ostream_iterator(*this)); *this << std::flush; jenv->ReleaseByteArrayElements(bytes, bptr, 0); assert(jenv->ExceptionOccurred() == NULL); assert(good()); assert(!eof()); } };/* class JavaInputStreamAdapter */ }/* CVC4 namespace */ #endif /* __CVC4__BINDINGS__JAVA_STREAM_ADAPTERS_H */ cvc4-1.5/src/bindings/swig.h000066400000000000000000000025561313116454100157330ustar00rootroot00000000000000/********************* */ /*! \file swig.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Common swig checks and definitions ** ** Common swig checks and definitions, when generating swig interfaces. **/ #ifndef __CVC4__BINDINGS__SWIG_H #define __CVC4__BINDINGS__SWIG_H #ifndef SWIG # error This file should only be included when generating swig interfaces. #endif /* SWIG */ #if !defined(SWIG_VERSION) || SWIG_VERSION < 0x020000 # error CVC4 bindings require swig version 2.0.0 or later, sorry. #endif /* SWIG_VERSION */ %import "cvc4_public.h" #warning "Working around a SWIG segfault in C++ template parsing." //%import "base/tls.h" #define CVC4_THREADLOCAL(__type...) __type #define CVC4_THREADLOCAL_PUBLIC(__type...) CVC4_PUBLIC __type #define CVC4_THREADLOCAL_TYPE(__type...) __type // swig doesn't like the __thread storage class... #define __thread // ...or GCC attributes #define __attribute__(x) #endif /* __CVC4__BINDINGS__SWIG_H */ cvc4-1.5/src/compat/000077500000000000000000000000001313116454100142675ustar00rootroot00000000000000cvc4-1.5/src/compat/Makefile.am000066400000000000000000000020171313116454100163230ustar00rootroot00000000000000# LIBCVC4COMPAT_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4COMPAT_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4COMPATLIB \ -I@builddir@/.. $(ANTLR_INCLUDES) -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall -Wno-unknown-pragmas if CVC4_BUILD_LIBCOMPAT lib_LTLIBRARIES = libcvc4compat.la libcvc4compat_la_LDFLAGS = \ -version-info $(LIBCVC4COMPAT_VERSION) libcvc4compat_la_LIBADD = \ @builddir@/../libcvc4.la \ @builddir@/../parser/libcvc4parser.la \ @builddir@/../lib/libreplacements.la libcvc4compat_la_SOURCES = \ cvc3_compat.h \ cvc3_compat.cpp libcvc4compat_la_CXXFLAGS = -fno-strict-aliasing else EXTRA_DIST = \ cvc3_kinds.h \ cvc3_compat.h \ cvc3_compat.cpp endif cvc4-1.5/src/compat/Makefile.in000066400000000000000000000707211313116454100163430ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = src/compat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = 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; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) @CVC4_BUILD_LIBCOMPAT_TRUE@libcvc4compat_la_DEPENDENCIES = \ @CVC4_BUILD_LIBCOMPAT_TRUE@ @builddir@/../libcvc4.la \ @CVC4_BUILD_LIBCOMPAT_TRUE@ @builddir@/../parser/libcvc4parser.la \ @CVC4_BUILD_LIBCOMPAT_TRUE@ @builddir@/../lib/libreplacements.la am__libcvc4compat_la_SOURCES_DIST = cvc3_compat.h cvc3_compat.cpp @CVC4_BUILD_LIBCOMPAT_TRUE@am_libcvc4compat_la_OBJECTS = \ @CVC4_BUILD_LIBCOMPAT_TRUE@ libcvc4compat_la-cvc3_compat.lo libcvc4compat_la_OBJECTS = $(am_libcvc4compat_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcvc4compat_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(libcvc4compat_la_CXXFLAGS) $(CXXFLAGS) \ $(libcvc4compat_la_LDFLAGS) $(LDFLAGS) -o $@ @CVC4_BUILD_LIBCOMPAT_TRUE@am_libcvc4compat_la_rpath = -rpath \ @CVC4_BUILD_LIBCOMPAT_TRUE@ $(libdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcvc4compat_la_SOURCES) DIST_SOURCES = $(am__libcvc4compat_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ # LIBCVC4COMPAT_VERSION (-version-info) is in the form current:revision:age # # current - # increment if interfaces have been added, removed or changed # revision - # increment if source code has changed # set to zero if current is incremented # age - # increment if interfaces have been added # set to zero if interfaces have been removed # or changed # LIBCVC4COMPAT_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ AM_CPPFLAGS = \ -D__BUILDING_CVC4COMPATLIB \ -I@builddir@/.. $(ANTLR_INCLUDES) -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall -Wno-unknown-pragmas @CVC4_BUILD_LIBCOMPAT_TRUE@lib_LTLIBRARIES = libcvc4compat.la @CVC4_BUILD_LIBCOMPAT_TRUE@libcvc4compat_la_LDFLAGS = \ @CVC4_BUILD_LIBCOMPAT_TRUE@ -version-info $(LIBCVC4COMPAT_VERSION) @CVC4_BUILD_LIBCOMPAT_TRUE@libcvc4compat_la_LIBADD = \ @CVC4_BUILD_LIBCOMPAT_TRUE@ @builddir@/../libcvc4.la \ @CVC4_BUILD_LIBCOMPAT_TRUE@ @builddir@/../parser/libcvc4parser.la \ @CVC4_BUILD_LIBCOMPAT_TRUE@ @builddir@/../lib/libreplacements.la @CVC4_BUILD_LIBCOMPAT_TRUE@libcvc4compat_la_SOURCES = \ @CVC4_BUILD_LIBCOMPAT_TRUE@ cvc3_compat.h \ @CVC4_BUILD_LIBCOMPAT_TRUE@ cvc3_compat.cpp @CVC4_BUILD_LIBCOMPAT_TRUE@libcvc4compat_la_CXXFLAGS = -fno-strict-aliasing @CVC4_BUILD_LIBCOMPAT_FALSE@EXTRA_DIST = \ @CVC4_BUILD_LIBCOMPAT_FALSE@ cvc3_kinds.h \ @CVC4_BUILD_LIBCOMPAT_FALSE@ cvc3_compat.h \ @CVC4_BUILD_LIBCOMPAT_FALSE@ cvc3_compat.cpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/compat/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/compat/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcvc4compat.la: $(libcvc4compat_la_OBJECTS) $(libcvc4compat_la_DEPENDENCIES) $(EXTRA_libcvc4compat_la_DEPENDENCIES) $(AM_V_CXXLD)$(libcvc4compat_la_LINK) $(am_libcvc4compat_la_rpath) $(libcvc4compat_la_OBJECTS) $(libcvc4compat_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcvc4compat_la-cvc3_compat.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< libcvc4compat_la-cvc3_compat.lo: cvc3_compat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcvc4compat_la_CXXFLAGS) $(CXXFLAGS) -MT libcvc4compat_la-cvc3_compat.lo -MD -MP -MF $(DEPDIR)/libcvc4compat_la-cvc3_compat.Tpo -c -o libcvc4compat_la-cvc3_compat.lo `test -f 'cvc3_compat.cpp' || echo '$(srcdir)/'`cvc3_compat.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcvc4compat_la-cvc3_compat.Tpo $(DEPDIR)/libcvc4compat_la-cvc3_compat.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cvc3_compat.cpp' object='libcvc4compat_la-cvc3_compat.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcvc4compat_la_CXXFLAGS) $(CXXFLAGS) -c -o libcvc4compat_la-cvc3_compat.lo `test -f 'cvc3_compat.cpp' || echo '$(srcdir)/'`cvc3_compat.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile # 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: cvc4-1.5/src/compat/cvc3_compat.cpp000066400000000000000000002745001313116454100172040ustar00rootroot00000000000000/********************* */ /*! \file cvc3_compat.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Andrew Reynolds ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief CVC3 compatibility layer for CVC4 ** ** CVC3 compatibility layer for CVC4. **/ #include "compat/cvc3_compat.h" #include #include #include #include #include #include #include "base/exception.h" #include "base/output.h" #include "expr/expr_iomanip.h" #include "expr/kind.h" #include "expr/predicate.h" #include "options/options.h" #include "options/set_language.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" #include "util/bitvector.h" #include "util/hash.h" #include "util/integer.h" #include "util/rational.h" #include "util/sexpr.h" #include "util/subrange_bound.h" using namespace std; // Matches base/cvc4_assert.h's PrettyCheckArgument. // base/cvc4_assert.h cannot be directly included. #define CompatCheckArgument(cond, arg, msg...) \ do { \ if(__builtin_expect( ( ! (cond) ), false )) { \ throw ::CVC4::IllegalArgumentException(#cond, #arg, __PRETTY_FUNCTION__, \ ::CVC4::IllegalArgumentException::formatVariadic(msg).c_str()); \ } \ } while(0) #define Unimplemented(str) throw Exception(str) namespace CVC3 { // Connects ExprManagers to ValidityCheckers. Needed to clean up the // emmcs on ValidityChecker destruction (which are used for // ExprManager-to-ExprManager import). static std::map s_validityCheckers; static std::hash_map s_typeToExpr; static std::hash_map s_exprToType; static bool typeHasExpr(const Type& t) { std::hash_map::const_iterator i = s_typeToExpr.find(t); return i != s_typeToExpr.end(); } static Expr typeToExpr(const Type& t) { std::hash_map::const_iterator i = s_typeToExpr.find(t); assert(i != s_typeToExpr.end()); return (*i).second; } static Type exprToType(const Expr& e) { std::hash_map::const_iterator i = s_exprToType.find(e); assert(i != s_exprToType.end()); return (*i).second; } std::string int2string(int n) { std::ostringstream ss; ss << n; return ss.str(); } std::ostream& operator<<(std::ostream& out, CLFlagType clft) { switch (clft) { case CLFLAG_NULL: out << "CLFLAG_NULL"; break; case CLFLAG_BOOL: out << "CLFLAG_BOOL"; break; case CLFLAG_INT: out << "CLFLAG_INT"; break; case CLFLAG_STRING: out << "CLFLAG_STRING"; break; case CLFLAG_STRVEC: out << "CLFLAG_STRVEC"; break; default: out << "CLFlagType!UNKNOWN"; break; } return out; } std::ostream& operator<<(std::ostream& out, QueryResult qr) { switch(qr) { case SATISFIABLE: out << "SATISFIABLE/INVALID"; break; case UNSATISFIABLE: out << "VALID/UNSATISFIABLE"; break; case ABORT: out << "ABORT"; break; case UNKNOWN: out << "UNKNOWN"; break; default: out << "QueryResult!UNKNOWN"; } return out; } std::string QueryResultToString(QueryResult qr) { stringstream sstr; sstr << qr; return sstr.str(); } std::ostream& operator<<(std::ostream& out, FormulaValue fv) { switch(fv) { case TRUE_VAL: out << "TRUE_VAL"; break; case FALSE_VAL: out << "FALSE_VAL"; break; case UNKNOWN_VAL: out << "UNKNOWN_VAL"; break; default: out << "FormulaValue!UNKNOWN"; } return out; } std::ostream& operator<<(std::ostream& out, CVC3CardinalityKind c) { switch(c) { case CARD_FINITE: out << "CARD_FINITE"; break; case CARD_INFINITE: out << "CARD_INFINITE"; break; case CARD_UNKNOWN: out << "CARD_UNKNOWN"; break; default: out << "CVC3CardinalityKind!UNKNOWN"; } return out; } static string toString(CLFlagType clft) { stringstream sstr; sstr << clft; return sstr.str(); } bool operator==(const Cardinality& c, CVC3CardinalityKind d) { switch(d) { case CARD_FINITE: return c.isFinite(); case CARD_INFINITE: return c.isInfinite(); case CARD_UNKNOWN: return c.isUnknown(); } throw Exception("internal error: CVC3 cardinality kind unhandled"); } bool operator==(CVC3CardinalityKind d, const Cardinality& c) { return c == d; } bool operator!=(const Cardinality& c, CVC3CardinalityKind d) { return !(c == d); } bool operator!=(CVC3CardinalityKind d, const Cardinality& c) { return !(c == d); } Type::Type() : CVC4::Type() { } Type::Type(const CVC4::Type& type) : CVC4::Type(type) { } Type::Type(const Type& type) : CVC4::Type(type) { } Expr Type::getExpr() const { if(typeHasExpr(*this)) { return typeToExpr(*this); } Expr e = getExprManager()->mkVar("compatibility-layer-expr-type", *this); s_typeToExpr[*this] = e; s_exprToType[e] = *this; s_validityCheckers[e.getExprManager()]->d_exprTypeMapRemove.push_back(e); return e; } int Type::arity() const { return isSort() ? CVC4::SortType(*this).getParamTypes().size() : 0; } Type Type::operator[](int i) const { return Type(CVC4::Type(CVC4::SortType(*this).getParamTypes()[i])); } bool Type::isBool() const { return isBoolean(); } bool Type::isSubtype() const { return false; } Cardinality Type::card() const { return getCardinality(); } Expr Type::enumerateFinite(Unsigned n) const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Unsigned Type::sizeFinite() const { return getCardinality().getFiniteCardinality().getUnsignedLong(); } Type Type::typeBool(ExprManager* em) { return Type(CVC4::Type(em->booleanType())); } Type Type::funType(const std::vector& typeDom, const Type& typeRan) { const vector& dom = *reinterpret_cast*>(&typeDom); return Type(typeRan.getExprManager()->mkFunctionType(dom, typeRan)); } Type Type::funType(const Type& typeRan) const { return Type(getExprManager()->mkFunctionType(*this, typeRan)); } Expr::Expr() : CVC4::Expr() { } Expr::Expr(const Expr& e) : CVC4::Expr(e) { } Expr::Expr(const CVC4::Expr& e) : CVC4::Expr(e) { } Expr::Expr(const CVC4::Kind k) : CVC4::Expr() { *this = getEM()->operatorOf(k); } Expr Expr::eqExpr(const Expr& right) const { return getEM()->mkExpr(CVC4::kind::EQUAL, *this, right); } Expr Expr::notExpr() const { return getEM()->mkExpr(CVC4::kind::NOT, *this); } Expr Expr::negate() const { // avoid double-negatives return (getKind() == CVC4::kind::NOT) ? (*this)[0] : Expr(getEM()->mkExpr(CVC4::kind::NOT, *this)); } Expr Expr::andExpr(const Expr& right) const { return getEM()->mkExpr(CVC4::kind::AND, *this, right); } Expr Expr::orExpr(const Expr& right) const { return getEM()->mkExpr(CVC4::kind::OR, *this, right); } Expr Expr::iteExpr(const Expr& thenpart, const Expr& elsepart) const { return getEM()->mkExpr(CVC4::kind::ITE, *this, thenpart, elsepart); } Expr Expr::iffExpr(const Expr& right) const { return getEM()->mkExpr(CVC4::kind::EQUAL, *this, right); } Expr Expr::impExpr(const Expr& right) const { return getEM()->mkExpr(CVC4::kind::IMPLIES, *this, right); } Expr Expr::xorExpr(const Expr& right) const { return getEM()->mkExpr(CVC4::kind::XOR, *this, right); } Expr Expr::substExpr(const std::vector& oldTerms, const std::vector& newTerms) const { const vector& o = *reinterpret_cast*>(&oldTerms); const vector& n = *reinterpret_cast*>(&newTerms); return Expr(substitute(o, n)); } Expr Expr::substExpr(const ExprHashMap& oldToNew) const { const hash_map& o2n = *reinterpret_cast*>(&oldToNew); return Expr(substitute(o2n)); } Expr Expr::operator!() const { return notExpr(); } Expr Expr::operator&&(const Expr& right) const { return andExpr(right); } Expr Expr::operator||(const Expr& right) const { return orExpr(right); } size_t Expr::hash(const Expr& e) { return CVC4::ExprHashFunction()(e); } size_t Expr::hash() const { return CVC4::ExprHashFunction()(*this); } bool Expr::isFalse() const { return getKind() == CVC4::kind::CONST_BOOLEAN && getConst() == false; } bool Expr::isTrue() const { return getKind() == CVC4::kind::CONST_BOOLEAN && getConst() == true; } bool Expr::isBoolConst() const { return getKind() == CVC4::kind::CONST_BOOLEAN; } bool Expr::isVar() const { return isVariable(); } bool Expr::isString() const { return getType().isString(); } bool Expr::isBoundVar() const { return getKind() == CVC4::kind::BOUND_VARIABLE; } bool Expr::isForall() const { return getKind() == CVC4::kind::FORALL; } bool Expr::isExists() const { return getKind() == CVC4::kind::EXISTS; } bool Expr::isLambda() const { return getKind() == CVC4::kind::LAMBDA; } bool Expr::isClosure() const { return isQuantifier() || isLambda(); } bool Expr::isQuantifier() const { return getKind() == CVC4::kind::FORALL || getKind() == CVC4::kind::EXISTS; } bool Expr::isApply() const { return hasOperator(); } bool Expr::isSymbol() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } bool Expr::isTheorem() const { return false; } bool Expr::isType() const { return s_exprToType.find(*this) != s_exprToType.end(); } bool Expr::isTerm() const { return !getType().isBool(); } bool Expr::isConstant() const { return isConst(); } bool Expr::isRawList() const { return false; } bool Expr::isAtomic() const { if (getType().isBool()) { return isBoolConst(); } for (int k = 0; k < arity(); ++k) { if (!(*this)[k].isAtomic()) { return false; } } return true; } bool Expr::isAtomicFormula() const { if (!getType().isBool()) { return false; } switch(getKind()) { case CVC4::kind::FORALL: case CVC4::kind::EXISTS: case CVC4::kind::XOR: case CVC4::kind::NOT: case CVC4::kind::AND: case CVC4::kind::OR: case CVC4::kind::ITE: case CVC4::kind::IMPLIES: return false; case CVC4::kind::EQUAL: return (*this)[0].getType().isBool(); break; default: ; /* fall through */ } for (Expr::iterator k = begin(), kend=end(); k != kend; ++k) { if (!CVC3::Expr(*k).isAtomic()) { return false; } } return true; } bool Expr::isAbsAtomicFormula() const { return isQuantifier() || isAtomicFormula(); } bool Expr::isLiteral() const { return isAtomicFormula() || (isNot() && (*this)[0].isAtomicFormula()); } bool Expr::isAbsLiteral() const { return isAbsAtomicFormula() || (isNot() && (*this)[0].isAbsAtomicFormula()); } bool Expr::isBoolConnective() const { if (!getType().isBool()) { return false; } switch (getKind()) { case CVC4::kind::NOT: case CVC4::kind::AND: case CVC4::kind::OR: case CVC4::kind::IMPLIES: case CVC4::kind::XOR: case CVC4::kind::ITE: return true; case CVC4::kind::EQUAL: return (*this)[0].getType().isBool(); break; default: return false; } } bool Expr::isPropLiteral() const { return (isNot() && (*this)[0].isPropAtom()) || isPropAtom(); } bool Expr::isPropAtom() const { return !isTerm() && !isBoolConnective(); } std::string Expr::getName() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } std::string Expr::getUid() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } std::string Expr::getString() const { CompatCheckArgument(getKind() == CVC4::kind::CONST_STRING, *this, "CVC3::Expr::getString(): not a string Expr: `%s'", toString().c_str()); return getConst().toString(); } std::vector Expr::getVars() const { CompatCheckArgument(isClosure(), *this, "CVC3::Expr::getVars(): not a closure Expr: `%s'", toString().c_str()); const vector& kids = (*this)[0].getChildren(); vector v; for(vector::const_iterator i = kids.begin(); i != kids.end(); ++i) { v.push_back(*i); } return v; } Expr Expr::getExistential() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } int Expr::getBoundIndex() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr Expr::getBody() const { CompatCheckArgument(isClosure(), *this, "CVC3::Expr::getBody(): not a closure Expr: `%s'", toString().c_str()); return (*this)[1]; } Theorem Expr::getTheorem() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } bool Expr::isEq() const { return getKind() == CVC4::kind::EQUAL; } bool Expr::isNot() const { return getKind() == CVC4::kind::NOT; } bool Expr::isAnd() const { return getKind() == CVC4::kind::AND; } bool Expr::isOr() const { return getKind() == CVC4::kind::OR; } bool Expr::isITE() const { return getKind() == CVC4::kind::ITE; } bool Expr::isIff() const { return getKind() == CVC4::kind::EQUAL && (*this)[0].getType().isBool();; } bool Expr::isImpl() const { return getKind() == CVC4::kind::IMPLIES; } bool Expr::isXor() const { return getKind() == CVC4::kind::XOR; } bool Expr::isRational() const { return getKind() == CVC4::kind::CONST_RATIONAL; } bool Expr::isSkolem() const { return getKind() == CVC4::kind::SKOLEM; } const Rational& Expr::getRational() const { CompatCheckArgument(isRational(), *this, "CVC3::Expr::getRational(): not a rational Expr: `%s'", toString().c_str()); return getConst(); } Op Expr::mkOp() const { return *this; } Op Expr::getOp() const { return getOperator(); } Expr Expr::getOpExpr() const { return getOperator(); } int Expr::getOpKind() const { Expr op = getOperator(); int k = op.getKind(); return k == BUILTIN ? getKind() : k; } Expr Expr::getExpr() const { return *this; } std::vector< std::vector > Expr::getTriggers() const { CompatCheckArgument(isClosure(), *this, "getTriggers() called on non-closure expr"); if(getNumChildren() < 3) { // no triggers for this quantifier return vector< vector >(); } else { // get the triggers from the third child Expr triggers = (*this)[2]; vector< vector > v; for(const_iterator i = triggers.begin(); i != triggers.end(); ++i) { v.push_back(vector()); for(const_iterator j = (*i).begin(); j != (*i).end(); ++j) { v.back().push_back(*j); } } return v; } } ExprManager* Expr::getEM() const { return reinterpret_cast(getExprManager()); } std::vector Expr::getKids() const { vector v = getChildren(); return *reinterpret_cast*>(&v); } ExprIndex Expr::getIndex() const { return getId(); } int Expr::arity() const { return getNumChildren(); } Expr Expr::unnegate() const { return isNot() ? Expr((*this)[0]) : *this; } bool Expr::isInitialized() const { return !isNull(); } Type Expr::getType() const { return Type(this->CVC4::Expr::getType()); } Type Expr::lookupType() const { return getType(); } void Expr::pprint() const { std::cout << *this << std::endl; } void Expr::pprintnodag() const { CVC4::expr::ExprDag::Scope scope(std::cout, 0); std::cout << *this << std::endl; } bool isArrayLiteral(const Expr& e) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } std::string ExprManager::getKindName(int kind) { return CVC4::kind::kindToString(CVC4::Kind(kind)); } InputLanguage ExprManager::getInputLang() const { return getOptions().getInputLanguage(); } InputLanguage ExprManager::getOutputLang() const { return CVC4::language::toInputLanguage(getOptions().getOutputLanguage()); } Expr Expr::operator[](int i) const { return Expr(this->CVC4::Expr::operator[](i)); } CLFlag::CLFlag(bool b, const std::string& help, bool display) : d_tp(CLFLAG_BOOL) { d_data.b = b; } CLFlag::CLFlag(int i, const std::string& help, bool display) : d_tp(CLFLAG_INT) { d_data.i = i; } CLFlag::CLFlag(const std::string& s, const std::string& help, bool display) : d_tp(CLFLAG_STRING) { d_data.s = new string(s); } CLFlag::CLFlag(const char* s, const std::string& help, bool display) : d_tp(CLFLAG_STRING) { d_data.s = new string(s); } CLFlag::CLFlag(const std::vector >& sv, const std::string& help, bool display) : d_tp(CLFLAG_STRVEC) { d_data.sv = new vector >(sv); } CLFlag::CLFlag() : d_tp(CLFLAG_NULL) { } CLFlag::CLFlag(const CLFlag& f) : d_tp(f.d_tp) { switch(d_tp) { case CLFLAG_STRING: d_data.s = new string(*f.d_data.s); break; case CLFLAG_STRVEC: d_data.sv = new vector >(*f.d_data.sv); break; default: d_data = f.d_data; } } CLFlag::~CLFlag() { switch(d_tp) { case CLFLAG_STRING: delete d_data.s; break; case CLFLAG_STRVEC: delete d_data.sv; break; default: ; // nothing to do } } CLFlag& CLFlag::operator=(const CLFlag& f) { if(this == &f) { // self-assignment return *this; } // try to preserve the existing heap objects if possible if(d_tp == f.d_tp) { switch(d_tp) { case CLFLAG_STRING: *d_data.s = *f.d_data.s; break; case CLFLAG_STRVEC: *d_data.sv = *f.d_data.sv; break; default: d_data = f.d_data; } } else { switch(d_tp) { case CLFLAG_STRING: delete d_data.s; break; case CLFLAG_STRVEC: delete d_data.sv; break; default: ; // nothing to do here } switch(f.d_tp) { case CLFLAG_STRING: d_data.s = new string(*f.d_data.s); break; case CLFLAG_STRVEC: d_data.sv = new vector >(*f.d_data.sv); break; default: d_data = f.d_data; } } d_tp = f.d_tp; return *this; } CLFlag& CLFlag::operator=(bool b) { CompatCheckArgument(d_tp == CLFLAG_BOOL, this); d_data.b = b; return *this; } CLFlag& CLFlag::operator=(int i) { CompatCheckArgument(d_tp == CLFLAG_INT, this); d_data.i = i; return *this; } CLFlag& CLFlag::operator=(const std::string& s) { CompatCheckArgument(d_tp == CLFLAG_STRING, this); *d_data.s = s; return *this; } CLFlag& CLFlag::operator=(const char* s) { CompatCheckArgument(d_tp == CLFLAG_STRING, this); *d_data.s = s; return *this; } CLFlag& CLFlag::operator=(const std::pair& p) { CompatCheckArgument(d_tp == CLFLAG_STRVEC, this); d_data.sv->push_back(p); return *this; } CLFlag& CLFlag::operator=(const std::vector >& sv) { CompatCheckArgument(d_tp == CLFLAG_STRVEC, this); *d_data.sv = sv; return *this; } CLFlagType CLFlag::getType() const { return d_tp; } bool CLFlag::modified() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } bool CLFlag::display() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } const bool& CLFlag::getBool() const { CompatCheckArgument(d_tp == CLFLAG_BOOL, this); return d_data.b; } const int& CLFlag::getInt() const { CompatCheckArgument(d_tp == CLFLAG_INT, this); return d_data.i; } const std::string& CLFlag::getString() const { CompatCheckArgument(d_tp == CLFLAG_STRING, this); return *d_data.s; } const std::vector >& CLFlag::getStrVec() const { CompatCheckArgument(d_tp == CLFLAG_STRVEC, this); return *d_data.sv; } const std::string& CLFlag::getHelp() const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void CLFlags::addFlag(const std::string& name, const CLFlag& f) { d_map[name] = f; } size_t CLFlags::countFlags(const std::string& name) const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } size_t CLFlags::countFlags(const std::string& name, std::vector& names) const { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } const CLFlag& CLFlags::getFlag(const std::string& name) const { FlagMap::const_iterator i = d_map.find(name); CompatCheckArgument(i != d_map.end(), name, "No command-line flag by that name, or not supported."); return (*i).second; } const CLFlag& CLFlags::operator[](const std::string& name) const { return getFlag(name); } void CLFlags::setFlag(const std::string& name, const CLFlag& f) { FlagMap::iterator i = d_map.find(name); CompatCheckArgument(i != d_map.end(), name, "No command-line flag by that name, or not supported."); CompatCheckArgument((*i).second.getType() == f.getType(), f, "Command-line flag `%s' has type %s, but caller tried to set to a %s.", name.c_str(), toString((*i).second.getType()).c_str(), toString(f.getType()).c_str()); (*i).second = f; } void CLFlags::setFlag(const std::string& name, bool b) { FlagMap::iterator i = d_map.find(name); CompatCheckArgument(i != d_map.end(), name, "No command-line flag by that name, or not supported."); (*i).second = b; } void CLFlags::setFlag(const std::string& name, int i) { FlagMap::iterator it = d_map.find(name); CompatCheckArgument(it != d_map.end(), name, "No command-line flag by that name, or not supported."); (*it).second = i; } void CLFlags::setFlag(const std::string& name, const std::string& s) { FlagMap::iterator i = d_map.find(name); CompatCheckArgument(i != d_map.end(), name, "No command-line flag by that name, or not supported."); (*i).second = s; } void CLFlags::setFlag(const std::string& name, const char* s) { FlagMap::iterator i = d_map.find(name); CompatCheckArgument(i != d_map.end(), name, "No command-line flag by that name, or not supported."); (*i).second = s; } void CLFlags::setFlag(const std::string& name, const std::pair& p) { FlagMap::iterator i = d_map.find(name); CompatCheckArgument(i != d_map.end(), name, "No command-line flag by that name, or not supported."); (*i).second = p; } void CLFlags::setFlag(const std::string& name, const std::vector >& sv) { FlagMap::iterator i = d_map.find(name); CompatCheckArgument(i != d_map.end(), name, "No command-line flag by that name, or not supported."); (*i).second = sv; } void ValidityChecker::setUpOptions(CVC4::Options& options, const CLFlags& clflags) { // always incremental and model-producing in CVC3 compatibility mode // also incrementally-simplifying and interactive d_smt->setOption("incremental", string("true")); // disable this option by default for now, because datatype models // are broken [MGD 10/4/2012] //d_smt->setOption("produce-models", string("true")); d_smt->setOption("simplification-mode", string("incremental")); d_smt->setOption("interactive-mode", string("true"));// support SmtEngine::getAssertions() d_smt->setOption("statistics", string(clflags["stats"].getBool() ? "true" : "false")); d_smt->setOption("random-seed", int2string(clflags["seed"].getInt())); d_smt->setOption("parse-only", string(clflags["parse-only"].getBool() ? "true" : "false")); d_smt->setOption("input-language", clflags["lang"].getString()); if(clflags["output-lang"].getString() == "") { stringstream langss; langss << CVC4::language::toOutputLanguage(options.getInputLanguage()); d_smt->setOption("output-language", langss.str()); } else { d_smt->setOption("output-language", clflags["output-lang"].getString()); } } ValidityChecker::ValidityChecker() : d_clflags(new CLFlags()), d_options(), d_em(NULL), d_emmc(), d_reverseEmmc(), d_smt(NULL), d_parserContext(NULL), d_exprTypeMapRemove(), d_stackLevel(0), d_constructors(), d_selectors() { d_em = reinterpret_cast(new CVC4::ExprManager(d_options)); s_validityCheckers[d_em] = this; d_smt = new CVC4::SmtEngine(d_em); setUpOptions(d_options, *d_clflags); d_parserContext = CVC4::parser::ParserBuilder(d_em, "").withInputLanguage(CVC4::language::input::LANG_CVC4).withStringInput("").build(); } ValidityChecker::ValidityChecker(const CLFlags& clflags) : d_clflags(new CLFlags(clflags)), d_options(), d_em(NULL), d_emmc(), d_reverseEmmc(), d_smt(NULL), d_parserContext(NULL), d_exprTypeMapRemove(), d_stackLevel(0), d_constructors(), d_selectors() { d_em = reinterpret_cast(new CVC4::ExprManager(d_options)); s_validityCheckers[d_em] = this; d_smt = new CVC4::SmtEngine(d_em); setUpOptions(d_options, *d_clflags); d_parserContext = CVC4::parser::ParserBuilder(d_em, "").withInputLanguage(CVC4::language::input::LANG_CVC4).withStringInput("").build(); } ValidityChecker::~ValidityChecker() { for(vector::iterator i = d_exprTypeMapRemove.begin(); i != d_exprTypeMapRemove.end(); ++i) { s_typeToExpr.erase(s_exprToType[*i]); s_exprToType.erase(*i); } d_exprTypeMapRemove.clear(); delete d_parserContext; delete d_smt; d_emmc.clear(); for(set::iterator i = d_reverseEmmc.begin(); i != d_reverseEmmc.end(); ++i) { (*i)->d_emmc.erase(d_em); } d_reverseEmmc.clear(); s_validityCheckers.erase(d_em); delete d_em; delete d_clflags; } CLFlags& ValidityChecker::getFlags() const { return *d_clflags; } void ValidityChecker::reprocessFlags() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } CLFlags ValidityChecker::createFlags() { CLFlags flags; // We expect the user to type cvc3 -h to get help, which will set // the "help" flag to false; that's why it's initially true. // Overall system control flags flags.addFlag("timeout", CLFlag(0, "Kill cvc3 process after given number of seconds (0==no limit)")); flags.addFlag("stimeout", CLFlag(0, "Set time resource limit in tenths of seconds for a query(0==no limit)")); flags.addFlag("resource", CLFlag(0, "Set finite resource limit (0==no limit)")); flags.addFlag("mm", CLFlag("chunks", "Memory manager (chunks, malloc)")); // Information printing flags flags.addFlag("help",CLFlag(true, "print usage information and exit")); flags.addFlag("unsupported",CLFlag(true, "print usage for old/unsupported/experimental options")); flags.addFlag("version",CLFlag(true, "print version information and exit")); flags.addFlag("interactive", CLFlag(false, "Interactive mode")); flags.addFlag("stats", CLFlag(false, "Print run-time statistics")); flags.addFlag("seed", CLFlag(91648253, "Set the seed for random sequence")); flags.addFlag("printResults", CLFlag(true, "Print results of interactive commands.")); flags.addFlag("dump-log", CLFlag("", "Dump API call log in CVC3 input " "format to given file " "(off when file name is \"\")")); flags.addFlag("parse-only", CLFlag(false,"Parse the input, then exit.")); //Translation related flags flags.addFlag("expResult", CLFlag("", "For smtlib translation. Give the expected result", false)); flags.addFlag("category", CLFlag("unknown", "For smtlib translation. Give the category", false)); flags.addFlag("translate", CLFlag(false, "Produce a complete translation from " "the input language to output language. ")); flags.addFlag("real2int", CLFlag(false, "When translating, convert reals to integers.", false)); flags.addFlag("convertArith", CLFlag(false, "When translating, try to rewrite arith terms into smt-lib subset", false)); flags.addFlag("convert2diff", CLFlag("", "When translating, try to force into difference logic. Legal values are int and real.", false)); flags.addFlag("iteLiftArith", CLFlag(false, "For translation. If true, ite's are lifted out of arith exprs.", false)); flags.addFlag("convertArray", CLFlag(false, "For translation. If true, arrays are converted to uninterpreted functions if possible.", false)); flags.addFlag("combineAssump", CLFlag(false, "For translation. If true, assumptions are combined into the query.", false)); flags.addFlag("convert2array", CLFlag(false, "For translation. If true, try to convert to array-only theory", false)); flags.addFlag("convertToBV",CLFlag(0, "For translation. Set to nonzero to convert ints to bv's of that length", false)); flags.addFlag("convert-eq-iff",CLFlag(false, "Convert equality on Boolean expressions to iff.", false)); flags.addFlag("preSimplify",CLFlag(false, "Simplify each assertion or query before translating it", false)); flags.addFlag("dump-tcc", CLFlag(false, "Compute and dump TCC only")); flags.addFlag("trans-skip-pp", CLFlag(false, "Skip preprocess step in translation module", false)); flags.addFlag("trans-skip-difficulty", CLFlag(false, "Leave out difficulty attribute during translation to SMT v2.0", false)); flags.addFlag("promote", CLFlag(true, "Promote undefined logic combinations to defined logic combinations during translation to SMT", false)); // Parser related flags flags.addFlag("old-func-syntax",CLFlag(false, "Enable parsing of old-style function syntax", false)); // Pretty-printing related flags flags.addFlag("dagify-exprs", CLFlag(true, "Print expressions with sharing as DAGs")); flags.addFlag("lang", CLFlag("presentation", "Input language " "(presentation, smt, smt2, internal)")); flags.addFlag("output-lang", CLFlag("", "Output language " "(presentation, smtlib, simplify, internal, lisp, tptp, spass)")); flags.addFlag("indent", CLFlag(false, "Print expressions with indentation")); flags.addFlag("width", CLFlag(80, "Suggested line width for printing")); flags.addFlag("print-depth", CLFlag(-1, "Max. depth to print expressions ")); flags.addFlag("print-assump", CLFlag(false, "Print assumptions in Theorems ")); // Search Engine (SAT) related flags flags.addFlag("sat",CLFlag("minisat", "choose a SAT solver to use " "(sat, minisat)")); flags.addFlag("de",CLFlag("dfs", "choose a decision engine to use " "(dfs, sat)")); // Proofs and Assumptions flags.addFlag("proofs", CLFlag(false, "Produce proofs")); flags.addFlag("check-proofs", CLFlag(false, "Check proofs on-the-fly")); flags.addFlag("minimizeClauses", CLFlag(false, "Use brute-force minimization of clauses", false)); flags.addFlag("dynack", CLFlag(false, "Use dynamic Ackermannization", false)); flags.addFlag("smart-clauses", CLFlag(true, "Learn multiple clauses per conflict")); // Core framework switches flags.addFlag("tcc", CLFlag(false, "Check TCCs for each ASSERT and QUERY")); flags.addFlag("cnf", CLFlag(true, "Convert top-level Boolean formulas to CNF", false)); flags.addFlag("ignore-cnf-vars", CLFlag(false, "Do not split on aux. CNF vars (with +cnf)", false)); flags.addFlag("orig-formula", CLFlag(false, "Preserve the original formula with +cnf (for splitter heuristics)", false)); flags.addFlag("liftITE", CLFlag(false, "Eagerly lift all ITE exprs")); flags.addFlag("iflift", CLFlag(false, "Translate if-then-else terms to CNF (with +cnf)", false)); flags.addFlag("circuit", CLFlag(false, "With +cnf, use circuit propagation", false)); flags.addFlag("un-ite-ify", CLFlag(false, "Unconvert ITE expressions", false)); flags.addFlag("ite-cond-simp", CLFlag(false, "Replace ITE condition by TRUE/FALSE in subexprs", false)); flags.addFlag("preprocess", CLFlag(true, "Preprocess queries")); flags.addFlag("pp-pushneg", CLFlag(false, "Push negation in preprocessor")); flags.addFlag("pp-bryant", CLFlag(false, "Enable Bryant algorithm for UF", false)); flags.addFlag("pp-budget", CLFlag(0, "Budget for new preprocessing step", false)); flags.addFlag("pp-care", CLFlag(true, "Enable care-set preprocessing step", false)); flags.addFlag("simp-and", CLFlag(false, "Rewrite x&y to x&y[x/true]", false)); flags.addFlag("simp-or", CLFlag(false, "Rewrite x|y to x|y[x/false]", false)); flags.addFlag("pp-batch", CLFlag(false, "Ignore assumptions until query, then process all at once")); // Negate the query when translate into tptp flags.addFlag("negate-query", CLFlag(true, "Negate the query when translate into TPTP format"));; // Concrete model generation (counterexamples) flags flags.addFlag("counterexample", CLFlag(false, "Dump counterexample if formula is invalid or satisfiable")); flags.addFlag("model", CLFlag(false, "Dump model if formula is invalid or satisfiable")); flags.addFlag("unknown-check-model", CLFlag(false, "Try to generate model if formula is unknown")); flags.addFlag("applications", CLFlag(true, "Add relevant function applications and array accesses to the concrete countermodel")); // Debugging flags (only for the debug build) // #ifdef _CVC3_DEBUG_MODE vector > sv; flags.addFlag("trace", CLFlag(sv, "Tracing. Multiple flags add up.")); flags.addFlag("dump-trace", CLFlag("", "Dump debugging trace to " "given file (off when file name is \"\")")); // #endif // DP-specific flags // Arithmetic flags.addFlag("arith-new",CLFlag(false, "Use new arithmetic dp", false)); flags.addFlag("arith3",CLFlag(false, "Use old arithmetic dp that works well with combined theories", false)); flags.addFlag("var-order", CLFlag(false, "Use simple variable order in arith", false)); flags.addFlag("ineq-delay", CLFlag(0, "Accumulate this many inequalities before processing (-1 for don't process until necessary)")); flags.addFlag("nonlinear-sign-split", CLFlag(true, "Whether to split on the signs of nontrivial nonlinear terms")); flags.addFlag("grayshadow-threshold", CLFlag(-1, "Ignore gray shadows bigger than this (makes solver incomplete)")); flags.addFlag("pathlength-threshold", CLFlag(-1, "Ignore gray shadows bigger than this (makes solver incomplete)")); // Arrays flags.addFlag("liftReadIte", CLFlag(true, "Lift read of ite")); //for LFSC stuff, disable Tseitin CNF conversion, by Yeting flags.addFlag("cnf-formula", CLFlag(false, "The input must be in CNF. This option automatically enables '-de sat' and disable preprocess")); //for LFSC print out, by Yeting //flags.addFlag("lfsc", CLFlag(false, "the input is already in CNF. This option automatically enables -de sat and disable -preprocess")); // for LFSC print, allows different modes by Liana flags.addFlag("lfsc-mode", CLFlag(0, "lfsc mode 0: off, 1:normal, 2:cvc3-mimic etc.")); // Quantifiers flags.addFlag("max-quant-inst", CLFlag(200, "The maximum number of" " naive instantiations")); flags.addFlag("quant-new", CLFlag(true, "If this option is false, only naive instantiation is called")); flags.addFlag("quant-lazy", CLFlag(false, "Instantiate lazily", false)); flags.addFlag("quant-sem-match", CLFlag(false, "Attempt to match semantically when instantiating", false)); // flags.addFlag("quant-const-match", // CLFlag(true, "When matching semantically, only match with constants", false)); flags.addFlag("quant-complete-inst", CLFlag(false, "Try complete instantiation heuristic. +pp-batch will be automatically enabled")); flags.addFlag("quant-max-IL", CLFlag(100, "The maximum Instantiation Level allowed")); flags.addFlag("quant-inst-lcache", CLFlag(true, "Cache instantiations")); flags.addFlag("quant-inst-gcache", CLFlag(false, "Cache instantiations", false)); flags.addFlag("quant-inst-tcache", CLFlag(false, "Cache instantiations", false)); flags.addFlag("quant-inst-true", CLFlag(true, "Ignore true instantiations")); flags.addFlag("quant-pullvar", CLFlag(false, "Pull out vars", false)); flags.addFlag("quant-score", CLFlag(true, "Use instantiation level")); flags.addFlag("quant-polarity", CLFlag(false, "Use polarity ", false)); flags.addFlag("quant-eqnew", CLFlag(true, "Use new equality matching")); flags.addFlag("quant-max-score", CLFlag(0, "Maximum initial dynamic score")); flags.addFlag("quant-trans3", CLFlag(true, "Use trans heuristic")); flags.addFlag("quant-trans2", CLFlag(true, "Use trans2 heuristic")); flags.addFlag("quant-naive-num", CLFlag(1000, "Maximum number to call naive instantiation")); flags.addFlag("quant-naive-inst", CLFlag(true, "Use naive instantiation")); flags.addFlag("quant-man-trig", CLFlag(true, "Use manual triggers")); flags.addFlag("quant-gfact", CLFlag(false, "Send facts to core directly", false)); flags.addFlag("quant-glimit", CLFlag(1000, "Limit for gfacts", false)); flags.addFlag("print-var-type", //by yeting, as requested by Sascha Boehme for proofs CLFlag(false, "Print types for bound variables")); // Bitvectors flags.addFlag("bv32-flag", CLFlag(false, "assume that all bitvectors are 32bits with no overflow", false)); // Uninterpreted Functions flags.addFlag("trans-closure", CLFlag(false,"enables transitive closure of binary relations", false)); // Datatypes flags.addFlag("dt-smartsplits", CLFlag(true, "enables smart splitting in datatype theory", false)); flags.addFlag("dt-lazy", CLFlag(false, "lazy splitting on datatypes", false)); return flags; } ValidityChecker* ValidityChecker::create(const CLFlags& flags) { return new ValidityChecker(flags); } ValidityChecker* ValidityChecker::create() { return new ValidityChecker(createFlags()); } Type ValidityChecker::boolType() { return d_em->booleanType(); } Type ValidityChecker::realType() { return d_em->realType(); } Type ValidityChecker::intType() { return d_em->integerType(); } Type ValidityChecker::subrangeType(const Expr& l, const Expr& r) { bool noLowerBound = l.getType().isString() && l.getConst() == "_NEGINF"; bool noUpperBound = r.getType().isString() && r.getConst() == "_POSINF"; CompatCheckArgument(noLowerBound || (l.getKind() == CVC4::kind::CONST_RATIONAL && l.getConst().isIntegral()), l); CompatCheckArgument(noUpperBound || (r.getKind() == CVC4::kind::CONST_RATIONAL && r.getConst().isIntegral()), r); CVC4::SubrangeBound bl = noLowerBound ? CVC4::SubrangeBound() : CVC4::SubrangeBound(l.getConst().getNumerator()); CVC4::SubrangeBound br = noUpperBound ? CVC4::SubrangeBound() : CVC4::SubrangeBound(r.getConst().getNumerator()); return d_em->mkSubrangeType(CVC4::SubrangeBounds(bl, br)); } Type ValidityChecker::subtypeType(const Expr& pred, const Expr& witness) { Unimplemented("Predicate subtyping not supported by CVC4 yet (sorry!)"); /* if(witness.isNull()) { return d_em->mkPredicateSubtype(pred); } else { return d_em->mkPredicateSubtype(pred, witness); } */ } Type ValidityChecker::tupleType(const Type& type0, const Type& type1) { vector types; types.push_back(type0); types.push_back(type1); return d_em->mkTupleType(types); } Type ValidityChecker::tupleType(const Type& type0, const Type& type1, const Type& type2) { vector types; types.push_back(type0); types.push_back(type1); types.push_back(type2); return d_em->mkTupleType(types); } Type ValidityChecker::tupleType(const std::vector& types) { const vector& v = *reinterpret_cast*>(&types); return Type(d_em->mkTupleType(v)); } Type ValidityChecker::recordType(const std::string& field, const Type& type) { std::vector< std::pair > fields; fields.push_back(std::make_pair(field, (const CVC4::Type&) type)); return d_em->mkRecordType(CVC4::Record(fields)); } Type ValidityChecker::recordType(const std::string& field0, const Type& type0, const std::string& field1, const Type& type1) { std::vector< std::pair > fields; fields.push_back(std::make_pair(field0, (const CVC4::Type&) type0)); fields.push_back(std::make_pair(field1, (const CVC4::Type&) type1)); return d_em->mkRecordType(CVC4::Record(fields)); } Type ValidityChecker::recordType(const std::string& field0, const Type& type0, const std::string& field1, const Type& type1, const std::string& field2, const Type& type2) { std::vector< std::pair > fields; fields.push_back(std::make_pair(field0, (const CVC4::Type&) type0)); fields.push_back(std::make_pair(field1, (const CVC4::Type&) type1)); fields.push_back(std::make_pair(field2, (const CVC4::Type&) type2)); return d_em->mkRecordType(CVC4::Record(fields)); } Type ValidityChecker::recordType(const std::vector& fields, const std::vector& types) { CompatCheckArgument(fields.size() == types.size() && fields.size() > 0, "invalid vector length(s) in recordType()"); std::vector< std::pair > fieldSpecs; for(unsigned i = 0; i < fields.size(); ++i) { fieldSpecs.push_back(std::make_pair(fields[i], (const CVC4::Type&) types[i])); } return d_em->mkRecordType(CVC4::Record(fieldSpecs)); } Type ValidityChecker::dataType(const std::string& name, const std::string& constructor, const std::vector& selectors, const std::vector& types) { CompatCheckArgument(selectors.size() == types.size(), types, "expected selectors and types vectors to be of equal" "length"); vector cv; vector< vector > sv; vector< vector > tv; cv.push_back(constructor); sv.push_back(selectors); tv.push_back(types); return dataType(name, cv, sv, tv); } Type ValidityChecker::dataType(const std::string& name, const std::vector& constructors, const std::vector >& selectors, const std::vector >& types) { CompatCheckArgument(constructors.size() == selectors.size(), selectors, "Expected constructors and selectors vectors to be of " "equal length."); CompatCheckArgument(constructors.size() == types.size(), types, "Expected constructors and types vectors to be of equal " "length."); vector nv; vector< vector > cv; vector< vector< vector > > sv; vector< vector< vector > > tv; nv.push_back(name); cv.push_back(constructors); sv.push_back(selectors); tv.push_back(types); vector dtts; dataType(nv, cv, sv, tv, dtts); assert(dtts.size() == 1); return dtts[0]; } void ValidityChecker::dataType(const std::vector& names, const std::vector >& constructors, const std::vector > >& selectors, const std::vector > >& types, std::vector& returnTypes) { CompatCheckArgument(names.size() == constructors.size(), constructors, "Expected names and constructors vectors to be of equal " "length."); CompatCheckArgument(names.size() == selectors.size(), selectors, "Expected names and selectors vectors to be of equal " "length."); CompatCheckArgument(names.size() == types.size(), types, "Expected names and types vectors to be of equal " "length."); vector dv; // Set up the datatype specifications. for(unsigned i = 0; i < names.size(); ++i) { CVC4::Datatype dt(names[i], false); CompatCheckArgument(constructors[i].size() == selectors[i].size(), "Expected sub-vectors in constructors and selectors " "vectors to match in size."); CompatCheckArgument(constructors[i].size() == types[i].size(), "Expected sub-vectors in constructors and types " "vectors to match in size."); for(unsigned j = 0; j < constructors[i].size(); ++j) { CVC4::DatatypeConstructor ctor(constructors[i][j]); CompatCheckArgument(selectors[i][j].size() == types[i][j].size(), types, "Expected sub-vectors in selectors and types vectors " "to match in size."); for(unsigned k = 0; k < selectors[i][j].size(); ++k) { if(types[i][j][k].getType().isString()) { CVC4::DatatypeUnresolvedType unresolvedName = types[i][j][k].getConst().toString(); ctor.addArg(selectors[i][j][k], unresolvedName); } else { ctor.addArg(selectors[i][j][k], exprToType(types[i][j][k])); } } dt.addConstructor(ctor); } dv.push_back(dt); } // Make the datatypes. vector dtts = d_em->mkMutualDatatypeTypes(dv); // Post-process to register the names of everything with this validity checker. // This is necessary for the compatibility layer because cons/sel operations are // constructed without appealing explicitly to the Datatype they belong to. for(vector::iterator i = dtts.begin(); i != dtts.end(); ++i) { // For each datatype... const CVC4::Datatype& dt = (*i).getDatatype(); // ensure it's well-founded (the check is done here because // that's how it is in CVC3) CompatCheckArgument(dt.isWellFounded(), "datatype is not well-founded"); for(CVC4::Datatype::const_iterator j = dt.begin(); j != dt.end(); ++j) { // For each constructor, register its name and its selectors names. CompatCheckArgument( d_constructors.find((*j).getName()) == d_constructors.end(), constructors, "Cannot have two constructors with the same name in a " "ValidityChecker."); d_constructors[(*j).getName()] = &dt; for(CVC4::DatatypeConstructor::const_iterator k = (*j).begin(); k != (*j).end(); ++k) { CompatCheckArgument( d_selectors.find((*k).getName()) == d_selectors.end(), selectors, "Cannot have two selectors with the same name in a " "ValidityChecker."); d_selectors[(*k).getName()] = make_pair(&dt, (*j).getName()); } } } // Copy into the output buffer. returnTypes.clear(); copy(dtts.begin(), dtts.end(), back_inserter(returnTypes)); } Type ValidityChecker::arrayType(const Type& typeIndex, const Type& typeData) { return d_em->mkArrayType(typeIndex, typeData); } Type ValidityChecker::bitvecType(int n) { CompatCheckArgument(n >= 0, n, "Cannot construct a bitvector type of negative size."); return d_em->mkBitVectorType(n); } Type ValidityChecker::funType(const Type& typeDom, const Type& typeRan) { return d_em->mkFunctionType(typeDom, typeRan); } Type ValidityChecker::funType(const std::vector& typeDom, const Type& typeRan) { const vector& dom = *reinterpret_cast*>(&typeDom); return Type(d_em->mkFunctionType(dom, typeRan)); } Type ValidityChecker::createType(const std::string& typeName) { return d_em->mkSort(typeName); } Type ValidityChecker::createType(const std::string& typeName, const Type& def) { d_parserContext->defineType(typeName, def); return def; } Type ValidityChecker::lookupType(const std::string& typeName) { return d_parserContext->getSort(typeName); } ExprManager* ValidityChecker::getEM() { return d_em; } Expr ValidityChecker::varExpr(const std::string& name, const Type& type) { return d_parserContext->mkVar(name, type); } Expr ValidityChecker::varExpr(const std::string& name, const Type& type, const Expr& def) { CompatCheckArgument(def.getType() == type, def, "expected types to match"); d_parserContext->defineVar(name, def); return def; } Expr ValidityChecker::lookupVar(const std::string& name, Type* type) { return d_parserContext->getVariable(name); } Type ValidityChecker::getType(const Expr& e) { return d_em->getType(e); } Type ValidityChecker::getBaseType(const Expr& e) { return getBaseType(e.getType()); } Type ValidityChecker::getBaseType(const Type& t) { return t.getBaseType(); } Expr ValidityChecker::getTypePred(const Type&t, const Expr& e) { // This function appears to be TCC-related---it doesn't just get the pred of a // subtype predicate, but returns a predicate describing the type. Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::stringExpr(const std::string& str) { return d_em->mkConst(CVC4::String(str)); } Expr ValidityChecker::idExpr(const std::string& name) { // represent as a string expr, CVC4 doesn't have id exprs return d_em->mkConst(CVC4::String(name)); } Expr ValidityChecker::listExpr(const std::vector& kids) { return d_em->mkExpr(CVC4::kind::SEXPR, vector(kids.begin(), kids.end())); } Expr ValidityChecker::listExpr(const Expr& e1) { return d_em->mkExpr(CVC4::kind::SEXPR, e1); } Expr ValidityChecker::listExpr(const Expr& e1, const Expr& e2) { return d_em->mkExpr(CVC4::kind::SEXPR, e1, e2); } Expr ValidityChecker::listExpr(const Expr& e1, const Expr& e2, const Expr& e3) { return d_em->mkExpr(CVC4::kind::SEXPR, e1, e2, e3); } Expr ValidityChecker::listExpr(const std::string& op, const std::vector& kids) { return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(CVC4::String(op)), vector(kids.begin(), kids.end())); } Expr ValidityChecker::listExpr(const std::string& op, const Expr& e1) { return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(CVC4::String(op)), e1); } Expr ValidityChecker::listExpr(const std::string& op, const Expr& e1, const Expr& e2) { return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(CVC4::String(op)), e1, e2); } Expr ValidityChecker::listExpr(const std::string& op, const Expr& e1, const Expr& e2, const Expr& e3) { return d_em->mkExpr(CVC4::kind::SEXPR, d_em->mkConst(CVC4::String(op)), e1, e2, e3); } void ValidityChecker::printExpr(const Expr& e) { printExpr(e, Message()); } void ValidityChecker::printExpr(const Expr& e, std::ostream& os) { CVC4::expr::ExprSetDepth::Scope sd(os, -1); CVC4::expr::ExprPrintTypes::Scope pt(os, false); CVC4::language::SetLanguage::Scope sl( os, d_em->getOptions().getOutputLanguage()); os << e; } Expr ValidityChecker::parseExpr(const Expr& e) { return e; } Type ValidityChecker::parseType(const Expr& e) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::importExpr(const Expr& e) { if(e.getExprManager() == d_em) { return e; } s_validityCheckers[e.getExprManager()]->d_reverseEmmc.insert(this); return e.exportTo(d_em, d_emmc[e.getExprManager()]); } Type ValidityChecker::importType(const Type& t) { if(t.getExprManager() == d_em) { return t; } s_validityCheckers[t.getExprManager()]->d_reverseEmmc.insert(this); return t.exportTo(d_em, d_emmc[t.getExprManager()]); } void ValidityChecker::cmdsFromString(const std::string& s, InputLanguage lang) { std::stringstream ss(s, std::stringstream::in); return loadFile(ss, lang, false); } Expr ValidityChecker::exprFromString(const std::string& s, InputLanguage lang) { std::stringstream ss; if( lang != PRESENTATION_LANG && lang != SMTLIB_V2_LANG ) { ss << lang; throw Exception("Unsupported language in exprFromString: " + ss.str()); } CVC4::parser::Parser* p = CVC4::parser::ParserBuilder(d_em, "").withStringInput(s).withInputLanguage(lang).build(); p->useDeclarationsFrom(d_parserContext); Expr e = p->nextExpression(); if( e.isNull() ) { throw CVC4::parser::ParserException("Parser result is null: '" + s + "'"); } delete p; return e; } Expr ValidityChecker::trueExpr() { return d_em->mkConst(true); } Expr ValidityChecker::falseExpr() { return d_em->mkConst(false); } Expr ValidityChecker::notExpr(const Expr& child) { return d_em->mkExpr(CVC4::kind::NOT, child); } Expr ValidityChecker::andExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::AND, left, right); } Expr ValidityChecker::andExpr(const std::vector& children) { // AND must have at least 2 children CompatCheckArgument(children.size() > 0, children); return (children.size() == 1) ? children[0] : Expr(d_em->mkExpr(CVC4::kind::AND, *reinterpret_cast*>(&children))); } Expr ValidityChecker::orExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::OR, left, right); } Expr ValidityChecker::orExpr(const std::vector& children) { // OR must have at least 2 children CompatCheckArgument(children.size() > 0, children); return (children.size() == 1) ? children[0] : Expr(d_em->mkExpr(CVC4::kind::OR, *reinterpret_cast*>(&children))); } Expr ValidityChecker::impliesExpr(const Expr& hyp, const Expr& conc) { return d_em->mkExpr(CVC4::kind::IMPLIES, hyp, conc); } Expr ValidityChecker::iffExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::EQUAL, left, right); } Expr ValidityChecker::eqExpr(const Expr& child0, const Expr& child1) { return d_em->mkExpr(CVC4::kind::EQUAL, child0, child1); } Expr ValidityChecker::iteExpr(const Expr& ifpart, const Expr& thenpart, const Expr& elsepart) { return d_em->mkExpr(CVC4::kind::ITE, ifpart, thenpart, elsepart); } Expr ValidityChecker::distinctExpr(const std::vector& children) { CompatCheckArgument(children.size() > 1, children, "it makes no sense to create a `distinct' expression with only one child"); const vector& v = *reinterpret_cast*>(&children); return d_em->mkExpr(CVC4::kind::DISTINCT, v); } Op ValidityChecker::createOp(const std::string& name, const Type& type) { return d_parserContext->mkVar(name, type); } Op ValidityChecker::createOp(const std::string& name, const Type& type, const Expr& def) { CompatCheckArgument(def.getType() == type, type, "Type mismatch in ValidityChecker::createOp(): `%s' defined to an " "expression of type %s but ascribed as type %s", name.c_str(), def.getType().toString().c_str(), type.toString().c_str()); d_parserContext->defineFunction(name, def); return def; } Op ValidityChecker::lookupOp(const std::string& name, Type* type) { Op op = d_parserContext->getFunction(name); *type = op.getType(); return op; } Expr ValidityChecker::funExpr(const Op& op, const Expr& child) { return d_em->mkExpr(CVC4::kind::APPLY_UF, op, child); } Expr ValidityChecker::funExpr(const Op& op, const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::APPLY_UF, op, left, right); } Expr ValidityChecker::funExpr(const Op& op, const Expr& child0, const Expr& child1, const Expr& child2) { return d_em->mkExpr(CVC4::kind::APPLY_UF, op, child0, child1, child2); } Expr ValidityChecker::funExpr(const Op& op, const std::vector& children) { vector opkids; opkids.push_back(op); opkids.insert(opkids.end(), children.begin(), children.end()); return d_em->mkExpr(CVC4::kind::APPLY_UF, opkids); } bool ValidityChecker::addPairToArithOrder(const Expr& smaller, const Expr& bigger) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::ratExpr(int n, int d) { return d_em->mkConst(Rational(n, d)); } Expr ValidityChecker::ratExpr(const std::string& n, const std::string& d, int base) { return d_em->mkConst(Rational(n + '/' + d, base)); } Expr ValidityChecker::ratExpr(const std::string& n, int base) { if(n.find(".") == string::npos) { return d_em->mkConst(Rational(n, base)); } else { CompatCheckArgument(base == 10, base, "unsupported base for decimal parsing"); return d_em->mkConst(Rational::fromDecimal(n)); } } Expr ValidityChecker::uminusExpr(const Expr& child) { return d_em->mkExpr(CVC4::kind::UMINUS, child); } Expr ValidityChecker::plusExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::PLUS, left, right); } Expr ValidityChecker::plusExpr(const std::vector& children) { // PLUS must have at least 2 children CompatCheckArgument(children.size() > 0, children); return (children.size() == 1) ? children[0] : Expr(d_em->mkExpr(CVC4::kind::PLUS, *reinterpret_cast*>(&children))); } Expr ValidityChecker::minusExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::MINUS, left, right); } Expr ValidityChecker::multExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::MULT, left, right); } Expr ValidityChecker::powExpr(const Expr& x, const Expr& n) { return d_em->mkExpr(CVC4::kind::POW, x, n); } Expr ValidityChecker::divideExpr(const Expr& numerator, const Expr& denominator) { return d_em->mkExpr(CVC4::kind::DIVISION, numerator, denominator); } Expr ValidityChecker::ltExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::LT, left, right); } Expr ValidityChecker::leExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::LEQ, left, right); } Expr ValidityChecker::gtExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::GT, left, right); } Expr ValidityChecker::geExpr(const Expr& left, const Expr& right) { return d_em->mkExpr(CVC4::kind::GEQ, left, right); } Expr ValidityChecker::recordExpr(const std::string& field, const Expr& expr) { CVC4::Type t = recordType(field, expr.getType()); const CVC4::Datatype& dt = ((CVC4::DatatypeType)t).getDatatype(); return d_em->mkExpr(CVC4::kind::APPLY_CONSTRUCTOR, dt[0].getConstructor(), expr); } Expr ValidityChecker::recordExpr(const std::string& field0, const Expr& expr0, const std::string& field1, const Expr& expr1) { CVC4::Type t = recordType(field0, expr0.getType(), field1, expr1.getType()); const CVC4::Datatype& dt = ((CVC4::DatatypeType)t).getDatatype(); return d_em->mkExpr(CVC4::kind::APPLY_CONSTRUCTOR, dt[0].getConstructor(), expr0, expr1); } Expr ValidityChecker::recordExpr(const std::string& field0, const Expr& expr0, const std::string& field1, const Expr& expr1, const std::string& field2, const Expr& expr2) { CVC4::Type t = recordType(field0, expr0.getType(), field1, expr1.getType(), field2, expr2.getType()); const CVC4::Datatype& dt = ((CVC4::DatatypeType)t).getDatatype(); return d_em->mkExpr(CVC4::kind::APPLY_CONSTRUCTOR, dt[0].getConstructor(), expr0, expr1, expr2); } Expr ValidityChecker::recordExpr(const std::vector& fields, const std::vector& exprs) { std::vector types; for(unsigned i = 0; i < exprs.size(); ++i) { types.push_back(exprs[i].getType()); } CVC4::Type t = recordType(fields, types); const CVC4::Datatype& dt = ((CVC4::DatatypeType)t).getDatatype(); return d_em->mkExpr(CVC4::kind::APPLY_CONSTRUCTOR, dt[0].getConstructor(), *reinterpret_cast*>(&exprs)); } Expr ValidityChecker::recSelectExpr(const Expr& record, const std::string& field) { Type t = record.getType(); const CVC4::Datatype& dt = ((CVC4::DatatypeType)t).getDatatype(); unsigned index = CVC4::Datatype::indexOf( dt[0].getSelector(field) ); return d_em->mkExpr(CVC4::kind::APPLY_SELECTOR_TOTAL, dt[0][index].getSelector(), record); } Expr ValidityChecker::recUpdateExpr(const Expr& record, const std::string& field, const Expr& newValue) { return d_em->mkExpr(d_em->mkConst(CVC4::RecordUpdate(field)), record, newValue); } Expr ValidityChecker::readExpr(const Expr& array, const Expr& index) { return d_em->mkExpr(CVC4::kind::SELECT, array, index); } Expr ValidityChecker::writeExpr(const Expr& array, const Expr& index, const Expr& newValue) { return d_em->mkExpr(CVC4::kind::STORE, array, index, newValue); } Expr ValidityChecker::newBVConstExpr(const std::string& s, int base) { return d_em->mkConst(CVC4::BitVector(s, base)); } Expr ValidityChecker::newBVConstExpr(const std::vector& bits) { Integer value = 0; for(vector::const_iterator i = bits.begin(); i != bits.end(); ++i) { value *= 2; value += *i ? 1 : 0; } return d_em->mkConst(CVC4::BitVector(bits.size(), value)); } Expr ValidityChecker::newBVConstExpr(const Rational& r, int len) { // implementation based on CVC3's TheoryBitvector::newBVConstExpr() CompatCheckArgument(r.getDenominator() == 1, r, "ValidityChecker::newBVConstExpr: " "not an integer: `%s'", r.toString().c_str()); CompatCheckArgument(len > 0, len, "ValidityChecker::newBVConstExpr: " "len = %d", len); string s(r.toString(2)); size_t strsize = s.size(); size_t length = len; Expr res; if(length > 0 && length != strsize) { //either (length > strsize) or (length < strsize) if(length < strsize) { s = s.substr(strsize - length, length); } else { string zeros(""); for(size_t i = 0, pad = length - strsize; i < pad; ++i) zeros += "0"; s = zeros + s; } } return newBVConstExpr(s, 2); } Expr ValidityChecker::newConcatExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only concat a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only concat a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_CONCAT, t1, t2); } Expr ValidityChecker::newConcatExpr(const std::vector& kids) { const vector& v = *reinterpret_cast*>(&kids); return d_em->mkExpr(CVC4::kind::BITVECTOR_CONCAT, v); } Expr ValidityChecker::newBVExtractExpr(const Expr& e, int hi, int low) { CompatCheckArgument(e.getType().isBitVector(), e, "can only bvextract from a bitvector, not a `%s'", e.getType().toString().c_str()); CompatCheckArgument(hi >= low, hi, "extraction [%d:%d] is bad; possibly inverted?", hi, low); CompatCheckArgument(low >= 0, low, "extraction [%d:%d] is bad (negative)", hi, low); CompatCheckArgument(CVC4::BitVectorType(e.getType()).getSize() > unsigned(hi), hi, "bitvector is of size %u, extraction [%d:%d] is off-the-end", CVC4::BitVectorType(e.getType()).getSize(), hi, low); return d_em->mkExpr(CVC4::kind::BITVECTOR_EXTRACT, d_em->mkConst(CVC4::BitVectorExtract(hi, low)), e); } Expr ValidityChecker::newBVNegExpr(const Expr& t1) { // CVC3's BVNEG => SMT-LIBv2 bvnot CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvneg a bitvector, not a `%s'", t1.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_NOT, t1); } Expr ValidityChecker::newBVAndExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvand a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvand a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_AND, t1, t2); } Expr ValidityChecker::newBVAndExpr(const std::vector& kids) { // BITVECTOR_AND is not N-ary in CVC4 CompatCheckArgument(kids.size() > 1, kids, "BITVECTOR_AND must have at least 2 children"); std::vector::const_reverse_iterator i = kids.rbegin(); Expr e = *i++; while(i != kids.rend()) { e = d_em->mkExpr(CVC4::kind::BITVECTOR_AND, *i++, e); } return e; } Expr ValidityChecker::newBVOrExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvor a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvor a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_OR, t1, t2); } Expr ValidityChecker::newBVOrExpr(const std::vector& kids) { // BITVECTOR_OR is not N-ary in CVC4 CompatCheckArgument(kids.size() > 1, kids, "BITVECTOR_OR must have at least 2 children"); std::vector::const_reverse_iterator i = kids.rbegin(); Expr e = *i++; while(i != kids.rend()) { e = d_em->mkExpr(CVC4::kind::BITVECTOR_OR, *i++, e); } return e; } Expr ValidityChecker::newBVXorExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvxor a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvxor a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_XOR, t1, t2); } Expr ValidityChecker::newBVXorExpr(const std::vector& kids) { // BITVECTOR_XOR is not N-ary in CVC4 CompatCheckArgument(kids.size() > 1, kids, "BITVECTOR_XOR must have at least 2 children"); std::vector::const_reverse_iterator i = kids.rbegin(); Expr e = *i++; while(i != kids.rend()) { e = d_em->mkExpr(CVC4::kind::BITVECTOR_XOR, *i++, e); } return e; } Expr ValidityChecker::newBVXnorExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvxnor a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvxnor a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_XNOR, t1, t2); } Expr ValidityChecker::newBVXnorExpr(const std::vector& kids) { // BITVECTOR_XNOR is not N-ary in CVC4 CompatCheckArgument(kids.size() > 1, kids, "BITVECTOR_XNOR must have at least 2 children"); std::vector::const_reverse_iterator i = kids.rbegin(); Expr e = *i++; while(i != kids.rend()) { e = d_em->mkExpr(CVC4::kind::BITVECTOR_XNOR, *i++, e); } return e; } Expr ValidityChecker::newBVNandExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvnand a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvnand a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_NAND, t1, t2); } Expr ValidityChecker::newBVNorExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvnor a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvnor a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_NOR, t1, t2); } Expr ValidityChecker::newBVCompExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvcomp a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvcomp a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_COMP, t1, t2); } Expr ValidityChecker::newBVLTExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvlt a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvlt a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_ULT, t1, t2); } Expr ValidityChecker::newBVLEExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvle a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvle a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_ULE, t1, t2); } Expr ValidityChecker::newBVSLTExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvslt a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvslt a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SLT, t1, t2); } Expr ValidityChecker::newBVSLEExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvsle a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvsle a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SLE, t1, t2); } Expr ValidityChecker::newSXExpr(const Expr& t1, int len) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only sx a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(len >= 0, len, "must sx by a positive integer"); CompatCheckArgument(unsigned(len) >= CVC4::BitVectorType(t1.getType()).getSize(), len, "cannot sx by something smaller than the bitvector (%d < %u)", len, CVC4::BitVectorType(t1.getType()).getSize()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SIGN_EXTEND, d_em->mkConst(CVC4::BitVectorSignExtend(len)), t1); } Expr ValidityChecker::newBVUminusExpr(const Expr& t1) { // CVC3's BVUMINUS => SMT-LIBv2 bvneg CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvuminus a bitvector, not a `%s'", t1.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_NEG, t1); } Expr ValidityChecker::newBVSubExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvsub a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvsub by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SUB, t1, t2); } // Copied from CVC3's bitvector theory: makes bitvector expression "e" // into "len" bits, by zero-padding, or extracting least-significant bits. Expr ValidityChecker::bvpad(int len, const Expr& e) { CompatCheckArgument(len >= 0, len, "padding length must be a non-negative integer, not %d", len); CompatCheckArgument(e.getType().isBitVector(), e, "input to bitvector operation must be a bitvector"); unsigned size = CVC4::BitVectorType(e.getType()).getSize(); Expr res; if(size == len) { res = e; } else if(len < size) { res = d_em->mkExpr(d_em->mkConst(CVC4::BitVectorExtract(len - 1, 0)), e); } else { // size < len Expr zero = d_em->mkConst(CVC4::BitVector(len - size, 0u)); res = d_em->mkExpr(CVC4::kind::BITVECTOR_CONCAT, zero, e); } return res; } Expr ValidityChecker::newBVPlusExpr(int numbits, const std::vector& kids) { // BITVECTOR_PLUS is not N-ary in CVC4 CompatCheckArgument(kids.size() > 1, kids, "BITVECTOR_PLUS must have at least 2 children"); std::vector::const_reverse_iterator i = kids.rbegin(); Expr e = *i++; while(i != kids.rend()) { e = d_em->mkExpr(CVC4::kind::BITVECTOR_PLUS, bvpad(numbits, *i++), e); } unsigned size = CVC4::BitVectorType(e.getType()).getSize(); CompatCheckArgument(unsigned(numbits) == size, numbits, "argument must match computed size of bitvector sum: " "passed size == %u, computed size == %u", numbits, size); return e; } Expr ValidityChecker::newBVPlusExpr(int numbits, const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvplus a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvplus a bitvector, not a `%s'", t2.getType().toString().c_str()); Expr e = d_em->mkExpr(CVC4::kind::BITVECTOR_PLUS, bvpad(numbits, t1), bvpad(numbits, t2)); unsigned size = CVC4::BitVectorType(e.getType()).getSize(); CompatCheckArgument(unsigned(numbits) == size, numbits, "argument must match computed size of bitvector sum: " "passed size == %u, computed size == %u", numbits, size); return e; } Expr ValidityChecker::newBVMultExpr(int numbits, const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvmult a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvmult by a bitvector, not a `%s'", t2.getType().toString().c_str()); Expr e = d_em->mkExpr(CVC4::kind::BITVECTOR_MULT, bvpad(numbits, t1), bvpad(numbits, t2)); unsigned size = CVC4::BitVectorType(e.getType()).getSize(); CompatCheckArgument(unsigned(numbits) == size, numbits, "argument must match computed size of bitvector product: " "passed size == %u, computed size == %u", numbits, size); return e; } Expr ValidityChecker::newBVUDivExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvudiv a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvudiv by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_UDIV, t1, t2); } Expr ValidityChecker::newBVURemExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvurem a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvurem by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_UREM, t1, t2); } Expr ValidityChecker::newBVSDivExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvsdiv a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvsdiv by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SDIV, t1, t2); } Expr ValidityChecker::newBVSRemExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvsrem a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvsrem by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SREM, t1, t2); } Expr ValidityChecker::newBVSModExpr(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only bvsmod a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only bvsmod by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SMOD, t1, t2); } Expr ValidityChecker::newFixedLeftShiftExpr(const Expr& t1, int r) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only left-shift a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(r >= 0, r, "left shift amount must be >= 0 (you passed %d)", r); // Defined in: // http://www.cs.nyu.edu/acsys/cvc3/doc/user_doc.html#user_doc_pres_lang_expr_bit return d_em->mkExpr(CVC4::kind::BITVECTOR_CONCAT, t1, d_em->mkConst(CVC4::BitVector(r))); } Expr ValidityChecker::newFixedConstWidthLeftShiftExpr(const Expr& t1, int r) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only right-shift a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(r >= 0, r, "const-width left shift amount must be >= 0 (you passed %d)", r); // just turn it into a BVSHL return d_em->mkExpr(CVC4::kind::BITVECTOR_SHL, t1, d_em->mkConst(CVC4::BitVector(CVC4::BitVectorType(t1.getType()).getSize(), unsigned(r)))); } Expr ValidityChecker::newFixedRightShiftExpr(const Expr& t1, int r) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only right-shift a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(r >= 0, r, "right shift amount must be >= 0 (you passed %d)", r); // Defined in: // http://www.cs.nyu.edu/acsys/cvc3/doc/user_doc.html#user_doc_pres_lang_expr_bit // Should be equivalent to a BVLSHR; just turn it into that. return d_em->mkExpr(CVC4::kind::BITVECTOR_LSHR, t1, d_em->mkConst(CVC4::BitVector(CVC4::BitVectorType(t1.getType()).getSize(), unsigned(r)))); } Expr ValidityChecker::newBVSHL(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only right-shift a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only right-shift by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_SHL, t1, t2); } Expr ValidityChecker::newBVLSHR(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only right-shift a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only right-shift by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_LSHR, t1, t2); } Expr ValidityChecker::newBVASHR(const Expr& t1, const Expr& t2) { CompatCheckArgument(t1.getType().isBitVector(), t1, "can only right-shift a bitvector, not a `%s'", t1.getType().toString().c_str()); CompatCheckArgument(t2.getType().isBitVector(), t2, "can only right-shift by a bitvector, not a `%s'", t2.getType().toString().c_str()); return d_em->mkExpr(CVC4::kind::BITVECTOR_ASHR, t1, t2); } Rational ValidityChecker::computeBVConst(const Expr& e) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::tupleExpr(const std::vector& exprs) { std::vector< Type > types; std::vector v; for( unsigned i=0; imkExpr(CVC4::kind::APPLY_CONSTRUCTOR, v); } Expr ValidityChecker::tupleSelectExpr(const Expr& tuple, int index) { CompatCheckArgument(index >= 0 && index < ((CVC4::DatatypeType)tuple.getType()).getTupleLength(), "invalid index in tuple select"); const CVC4::Datatype& dt = ((CVC4::DatatypeType)tuple.getType()).getDatatype(); return d_em->mkExpr(CVC4::kind::APPLY_SELECTOR_TOTAL, dt[0][index].getSelector(), tuple); } Expr ValidityChecker::tupleUpdateExpr(const Expr& tuple, int index, const Expr& newValue) { CompatCheckArgument(index >= 0 && index < tuple.getNumChildren(), "invalid index in tuple update"); return d_em->mkExpr(d_em->mkConst(CVC4::TupleUpdate(index)), tuple, newValue); } Expr ValidityChecker::datatypeConsExpr(const std::string& constructor, const std::vector& args) { ConstructorMap::const_iterator i = d_constructors.find(constructor); CompatCheckArgument(i != d_constructors.end(), constructor, "no such constructor"); const CVC4::Datatype& dt = *(*i).second; const CVC4::DatatypeConstructor& ctor = dt[constructor]; CompatCheckArgument(ctor.getNumArgs() == args.size(), args, "arity mismatch in constructor application"); return d_em->mkExpr(CVC4::kind::APPLY_CONSTRUCTOR, ctor.getConstructor(), vector(args.begin(), args.end())); } Expr ValidityChecker::datatypeSelExpr(const std::string& selector, const Expr& arg) { SelectorMap::const_iterator i = d_selectors.find(selector); CompatCheckArgument(i != d_selectors.end(), selector, "no such selector"); const CVC4::Datatype& dt = *(*i).second.first; string constructor = (*i).second.second; const CVC4::DatatypeConstructor& ctor = dt[constructor]; return d_em->mkExpr(CVC4::kind::APPLY_SELECTOR, ctor.getSelector(selector), arg); } Expr ValidityChecker::datatypeTestExpr(const std::string& constructor, const Expr& arg) { ConstructorMap::const_iterator i = d_constructors.find(constructor); CompatCheckArgument(i != d_constructors.end(), constructor, "no such constructor"); const CVC4::Datatype& dt = *(*i).second; const CVC4::DatatypeConstructor& ctor = dt[constructor]; return d_em->mkExpr(CVC4::kind::APPLY_TESTER, ctor.getTester(), arg); } Expr ValidityChecker::boundVarExpr(const std::string& name, const std::string& uid, const Type& type) { return d_em->mkBoundVar(name, type); } Expr ValidityChecker::forallExpr(const std::vector& vars, const Expr& body) { Expr boundVarList = d_em->mkExpr(CVC4::kind::BOUND_VAR_LIST, *reinterpret_cast*>(&vars)); return d_em->mkExpr(CVC4::kind::FORALL, boundVarList, body); } Expr ValidityChecker::forallExpr(const std::vector& vars, const Expr& body, const Expr& trigger) { // trigger Expr boundVarList = d_em->mkExpr(CVC4::kind::BOUND_VAR_LIST, *reinterpret_cast*>(&vars)); Expr triggerList = d_em->mkExpr(CVC4::kind::INST_PATTERN_LIST, d_em->mkExpr(CVC4::kind::INST_PATTERN, trigger)); return d_em->mkExpr(CVC4::kind::FORALL, boundVarList, body, triggerList); } Expr ValidityChecker::forallExpr(const std::vector& vars, const Expr& body, const std::vector& triggers) { // set of triggers Expr boundVarList = d_em->mkExpr(CVC4::kind::BOUND_VAR_LIST, *reinterpret_cast*>(&vars)); std::vector pats; for(std::vector::const_iterator i = triggers.begin(); i != triggers.end(); ++i) { pats.push_back(d_em->mkExpr(CVC4::kind::INST_PATTERN, *i)); } Expr triggerList = d_em->mkExpr(CVC4::kind::INST_PATTERN_LIST, pats); return d_em->mkExpr(CVC4::kind::FORALL, boundVarList, body, triggerList); } Expr ValidityChecker::forallExpr(const std::vector& vars, const Expr& body, const std::vector >& triggers) { // set of multi-triggers Expr boundVarList = d_em->mkExpr(CVC4::kind::BOUND_VAR_LIST, *reinterpret_cast*>(&vars)); std::vector pats; for(std::vector< std::vector >::const_iterator i = triggers.begin(); i != triggers.end(); ++i) { pats.push_back(d_em->mkExpr(CVC4::kind::INST_PATTERN, *reinterpret_cast*>(&*i))); } Expr triggerList = d_em->mkExpr(CVC4::kind::INST_PATTERN_LIST, pats); return d_em->mkExpr(CVC4::kind::FORALL, boundVarList, body, triggerList); } void ValidityChecker::setTriggers(const Expr& e, const std::vector > & triggers) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::setTriggers(const Expr& e, const std::vector& triggers) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::setTrigger(const Expr& e, const Expr& trigger) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::setMultiTrigger(const Expr& e, const std::vector& multiTrigger) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::existsExpr(const std::vector& vars, const Expr& body) { Expr boundVarList = d_em->mkExpr(CVC4::kind::BOUND_VAR_LIST, *reinterpret_cast*>(&vars)); return d_em->mkExpr(CVC4::kind::EXISTS, boundVarList, body); } Op ValidityChecker::lambdaExpr(const std::vector& vars, const Expr& body) { Unimplemented("Lambda expressions not supported by CVC4 yet (sorry!)"); } Op ValidityChecker::transClosure(const Op& op) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::simulateExpr(const Expr& f, const Expr& s0, const std::vector& inputs, const Expr& n) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::setResourceLimit(unsigned limit) { // Set a resource limit for CVC4, cumulative (rather than // per-query), starting from now. d_smt->setResourceLimit(limit, true); } void ValidityChecker::setTimeLimit(unsigned limit) { // Set a time limit for CVC4, cumulative (rather than per-query), // starting from now. Note that CVC3 uses tenths of a second, // while CVC4 uses milliseconds. d_smt->setTimeLimit(limit * 100, true); } void ValidityChecker::assertFormula(const Expr& e) { d_smt->assertFormula(e); } void ValidityChecker::registerAtom(const Expr& e) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::getImpliedLiteral() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::simplify(const Expr& e) { return d_smt->simplify(e); } static QueryResult cvc4resultToCvc3result(CVC4::Result r) { switch(r.isSat()) { case CVC4::Result::SAT: return SATISFIABLE; case CVC4::Result::UNSAT: return UNSATISFIABLE; default: ; } switch(r.isValid()) { case CVC4::Result::VALID: return VALID; case CVC4::Result::INVALID: return INVALID; default: return UNKNOWN; } } QueryResult ValidityChecker::query(const Expr& e) { return cvc4resultToCvc3result(d_smt->query(e)); } QueryResult ValidityChecker::checkUnsat(const Expr& e) { return cvc4resultToCvc3result(d_smt->checkSat(e)); } QueryResult ValidityChecker::checkContinue() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } QueryResult ValidityChecker::restart(const Expr& e) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::returnFromCheck() { // CVC4 has this behavior by default } void ValidityChecker::getUserAssumptions(std::vector& assumptions) { CompatCheckArgument(assumptions.empty(), assumptions, "assumptions arg must be empty"); vector v = d_smt->getAssertions(); assumptions.swap(*reinterpret_cast*>(&v)); } void ValidityChecker::getInternalAssumptions(std::vector& assumptions) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::getAssumptions(std::vector& assumptions) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::getAssumptionsUsed(std::vector& assumptions) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::getProofQuery() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::getCounterExample(std::vector& assumptions, bool inOrder) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::getConcreteModel(ExprMap& m) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } QueryResult ValidityChecker::tryModelGeneration() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } FormulaValue ValidityChecker::value(const Expr& e) { CompatCheckArgument(e.getType() == d_em->booleanType(), e, "argument must be a formula"); try { return d_smt->getValue(e).getConst() ? TRUE_VAL : FALSE_VAL; } catch(CVC4::Exception& e) { return UNKNOWN_VAL; } } Expr ValidityChecker::getValue(const Expr& e) { try { return d_smt->getValue(e); } catch(CVC4::ModalException& e) { // by contract, we return null expr return Expr(); } } bool ValidityChecker::inconsistent(std::vector& assumptions) { CompatCheckArgument(assumptions.empty(), assumptions, "assumptions vector should be empty on entry"); if(d_smt->checkSat() == CVC4::Result::UNSAT) { // supposed to be a minimal set, but CVC4 doesn't support that d_smt->getAssertions().swap(*reinterpret_cast*>(&assumptions)); return true; } return false; } bool ValidityChecker::inconsistent() { return d_smt->checkSat() == CVC4::Result::UNSAT; } bool ValidityChecker::incomplete() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } bool ValidityChecker::incomplete(std::vector& reasons) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Proof ValidityChecker::getProof() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::getTCC() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } void ValidityChecker::getAssumptionsTCC(std::vector& assumptions) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Proof ValidityChecker::getProofTCC() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Expr ValidityChecker::getClosure() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } Proof ValidityChecker::getProofClosure() { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } int ValidityChecker::stackLevel() { return d_stackLevel; } void ValidityChecker::push() { ++d_stackLevel; d_smt->push(); } void ValidityChecker::pop() { d_smt->pop(); --d_stackLevel; } void ValidityChecker::popto(int stackLevel) { CompatCheckArgument(stackLevel >= 0, stackLevel, "Cannot pop to a negative stack level %d", stackLevel); CompatCheckArgument(unsigned(stackLevel) <= d_stackLevel, stackLevel, "Cannot pop to a stack level higher than the current one! " "At stack level %u, user requested stack level %d", d_stackLevel, stackLevel); while(unsigned(stackLevel) < d_stackLevel) { pop(); } } int ValidityChecker::scopeLevel() { return d_parserContext->scopeLevel(); } void ValidityChecker::pushScope() { d_parserContext->pushScope(); } void ValidityChecker::popScope() { d_parserContext->popScope(); } void ValidityChecker::poptoScope(int scopeLevel) { CompatCheckArgument(scopeLevel >= 0, scopeLevel, "Cannot pop to a negative scope level %d", scopeLevel); CompatCheckArgument(unsigned(scopeLevel) <= d_parserContext->scopeLevel(), scopeLevel, "Cannot pop to a scope level higher than the current one! " "At scope level %u, user requested scope level %d", d_parserContext->scopeLevel(), scopeLevel); while(unsigned(scopeLevel) < d_parserContext->scopeLevel()) { popScope(); } } Context* ValidityChecker::getCurrentContext() { Unimplemented("Contexts are not part of the public interface of CVC4"); } void ValidityChecker::reset() { // reset everything, forget everything d_smt->reset(); delete d_parserContext; d_parserContext = CVC4::parser::ParserBuilder(d_em, "").withInputLanguage(CVC4::language::input::LANG_CVC4).withStringInput("").build(); s_typeToExpr.clear(); s_exprToType.clear(); } void ValidityChecker::logAnnotation(const Expr& annot) { Unimplemented("This CVC3 compatibility function not yet implemented (sorry!)"); } static void doCommands(CVC4::parser::Parser* parser, CVC4::SmtEngine* smt, CVC4::Options& opts) { while(CVC4::Command* cmd = parser->nextCommand()) { if(opts.getVerbosity() >= 0) { cmd->invoke(smt, *opts.getOut()); } else { cmd->invoke(smt); } delete cmd; } } void ValidityChecker::loadFile(const std::string& fileName, InputLanguage lang, bool interactive, bool calledFromParser) { CVC4::Options opts; opts.copyValues(d_em->getOptions()); stringstream langss; langss << lang; d_smt->setOption("input-language", CVC4::SExpr(langss.str())); d_smt->setOption("interactive-mode", CVC4::SExpr(interactive ? true : false)); CVC4::parser::ParserBuilder parserBuilder(d_em, fileName, opts); CVC4::parser::Parser* p = parserBuilder.build(); p->useDeclarationsFrom(d_parserContext); doCommands(p, d_smt, opts); delete p; } void ValidityChecker::loadFile(std::istream& is, InputLanguage lang, bool interactive) { CVC4::Options opts; opts.copyValues(d_em->getOptions()); stringstream langss; langss << lang; d_smt->setOption("input-language", CVC4::SExpr(langss.str())); d_smt->setOption("interactive-mode", CVC4::SExpr(interactive ? true : false)); CVC4::parser::ParserBuilder parserBuilder(d_em, "[stream]", opts); CVC4::parser::Parser* p = parserBuilder.withStreamInput(is).build(); d_parserContext = p; p->useDeclarationsFrom(d_parserContext); doCommands(p, d_smt, opts); delete p; } Statistics ValidityChecker::getStatistics() { return d_smt->getStatistics(); } void ValidityChecker::printStatistics() { d_smt->getStatistics().flushInformation(Message.getStream()); } int compare(const Expr& e1, const Expr& e2) { // Quick equality check (operator== is implemented independently // and more efficiently) if(e1 == e2) return 0; if(e1.isNull()) return -1; if(e2.isNull()) return 1; // Both are non-Null. Check for constant bool e1c = e1.isConstant(); if (e1c != e2.isConstant()) { return e1c ? -1 : 1; } // Compare the indices return (e1.getIndex() < e2.getIndex())? -1 : 1; } }/* CVC3 namespace */ cvc4-1.5/src/compat/cvc3_compat.h000066400000000000000000001546141313116454100166540ustar00rootroot00000000000000/********************* */ /*! \file cvc3_compat.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief CVC3 compatibility layer for CVC4 ** ** CVC3 compatibility layer for CVC4. This version was derived from ** the following CVS revisions of the following files in CVC3. If ** those files have a later revision, then this file might be out of ** date. Note that this compatibility layer is not safe for use in ** multithreaded contexts where multiple threads are accessing this ** compatibility layer functionality. ** ** src/include/vc.h 1.36 ** src/include/expr.h 1.39 ** src/include/command_line_flags.h 1.3 ** src/include/queryresult.h 1.2 ** src/include/formula_value.h 1.1 **/ #include "cvc4_public.h" #ifndef __CVC4__CVC3_COMPAT_H #define __CVC4__CVC3_COMPAT_H // keep the CVC3 include guard also #if defined(_cvc3__include__vc_h_) || \ defined(_cvc3__expr_h_) || \ defined(_cvc3__command_line_flags_h_) || \ defined(_cvc3__include__queryresult_h_) || \ defined(_cvc3__include__formula_value_h_) #error "A CVC3 header file was included before CVC4's cvc3_compat.h header. Please include cvc3_compat.h rather than any CVC3 headers." #else // define these so the files are skipped if the user #includes them too #define _cvc3__expr_h_ #define _cvc3__include__vc_h_ #define _cvc3__command_line_flags_h_ #define _cvc3__include__queryresult_h_ #define _cvc3__include__formula_value_h_ #include #include #include #include "base/exception.h" #include "expr/expr.h" #include "expr/expr_manager.h" #include "expr/type.h" #include "parser/parser.h" #include "smt/smt_engine.h" #include "util/hash.h" #include "util/integer.h" #include "util/rational.h" //class CInterface; namespace CVC3 { const CVC4::Kind EQ = CVC4::kind::EQUAL; const CVC4::Kind LE = CVC4::kind::LEQ; const CVC4::Kind GE = CVC4::kind::GEQ; const CVC4::Kind DIVIDE = CVC4::kind::DIVISION; const CVC4::Kind BVLT = CVC4::kind::BITVECTOR_ULT; const CVC4::Kind BVLE = CVC4::kind::BITVECTOR_ULE; const CVC4::Kind BVGT = CVC4::kind::BITVECTOR_UGT; const CVC4::Kind BVGE = CVC4::kind::BITVECTOR_UGE; const CVC4::Kind BVPLUS = CVC4::kind::BITVECTOR_PLUS; const CVC4::Kind BVSUB = CVC4::kind::BITVECTOR_SUB; const CVC4::Kind BVCONST = CVC4::kind::CONST_BITVECTOR; const CVC4::Kind EXTRACT = CVC4::kind::BITVECTOR_EXTRACT; const CVC4::Kind CONCAT = CVC4::kind::BITVECTOR_CONCAT; std::string int2string(int n) CVC4_PUBLIC; //! Different types of command line flags typedef enum CVC4_PUBLIC { CLFLAG_NULL, CLFLAG_BOOL, CLFLAG_INT, CLFLAG_STRING, CLFLAG_STRVEC //!< Vector of pair } CLFlagType; std::ostream& operator<<(std::ostream& out, CLFlagType clft) CVC4_PUBLIC; /*! Class CLFlag (for Command Line Flag) Author: Sergey Berezin Date: Fri May 30 14:10:48 2003 This class implements a data structure to hold a value of a single command line flag. */ class CVC4_PUBLIC CLFlag { //! Type of the argument CLFlagType d_tp; //! The argument union { bool b; int i; std::string* s; std::vector >* sv; } d_data; public: //! Constructor for a boolean flag CLFlag(bool b, const std::string& help, bool display = true); //! Constructor for an integer flag CLFlag(int i, const std::string& help, bool display = true); //! Constructor for a string flag CLFlag(const std::string& s, const std::string& help, bool display = true); //! Constructor for a string flag from char* CLFlag(const char* s, const std::string& help, bool display = true); //! Constructor for a vector flag CLFlag(const std::vector >& sv, const std::string& help, bool display = true); //! Default constructor CLFlag(); //! Copy constructor CLFlag(const CLFlag& f); //! Destructor ~CLFlag(); //! Assignment from another flag CLFlag& operator=(const CLFlag& f); //! Assignment of a boolean value /*! The flag must already have the right type */ CLFlag& operator=(bool b); //! Assignment of an integer value /*! The flag must already have the right type */ CLFlag& operator=(int i); //! Assignment of a string value /*! The flag must already have a string type. */ CLFlag& operator=(const std::string& s); //! Assignment of an string value from char* /*! The flag must already have a string type. */ CLFlag& operator=(const char* s); //! Assignment of a string value with a boolean tag to a vector flag /*! The flag must already have a vector type. The pair of will be appended to the vector. */ CLFlag& operator=(const std::pair& p); //! Assignment of a vector value /*! The flag must already have a vector type. */ CLFlag& operator=(const std::vector >& sv); // Accessor methods //! Return the type of the flag CLFlagType getType() const; /*! @brief Return true if the flag was modified from the default value (e.g. set on the command line) */ bool modified() const; //! Return true if flag should be displayed in regular help bool display() const; // The value accessors return a reference. For the system-wide // flags, this reference will remain valid throughout the run of the // program, even if the flag's value changes. So, the reference can // be cached, and the value can be checked directly (which is more // efficient). const bool& getBool() const; const int& getInt() const; const std::string& getString() const; const std::vector >& getStrVec() const; const std::string& getHelp() const; };/* class CLFlag */ /////////////////////////////////////////////////////////////////////// // Class CLFlag (for Command Line Flag) // // Author: Sergey Berezin // Date: Fri May 30 14:10:48 2003 // // Database of command line flags. /////////////////////////////////////////////////////////////////////// class CVC4_PUBLIC CLFlags { typedef std::map FlagMap; FlagMap d_map; public: // Public methods // Add a new flag. The name must be a complete flag name. void addFlag(const std::string& name, const CLFlag& f); // Count how many flags match the name prefix size_t countFlags(const std::string& name) const; // Match the name prefix and add all the matching names to the vector size_t countFlags(const std::string& name, std::vector& names) const; // Retrieve an existing flag. The 'name' must be a full name of an // existing flag. const CLFlag& getFlag(const std::string& name) const; const CLFlag& operator[](const std::string& name) const; // Setting the flag to a new value, but preserving the help string. // The 'name' prefix must uniquely resolve to an existing flag. void setFlag(const std::string& name, const CLFlag& f); // Variants of setFlag for all the types void setFlag(const std::string& name, bool b); void setFlag(const std::string& name, int i); void setFlag(const std::string& name, const std::string& s); void setFlag(const std::string& name, const char* s); void setFlag(const std::string& name, const std::pair& p); void setFlag(const std::string& name, const std::vector >& sv); };/* class CLFlags */ class CVC4_PUBLIC ExprManager; class CVC4_PUBLIC Context; class CVC4_PUBLIC Proof {}; class CVC4_PUBLIC Theorem {}; using CVC4::InputLanguage; using CVC4::Integer; using CVC4::Rational; using CVC4::Exception; using CVC4::Cardinality; using namespace CVC4::kind; typedef size_t ExprIndex; typedef CVC4::TypeCheckingException TypecheckException; typedef size_t Unsigned; static const int READ = ::CVC4::kind::SELECT; static const int WRITE = ::CVC4::kind::STORE; // CVC4 has a more sophisticated Cardinality type; // but we can support comparison against CVC3's more // coarse-grained Cardinality. enum CVC4_PUBLIC CVC3CardinalityKind { CARD_FINITE, CARD_INFINITE, CARD_UNKNOWN };/* enum CVC3CardinalityKind */ std::ostream& operator<<(std::ostream& out, CVC3CardinalityKind c) CVC4_PUBLIC; bool operator==(const Cardinality& c, CVC3CardinalityKind d) CVC4_PUBLIC; bool operator==(CVC3CardinalityKind d, const Cardinality& c) CVC4_PUBLIC; bool operator!=(const Cardinality& c, CVC3CardinalityKind d) CVC4_PUBLIC; bool operator!=(CVC3CardinalityKind d, const Cardinality& c) CVC4_PUBLIC; class CVC4_PUBLIC Expr; template class CVC4_PUBLIC ExprMap : public std::map { };/* class ExprMap */ template class CVC4_PUBLIC ExprHashMap : public std::hash_map { public: void insert(Expr a, Expr b); };/* class ExprHashMap */ class CVC4_PUBLIC Type : public CVC4::Type { public: Type(); Type(const CVC4::Type& type); Type(const Type& type); Expr getExpr() const; // Reasoning about children int arity() const; Type operator[](int i) const; // Core testers bool isBool() const; bool isSubtype() const; //! Return cardinality of type Cardinality card() const; //! Return nth (starting with 0) element in a finite type /*! Returns NULL Expr if unable to compute nth element */ Expr enumerateFinite(Unsigned n) const; //! Return size of a finite type; returns 0 if size cannot be determined Unsigned sizeFinite() const; // Core constructors static Type typeBool(ExprManager* em); static Type funType(const std::vector& typeDom, const Type& typeRan); Type funType(const Type& typeRan) const; };/* class CVC3::Type */ class CVC4_PUBLIC Expr; typedef Expr Op; /** * Expr class for CVC3 compatibility layer. * * This class is identical to (and convertible to/from) a CVC4 Expr, * except that a few additional functions are supported to provide * naming compatibility with CVC3. */ class CVC4_PUBLIC Expr : public CVC4::Expr { public: typedef CVC4::Expr::const_iterator iterator; Expr(); Expr(const Expr& e); Expr(const CVC4::Expr& e); Expr(CVC4::Kind k); // Compound expression constructors Expr eqExpr(const Expr& right) const; Expr notExpr() const; Expr negate() const; // avoid double-negatives Expr andExpr(const Expr& right) const; Expr orExpr(const Expr& right) const; Expr iteExpr(const Expr& thenpart, const Expr& elsepart) const; Expr iffExpr(const Expr& right) const; Expr impExpr(const Expr& right) const; Expr xorExpr(const Expr& right) const; Expr substExpr(const std::vector& oldTerms, const std::vector& newTerms) const; Expr substExpr(const ExprHashMap& oldToNew) const; Expr operator!() const; Expr operator&&(const Expr& right) const; Expr operator||(const Expr& right) const; static size_t hash(const Expr& e); size_t hash() const; // Core expression testers bool isFalse() const; bool isTrue() const; bool isBoolConst() const; bool isVar() const; bool isBoundVar() const; bool isString() const; bool isSymbol() const; bool isTerm() const; bool isType() const; bool isClosure() const; bool isQuantifier() const; bool isForall() const; bool isExists() const; bool isLambda() const; bool isApply() const; bool isTheorem() const; bool isConstant() const; bool isRawList() const; bool isAtomic() const; bool isAtomicFormula() const; bool isAbsAtomicFormula() const; bool isLiteral() const; bool isAbsLiteral() const; bool isBoolConnective() const; bool isPropLiteral() const; bool isPropAtom() const; std::string getName() const; std::string getUid() const; std::string getString() const; std::vector getVars() const; Expr getExistential() const; int getBoundIndex() const; Expr getBody() const; Theorem getTheorem() const; bool isEq() const; bool isNot() const; bool isAnd() const; bool isOr() const; bool isITE() const; bool isIff() const; bool isImpl() const; bool isXor() const; bool isRational() const; bool isSkolem() const; const Rational& getRational() const; Op mkOp() const; Op getOp() const; Expr getOpExpr() const; int getOpKind() const; Expr getExpr() const;// since people are used to doing getOp().getExpr() in CVC3 //! Get the manual triggers of the closure Expr std::vector< std::vector > getTriggers() const; // Get the expression manager. The expression must be non-null. ExprManager* getEM() const; // Return a ref to the vector of children. std::vector getKids() const; // Get the index field ExprIndex getIndex() const; // Return the number of children. Note, that an application of a // user-defined function has the arity of that function (the number // of arguments), and the function name itself is part of the // operator. int arity() const; // Return the ith child. As with arity, it's also the ith argument // in function application. Expr operator[](int i) const; //! Remove leading NOT if any Expr unnegate() const; // Check if Expr is not Null bool isInitialized() const; //! Get the type. Recursively compute if necessary Type getType() const; //! Look up the current type. Do not recursively compute (i.e. may be NULL) Type lookupType() const; //! Pretty-print the expression void pprint() const; //! Pretty-print without dagifying void pprintnodag() const; };/* class CVC3::Expr */ bool isArrayLiteral(const Expr&) CVC4_PUBLIC; class CVC4_PUBLIC ExprManager : public CVC4::ExprManager { public: std::string getKindName(int kind); //! Get the input language for printing InputLanguage getInputLang() const; //! Get the output language for printing InputLanguage getOutputLang() const; };/* class CVC3::ExprManager */ typedef CVC4::Statistics Statistics; #define PRESENTATION_LANG ::CVC4::language::input::LANG_CVC4 #define SMTLIB_LANG ::CVC4::language::input::LANG_SMTLIB_V1 #define SMTLIB_V2_LANG ::CVC4::language::input::LANG_SMTLIB_V2 #define TPTP_LANG ::CVC4::language::input::LANG_TPTP #define AST_LANG ::CVC4::language::input::LANG_AST /*****************************************************************************/ /* * Type for result of queries. VALID and UNSATISFIABLE are treated as * equivalent, as are SATISFIABLE and INVALID. */ /*****************************************************************************/ typedef enum CVC4_PUBLIC QueryResult { SATISFIABLE = 0, INVALID = 0, VALID = 1, UNSATISFIABLE = 1, ABORT, UNKNOWN } QueryResult; std::ostream& operator<<(std::ostream& out, QueryResult qr); std::string QueryResultToString(QueryResult query_result); /*****************************************************************************/ /* * Type for truth value of formulas. */ /*****************************************************************************/ typedef enum CVC4_PUBLIC FormulaValue { TRUE_VAL, FALSE_VAL, UNKNOWN_VAL } FormulaValue; std::ostream& operator<<(std::ostream& out, FormulaValue fv) CVC4_PUBLIC; /*****************************************************************************/ /*! *\class ValidityChecker *\brief CVC3 API (compatibility layer for CVC4) * * All terms and formulas are represented as expressions using the Expr class. * The notion of a context is also important. A context is a "background" set * of formulas which are assumed to be true or false. Formulas can be added to * the context explicitly, using assertFormula, or they may be added as part of * processing a query command. At any time, the current set of formulas making * up the context can be retrieved using getAssumptions. */ /*****************************************************************************/ class CVC4_PUBLIC ValidityChecker { CLFlags* d_clflags; CVC4::Options d_options; CVC3::ExprManager* d_em; std::map d_emmc; std::set d_reverseEmmc; CVC4::SmtEngine* d_smt; CVC4::parser::Parser* d_parserContext; std::vector d_exprTypeMapRemove; unsigned d_stackLevel; friend class Type; // to reach in to d_exprTypeMapRemove typedef std::hash_map ConstructorMap; typedef std::hash_map, CVC4::StringHashFunction> SelectorMap; ConstructorMap d_constructors; SelectorMap d_selectors; ValidityChecker(const CLFlags& clflags); void setUpOptions(CVC4::Options& options, const CLFlags& clflags); // helper function for bitvectors Expr bvpad(int len, const Expr& e); public: //! Constructor ValidityChecker(); //! Destructor virtual ~ValidityChecker(); //! Return the set of command-line flags /*! The flags are returned by reference, and if modified, will have an immediate effect on the subsequent commands. Note that not all flags will have such an effect; some flags are used only at initialization time (like "sat"), and therefore, will not take effect if modified after ValidityChecker is created. */ virtual CLFlags& getFlags() const; //! Force reprocessing of all flags virtual void reprocessFlags(); /***************************************************************************/ /* * Static methods */ /***************************************************************************/ //! Create the set of command line flags with default values; /*! \return the set of flags by value */ static CLFlags createFlags(); //! Create an instance of ValidityChecker /*! \param flags is the set of command line flags. */ static ValidityChecker* create(const CLFlags& flags); //! Create an instance of ValidityChecker using default flag values. static ValidityChecker* create(); /***************************************************************************/ /*! *\name Type-related methods * Methods for creating and looking up types *\sa class Type *@{ */ /***************************************************************************/ // Basic types virtual Type boolType(); //!< Create type BOOLEAN virtual Type realType(); //!< Create type REAL virtual Type intType(); //!< Create type INT //! Create a subrange type [l..r] /*! l and r can be Null; l=Null represents minus infinity, r=Null is * plus infinity. */ virtual Type subrangeType(const Expr& l, const Expr& r); //! Creates a subtype defined by the given predicate /*! * \param pred is a predicate taking one argument of type T and returning * Boolean. The resulting type is a subtype of T whose elements x are those * satisfying the predicate pred(x). * * \param witness is an expression of type T for which pred holds (if a Null * expression is passed as a witness, cvc will try to prove \f$\exists x. pred(x))\f$. * if the witness check fails, a TypecheckException is thrown. */ virtual Type subtypeType(const Expr& pred, const Expr& witness); // Tuple types //! 2-element tuple virtual Type tupleType(const Type& type0, const Type& type1); //! 3-element tuple virtual Type tupleType(const Type& type0, const Type& type1, const Type& type2); //! n-element tuple (from a vector of types) virtual Type tupleType(const std::vector& types); // Record types //! 1-element record virtual Type recordType(const std::string& field, const Type& type); //! 2-element record /*! Fields will be sorted automatically */ virtual Type recordType(const std::string& field0, const Type& type0, const std::string& field1, const Type& type1); //! 3-element record /*! Fields will be sorted automatically */ virtual Type recordType(const std::string& field0, const Type& type0, const std::string& field1, const Type& type1, const std::string& field2, const Type& type2); //! n-element record (fields and types must be of the same length) /*! Fields will be sorted automatically */ virtual Type recordType(const std::vector& fields, const std::vector& types); // Datatypes //! Single datatype, single constructor /*! The types are either type exressions (obtained from a type with * getExpr()) or string expressions containing the name of (one of) the * dataType(s) being defined. */ virtual Type dataType(const std::string& name, const std::string& constructor, const std::vector& selectors, const std::vector& types); //! Single datatype, multiple constructors /*! The types are either type exressions (obtained from a type with * getExpr()) or string expressions containing the name of (one of) the * dataType(s) being defined. */ virtual Type dataType(const std::string& name, const std::vector& constructors, const std::vector >& selectors, const std::vector >& types); //! Multiple datatypes /*! The types are either type exressions (obtained from a type with * getExpr()) or string expressions containing the name of (one of) the * dataType(s) being defined. */ virtual void dataType(const std::vector& names, const std::vector >& constructors, const std::vector > >& selectors, const std::vector > >& types, std::vector& returnTypes); //! Create an array type (ARRAY typeIndex OF typeData) virtual Type arrayType(const Type& typeIndex, const Type& typeData); //! Create a bitvector type of length n virtual Type bitvecType(int n); //! Create a function type typeDom -> typeRan virtual Type funType(const Type& typeDom, const Type& typeRan); //! Create a function type (t1,t2,...,tn) -> typeRan virtual Type funType(const std::vector& typeDom, const Type& typeRan); //! Create named user-defined uninterpreted type virtual Type createType(const std::string& typeName); //! Create named user-defined interpreted type (type abbreviation) virtual Type createType(const std::string& typeName, const Type& def); //! Lookup a user-defined (uninterpreted) type by name. Returns Null if none. virtual Type lookupType(const std::string& typeName); /*@}*/ // End of Type-related methods /***************************************************************************/ /*! *\name General Expr methods *\sa class Expr *\sa class ExprManager *@{ */ /***************************************************************************/ //! Return the ExprManager virtual ExprManager* getEM(); //! Create a variable with a given name and type /*! \param name is the name of the variable \param type is its type. The type cannot be a function type. \return an Expr representation of a new variable */ virtual Expr varExpr(const std::string& name, const Type& type); //! Create a variable with a given name, type, and value virtual Expr varExpr(const std::string& name, const Type& type, const Expr& def); //! Get the variable associated with a name, and its type /*! \param name is the variable name \param type is where the type value is returned \return a variable by the name. If there is no such Expr, a NULL \ Expr is returned. */ virtual Expr lookupVar(const std::string& name, Type* type); //! Get the type of the Expr. virtual Type getType(const Expr& e); //! Get the largest supertype of the Expr. virtual Type getBaseType(const Expr& e); //! Get the largest supertype of the Type. virtual Type getBaseType(const Type& t); //! Get the subtype predicate virtual Expr getTypePred(const Type&t, const Expr& e); //! Create a string Expr virtual Expr stringExpr(const std::string& str); //! Create an ID Expr virtual Expr idExpr(const std::string& name); //! Create a list Expr /*! Intermediate representation for DP-specific expressions. * Normally, the first element of the list is a string Expr * representing an operator, and the rest of the list are the * arguments. For example, * * kids.push_back(vc->stringExpr("PLUS")); * kids.push_back(x); // x and y are previously created Exprs * kids.push_back(y); * Expr lst = vc->listExpr(kids); * * Or, alternatively (using its overloaded version): * * Expr lst = vc->listExpr("PLUS", x, y); * * or * * vector summands; * summands.push_back(x); summands.push_back(y); ... * Expr lst = vc->listExpr("PLUS", summands); */ virtual Expr listExpr(const std::vector& kids); //! Overloaded version of listExpr with one argument virtual Expr listExpr(const Expr& e1); //! Overloaded version of listExpr with two arguments virtual Expr listExpr(const Expr& e1, const Expr& e2); //! Overloaded version of listExpr with three arguments virtual Expr listExpr(const Expr& e1, const Expr& e2, const Expr& e3); //! Overloaded version of listExpr with string operator and many arguments virtual Expr listExpr(const std::string& op, const std::vector& kids); //! Overloaded version of listExpr with string operator and one argument virtual Expr listExpr(const std::string& op, const Expr& e1); //! Overloaded version of listExpr with string operator and two arguments virtual Expr listExpr(const std::string& op, const Expr& e1, const Expr& e2); //! Overloaded version of listExpr with string operator and three arguments virtual Expr listExpr(const std::string& op, const Expr& e1, const Expr& e2, const Expr& e3); //! Prints e to the standard output virtual void printExpr(const Expr& e); //! Prints e to the given ostream virtual void printExpr(const Expr& e, std::ostream& os); //! Parse an expression using a Theory-specific parser virtual Expr parseExpr(const Expr& e); //! Parse a type expression using a Theory-specific parser virtual Type parseType(const Expr& e); //! Import the Expr from another instance of ValidityChecker /*! When expressions need to be passed among several instances of * ValidityChecker, they need to be explicitly imported into the * corresponding instance using this method. The return result is * an identical expression that belongs to the current instance of * ValidityChecker, and can be safely used as part of more complex * expressions from the same instance. */ virtual Expr importExpr(const Expr& e); //! Import the Type from another instance of ValidityChecker /*! \sa getType() */ virtual Type importType(const Type& t); //! Parse a sequence of commands from a presentation language string virtual void cmdsFromString(const std::string& s, InputLanguage lang = PRESENTATION_LANG); //! Parse an expression from a presentation language string /*! Only PRESENTATION_LANG and SMTLIB_V2_LANG are supported. Any other * value for lang will raise an exception. */ virtual Expr exprFromString(const std::string& e, InputLanguage lang = PRESENTATION_LANG); /*@}*/ // End of General Expr Methods /***************************************************************************/ /*! *\name Core expression methods * Methods for manipulating core expressions * * Except for equality and ite, the children provided as arguments must be of * type Boolean. *@{ */ /***************************************************************************/ //! Return TRUE Expr virtual Expr trueExpr(); //! Return FALSE Expr virtual Expr falseExpr(); //! Create negation virtual Expr notExpr(const Expr& child); //! Create 2-element conjunction virtual Expr andExpr(const Expr& left, const Expr& right); //! Create n-element conjunction virtual Expr andExpr(const std::vector& children); //! Create 2-element disjunction virtual Expr orExpr(const Expr& left, const Expr& right); //! Create n-element disjunction virtual Expr orExpr(const std::vector& children); //! Create Boolean implication virtual Expr impliesExpr(const Expr& hyp, const Expr& conc); //! Create left IFF right (boolean equivalence) virtual Expr iffExpr(const Expr& left, const Expr& right); //! Create an equality expression. /*! The two children must have the same type, and cannot be of type Boolean. */ virtual Expr eqExpr(const Expr& child0, const Expr& child1); //! Create IF ifpart THEN thenpart ELSE elsepart ENDIF /*! \param ifpart must be of type Boolean. \param thenpart and \param elsepart must have the same type, which will also be the type of the ite expression. */ virtual Expr iteExpr(const Expr& ifpart, const Expr& thenpart, const Expr& elsepart); /** * Create an expression asserting that all the children are different. * @param children the children to be asserted different */ virtual Expr distinctExpr(const std::vector& children); /*@}*/ // End of Core expression methods /***************************************************************************/ /*! *\name User-defined (uninterpreted) function methods * Methods for manipulating uninterpreted function expressions *@{ */ /***************************************************************************/ //! Create a named uninterpreted function with a given type /*! \param name is the new function's name (as ID Expr) \param type is a function type ( [range -> domain] ) */ virtual Op createOp(const std::string& name, const Type& type); //! Create a named user-defined function with a given type virtual Op createOp(const std::string& name, const Type& type, const Expr& def); //! Get the Op associated with a name, and its type /*! \param name is the operator name \param type is where the type value is returned \return an Op by the name. If there is no such Op, a NULL \ Op is returned. */ virtual Op lookupOp(const std::string& name, Type* type); //! Unary function application (op must be of function type) virtual Expr funExpr(const Op& op, const Expr& child); //! Binary function application (op must be of function type) virtual Expr funExpr(const Op& op, const Expr& left, const Expr& right); //! Ternary function application (op must be of function type) virtual Expr funExpr(const Op& op, const Expr& child0, const Expr& child1, const Expr& child2); //! n-ary function application (op must be of function type) virtual Expr funExpr(const Op& op, const std::vector& children); /*@}*/ // End of User-defined (uninterpreted) function methods /***************************************************************************/ /*! *\name Arithmetic expression methods * Methods for manipulating arithmetic expressions * * These functions create arithmetic expressions. The children provided * as arguments must be of type Real. *@{ */ /***************************************************************************/ /*! * Add the pair of variables to the variable ordering for aritmetic solving. * Terms that are not arithmetic will be ignored. * \param smaller the smaller variable * \param bigger the bigger variable */ virtual bool addPairToArithOrder(const Expr& smaller, const Expr& bigger); //! Create a rational number with numerator n and denominator d. /*! \param n the numerator \param d the denominator, cannot be 0. */ virtual Expr ratExpr(int n, int d = 1); //! Create a rational number with numerator n and denominator d. /*! Here n and d are given as strings. They are converted to arbitrary-precision integers according to the given base. */ virtual Expr ratExpr(const std::string& n, const std::string& d, int base); //! Create a rational from a single string. /*! \param n can be a string containing an integer, a pair of integers "nnn/ddd", or a number in the fixed or floating point format. \param base is the base in which to interpret the string. */ virtual Expr ratExpr(const std::string& n, int base = 10); //! Unary minus. virtual Expr uminusExpr(const Expr& child); //! Create 2-element sum (left + right) virtual Expr plusExpr(const Expr& left, const Expr& right); //! Create n-element sum virtual Expr plusExpr(const std::vector& children); //! Make a difference (left - right) virtual Expr minusExpr(const Expr& left, const Expr& right); //! Create a product (left * right) virtual Expr multExpr(const Expr& left, const Expr& right); //! Create a power expression (x ^ n); n must be integer virtual Expr powExpr(const Expr& x, const Expr& n); //! Create expression x / y virtual Expr divideExpr(const Expr& numerator, const Expr& denominator); //! Create (left < right) virtual Expr ltExpr(const Expr& left, const Expr& right); //! Create (left <= right) virtual Expr leExpr(const Expr& left, const Expr& right); //! Create (left > right) virtual Expr gtExpr(const Expr& left, const Expr& right); //! Create (left >= right) virtual Expr geExpr(const Expr& left, const Expr& right); /*@}*/ // End of Arithmetic expression methods /***************************************************************************/ /*! *\name Record expression methods * Methods for manipulating record expressions *@{ */ /***************************************************************************/ //! Create a 1-element record value (# field := expr #) /*! Fields will be sorted automatically */ virtual Expr recordExpr(const std::string& field, const Expr& expr); //! Create a 2-element record value (# field0 := expr0, field1 := expr1 #) /*! Fields will be sorted automatically */ virtual Expr recordExpr(const std::string& field0, const Expr& expr0, const std::string& field1, const Expr& expr1); //! Create a 3-element record value (# field_i := expr_i #) /*! Fields will be sorted automatically */ virtual Expr recordExpr(const std::string& field0, const Expr& expr0, const std::string& field1, const Expr& expr1, const std::string& field2, const Expr& expr2); //! Create an n-element record value (# field_i := expr_i #) /*! * \param fields * \param exprs must be the same length as fields * * Fields will be sorted automatically */ virtual Expr recordExpr(const std::vector& fields, const std::vector& exprs); //! Create record.field (field selection) /*! Create an expression representing the selection of a field from a record. */ virtual Expr recSelectExpr(const Expr& record, const std::string& field); //! Record update; equivalent to "record WITH .field := newValue" /*! Notice the `.' before field in the presentation language (and the comment above); this is to distinguish it from datatype update. */ virtual Expr recUpdateExpr(const Expr& record, const std::string& field, const Expr& newValue); /*@}*/ // End of Record expression methods /***************************************************************************/ /*! *\name Array expression methods * Methods for manipulating array expressions *@{ */ /***************************************************************************/ //! Create an expression array[index] (array access) /*! Create an expression for the value of array at the given index */ virtual Expr readExpr(const Expr& array, const Expr& index); //! Array update; equivalent to "array WITH index := newValue" virtual Expr writeExpr(const Expr& array, const Expr& index, const Expr& newValue); /*@}*/ // End of Array expression methods /***************************************************************************/ /*! *\name Bitvector expression methods * Methods for manipulating bitvector expressions *@{ */ /***************************************************************************/ // Bitvector constants // From a string of digits in a given base virtual Expr newBVConstExpr(const std::string& s, int base = 2); // From a vector of bools virtual Expr newBVConstExpr(const std::vector& bits); // From a rational: bitvector is of length 'len', or the min. needed length when len=0. virtual Expr newBVConstExpr(const Rational& r, int len = 0); // Concat and extract virtual Expr newConcatExpr(const Expr& t1, const Expr& t2); virtual Expr newConcatExpr(const std::vector& kids); virtual Expr newBVExtractExpr(const Expr& e, int hi, int low); // Bitwise Boolean operators: Negation, And, Nand, Or, Nor, Xor, Xnor virtual Expr newBVNegExpr(const Expr& t1); virtual Expr newBVAndExpr(const Expr& t1, const Expr& t2); virtual Expr newBVAndExpr(const std::vector& kids); virtual Expr newBVOrExpr(const Expr& t1, const Expr& t2); virtual Expr newBVOrExpr(const std::vector& kids); virtual Expr newBVXorExpr(const Expr& t1, const Expr& t2); virtual Expr newBVXorExpr(const std::vector& kids); virtual Expr newBVXnorExpr(const Expr& t1, const Expr& t2); virtual Expr newBVXnorExpr(const std::vector& kids); virtual Expr newBVNandExpr(const Expr& t1, const Expr& t2); virtual Expr newBVNorExpr(const Expr& t1, const Expr& t2); virtual Expr newBVCompExpr(const Expr& t1, const Expr& t2); // Unsigned bitvector inequalities virtual Expr newBVLTExpr(const Expr& t1, const Expr& t2); virtual Expr newBVLEExpr(const Expr& t1, const Expr& t2); // Signed bitvector inequalities virtual Expr newBVSLTExpr(const Expr& t1, const Expr& t2); virtual Expr newBVSLEExpr(const Expr& t1, const Expr& t2); // Sign-extend t1 to a total of len bits virtual Expr newSXExpr(const Expr& t1, int len); // Bitvector arithmetic: unary minus, plus, subtract, multiply virtual Expr newBVUminusExpr(const Expr& t1); virtual Expr newBVSubExpr(const Expr& t1, const Expr& t2); //! 'numbits' is the number of bits in the result virtual Expr newBVPlusExpr(int numbits, const std::vector& k); virtual Expr newBVPlusExpr(int numbits, const Expr& t1, const Expr& t2); virtual Expr newBVMultExpr(int numbits, const Expr& t1, const Expr& t2); virtual Expr newBVUDivExpr(const Expr& t1, const Expr& t2); virtual Expr newBVURemExpr(const Expr& t1, const Expr& t2); virtual Expr newBVSDivExpr(const Expr& t1, const Expr& t2); virtual Expr newBVSRemExpr(const Expr& t1, const Expr& t2); virtual Expr newBVSModExpr(const Expr& t1, const Expr& t2); // Left shift by r bits: result is old size + r bits virtual Expr newFixedLeftShiftExpr(const Expr& t1, int r); // Left shift by r bits: result is same size as t1 virtual Expr newFixedConstWidthLeftShiftExpr(const Expr& t1, int r); // Logical right shift by r bits: result is same size as t1 virtual Expr newFixedRightShiftExpr(const Expr& t1, int r); // Left shift with shift parameter an arbitrary bit-vector expr virtual Expr newBVSHL(const Expr& t1, const Expr& t2); // Logical right shift with shift parameter an arbitrary bit-vector expr virtual Expr newBVLSHR(const Expr& t1, const Expr& t2); // Arithmetic right shift with shift parameter an arbitrary bit-vector expr virtual Expr newBVASHR(const Expr& t1, const Expr& t2); // Get value of BV Constant virtual Rational computeBVConst(const Expr& e); /*@}*/ // End of Bitvector expression methods /***************************************************************************/ /*! *\name Other expression methods * Methods for manipulating other kinds of expressions *@{ */ /***************************************************************************/ //! Tuple expression virtual Expr tupleExpr(const std::vector& exprs); //! Tuple select; equivalent to "tuple.n", where n is an numeral (e.g. tup.5) virtual Expr tupleSelectExpr(const Expr& tuple, int index); //! Tuple update; equivalent to "tuple WITH index := newValue" virtual Expr tupleUpdateExpr(const Expr& tuple, int index, const Expr& newValue); //! Datatype constructor expression virtual Expr datatypeConsExpr(const std::string& constructor, const std::vector& args); //! Datatype selector expression virtual Expr datatypeSelExpr(const std::string& selector, const Expr& arg); //! Datatype tester expression virtual Expr datatypeTestExpr(const std::string& constructor, const Expr& arg); //! Create a bound variable with a given name, unique ID (uid) and type /*! \param name is the name of the variable \param uid is the unique ID (a string), which must be unique for each variable \param type is its type. The type cannot be a function type. \return an Expr representation of a new variable */ virtual Expr boundVarExpr(const std::string& name, const std::string& uid, const Type& type); //! Universal quantifier virtual Expr forallExpr(const std::vector& vars, const Expr& body); //! Universal quantifier with a trigger virtual Expr forallExpr(const std::vector& vars, const Expr& body, const Expr& trigger); //! Universal quantifier with a set of triggers. virtual Expr forallExpr(const std::vector& vars, const Expr& body, const std::vector& triggers); //! Universal quantifier with a set of multi-triggers. virtual Expr forallExpr(const std::vector& vars, const Expr& body, const std::vector >& triggers); //! Set triggers for quantifier instantiation /*! * \param e the expression for which triggers are being set. * \param triggers Each item in triggers is a vector of Expr containing one * or more patterns. A pattern is a term or Atomic predicate sub-expression * of e. A vector containing more than one pattern is treated as a * multi-trigger. Patterns will be matched in the order they occur in * the vector. */ virtual void setTriggers(const Expr& e, const std::vector > & triggers); //! Set triggers for quantifier instantiation (no multi-triggers) virtual void setTriggers(const Expr& e, const std::vector& triggers); //! Set a single trigger for quantifier instantiation virtual void setTrigger(const Expr& e, const Expr& trigger); //! Set a single multi-trigger for quantifier instantiation virtual void setMultiTrigger(const Expr& e, const std::vector& multiTrigger); //! Existential quantifier virtual Expr existsExpr(const std::vector& vars, const Expr& body); //! Lambda-expression virtual Op lambdaExpr(const std::vector& vars, const Expr& body); //! Transitive closure of a binary predicate virtual Op transClosure(const Op& op); //! Symbolic simulation expression /*! * \param f is the next state function (LAMBDA-expression) * \param s0 is the initial state * \param inputs is the vector of LAMBDA-expressions representing * the sequences of inputs to f * \param n is a constant, the number of cycles to run the simulation. */ virtual Expr simulateExpr(const Expr& f, const Expr& s0, const std::vector& inputs, const Expr& n); /*@}*/ // End of Other expression methods /***************************************************************************/ /*! *\name Validity checking methods * Methods related to validity checking * * This group includes methods for asserting formulas, checking * validity in the given logical context, manipulating the scope * level of the context, etc. *@{ */ /***************************************************************************/ //! Set the resource limit (0==unlimited, 1==exhausted). /*! Currently, the limit is the total number of processed facts. */ virtual void setResourceLimit(unsigned limit); //! Set a time limit in tenth of a second, /*! counting the cpu time used by the current process from now on. * Currently, when the limit is reached, cvc3 tries to quickly * terminate, probably with the status unknown. */ virtual void setTimeLimit(unsigned limit); //! Assert a new formula in the current context. /*! This creates the assumption e |- e. The formula must have Boolean type. */ virtual void assertFormula(const Expr& e); //! Register an atomic formula of interest. /*! Registered atoms are tracked by the decision procedures. If one of them is deduced to be true or false, it is added to a list of implied literals. Implied literals can be retrieved with the getImpliedLiteral function */ virtual void registerAtom(const Expr& e); //! Return next literal implied by last assertion. Null Expr if none. /*! Returned literals are either registered atomic formulas or their negation */ virtual Expr getImpliedLiteral(); //! Simplify e with respect to the current context virtual Expr simplify(const Expr& e); //! Check validity of e in the current context. /*! If it returns VALID, the scope and context are the same * as when called. If it returns INVALID, the context will be one which * falsifies the query. If it returns UNKNOWN, the context will falsify the * query, but the context may be inconsistent. Finally, if it returns * ABORT, the context will be one which satisfies as much as possible. * * \param e is the queried formula */ virtual QueryResult query(const Expr& e); //! Check satisfiability of the expr in the current context. /*! Equivalent to query(!e) */ virtual QueryResult checkUnsat(const Expr& e); //! Get the next model /*! This method should only be called after a query which returns INVALID. Its return values are as for query(). */ virtual QueryResult checkContinue(); //! Restart the most recent query with e as an additional assertion. /*! This method should only be called after a query which returns INVALID. Its return values are as for query(). */ virtual QueryResult restart(const Expr& e); //! Returns to context immediately before last invalid query. /*! This method should only be called after a query which returns false. */ virtual void returnFromCheck(); //! Get assumptions made by the user in this and all previous contexts. /*! User assumptions are created either by calls to assertFormula or by a * call to query. In the latter case, the negated query is added as an * assumption. * \param assumptions should be empty on entry. */ virtual void getUserAssumptions(std::vector& assumptions); //! Get assumptions made internally in this and all previous contexts. /*! Internal assumptions are literals assumed by the sat solver. * \param assumptions should be empty on entry. */ virtual void getInternalAssumptions(std::vector& assumptions); //! Get all assumptions made in this and all previous contexts. /*! \param assumptions should be empty on entry. */ virtual void getAssumptions(std::vector& assumptions); //! Returns the set of assumptions used in the proof of queried formula. /*! It returns a subset of getAssumptions(). If the last query was false * or there has not yet been a query, it does nothing. * NOTE: this functionality is not supported yet * \param assumptions should be empty on entry. */ virtual void getAssumptionsUsed(std::vector& assumptions); virtual Expr getProofQuery(); //! Return the internal assumptions that make the queried formula false. /*! This method should only be called after a query which returns false. It will try to return the simplest possible subset of the internal assumptions sufficient to make the queried expression false. \param assumptions should be empty on entry. \param inOrder if true, returns the assumptions in the order they were made. This is slightly more expensive than inOrder = false. */ virtual void getCounterExample(std::vector& assumptions, bool inOrder=true); //! Will assign concrete values to all user created variables /*! This function should only be called after a query which return false. */ virtual void getConcreteModel(ExprMap & m); //! If the result of the last query was UNKNOWN try to actually build the model //! to verify the result. /*! This function should only be called after a query which return unknown. */ virtual QueryResult tryModelGeneration(); //:ALEX: returns the current truth value of a formula // returns UNKNOWN_VAL if e is not associated // with a boolean variable in the SAT module, // i.e. if its value can not determined without search. virtual FormulaValue value(const Expr& e); //! Returns true if the current context is inconsistent. /*! Also returns a minimal set of assertions used to determine the inconsistency. \param assumptions should be empty on entry. */ virtual bool inconsistent(std::vector& assumptions); //! Returns true if the current context is inconsistent. virtual bool inconsistent(); //! Returns true if the invalid result from last query() is imprecise /*! * Some decision procedures in CVC are incomplete (quantifier * elimination, non-linear arithmetic, etc.). If any incomplete * features were used during the last query(), and the result is * "invalid" (query() returns false), then this result is * inconclusive. It means that the system gave up the search for * contradiction at some point. */ virtual bool incomplete(); //! Returns true if the invalid result from last query() is imprecise /*! * \sa incomplete() * * The argument is filled with the reasons for incompleteness (they * are intended to be shown to the end user). */ virtual bool incomplete(std::vector& reasons); //! Returns the proof term for the last proven query /*! If there has not been a successful query, it should return a NULL proof */ virtual Proof getProof(); //! Evaluate an expression and return a concrete value in the model /*! If the last query was not invalid, should return NULL expr */ virtual Expr getValue(const Expr& e); //! Returns the TCC of the last assumption or query /*! Returns Null if no assumptions or queries were performed. */ virtual Expr getTCC(); //! Return the set of assumptions used in the proof of the last TCC virtual void getAssumptionsTCC(std::vector& assumptions); //! Returns the proof of TCC of the last assumption or query /*! Returns Null if no assumptions or queries were performed. */ virtual Proof getProofTCC(); //! After successful query, return its closure |- Gamma => phi /*! Turn a valid query Gamma |- phi into an implication * |- Gamma => phi. * * Returns Null if last query was invalid. */ virtual Expr getClosure(); //! Construct a proof of the query closure |- Gamma => phi /*! Returns Null if last query was Invalid. */ virtual Proof getProofClosure(); /*@}*/ // End of Validity checking methods /***************************************************************************/ /*! *\name Context methods * Methods for manipulating contexts * * Contexts support stack-based push and pop. There are two * separate notions of the current context stack. stackLevel(), push(), * pop(), and popto() work with the user-level notion of the stack. * * scopeLevel(), pushScope(), popScope(), and poptoScope() work with * the internal stack which is more fine-grained than the user * stack. * * Do not use the scope methods unless you know what you are doing. * *@{ */ /***************************************************************************/ //! Returns the current stack level. Initial level is 0. virtual int stackLevel(); //! Checkpoint the current context and increase the scope level virtual void push(); //! Restore the current context to its state at the last checkpoint virtual void pop(); //! Restore the current context to the given stackLevel. /*! \param stackLevel should be greater than or equal to 0 and less than or equal to the current scope level. */ virtual void popto(int stackLevel); //! Returns the current scope level. Initially, the scope level is 1. virtual int scopeLevel(); /*! @brief Checkpoint the current context and increase the * internal scope level. Do not use unless you * know what you're doing! */ virtual void pushScope(); /*! @brief Restore the current context to its state at the last * internal checkpoint. Do not use unless you know * what you're doing! */ virtual void popScope(); //! Restore the current context to the given scopeLevel. /*! \param scopeLevel should be less than or equal to the current scope level. If scopeLevel is less than 1, then the current context is reset and the scope level is set to 1. */ virtual void poptoScope(int scopeLevel); //! Get the current context virtual Context* getCurrentContext(); //! Destroy and recreate validity checker: resets everything except for flags virtual void reset(); //! Add an annotation to the current script - prints annot when translating virtual void logAnnotation(const Expr& annot); /*@}*/ // End of Context methods /***************************************************************************/ /*! *\name Reading files * Methods for reading external files *@{ */ /***************************************************************************/ //! Read and execute the commands from a file given by name ("" means stdin) virtual void loadFile(const std::string& fileName, InputLanguage lang = PRESENTATION_LANG, bool interactive = false, bool calledFromParser = false); //! Read and execute the commands from a stream virtual void loadFile(std::istream& is, InputLanguage lang = PRESENTATION_LANG, bool interactive = false); /*@}*/ // End of methods for reading files /***************************************************************************/ /*! *\name Reporting Statistics * Methods for collecting and reporting run-time statistics *@{ */ /***************************************************************************/ //! Get statistics object virtual Statistics getStatistics(); //! Print collected statistics to stdout virtual void printStatistics(); /*@}*/ // End of Statistics Methods };/* class ValidityChecker */ template void ExprHashMap::insert(Expr a, Expr b) { (*this)[a] = b; } // Comparison (the way that CVC3 does it) int compare(const Expr& e1, const Expr& e2); }/* CVC3 namespace */ #endif /* _cvc3__include__vc_h_ */ #endif /* __CVC4__CVC3_COMPAT_H */ cvc4-1.5/src/context/000077500000000000000000000000001313116454100144705ustar00rootroot00000000000000cvc4-1.5/src/context/backtrackable.h000066400000000000000000000127201313116454100174140ustar00rootroot00000000000000/********************* */ /*! \file backtrackable.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Contains a backtrackable list ** ** Contains a backtrackable list. **/ #include "cvc4_private.h" #ifndef __CVC4__UTIL__BACKTRACKABLE_H #define __CVC4__UTIL__BACKTRACKABLE_H #include #include #include "context/cdo.h" namespace CVC4 { template class List; template class List_iterator; template class Backtracker; template class ListNode { private: T data; ListNode* next; bool empty; ListNode(const T& t, ListNode* n, bool e = false) : data(t), next(n), empty(e) {} ~ListNode() { // maybe set to NULL delete next; } friend class List; friend class List_iterator; };/* class ListNode */ template class List_iterator : public std::iterator { friend class List; public: const T& operator*(); List_iterator& operator++(); List_iterator operator++(int); bool operator!=(const List_iterator & other) const; private: const ListNode* pointee; List_iterator(const ListNode* p) : pointee(p) {} };/* class List_iterator */ template const T& List_iterator::operator*() { return pointee->data; } template List_iterator& List_iterator::operator++() { Assert(pointee != NULL); pointee = pointee->next; while(pointee != NULL && pointee->empty ) { pointee = pointee->next; } return *this; } template List_iterator List_iterator::operator++(int) { List_iterator it = *this; ++*this; return it; } template bool List_iterator::operator!=(const List_iterator& other) const { return (this->pointee != other.pointee); } // !! for the backtracking to work the lists must be allocated on the heap // therefore the hashmap from TNode to List should store pointers! template class List { ListNode* head; ListNode* tail; ListNode* ptr_to_head; bool uninitialized; Backtracker* bck; List (const List&) {} public: List(Backtracker* b) : ptr_to_head(NULL), uninitialized(true), bck(b) { head = tail = (ListNode*)calloc(1,sizeof(ListNode)); head->next = NULL; head->empty = true; } ~List() {delete head;} bool empty() { bck->checkConsistency(); return head == NULL; } void append(const T& d); //typedef List_iterator iterator; typedef List_iterator const_iterator; const_iterator begin() { bck->checkConsistency(); if(head->empty) { ListNode* temp = head; // if the head is empty return the first non-empty element or NULL while(temp != NULL && temp->empty ) { temp = temp->next; } return List_iterator(temp); } return List_iterator(head); } const_iterator end() { bck->checkConsistency(); return List_iterator(NULL); } void concat(List* other); void unconcat(List* other); };/* class List */ template void List::append (const T& d) { bck->checkConsistency(); if(uninitialized) { new(head)ListNode (d, head->next); //head->data = d; head->empty = false; //Assert(tail == head); FIXME: do I need this because this list might be empty but append to another one uninitialized = false; } else { ListNode* new_node = new ListNode(d, head); head = new_node; } if(ptr_to_head != NULL) { ptr_to_head->next = head; } } template void List::concat (List* other) { bck->checkConsistency(); bck->notifyConcat(this, other); Assert(tail->next==NULL); tail->next = other->head; Assert(other->ptr_to_head == NULL); other->ptr_to_head = tail; tail = other->tail; } template void List::unconcat(List* other) { // we do not need to check consistency since this is only called by the // Backtracker when we are inconsistent Assert(other->ptr_to_head != NULL); other->ptr_to_head->next = NULL; tail = other->ptr_to_head; other->ptr_to_head = NULL; } /* Backtrackable Table */ template class Backtracker { friend class List; std::vector*,List*> > undo_stack; int curr_level; context::CDO pop_level; void checkConsistency(); void notifyConcat(List* a, List* b); public: Backtracker(context::Context* c) : undo_stack(), curr_level(0), pop_level(c, 0) {} ~Backtracker() {} };/* class Backtrackable */ template void Backtracker::notifyConcat(List* a, List* b) { curr_level++; pop_level.set(pop_level.get()+1); undo_stack.push_back( std::make_pair(a, b)); } template void Backtracker::checkConsistency() { if( curr_level == pop_level || pop_level == -1) { return; } Assert(curr_level > pop_level); while (curr_level > pop_level) { curr_level--; List* l1 = undo_stack[curr_level].first; List* l2 = undo_stack[curr_level].second; l1->unconcat(l2); undo_stack.pop_back(); } Assert(curr_level == pop_level); } }/* CVC4 namespace */ #endif /* __CVC4__UTIL__BACKTRACKABLE_H */ cvc4-1.5/src/context/cdchunk_list.h000066400000000000000000000360311313116454100173160ustar00rootroot00000000000000/********************* */ /*! \file cdchunk_list.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent list class designed for use with a ** context memory allocator. ** ** Context-dependent list class designed for use with a context ** memory allocator. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDCHUNK_LIST_H #define __CVC4__CONTEXT__CDCHUNK_LIST_H #include #include #include "base/cvc4_assert.h" #include "context/context.h" #include "context/context_mm.h" namespace CVC4 { namespace context { /** * Generic context-dependent dynamic array. Like the usual CDList<>, * but allocates all memory from context memory. Elements are kept in * cascading "list segments." Access to elements by operator[] is not O(1) but * O(log n). As with CDList<>, update is not permitted, only * appending to the end of the list. */ template class CDChunkList : public ContextObj { public: /** The value type with which this CDChunkList<> was instantiated. */ typedef T value_type; /** The allocator type with which this CDChunkList<> was instantiated. */ typedef ContextMemoryAllocator Allocator; protected: static const size_t INITIAL_SEGMENT_SIZE = 10; static const size_t INCREMENTAL_GROWTH_FACTOR = 2; /** * ListSegment is itself allocated in Context memory, but it is * never updated; it serves as information about the d_list segment * pointer it contains only. */ class ListSegment { ListSegment* d_nextSegment; size_t d_segmentSize; T* d_list; public: ListSegment() : d_nextSegment(NULL), d_segmentSize(0), d_list(NULL) { } void initialize(T* list) { Assert( d_nextSegment == NULL && d_segmentSize == 0 && d_list == NULL, "Double-initialization of ListSegment not permitted" ); d_list = list; } void linkTo(ListSegment* nextSegment) { Assert( d_nextSegment == NULL, "Double-linking of ListSegment not permitted" ); d_nextSegment = nextSegment; } void cutLink() { d_nextSegment = NULL; } ListSegment* getNextSegment() const { return d_nextSegment; } size_t& size() { return d_segmentSize; } size_t size() const { return d_segmentSize; } const T* list() const { return d_list; } T& operator[](size_t i) { return d_list[i]; } const T& operator[](size_t i) const { return d_list[i]; } };/* struct CDChunkList::ListSegment */ /** * The first segment of list memory. */ ListSegment d_headSegment; /** * A pointer to the final segment of list memory. */ ListSegment* d_tailSegment; /** * Whether to call the destructor when items are popped from the * list. True by default, but can be set to false by setting the * second argument in the constructor to false. */ bool d_callDestructor; /** * Number of objects in list across all segments. */ size_t d_size; /** * Total allocated size across all segments. */ size_t d_totalSizeAlloc; /** * Our allocator. */ Allocator d_allocator; /** * Lightweight save object for CDChunkList >. */ struct CDChunkListSave : public ContextObj { ListSegment* d_tail; size_t d_tailSize, d_size, d_sizeAlloc; CDChunkListSave(const CDChunkList& list, ListSegment* tail, size_t size, size_t sizeAlloc) : ContextObj(list), d_tail(tail), d_tailSize(tail->size()), d_size(size), d_sizeAlloc(sizeAlloc) { } ~CDChunkListSave() { this->destroy(); } ContextObj* save(ContextMemoryManager* pCMM) { // This type of object _is_ the save/restore object. It isn't // itself saved or restored. Unreachable(); } void restore(ContextObj* data) { // This type of object _is_ the save/restore object. It isn't // itself saved or restored. Unreachable(); } };/* struct CDChunkList::CDChunkListSave */ /** * Private copy constructor undefined (no copy permitted). */ CDChunkList(const CDChunkList& l) CVC4_UNDEFINED; /** * Allocate the first list segment. */ void allocateHeadSegment() { Assert(d_headSegment.list() == NULL); Assert(d_totalSizeAlloc == 0 && d_size == 0); // Allocate an initial list if one does not yet exist size_t newSize = INITIAL_SEGMENT_SIZE; Debug("cdlist:cmm") << "initial grow of cdlist " << this << " level " << getContext()->getLevel() << " to " << newSize << std::endl; if(newSize > d_allocator.max_size()) { newSize = d_allocator.max_size(); } T* newList = d_allocator.allocate(newSize); if(newList == NULL) { throw std::bad_alloc(); } d_totalSizeAlloc = newSize; d_headSegment.initialize(newList); } /** * Allocate a new segment with more space. * Throws bad_alloc if memory allocation fails. */ void grow() { Assert(d_totalSizeAlloc == d_size); // Allocate a new segment typedef typename Allocator::template rebind::other SegmentAllocator; ContextMemoryManager* cmm = d_allocator.getCMM(); SegmentAllocator segAllocator = SegmentAllocator(cmm); ListSegment* newSegment = segAllocator.allocate(1); if(newSegment == NULL) { throw std::bad_alloc(); } segAllocator.construct(newSegment, ListSegment()); size_t newSize = INCREMENTAL_GROWTH_FACTOR * d_totalSizeAlloc; if(newSize > d_allocator.max_size()) { newSize = d_allocator.max_size(); } T* newList = d_allocator.allocate(newSize); Debug("cdlist:cmm") << "new segment of cdlistcontext " << this << " level " << getContext()->getLevel() << " to " << newSize << " (from " << d_tailSegment->list() << " to " << newList << ")" << std::endl; if(newList == NULL) { throw std::bad_alloc(); } d_tailSegment->linkTo(newSegment); d_tailSegment = newSegment; d_tailSegment->initialize(newList); d_totalSizeAlloc += newSize; } /** * Implementation of mandatory ContextObj method save: simply copies the * current size to a copy using the copy constructor (the pointer and the * allocated size are *not* copied as they are not restored on a pop). * The saved information is allocated using the ContextMemoryManager. */ ContextObj* save(ContextMemoryManager* pCMM) { ContextObj* data = new(pCMM) CDChunkListSave(*this, d_tailSegment, d_size, d_totalSizeAlloc); Debug("cdlist:cmm") << "save " << this << " at level " << this->getContext()->getLevel() << " size at " << this->d_size << " totalSizeAlloc at " << this->d_totalSizeAlloc << " data:" << data << std::endl; return data; } /** * Implementation of mandatory ContextObj method restore: simply restores the * previous size. Note that the list pointer and the allocated size are not * changed. */ void restore(ContextObj* data) { CDChunkListSave* save = static_cast(data); Debug("cdlist:cmm") << "restore " << this << " level " << this->getContext()->getLevel() << " data == " << data << " call dtor == " << this->d_callDestructor << " d_tail == " << this->d_tailSegment << std::endl; if(this->d_callDestructor) { ListSegment* seg = &d_headSegment; size_t i = save->d_size; while(i >= seg->size()) { i -= seg->size(); seg = seg->getNextSegment(); } do { while(i < seg->size()) { this->d_allocator.destroy(&(*seg)[i++]); } i = 0; } while((seg = seg->getNextSegment()) != NULL); } this->d_size = save->d_size; this->d_tailSegment = save->d_tail; this->d_tailSegment->size() = save->d_tailSize; this->d_tailSegment->cutLink(); this->d_totalSizeAlloc = save->d_sizeAlloc; Debug("cdlist:cmm") << "restore " << this << " level " << this->getContext()->getLevel() << " size back to " << this->d_size << " totalSizeAlloc at " << this->d_totalSizeAlloc << std::endl; } public: CDChunkList(Context* context, bool callDestructor, const Allocator& alloc) : ContextObj(context), d_headSegment(), d_tailSegment(&d_headSegment), d_callDestructor(callDestructor), d_size(0), d_totalSizeAlloc(0), d_allocator(alloc) { allocateHeadSegment(); } CDChunkList(Context* context, bool callDestructor = true) : ContextObj(context), d_headSegment(), d_tailSegment(&d_headSegment), d_callDestructor(callDestructor), d_size(0), d_totalSizeAlloc(0), d_allocator(Allocator(context->getCMM())) { allocateHeadSegment(); } CDChunkList(bool allocatedInCMM, Context* context, bool callDestructor, const Allocator& alloc) : ContextObj(allocatedInCMM, context), d_headSegment(), d_tailSegment(&d_headSegment), d_callDestructor(callDestructor), d_size(0), d_totalSizeAlloc(0), d_allocator(alloc) { allocateHeadSegment(); } CDChunkList(bool allocatedInCMM, Context* context, bool callDestructor = true) : ContextObj(allocatedInCMM, context), d_headSegment(), d_tailSegment(&d_headSegment), d_callDestructor(callDestructor), d_size(0), d_totalSizeAlloc(0), d_allocator(Allocator(context->getCMM())) { allocateHeadSegment(); } /** * Destructor: delete the list */ ~CDChunkList() { this->destroy(); if(this->d_callDestructor) { for(ListSegment* segment = &d_headSegment; segment != NULL; segment = segment->getNextSegment()) { for(size_t i = 0; i < segment->size(); ++i) { this->d_allocator.destroy(&(*segment)[i]); } } } } /** * Return the current size of (i.e. valid number of objects in) the * list. */ size_t size() const { return d_size; } /** * Return true iff there are no valid objects in the list. */ bool empty() const { return d_size == 0; } /** * Add an item to the end of the list. */ void push_back(const T& data) { Debug("cdlist:cmm") << "push_back " << this << " level " << getContext()->getLevel() << ": make-current, " << "d_list == " << d_tailSegment->list() << std::endl; makeCurrent(); Debug("cdlist:cmm") << "push_back " << this << " level " << getContext()->getLevel() << ": grow? " << d_size << " size_alloc " << d_totalSizeAlloc << std::endl; if(d_size == d_totalSizeAlloc) { Debug("cdlist:cmm") << "push_back " << this << " " << getContext()->getLevel() << ": grow!\n"; grow(); } Assert(d_size < d_totalSizeAlloc); Debug("cdlist:cmm") << "push_back " << this << " " << getContext()->getLevel() << ": construct! at [" << d_size << "] == " << &(*d_tailSegment)[d_tailSegment->size()] << std::endl; d_allocator.construct(&(*d_tailSegment)[d_tailSegment->size()], data); Debug("cdlist:cmm") << "push_back " << this << " " << getContext()->getLevel() << ": done..." << std::endl; ++d_tailSegment->size(); ++d_size; Debug("cdlist:cmm") << "push_back " << this << " " << getContext()->getLevel() << ": size now " << d_size << std::endl; } /** * Access to the ith item in the list in O(log n). */ const T& operator[](size_t i) const { Assert(i < d_size, "index out of bounds in CDChunkList::operator[]"); const ListSegment* seg = &d_headSegment; while(i >= seg->size()) { i -= seg->size(); seg = seg->getNextSegment(); } return (*seg)[i]; } /** * Returns the most recent item added to the list. */ const T& back() const { Assert(d_size > 0, "CDChunkList::back() called on empty list"); return (*d_tailSegment)[d_tailSegment->size() - 1]; } /** * Iterator for CDChunkList class. It has to be const because we don't * allow items in the list to be changed. It's a straightforward * wrapper around a pointer. Note that for efficiency, we implement * only prefix increment and decrement. Also note that it's OK to * create an iterator from an empty, uninitialized list, as begin() * and end() will have the same value (NULL). */ class const_iterator { const ListSegment* d_segment; size_t d_index; const_iterator(const ListSegment* segment, size_t i) : d_segment(segment), d_index(i) { } friend class CDChunkList; public: typedef std::input_iterator_tag iterator_category; typedef T value_type; typedef std::ptrdiff_t difference_type; typedef const T* pointer; typedef const T& reference; const_iterator() : d_segment(NULL), d_index(0) {} inline bool operator==(const const_iterator& i) const { return d_segment == i.d_segment && d_index == i.d_index; } inline bool operator!=(const const_iterator& i) const { return !(*this == i); } inline const T& operator*() const { return (*d_segment)[d_index]; } /** Prefix increment */ const_iterator& operator++() { if(++d_index >= d_segment->size()) { d_segment = d_segment->getNextSegment(); d_index = 0; } return *this; } /** Postfix increment: returns new iterator with the old value. */ const_iterator operator++(int) { const_iterator i = *this; ++(*this); return i; } };/* class CDChunkList<>::const_iterator */ /** * Returns an iterator pointing to the first item in the list. */ const_iterator begin() const { // This looks curious, but we have to make sure that begin() == end() // for an empty list, and begin() == (head,0) for a nonempty one. // Since the segment spill-over is implemented in // iterator::operator++(), let's reuse it. */ return ++const_iterator(&d_headSegment, -1); } /** * Returns an iterator pointing one past the last item in the list. */ const_iterator end() const { return const_iterator(NULL, 0); } };/* class CDChunkList > */ }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDCHUNK_LIST_H */ cvc4-1.5/src/context/cddense_set.h000066400000000000000000000045621313116454100171300ustar00rootroot00000000000000/********************* */ /*! \file cddense_set.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is an abstraction of a set of unsigned integers. ** ** This is an abstraction of a set of unsigned integers. ** This class is designed to provide constant time insertion, element_of, ** and fast iteration. This is done by storing backing vectors of size greater than ** the maximum key. **/ #include "cvc4_private.h" #pragma once #include #include "context/context.h" #include "context/cdlist_forward.h" #include "context/cdlist.h" #include "util/index.h" namespace CVC4 { namespace context { template > class CDDenseSet { public: typedef Index Element; private: class RemoveIntCleanup { private: std::vector& d_set; /** * The CleanUp functor. */ CleanUp d_cleanUp; public: RemoveIntCleanup(std::vector& set, const CleanUp& cleanup) : d_set(set), d_cleanUp(cleanup) {} void operator()(Element* p){ d_cleanup(p); ArithVar x = *p; Assert(d_set[x]); d_set[x] = false; } }; typedef CDList ElementList; ElementList d_list; std::vector d_set; public: typedef ElementList::const_iterator const_iterator; CDDenseSet(context::Context* c, const CleanUp& cleanup = CleanUp()) : d_set(), d_list(c, true, RemoveIntCleanup(d_set, cleanup)) { } /** This cannot be const as garbage collection is done lazily. */ bool contains(Element x) const{ if(x < d_set.size()){ return d_set[x]; }else{ return false; } } void insert(Element x){ Assert(!contains(x)); if(x >= d_set.size()){ d_set.resize(x+1, false); } d_list.push_back(x); d_set[x] = true; } const_iterator begin() const { return d_list.begin(); } const_iterator end() const { return d_list.end(); } };/* class CDDenseSet<> */ }/* CVC4::context namespace */ }/* CVC4 namespace */ cvc4-1.5/src/context/cdhashmap.h000066400000000000000000000435031313116454100165760ustar00rootroot00000000000000/********************* */ /*! \file cdhashmap.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent map class. ** ** Context-dependent map class. Generic templated class for a map ** which must be saved and restored as contexts are pushed and ** popped. Requires that operator= be defined for the data class, ** and operator== for the key class. For key types that don't have a ** __gnu_cxx::hash<>, you should provide an explicit HashFcn. ** ** See also: ** CDInsertHashMap : An "insert-once" CD hash map. ** CDTrailHashMap : A lightweight CD hash map with poor iteration ** characteristics and some quirks in usage. ** ** Internal documentation: ** ** CDHashMap<> is something of a work in progress at present (26 May ** 2010), due to some recent discoveries of problems with its ** internal state. Here are some notes on the internal use of ** CDOhash_maps that may be useful in figuring out this mess: ** ** So you have a CDHashMap<>. ** ** You insert some (key,value) pairs. Each allocates a CDOhash_map<> ** and goes on a doubly-linked list headed by map.d_first and ** threaded via CDOhash_map.{d_prev,d_next}. CDOhash_maps are constructed ** with a NULL d_map pointer, but then immediately call ** makeCurrent() and set the d_map pointer back to the map. At ** context level 0, this doesn't lead to anything special. In ** higher context levels, this stores away a CDOhash_map with a NULL ** map pointer at level 0, and a non-NULL map pointer in the ** current context level. (Remember that for later.) ** ** When a key is associated to a new value in a CDHashMap, its ** associated CDOhash_map calls makeCurrent(), then sets the new ** value. The save object is also a CDOhash_map (allocated in context ** memory). ** ** Now, CDOhash_maps disappear in a variety of ways. ** ** First, you might pop beyond a "modification of the value" ** scope level, requiring a re-association of the key to an old ** value. This is easy. CDOhash_map::restore() does the work, and ** the context memory of the save object is reclaimed as usual. ** ** Second, you might pop beyond a "insert the key" scope level, ** requiring that the key be completely removed from the map and ** its CDOhash_map object memory freed. Here, the CDOhash_map is restored ** to a "NULL-map" state (see above), signaling it to remove ** itself from the map completely and put itself on a "trash ** list" for the map. ** ** Third, you might obliterate() the key. This calls the CDOhash_map ** destructor, which calls destroy(), which does a successive ** restore() until level 0. If the key was in the map since ** level 0, the restore() won't remove it, so in that case ** obliterate() removes it from the map and frees the CDOhash_map's ** memory. ** ** Fourth, you might delete the cdhashmap(calling CDHashMap::~CDHashMap()). ** This first calls destroy(), as per ContextObj contract, but ** cdhashmapdoesn't save/restore itself, so that does nothing at the ** CDHashMap-level. Then it empties the trash. Then, for each ** element in the map, it marks it as being "part of a complete ** map destruction", which essentially short-circuits ** CDOhash_map::restore() (see CDOhash_map::restore()), then deallocates ** it. Finally it asserts that the trash is empty (which it ** should be, since restore() was short-circuited). ** ** Fifth, you might clear() the CDHashMap. This does exactly the ** same as CDHashMap::~CDHashMap(), except that it doesn't call destroy() ** on itself. ** ** CDHashMap::emptyTrash() simply goes through and calls ** ->deleteSelf() on all elements in the trash. ** ContextObj::deleteSelf() calls the CDOhash_map destructor, then ** frees the memory associated to the CDOhash_map. CDOhash_map::~CDOhash_map() ** calls destroy(), which restores as much as possible. (Note, ** though, that since objects placed on the trash have already ** restored to the fullest extent possible, it does nothing.) **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDHASHMAP_H #define __CVC4__CONTEXT__CDHASHMAP_H #include #include #include #include "base/cvc4_assert.h" #include "context/context.h" #include "context/cdhashmap_forward.h" namespace CVC4 { namespace context { // Auxiliary class: almost the same as CDO (see cdo.h) template > class CDOhash_map : public ContextObj { friend class CDHashMap; Key d_key; Data d_data; CDHashMap* d_map; /** never put this cdhashmapelement on the trash */ bool d_noTrash; // Doubly-linked list for keeping track of elements in order of insertion CDOhash_map* d_prev; CDOhash_map* d_next; virtual ContextObj* save(ContextMemoryManager* pCMM) { return new(pCMM) CDOhash_map(*this); } virtual void restore(ContextObj* data) { CDOhash_map* p = static_cast(data); if(d_map != NULL) { if(p->d_map == NULL) { Assert(d_map->d_map.find(d_key) != d_map->d_map.end() && (*d_map->d_map.find(d_key)).second == this); // no longer in map (popped beyond first level in which it was) d_map->d_map.erase(d_key); // If we call deleteSelf() here, it re-enters restore(). So, // put it on a "trash heap" instead, for later deletion. // // FIXME multithreading if(d_map->d_first == this) { Debug("gc") << "remove first-elem " << this << " from map " << d_map << " with next-elem " << d_next << std::endl; if(d_next == this) { Assert(d_prev == this); d_map->d_first = NULL; } else { d_map->d_first = d_next; } } else { Debug("gc") << "remove nonfirst-elem " << this << " from map " << d_map << std::endl; } d_next->d_prev = d_prev; d_prev->d_next = d_next; if(d_noTrash) { Debug("gc") << "CDHashMap<> no-trash " << this << std::endl; } else { Debug("gc") << "CDHashMap<> trash push_back " << this << std::endl; //this->deleteSelf(); d_map->d_trash.push_back(this); } } else { d_data = p->d_data; } } // Explicitly call destructors for the key and the data as they will not // otherwise get called. p->d_key.~Key(); p->d_data.~Data(); } /** ensure copy ctor is only called by us */ CDOhash_map(const CDOhash_map& other) : ContextObj(other), // don't need to save the key---and if we do we can get // refcounts for Node keys messed up and leak memory d_key(), d_data(other.d_data), d_map(other.d_map), d_prev(NULL), d_next(NULL) { } CDOhash_map& operator=(const CDOhash_map&) CVC4_UNDEFINED; public: CDOhash_map(Context* context, CDHashMap* map, const Key& key, const Data& data, bool atLevelZero = false, bool allocatedInCMM = false) : ContextObj(allocatedInCMM, context), d_key(key), d_data(), d_map(NULL), d_noTrash(allocatedInCMM) { // untested, probably unsafe. Assert(!(atLevelZero && allocatedInCMM)); if(atLevelZero) { // "Initializing" map insertion: this entry will never be // removed from the map, it's inserted at level 0 as an // "initializing" element. See // CDHashMap<>::insertAtContextLevelZero(). d_data = data; } else { // Normal map insertion: first makeCurrent(), then set the data // and then, later, the map. Order is important; we can't // initialize d_map in the constructor init list above, because // we want the restore of d_map to NULL to signal us to remove // the element from the map. if(allocatedInCMM) { // Force a save/restore point, even though the object is // allocated here. This is so that we can detect when the // object falls out of the map (otherwise we wouldn't get it). makeSaveRestorePoint(); } set(data); } d_map = map; CDOhash_map*& first = d_map->d_first; if(first == NULL) { first = d_next = d_prev = this; Debug("gc") << "add first-elem " << this << " to map " << d_map << std::endl; } else { Debug("gc") << "add nonfirst-elem " << this << " to map " << d_map << " with first-elem " << first << "[" << first->d_prev << " " << first->d_next << std::endl; d_prev = first->d_prev; d_next = first; d_prev->d_next = this; first->d_prev = this; } } ~CDOhash_map() { destroy(); } void set(const Data& data) { makeCurrent(); d_data = data; } const Key& getKey() const { return d_key; } const Data& get() const { return d_data; } operator Data() { return get(); } const Data& operator=(const Data& data) { set(data); return data; } CDOhash_map* next() const { if(d_next == d_map->d_first) { return NULL; } else { return d_next; } } };/* class CDOhash_map<> */ /** * Generic templated class for a map which must be saved and restored * as contexts are pushed and popped. Requires that operator= be * defined for the data class, and operator== for the key class. */ template class CDHashMap : public ContextObj { typedef CDOhash_map Element; typedef __gnu_cxx::hash_map table_type; friend class CDOhash_map; table_type d_map; Element* d_first; Context* d_context; std::vector d_trash; // Nothing to save; the elements take care of themselves virtual ContextObj* save(ContextMemoryManager* pCMM) { Unreachable(); } // Similarly, nothing to restore virtual void restore(ContextObj* data) { Unreachable(); } void emptyTrash() { //FIXME multithreading for(typename std::vector::iterator i = d_trash.begin(); i != d_trash.end(); ++i) { Debug("gc") << "emptyTrash(): " << *i << std::endl; (*i)->deleteSelf(); } d_trash.clear(); } // no copy or assignment CDHashMap(const CDHashMap&) CVC4_UNDEFINED; CDHashMap& operator=(const CDHashMap&) CVC4_UNDEFINED; public: CDHashMap(Context* context) : ContextObj(context), d_map(), d_first(NULL), d_context(context), d_trash() { } ~CDHashMap() { Debug("gc") << "cdhashmap" << this << " disappearing, destroying..." << std::endl; destroy(); Debug("gc") << "cdhashmap" << this << " disappearing, done destroying" << std::endl; Debug("gc") << "cdhashmap" << this << " gone, emptying trash" << std::endl; emptyTrash(); Debug("gc") << "done emptying trash for " << this << std::endl; for(typename table_type::iterator i = d_map.begin(); i != d_map.end(); ++i) { // mark it as being a destruction (short-circuit restore()) (*i).second->d_map = NULL; if(!(*i).second->d_noTrash) { (*i).second->deleteSelf(); } } d_map.clear(); d_first = NULL; Assert(d_trash.empty()); } void clear() throw(AssertionException) { Debug("gc") << "clearing cdhashmap" << this << ", emptying trash" << std::endl; emptyTrash(); Debug("gc") << "done emptying trash for " << this << std::endl; for(typename table_type::iterator i = d_map.begin(); i != d_map.end(); ++i) { // mark it as being a destruction (short-circuit restore()) (*i).second->d_map = NULL; if(!(*i).second->d_noTrash) { (*i).second->deleteSelf(); } } d_map.clear(); d_first = NULL; Assert(d_trash.empty()); } // The usual operators of map size_t size() const { return d_map.size(); } bool empty() const { return d_map.empty(); } size_t count(const Key& k) const { return d_map.count(k); } // If a key is not present, a new object is created and inserted Element& operator[](const Key& k) { emptyTrash(); typename table_type::iterator i = d_map.find(k); Element* obj; if(i == d_map.end()) {// create new object obj = new(true) Element(d_context, this, k, Data()); d_map[k] = obj; } else { obj = (*i).second; } return *obj; } bool insert(const Key& k, const Data& d) { emptyTrash(); typename table_type::iterator i = d_map.find(k); if(i == d_map.end()) {// create new object Element* obj = new(true) Element(d_context, this, k, d); d_map[k] = obj; return true; } else { (*i).second->set(d); return false; } } /** * Version of insert() for CDHashMap<> that inserts data value d at * context level zero. This is a special escape hatch for inserting * "initializing" data into the map. Imagine something happens at a * deep context level L that causes insertion into a map, such that * the object should have an "initializing" value v1 below context * level L, and a "current" value v2 at context level L. Then you * can (assuming key k): * * map.insertAtContextLevelZero(k, v1); * map.insert(k, v2); * * The justification for this "escape hatch" has to do with * variables and assignments in theories (e.g., in arithmetic). * Let's say you introduce a new variable x at some deep decision * level (thanks to lazy registration, or a splitting lemma, or * whatever). x might be mapped to something, but for theory * implementation simplicity shouldn't disappear from the map on * backjump; rather, it can take another (legal) value, or a special * value to indicate it needs to be recomputed. * * It is an error (checked via AlwaysAssert()) to * insertAtContextLevelZero() a key that already is in the map. */ void insertAtContextLevelZero(const Key& k, const Data& d) { emptyTrash(); AlwaysAssert(d_map.find(k) == d_map.end()); Element* obj = new(true) Element(d_context, this, k, d, true /* atLevelZero */); d_map[k] = obj; } // FIXME: no erase(), too much hassle to implement efficiently... /** * "Obliterating" is kind of like erasing, except it's not * backtrackable; the key is permanently removed from the map. * (Naturally, it can be re-added as a new element.) */ void obliterate(const Key& k) { typename table_type::iterator i = d_map.find(k); if(i != d_map.end()) { Debug("gc") << "key " << k << " obliterated" << std::endl; // Restore this object to level 0. If it was inserted after level 0, // nothing else to do as restore will put it in the trash. (*i).second->destroy(); // Check if object was inserted at level 0: in that case, still have // to do some work. typename table_type::iterator j = d_map.find(k); if(j != d_map.end()) { Element* elt = (*j).second; if(d_first == elt) { if(elt->d_next == elt) { Assert(elt->d_prev == elt); d_first = NULL; } else { d_first = elt->d_next; } } elt->d_prev->d_next = elt->d_next; elt->d_next->d_prev = elt->d_prev; d_map.erase(j);//FIXME multithreading Debug("gc") << "key " << k << " obliterated zero-scope: " << elt << std::endl; if(!elt->d_noTrash) { elt->deleteSelf(); } } } } class iterator { const Element* d_it; public: iterator(const Element* p) : d_it(p) {} iterator(const iterator& i) : d_it(i.d_it) {} // Default constructor iterator() {} // (Dis)equality bool operator==(const iterator& i) const { return d_it == i.d_it; } bool operator!=(const iterator& i) const { return d_it != i.d_it; } // Dereference operators. std::pair operator*() const { return std::pair(d_it->getKey(), d_it->get()); } // Prefix increment iterator& operator++() { d_it = d_it->next(); return *this; } // Postfix increment: requires a Proxy object to hold the // intermediate value for dereferencing class Proxy { const std::pair* d_pair; public: Proxy(const std::pair& p) : d_pair(&p) {} const std::pair& operator*() const { return *d_pair; } };/* class CDHashMap<>::iterator::Proxy */ // Actual postfix increment: returns Proxy with the old value. // Now, an expression like *i++ will return the current *i, and // then advance the iterator. However, don't try to use // Proxy for anything else. const Proxy operator++(int) { Proxy e(*(*this)); ++(*this); return e; } };/* class CDHashMap<>::iterator */ typedef iterator const_iterator; iterator begin() const { return iterator(d_first); } iterator end() const { return iterator(NULL); } iterator find(const Key& k) const { typename table_type::const_iterator i = d_map.find(k); if(i == d_map.end()) { return end(); } else { return iterator((*i).second); } } iterator find(const Key& k) { emptyTrash(); return const_cast(this)->find(k); } };/* class CDHashMap<> */ }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDHASHMAP_H */ cvc4-1.5/src/context/cdhashmap_forward.h000066400000000000000000000027011313116454100203150ustar00rootroot00000000000000/********************* */ /*! \file cdhashmap_forward.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a forward declaration header to declare the CDHashMap<> ** template ** ** This is a forward declaration header to declare the CDHashMap<> ** template. It's useful if you want to forward-declare CDHashMap<> ** without including the full cdhashmap.h header, for example, in a ** public header context. ** ** For CDHashMap<> in particular, it's difficult to forward-declare it ** yourself, because it has a default template argument. **/ #include "cvc4_public.h" #ifndef __CVC4__CONTEXT__CDHASHMAP_FORWARD_H #define __CVC4__CONTEXT__CDHASHMAP_FORWARD_H /// \cond internals namespace __gnu_cxx { template struct hash; }/* __gnu_cxx namespace */ namespace CVC4 { namespace context { template > class CDHashMap; }/* CVC4::context namespace */ }/* CVC4 namespace */ /// \endcond #endif /* __CVC4__CONTEXT__CDHASHMAP_FORWARD_H */ cvc4-1.5/src/context/cdhashset.h000066400000000000000000000074441313116454100166200ustar00rootroot00000000000000/********************* */ /*! \file cdhashset.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent set class. ** ** Context-dependent set class. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDHASHSET_H #define __CVC4__CONTEXT__CDHASHSET_H #include "base/cvc4_assert.h" #include "context/context.h" #include "context/cdinsert_hashmap.h" namespace CVC4 { namespace context { template class CDHashSet : protected CDInsertHashMap { typedef CDInsertHashMap super; // no copy or assignment CDHashSet(const CDHashSet&) CVC4_UNDEFINED; CDHashSet& operator=(const CDHashSet&) CVC4_UNDEFINED; public: // ensure these are publicly accessible static void* operator new(size_t size, bool b) { return ContextObj::operator new(size, b); } static void operator delete(void* pMem, bool b) { return ContextObj::operator delete(pMem, b); } void deleteSelf() { this->ContextObj::deleteSelf(); } static void operator delete(void* pMem) { AlwaysAssert(false, "It is not allowed to delete a ContextObj this way!"); } CDHashSet(Context* context) : super(context) { } size_t size() const { return super::size(); } bool empty() const { return super::empty(); } bool insert(const V& v) { return super::insert_safe(v, true); } bool contains(const V& v) const { return super::contains(v); } class const_iterator { typename super::const_iterator d_it; public: const_iterator(const typename super::const_iterator& it) : d_it(it) {} const_iterator(const const_iterator& it) : d_it(it.d_it) {} // Default constructor const_iterator() {} // (Dis)equality bool operator==(const const_iterator& i) const { return d_it == i.d_it; } bool operator!=(const const_iterator& i) const { return d_it != i.d_it; } // Dereference operators. V operator*() const { return (*d_it).first; } // Prefix increment const_iterator& operator++() { ++d_it; return *this; } // Postfix increment: requires a Proxy object to hold the // intermediate value for dereferencing class Proxy { const V& d_val; public: Proxy(const V& v) : d_val(v) {} V operator*() const { return d_val; } };/* class CDSet<>::iterator::Proxy */ // Actual postfix increment: returns Proxy with the old value. // Now, an expression like *i++ will return the current *i, and // then advance the orderedIterator. However, don't try to use // Proxy for anything else. const Proxy operator++(int) { Proxy e(*(*this)); ++(*this); return e; } };/* class CDSet<>::iterator */ const_iterator begin() const { return const_iterator(super::begin()); } const_iterator end() const { return const_iterator(super::end()); } const_iterator find(const V& v) const { return const_iterator(super::find(v)); } typedef typename super::key_iterator key_iterator; key_iterator key_begin() const { return super::key_begin(); } key_iterator key_end() const { return super::key_end(); } void insertAtContextLevelZero(const V& v) { return super::insertAtContextLevelZero(v, true); } };/* class CDHashSet */ }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDHASHSET_H */ cvc4-1.5/src/context/cdhashset_forward.h000066400000000000000000000026301313116454100203340ustar00rootroot00000000000000/********************* */ /*! \file cdhashset_forward.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a forward declaration header to declare the CDSet<> ** template ** ** This is a forward declaration header to declare the CDSet<> ** template. It's useful if you want to forward-declare CDSet<> ** without including the full cdset.h header, for example, in a ** public header context. ** ** For CDSet<> in particular, it's difficult to forward-declare it ** yourself, because it has a default template argument. **/ #include "cvc4_public.h" #ifndef __CVC4__CONTEXT__CDSET_FORWARD_H #define __CVC4__CONTEXT__CDSET_FORWARD_H /// \cond internals namespace __gnu_cxx { template struct hash; }/* __gnu_cxx namespace */ namespace CVC4 { namespace context { template > class CDHashSet; }/* CVC4::context namespace */ }/* CVC4 namespace */ /// \endcond #endif /* __CVC4__CONTEXT__CDSET_FORWARD_H */ cvc4-1.5/src/context/cdinsert_hashmap.h000066400000000000000000000271321313116454100201620ustar00rootroot00000000000000/********************* */ /*! \file cdinsert_hashmap.h ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent insert only hashmap built using trail of edits ** ** Context-dependent hashmap that only allows for one insertion per element. ** This can be viewed as a highly restricted version of CDHashMap. ** It is significantly lighter in memory usage than CDHashMap. ** ** See also: ** CDTrailHashMap : A lightweight CD hash map with poor iteration ** characteristics and some quirks in usage. ** CDHashMap : A fully featured CD hash map. (The closest to ) ** ** Notes: ** - To iterate efficiently over the elements use the key_iterators. ** - operator[] is only supported as a const derefence (must succeed). ** - insert(k) must always work. ** - Use insert_safe if you want to check if the element has been inserted ** and only insert if it has not yet been. ** - Does not accept TNodes as keys. ** - Supports insertAtContextLevelZero() if the element is not in the map. **/ #include "cvc4_private.h" #include #include #include #include #include "base/cvc4_assert.h" #include "base/output.h" #include "context/context.h" #include "context/cdinsert_hashmap_forward.h" #include "expr/node.h" #pragma once namespace CVC4 { namespace context { template > class InsertHashMap { private: typedef std::deque KeyVec; /** A list of the keys in the map maintained as a stack. */ KeyVec d_keys; typedef __gnu_cxx::hash_map HashMap; /** The hash_map used for element lookup. */ HashMap d_hashMap; public: /** * An iterator over a list of keys. * Use this to efficiently iterate over the elements. * (See std::deque<>::iterator). */ typedef typename KeyVec::const_iterator key_iterator; /**An iterator over the elements in the hash_map. */ typedef typename HashMap::const_iterator const_iterator; /** * Returns an iterator to the begining of the HashMap. * Acts like a hash_map::const_iterator. */ const_iterator begin() const{ return d_hashMap.begin(); } /** * Returns an iterator to the end of the HashMap. * Acts like a hash_map::const_iterator. */ const_iterator end() const{ return d_hashMap.end(); } /** * Returns an iterator to the Key k of the map. * See hash_map::find() */ const_iterator find(const Key& k) const{ return d_hashMap.find(k); } /** Returns an iterator to the start of the set of keys. */ key_iterator key_begin() const{ return d_keys.begin(); } /** Returns an iterator to the end of the set of keys. */ key_iterator key_end() const{ return d_keys.end(); } /** Returns true if the map is empty. */ bool empty() const { return d_keys.empty(); } /** Returns the number of elements in the map. */ size_t size() const { return d_keys.size(); } /** Returns true if k is a mapped key. */ bool contains(const Key& k) const { return find(k) != end(); } /** * Returns a reference the data mapped by k. * This must succeed. */ const Data& operator[](const Key& k) const { const_iterator ci = find(k); Assert(ci != end()); return (*ci).second; } /** * Inserts an element into the map, and pushes its key to the front * of the stack. The key inserted must be not be currently mapped. */ void push_front(const Key& k, const Data& d){ Assert(!contains(k)); d_hashMap.insert(std::make_pair(k, d)); d_keys.push_front(k); } /** * Inserts an element into the map, and pushes its key onto the * back on the stack. The key inserted must be not be currently mapped. */ void push_back(const Key& k, const Data& d){ Assert(!contains(k)); d_hashMap.insert(std::make_pair(k, d)); d_keys.push_back(k); } /** * Pops the key at the front of the list off and removes its key from the map. */ void pop_front(){ Assert(!empty()); const Key& front = d_keys.front(); d_hashMap.erase(front); Debug("TrailHashMap") <<"TrailHashMap pop_front " << size() << std::endl; d_keys.pop_front(); } /** * Pops the key at the back of the stack off and removes its key from the map. */ void pop_back(){ Assert(!empty()); const Key& back = d_keys.back(); d_hashMap.erase(back); Debug("TrailHashMap") <<"TrailHashMap pop_back " << size() << std::endl; d_keys.pop_back(); } /** * Pops the back of the stack until the size is below s. */ void pop_to_size(size_t s){ while(size() > s){ pop_back(); } } };/* class TrailHashMap<> */ template class CDInsertHashMap : public ContextObj { private: typedef InsertHashMap IHM; /** An InsertHashMap that backs all of the data. */ IHM* d_insertMap; /** For restores, we need to keep track of the previous size. */ size_t d_size; /** * To support insertAtContextLevelZero() and restores, * we have called d_insertMap->d_pushFront(). */ size_t d_pushFronts; /** * Private copy constructor used only by save(). d_insertMap is * not copied: only the base class information and * d_size and d_pushFronts are needed in restore. */ CDInsertHashMap(const CDInsertHashMap& l) : ContextObj(l), d_insertMap(NULL), d_size(l.d_size), d_pushFronts(l.d_pushFronts) { Debug("CDInsertHashMap") << "copy ctor: " << this << " from " << &l << " size " << d_size << std::endl; } CDInsertHashMap& operator=(const CDInsertHashMap&) CVC4_UNDEFINED; /** * Implementation of mandatory ContextObj method save: simply copies * the current size information to a copy using the copy constructor (the * pointer and the allocated size are *not* copied as they are not * restored on a pop). The saved information is allocated using the * ContextMemoryManager. */ ContextObj* save(ContextMemoryManager* pCMM) { ContextObj* data = new(pCMM) CDInsertHashMap(*this); Debug("CDInsertHashMap") << "save " << this << " at level " << this->getContext()->getLevel() << " size at " << this->d_size << " d_list is " << this->d_insertMap << " data:" << data << std::endl; return data; } protected: /** * Implementation of mandatory ContextObj method restore: * restore to the previous size taking into account the number * of new pushFront calls have happened since saving. * The d_insertMap is untouched and d_pushFronts is also kept. */ void restore(ContextObj* data) { Debug("CDInsertHashMap") << "restore " << this << " level " << this->getContext()->getLevel() << " data == " << data << " d_insertMap == " << this->d_insertMap << std::endl; size_t oldSize = ((CDInsertHashMap*)data)->d_size; size_t oldPushFronts = ((CDInsertHashMap*)data)->d_pushFronts; Assert(oldPushFronts <= d_pushFronts); // The size to restore to. size_t restoreSize = oldSize + (d_pushFronts - oldPushFronts); d_insertMap->pop_to_size(restoreSize); d_size = restoreSize; Assert(d_insertMap->size() == d_size); Debug("CDInsertHashMap") << "restore " << this << " level " << this->getContext()->getLevel() << " size back to " << this->d_size << std::endl; } public: /** * Main constructor: d_insertMap starts as an empty map, with the size is 0 */ CDInsertHashMap(Context* context) : ContextObj(context), d_insertMap(new IHM()), d_size(0), d_pushFronts(0){ Assert(d_insertMap->size() == d_size); } /** * Destructor: delete the d_insertMap */ ~CDInsertHashMap() { this->destroy(); delete d_insertMap; } /** An iterator over the elements in the hash_map. */ typedef typename IHM::const_iterator const_iterator; /** * An iterator over a list of keys. * Use this to efficiently iterate over the elements. * (See std::deque<>::iterator). */ typedef typename IHM::key_iterator key_iterator; /** Returns true if the map is empty in the current context. */ bool empty() const{ return d_size == 0; } /** Returns true the size of the map in the current context. */ size_t size() const { return d_size; } /** * Inserts an element into the map. * The key inserted must be not be currently mapped. * This is implemented using d_insertMap.push_back(). */ void insert(const Key& k, const Data& d){ makeCurrent(); ++d_size; d_insertMap->push_back(k, d); Assert(d_insertMap->size() == d_size); } /** * Checks if the key k is mapped already. * If it is, this returns false. * Otherwise it is inserted and this returns true. */ bool insert_safe(const Key& k, const Data& d){ if(contains(k)){ return false; }else{ insert(k,d); return true; } } /** * Version of insert() for CDMap<> that inserts data value d at * context level zero. * * It is an error to insertAtContextLevelZero() * a key that already is in the map. */ void insertAtContextLevelZero(const Key& k, const Data& d){ makeCurrent(); ++d_size; ++d_pushFronts; d_insertMap->push_front(k, d); } /** Returns true if k is a mapped key in the context. */ bool contains(const Key& k) const { return d_insertMap->contains(k); } /** * Returns a reference the data mapped by k. * k must be in the map in this context. */ const Data& operator[](const Key& k) const { return (*d_insertMap)[k]; } /** * Returns a const_iterator to the value_type if k is a mapped key in * the context. */ const_iterator find(const Key& k) const { return d_insertMap->find(k); } /** * Returns an iterator to the begining of the map. * Acts like a hash_map::const_iterator. */ const_iterator begin() const{ return d_insertMap->begin(); } /** * Returns an iterator to the end of the map. * Acts like a hash_map::const_iterator. */ const_iterator end() const{ return d_insertMap->end(); } /** Returns an iterator to the start of the set of keys. */ key_iterator key_begin() const{ return d_insertMap->key_begin(); } /** Returns an iterator to the end of the set of keys. */ key_iterator key_end() const{ return d_insertMap->key_end(); } };/* class CDInsertHashMap<> */ template class CDInsertHashMap : public ContextObj { /* CDInsertHashMap is challenging to get working with TNode. * Consider using CDHashMap instead. * * Explanation: * CDInsertHashMap uses keys for deallocation. * If the key is a TNode and the backing (the hard node reference) * for the key in another data structure removes the key at the same context * the ref count could drop to 0. The key would then not be eligible to be * hashed. Getting the order right with a guarantee is too hard. */ BOOST_STATIC_ASSERT(sizeof(Data) == 0); }; }/* CVC4::context namespace */ }/* CVC4 namespace */ cvc4-1.5/src/context/cdinsert_hashmap_forward.h000066400000000000000000000024741313116454100217100ustar00rootroot00000000000000/********************* */ /*! \file cdinsert_hashmap_forward.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a forward declaration header to declare the CDInsertHashMap<> ** template ** ** This is a forward declaration header to declare the CDInsertHashMap<> ** template. It's useful if you want to forward-declare CDInsertHashMap<> ** without including the full cdinsert_hashmap.h header, for example, in a ** public header context. ** ** For CDInsertHashMap<> in particular, it's difficult to forward-declare it ** yourself, because it has a default template argument. **/ #include "cvc4_public.h" #pragma once namespace __gnu_cxx { template struct hash; }/* __gnu_cxx namespace */ namespace CVC4 { namespace context { template > class CDInsertHashMap; }/* CVC4::context namespace */ }/* CVC4 namespace */ cvc4-1.5/src/context/cdlist.h000066400000000000000000000311511313116454100161240ustar00rootroot00000000000000/********************* */ /*! \file cdlist.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Francois Bobot ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent list class (only supports append) ** ** Context-dependent list class. This list only supports appending ** to the list; on backtrack, the list is simply shortened. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDLIST_H #define __CVC4__CONTEXT__CDLIST_H #include #include #include #include #include #include "base/cvc4_assert.h" #include "context/context.h" #include "context/context_mm.h" #include "context/cdlist_forward.h" namespace CVC4 { namespace context { /** * Generic context-dependent dynamic array. Note that for efficiency, * this implementation makes the following assumptions: * * 1. Over time, objects are only added to the list. Objects are only * removed when a pop restores the list to a previous state. * * 2. T objects can safely be copied using their copy constructor, * operator=, and memcpy. */ template class CDList : public ContextObj { public: /** The value type with which this CDList<> was instantiated. */ typedef T value_type; /** The cleanup type with which this CDList<> was instantiated. */ typedef CleanUpT CleanUp; /** The allocator type with which this CDList<> was instantiated. */ typedef AllocatorT Allocator; protected: /** * d_list is a dynamic array of objects of type T. */ T* d_list; /** * Number of objects in d_list */ size_t d_size; private: static const size_t INITIAL_SIZE = 10; static const size_t GROWTH_FACTOR = 2; /** * Whether to call the destructor when items are popped from the * list. True by default, but can be set to false by setting the * second argument in the constructor to false. */ bool d_callDestructor; /** * Allocated size of d_list. */ size_t d_sizeAlloc; /** * The CleanUp functor. */ CleanUp d_cleanUp; /** * Our allocator. */ Allocator d_allocator; protected: /** * Private copy constructor used only by save(). d_list and * d_sizeAlloc are not copied: only the base class information and * d_size are needed in restore. */ CDList(const CDList& l) : ContextObj(l), d_list(NULL), d_size(l.d_size), d_callDestructor(false), d_sizeAlloc(0), d_cleanUp(l.d_cleanUp), d_allocator(l.d_allocator) { Debug("cdlist") << "copy ctor: " << this << " from " << &l << " size " << d_size << std::endl; } CDList& operator=(const CDList& l) CVC4_UNDEFINED; private: /** * Reallocate the array with more space. * Throws bad_alloc if memory allocation fails. */ void grow() { if(d_list == NULL) { // Allocate an initial list if one does not yet exist d_sizeAlloc = INITIAL_SIZE; Debug("cdlist") << "initial grow of cdlist " << this << " level " << getContext()->getLevel() << " to " << d_sizeAlloc << std::endl; if(d_sizeAlloc > d_allocator.max_size()) { d_sizeAlloc = d_allocator.max_size(); } d_list = d_allocator.allocate(d_sizeAlloc); if(d_list == NULL) { throw std::bad_alloc(); } } else { // Allocate a new array with double the size size_t newSize = GROWTH_FACTOR * d_sizeAlloc; if(newSize > d_allocator.max_size()) { newSize = d_allocator.max_size(); Assert(newSize > d_sizeAlloc, "cannot request larger list due to allocator limits"); } T* newList = d_allocator.allocate(newSize); Debug("cdlist") << "2x grow of cdlist " << this << " level " << getContext()->getLevel() << " to " << newSize << " (from " << d_list << " to " << newList << ")" << std::endl; if(newList == NULL) { throw std::bad_alloc(); } std::memcpy(newList, d_list, sizeof(T) * d_sizeAlloc); d_allocator.deallocate(d_list, d_sizeAlloc); d_list = newList; d_sizeAlloc = newSize; } } /** * Implementation of mandatory ContextObj method save: simply copies * the current size to a copy using the copy constructor (the * pointer and the allocated size are *not* copied as they are not * restored on a pop). The saved information is allocated using the * ContextMemoryManager. */ ContextObj* save(ContextMemoryManager* pCMM) { ContextObj* data = new(pCMM) CDList(*this); Debug("cdlist") << "save " << this << " at level " << this->getContext()->getLevel() << " size at " << this->d_size << " sizeAlloc at " << this->d_sizeAlloc << " d_list is " << this->d_list << " data:" << data << std::endl; return data; } protected: /** * Implementation of mandatory ContextObj method restore: simply * restores the previous size. Note that the list pointer and the * allocated size are not changed. */ void restore(ContextObj* data) { Debug("cdlist") << "restore " << this << " level " << this->getContext()->getLevel() << " data == " << data << " call dtor == " << this->d_callDestructor << " d_list == " << this->d_list << std::endl; truncateList(((CDList*)data)->d_size); Debug("cdlist") << "restore " << this << " level " << this->getContext()->getLevel() << " size back to " << this->d_size << " sizeAlloc at " << this->d_sizeAlloc << std::endl; } /** * Given a size parameter smaller than d_size, truncateList() * removes the elements from the end of the list until d_size equals size. * * WARNING! You should only use this function when you know what you are doing. * This is a primitive operation with strange context dependent behavior! * It is up to the user of the function to ensure that the saved d_size values * at lower context levels are less than or equal to size. */ void truncateList(const size_t size){ Assert(size <= d_size); if(d_callDestructor) { while(d_size != size) { --d_size; d_cleanUp(&d_list[d_size]); d_allocator.destroy(&d_list[d_size]); } } else { d_size = size; } } public: /** * Main constructor: d_list starts as NULL, size is 0 */ CDList(Context* context, bool callDestructor = true, const CleanUp& cleanup = CleanUp(), const Allocator& alloc = Allocator()) : ContextObj(context), d_list(NULL), d_size(0), d_callDestructor(callDestructor), d_sizeAlloc(0), d_cleanUp(cleanup), d_allocator(alloc) { } /** * Destructor: delete the list */ ~CDList() { this->destroy(); if(this->d_callDestructor) { truncateList(0); } this->d_allocator.deallocate(this->d_list, this->d_sizeAlloc); } /** * Return the current size of (i.e. valid number of objects in) the * list. */ size_t size() const { return d_size; } /** * Return true iff there are no valid objects in the list. */ bool empty() const { return d_size == 0; } /** * Add an item to the end of the list. */ void push_back(const T& data) { Debug("cdlist") << "push_back " << this << " " << getContext()->getLevel() << ": make-current, " << "d_list == " << d_list << std::endl; makeCurrent(); Debug("cdlist") << "push_back " << this << " " << getContext()->getLevel() << ": grow? " << d_size << " " << d_sizeAlloc << std::endl; if(d_size == d_sizeAlloc) { Debug("cdlist") << "push_back " << this << " " << getContext()->getLevel() << ": grow!" << std::endl; grow(); } Assert(d_size < d_sizeAlloc); Debug("cdlist") << "push_back " << this << " " << getContext()->getLevel() << ": construct! at " << d_list << "[" << d_size << "] == " << &d_list[d_size] << std::endl; d_allocator.construct(&d_list[d_size], data); Debug("cdlist") << "push_back " << this << " " << getContext()->getLevel() << ": done..." << std::endl; ++d_size; Debug("cdlist") << "push_back " << this << " " << getContext()->getLevel() << ": size now " << d_size << std::endl; } /** * Access to the ith item in the list. */ const T& operator[](size_t i) const { Assert(i < d_size, "index out of bounds in CDList::operator[]"); return d_list[i]; } /** * Returns the most recent item added to the list. */ const T& back() const { Assert(d_size > 0, "CDList::back() called on empty list"); return d_list[d_size - 1]; } /** * Iterator for CDList class. It has to be const because we don't * allow items in the list to be changed. It's a straightforward * wrapper around a pointer. Note that for efficiency, we implement * only prefix increment and decrement. Also note that it's OK to * create an iterator from an empty, uninitialized list, as begin() * and end() will have the same value (NULL). */ class const_iterator { T const* d_it; const_iterator(T const* it) : d_it(it) {} friend class CDList; public: // FIXME we support operator--, but do we satisfy all the // requirements of a bidirectional iterator ? typedef std::input_iterator_tag iterator_category; typedef T value_type; typedef std::ptrdiff_t difference_type; typedef const T* pointer; typedef const T& reference; const_iterator() : d_it(NULL) {} inline bool operator==(const const_iterator& i) const { return d_it == i.d_it; } inline bool operator!=(const const_iterator& i) const { return d_it != i.d_it; } inline const T& operator*() const { return *d_it; } /** Prefix increment */ const_iterator& operator++() { ++d_it; return *this; } /** Prefix decrement */ const_iterator& operator--() { --d_it; return *this; } /** operator+ */ const_iterator operator+(long signed int off) const { return const_iterator(d_it + off); } // Postfix operations on iterators: requires a Proxy object to // hold the intermediate value for dereferencing class Proxy { const T* d_t; public: Proxy(const T& p): d_t(&p) {} T& operator*() { return *d_t; } };/* class CDList<>::const_iterator::Proxy */ /** Postfix increment: returns Proxy with the old value. */ Proxy operator++(int) { Proxy e(*(*this)); ++(*this); return e; } /** Postfix decrement: returns Proxy with the old value. */ Proxy operator--(int) { Proxy e(*(*this)); --(*this); return e; } };/* class CDList<>::const_iterator */ typedef const_iterator iterator; /** * Returns an iterator pointing to the first item in the list. */ const_iterator begin() const { return const_iterator(static_cast(d_list)); } /** * Returns an iterator pointing one past the last item in the list. */ const_iterator end() const { return const_iterator(static_cast(d_list) + d_size); } };/* class CDList<> */ template class CDList > : public ContextObj { /* CDList is incompatible for use with a ContextMemoryAllocator. * Consider using CDChunkList instead. * * Explanation: * If ContextMemoryAllocator is used and d_list grows at a deeper context level * the reallocated will be reallocated in a context memory region that can be * destroyed on pop. To support this, a full copy of d_list would have to be made. * As this is unacceptable for performance in other situations, we do not do * this. */ BOOST_STATIC_ASSERT(sizeof(T) == 0); }; }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDLIST_H */ cvc4-1.5/src/context/cdlist_forward.h000066400000000000000000000036641313116454100176600ustar00rootroot00000000000000/********************* */ /*! \file cdlist_forward.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a forward declaration header to declare the ** CDList<> template ** ** This is a forward declaration header to declare the CDList<> ** template. It's useful if you want to forward-declare CDList<> ** without including the full cdlist.h or cdlist_context_memory.h ** header, for example, in a public header context, or to keep ** compile times low when only a forward declaration is needed. ** ** Note that all specializations of the template should be listed ** here as well, since different specializations are defined in ** different headers (cdlist.h and cdlist_context_memory.h). ** Explicitly declaring both specializations here ensure that if you ** define one, you'll get an error if you didn't include the correct ** header (avoiding different, incompatible instantiations in ** different compilation units). **/ #include "cvc4_public.h" #ifndef __CVC4__CONTEXT__CDLIST_FORWARD_H #define __CVC4__CONTEXT__CDLIST_FORWARD_H #include /// \cond internals namespace __gnu_cxx { template struct hash; }/* __gnu_cxx namespace */ namespace CVC4 { namespace context { template class DefaultCleanUp { public: inline void operator()(T* t) const{} }; template , class Allocator = std::allocator > class CDList; /// \endcond }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDLIST_FORWARD_H */ cvc4-1.5/src/context/cdmaybe.h000066400000000000000000000032121313116454100162430ustar00rootroot00000000000000/********************* */ /*! \file cdmaybe.h ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A context-dependent "maybe" template type ** ** This implements a CDMaybe. ** This has either been set in the context or it has not. ** Template parameter T must have a default constructor and support ** assignment. **/ #include "cvc4_private.h" #pragma once #include "context/cdo.h" #include "context/context.h" namespace CVC4 { namespace context { class CDRaised { private: context::CDO d_flag; public: CDRaised(context::Context* c) : d_flag(c, false) {} bool isRaised() const { return d_flag.get(); } void raise(){ Assert(!isRaised()); d_flag.set(true); } };/* class CDRaised */ template class CDMaybe { private: typedef std::pair BoolTPair; context::CDO d_data; public: CDMaybe(context::Context* c) : d_data(c, std::make_pair(false, T())) {} bool isSet() const { return d_data.get().first; } void set(const T& d){ Assert(!isSet()); d_data.set(std::make_pair(true, d)); } const T& get() const{ Assert(isSet()); return d_data.get().second; } };/* class CDMaybe */ }/* CVC4::context namespace */ }/* CVC4 namespace */ cvc4-1.5/src/context/cdo.h000066400000000000000000000121161313116454100154070ustar00rootroot00000000000000/********************* */ /*! \file cdo.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Francois Bobot ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A context-dependent object. ** ** A context-dependent object. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDO_H #define __CVC4__CONTEXT__CDO_H #include "base/cvc4_assert.h" #include "context/context.h" namespace CVC4 { namespace context { /** * Most basic template for context-dependent objects. Simply makes a copy * (using the copy constructor) of class T when saving, and copies it back * (using operator=) during restore. */ template class CDO : public ContextObj { /** * The data of type T being stored in this context-dependent object. */ T d_data; protected: /** * Copy constructor - it's private to ensure it is only used by save(). * Basic CDO objects, cannot be copied-they have to be unique. */ CDO(const CDO& cdo) : ContextObj(cdo), d_data(cdo.d_data) {} /** * operator= for CDO is private to ensure CDO object is not copied. */ CDO& operator=(const CDO& cdo) CVC4_UNDEFINED; /** * Implementation of mandatory ContextObj method save: simply copies the * current data to a copy using the copy constructor. Memory is allocated * using the ContextMemoryManager. */ virtual ContextObj* save(ContextMemoryManager* pCMM) { Debug("context") << "save cdo " << this; ContextObj* p = new(pCMM) CDO(*this); Debug("context") << " to " << p << std::endl; return p; } /** * Implementation of mandatory ContextObj method restore: simply copies the * saved data back from the saved copy using operator= for T. */ virtual void restore(ContextObj* pContextObj) { //Debug("context") << "restore cdo " << this; CDO* p = static_cast*>(pContextObj); d_data = p->d_data; //Debug("context") << " to " << get() << std::endl; // Explicitly call destructor as it will not otherwise get called. p->d_data.~T(); } public: /** * Main constructor - uses default constructor for T to create the initial * value of d_data. */ CDO(Context* context) : ContextObj(context), d_data(T()) { } /** * Main constructor - uses default constructor for T to create the * initial value of d_data. * * This version takes an argument that specifies whether this CDO<> * was itself allocated in context memory. If it was, it is linked * with the current scope rather than scope 0. * * WARNING: Read the notes in src/context/context.h on "Gotchas when * allocating contextual objects with non-standard allocators." */ CDO(bool allocatedInCMM, Context* context) : ContextObj(allocatedInCMM, context), d_data(T()) { } /** * Constructor from object of type T. Creates a ContextObj and sets the data * to the given data value. Note that this value is only valid in the * current Scope. If the Scope is popped, the value will revert to whatever * is assigned by the default constructor for T */ CDO(Context* context, const T& data) : ContextObj(context), d_data(T()) { makeCurrent(); d_data = data; } /** * Constructor from object of type T. Creates a ContextObj and sets the data * to the given data value. Note that this value is only valid in the * current Scope. If the Scope is popped, the value will revert to whatever * is assigned by the default constructor for T. * * This version takes an argument that specifies whether this CDO<> * was itself allocated in context memory. If it was, it is linked * with the current scope rather than scope 0. * * WARNING: Read the notes in src/context/context.h on "Gotchas when * allocating contextual objects with non-standard allocators." */ CDO(bool allocatedInCMM, Context* context, const T& data) : ContextObj(allocatedInCMM, context), d_data(T()) { makeCurrent(); d_data = data; } /** * Destructor - call destroy() method */ ~CDO() { destroy(); } /** * Set the data in the CDO. First call makeCurrent. */ void set(const T& data) { makeCurrent(); d_data = data; } /** * Get the current data from the CDO. Read-only. */ const T& get() const { return d_data; } /** * For convenience, define operator T() to be the same as get(). */ operator T() { return get(); } /** * For convenience, define operator const T() to be the same as get(). */ operator const T() const { return get(); } /** * For convenience, define operator= that takes an object of type T. */ CDO& operator=(const T& data) { set(data); return *this; } };/* class CDO */ }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDO_H */ cvc4-1.5/src/context/cdqueue.h000066400000000000000000000121771313116454100163040ustar00rootroot00000000000000/********************* */ /*! \file cdqueue.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng, Francois Bobot ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent queue class ** ** Context-dependent First-In-First-Out queue class. ** This implementation may discard elements which are enqueued and dequeued ** at the same context level. ** ** The implementation is based on a CDList with one additional size_t ** for tracking the next element to dequeue from the list and additional ** size_t for tracking the previous size of the list. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDQUEUE_H #define __CVC4__CONTEXT__CDQUEUE_H #include "context/context.h" #include "context/cdlist.h" namespace CVC4 { namespace context { template , class Allocator = std::allocator > class CDQueue; /** We don't define a template with Allocator for the first implementation */ template class CDQueue : public CDList { private: typedef CDList ParentType; protected: /** Points to the next element in the current context to dequeue. */ size_t d_iter; /** Points to the size at the last save. */ size_t d_lastsave; /** * Private copy constructor used only by save(). */ CDQueue(const CDQueue& l): ParentType(l), d_iter(l.d_iter), d_lastsave(l.d_lastsave) {} /** Implementation of mandatory ContextObj method save: * We assume that the base class do the job inside their copy constructor. */ ContextObj* save(ContextMemoryManager* pCMM) { ContextObj* data = new(pCMM) CDQueue(*this); // We save the d_size in d_lastsave and we should never destruct below this // indices before the corresponding restore. d_lastsave = ParentType::d_size; Debug("cdqueue") << "save " << this << " at level " << this->getContext()->getLevel() << " size at " << this->d_size << " iter at " << this->d_iter << " lastsave at " << this->d_lastsave << " d_list is " << this->d_list << " data:" << data << std::endl; return data; } /** * Implementation of mandatory ContextObj method restore: simply * restores the previous size, iter and lastsave indices. Note that * the list pointer and the allocated size are not changed. */ void restore(ContextObj* data) { CDQueue* qdata = static_cast*>(data); d_iter = qdata->d_iter; d_lastsave = qdata->d_lastsave; ParentType::restore(data); } public: /** Creates a new CDQueue associated with the current context. */ CDQueue(Context* context, bool callDestructor = true, const CleanUp& cleanup = CleanUp(), const Allocator& alloc = Allocator()) : ParentType(context, callDestructor, cleanup, alloc), d_iter(0), d_lastsave(0) {} /** Returns true if the queue is empty in the current context. */ bool empty() const{ Assert(d_iter <= ParentType::d_size); return d_iter == ParentType::d_size; } /** Returns the number of elements that have not been dequeued in the context. */ size_t size() const{ return ParentType::d_size - d_iter; } /** Enqueues an element in the current context. */ void push(const T& data){ ParentType::push_back(data); } /** * Delete next element. The destructor of this object will be * called eventually but not necessarily during the call of this * function. */ void pop(){ Assert(!empty(), "Attempting to pop from an empty queue."); ParentType::makeCurrent(); d_iter = d_iter + 1; if (empty() && d_lastsave != ParentType::d_size) { // Some elements have been enqueued and dequeued in the same // context and now the queue is empty we can destruct them. ParentType::truncateList(d_lastsave); Assert(ParentType::d_size == d_lastsave); d_iter = d_lastsave; } } /** Returns a reference to the next element on the queue. */ const T& front() const{ Assert(!empty(), "No front in an empty queue."); return ParentType::d_list[d_iter]; } /** * Returns the most recent item added to the queue. */ const T& back() const { Assert(!empty(), "CDQueue::back() called on empty list"); return ParentType::d_list[ParentType::d_size - 1]; } typedef typename ParentType::const_iterator const_iterator; const_iterator begin() const { return ParentType::begin() + d_iter; } const_iterator end() const { return ParentType::end(); } };/* class CDQueue<> */ }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDQUEUE_H */ cvc4-1.5/src/context/cdtrail_hashmap.h000066400000000000000000000425541313116454100177760ustar00rootroot00000000000000/********************* */ /*! \file cdtrail_hashmap.h ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent hashmap built using trail of elements ** ** Context-dependent hashmap that explicitly keeps track of its edit history. ** This is similar in functionality to CDHashMap with fewer capabilites and ** slight changes in the interface. It has the advantage of being lighter in ** memory usage. ** ** See also: ** CDInsertHashMap : An "insert-once" CD hash map. ** CDHashMap : A fully featured CD hash map. (The closest to ) ** ** Notes: ** - To iterate efficiently over the elements use the key_iterators. ** - operator[] is only supported as a const derefence (must succeed). ** - Insertions to the map are done with respect to a context. ** - Insertions can be done in two manors either with insert() or ** insert_no_overwrite(). ** - insert(k,d) inserts the key data pair into the hashtable and returns a ** false if it overwrote the previous value. ** - insert_no_overwrite(k,d) inserts key data pair into the hashtable only ** if the value is not already there. It returns true, if an element was ** added. This conditionally extends the trail length if it returns true. ** - inserts are compacting. If there is another insert to the same key ** at the same context, the memory is reused. ** - Iterating over const_iterators has amortized time proportional to ** O(trail length). (If this needs to be improved, please bug Tim.) ** - contains() and operator[] are slightly faster than using stl style ** iterator comparisons: find(), end(), etc. **/ #include "cvc4_private.h" #pragma once #include #include #include #include #include "base/cvc4_assert.h" #include "base/output.h" #include "context/context.h" #include "context/cdtrail_hashmap_forward.h" #include "expr/node.h" namespace CVC4 { namespace context { template > class TrailHashMap { public: /** A pair of Key and Data that mirrors hash_map::value_type. */ typedef std::pair value_type; private: /** The trail information from an insert. */ struct KDT { /** The Key Data pair. */ value_type d_kd; /** * The previous trail entry with the same key. * On a pop, this is the element to revert to. * This value is a self loop if there is no previous entry. */ size_t d_prevKey; /** The whether the trail element is current. */ bool d_current; KDT(const Key& key, const Data& data, size_t prev, bool cur = true): d_kd(std::make_pair(key, data)), d_prevKey(prev), d_current(cur){ } KDT(){} }; typedef std::deque KDTVec; typedef typename KDTVec::const_iterator KDTVec_const_iterator; /** The trail of elements. */ KDTVec d_kdts; typedef __gnu_cxx::hash_map PositionMap; typedef typename PositionMap::iterator PM_iterator; typedef typename PositionMap::const_iterator PM_const_iterator; /** A map of keys to their positions in the trail. */ PositionMap d_posMap; /** The number of unique keys in the map. */ size_t d_uniqueKeys; /** Internal utility class. NonConstant find on the position map.*/ inline PM_iterator ncfind(const Key& k) { return d_posMap.find(k); } /** Internal utility class. Position Map Find.*/ inline PM_const_iterator pmfind(const Key& k) const{ return d_posMap.find(k); } /** Internal utility class. Position Map End.*/ inline PM_const_iterator pmend() const{ return d_posMap.end(); } /** This is true if the previous entry in the trail points at itself.*/ inline bool selfLoop(size_t pos, const KDT& kdt) const { return pos == kdt.d_prevKey; } public: /** * Constant iterator for TrailHashMap. * Only supports forward iteration. * This always points at the end or a current element in the trail. * This is done by iterating over the trail. */ class const_iterator { private: /** A vector iterator. */ KDTVec_const_iterator d_it; /** A pointer to the end of the vector.*/ KDTVec_const_iterator d_end; /** Move the iterator to the end or the next current element.*/ void findCurrent(){ while(d_it != d_end && !(*d_it).d_current){ ++d_it; } } public: /** Constructs an iterator for a TrailHashMap. */ const_iterator(KDTVec_const_iterator it, KDTVec_const_iterator end) : d_it(it), d_end(end){ findCurrent(); } /** Copy constructor for an iterator for a TrailHashMap. */ const_iterator(const const_iterator& other) : d_it(other.d_it), d_end(other.d_end){ // Do not need to findCurrent() } /** Returns true if the iterators are the same. */ inline bool operator==(const const_iterator& other) const { return d_it == other.d_it; } /** Returns true if the iterators are the same. */ inline bool operator!=(const const_iterator& other) const { return d_it != other.d_it; } /** Returns a pair. */ inline const value_type& operator*() const { return (*d_it).d_kd; } /** Prefix increment */ const_iterator& operator++() { ++d_it; findCurrent(); return *this; } }; /** Returns a beginning iterator.*/ inline const_iterator begin() const{ return const_iterator(d_kdts.begin(), d_kdts.end()); } /** Returns an end iterator.*/ inline const_iterator end() const{ return const_iterator(d_kdts.end(), d_kdts.end()); } /** Returns true if the trail is empty.*/ inline bool empty() const { return d_kdts.empty(); } /** Returns the size of the trail.*/ inline size_t trailSize() const { return d_kdts.size(); } /** Returns the number of unique keys in the map.*/ inline size_t uniqueKeys() const { return d_uniqueKeys; } /** Returns true if the key is in the map.*/ inline bool contains(const Key& k) const { return pmfind(k) != pmend(); } /** * Returns a NON const reference to an element in the Map. * k must be a key in the Map. * DO NOT USE THIS UNLESS YOU ARE CONFIDENT THE CHANGES MAKE SENSE. */ Data& lookup(const Key& k){ Assert(contains(k)); PM_iterator ci = ncfind(k); KDT& kdt = d_kdts[(*ci).second]; return kdt.d_kd.second; } /** * Returns a const reference to an element mapped by a Key k. * k must be a key in the Map. */ const Data& operator[](const Key& k) const { PM_const_iterator pci = pmfind(k); Assert(pci != pmend()); return d_kdts[(*pci).second].d_kd.second; } /** * If the key k is in the map, this returns a const_iterator pointing at this * element. Otherwise, this returns end(). */ const_iterator find(const Key& k) const { PM_const_iterator pci = pmfind(k); if(pci == pmend()){ return end(); }else{ size_t pos = (*pci).second; return const_iterator(d_kdts.begin() + pos, d_kdts.end()); } } /** * Similar to contains, but includes a notion of trail position. * Returns if contains(k) and the current position of k * in the map is greater than or equal to pos. * Returns if it contains(k) but not the previous condition. * Returns if it does not contains(k). */ std::pair hasAfter(const Key& k, size_t pos) { PM_iterator it = ncfind(k); if(it != d_posMap.end()){ return std::make_pair(true, (*it).second >= pos ); } return std::make_pair(false, false); } /** * Inserts an element unconditionally. * Always increases the trail size. * Returns true if the key count increased. */ bool push_back(const Key& k, const Data& d){ std::pair res = compacting_push_back(k, d, trailSize()); return res.first; } /** * This inserts an element into the trail. * This insert can reuse the same trail element if the postion of the element * is >= threshold. * * Return values: * If pair res = compacting_push_back(..), * then res.first is true if this is a new unique key, and * res.second is true if the trail length increased. * */ std::pair compacting_push_back(const Key& k, const Data& d, size_t threshold){ size_t backPos = d_kdts.size(); std::pair res = d_posMap.insert(std::make_pair(k, backPos)); if(!res.second){ size_t& prevPosInPM = (*res.first).second; Assert(d_kdts[prevPosInPM].d_current); if(prevPosInPM < threshold){ d_kdts.push_back(KDT(k,d, prevPosInPM)); d_kdts[prevPosInPM].d_current = false; prevPosInPM = backPos; return std::make_pair(false, true); }else{ d_kdts[prevPosInPM].d_kd.second = d; return std::make_pair(false, false); } }else{ d_kdts.push_back(KDT(k,d, backPos)); ++d_uniqueKeys; return std::make_pair(true, true); } } /** * Inserts an element if the key is not already in the map. * Returns true if the element was inserted. */ bool insert_no_overwrite(const Key& k, const Data& d){ size_t backPos = d_kdts.size(); std::pair res = d_posMap.insert(std::make_pair(k, backPos)); if(res.second){ d_kdts.push_back(KDT(k,d, backPos)); ++d_uniqueKeys; } Debug("TrailHashMap") <<"TrailHashMap insert" << k << " d " << d << " " << backPos << std::endl; return res.second; } /** Pops the element at the back of the trail. */ void pop_back(){ Assert(!empty()); const KDT& back = d_kdts.back(); const Key& k = back.d_kd.first; if(selfLoop(trailSize()-1, back)){ d_posMap.erase(k); --d_uniqueKeys; Debug("TrailHashMap") <<"TrailHashMap pop_back erase " << trailSize() <<" " << std::endl; }else{ Debug("TrailHashMap") <<"TrailHashMap reset " << trailSize() <<" " << " " << back.d_prevKey << std::endl; d_posMap[k] = back.d_prevKey; d_kdts[back.d_prevKey].d_current = true; } d_kdts.pop_back(); } /** Pops the element at the back of the trail until the trailSize is <= s. */ void pop_to_size(size_t s){ while(trailSize() > s){ pop_back(); } } };/* class TrailHashMap<> */ template class CDTrailHashMap : public ContextObj { private: /** A short name for the templatized TrailMap that backs the CDTrailMap. */ typedef TrailHashMap THM; /** The trail map that backs the CDTrailMap. */ THM* d_trailMap; public: /** Iterator for the CDTrailHashMap. */ typedef typename THM::const_iterator const_iterator; /** Return value of operator* on a const_iterator (pair).*/ typedef typename THM::value_type value_type; private: /** * The length of the trail in the current context. * This is used to support reverting. */ size_t d_trailSize; /** * The length of the trail immediately after the previous makeCurrent(). * This is used to support compacting inserts. */ size_t d_prevTrailSize; /** * Private copy constructor used only by save(). d_trailMap is not copied: * only the base class information, d_trailSize, and d_prevTrailSize * are needed in restore. */ CDTrailHashMap(const CDTrailHashMap& l) : ContextObj(l), d_trailMap(NULL), d_trailSize(l.d_trailSize), d_prevTrailSize(l.d_prevTrailSize){ Debug("CDTrailHashMap") << "copy ctor: " << this << " from " << &l << " size " << d_trailSize << std::endl; } /** * Implementation of mandatory ContextObj method save: simply copies * the current sizes to a copy using the copy constructor, * The saved information is allocated using the ContextMemoryManager. */ ContextObj* save(ContextMemoryManager* pCMM) { ContextObj* data = new(pCMM) CDTrailHashMap(*this); Debug("CDTrailHashMap") << "save " << this << " at level " << this->getContext()->getLevel() << " size at " << this->d_trailSize << " d_list is " << this->d_trailMap << " data:" << data << std::endl; return data; } protected: /** * Implementation of mandatory ContextObj method restore: simply * restores the previous size. Note that the list pointer and the * allocated size are not changed. */ void restore(ContextObj* data) { Debug("CDTrailHashMap") << "restore " << this << " level " << this->getContext()->getLevel() << " data == " << data << " d_trailMap == " << this->d_trailMap << std::endl; size_t oldSize = ((CDTrailHashMap*)data)->d_trailSize; d_trailMap->pop_to_size(oldSize); d_trailSize = oldSize; Assert(d_trailMap->trailSize() == d_trailSize); d_prevTrailSize = ((CDTrailHashMap*)data)->d_prevTrailSize; Debug("CDTrailHashMap") << "restore " << this << " level " << this->getContext()->getLevel() << " size back to " << this->d_trailSize << std::endl; } /** * We need to save the d_trailSize immediately after a successful makeCurrent. * So this version needs to be used everywhere instead of maekCurrent() * internally. */ void internalMakeCurrent () { if(!isCurrent()){ makeCurrent(); d_prevTrailSize = d_trailSize; } } public: /** * Main constructor: d_trailMap starts as an empty map, with the sizes are 0 */ CDTrailHashMap(Context* context) : ContextObj(context), d_trailMap(new THM()), d_trailSize(0), d_prevTrailSize(0){ Assert(d_trailMap->trailSize() == d_trailSize); } /** * Destructor: delete the map */ ~CDTrailHashMap() { this->destroy(); delete d_trailMap; } /** Returns true if the map is empty in the current context. */ bool empty() const{ return d_trailSize == 0; } /** Returns true the size of the map in the current context. */ size_t size() const { return d_trailMap->uniqueKeys(); } /** * Inserts an element into the map. * This always succeeds. * Returns true if the key is new. */ bool insert(const Key& k, const Data& d){ internalMakeCurrent(); std::pair res = d_trailMap->compacting_push_back(k, d, d_prevTrailSize); if(res.second){ ++d_trailSize; } Assert(d_trailMap->trailSize() == d_trailSize); return res.first; } /** * Inserts an element into the map if the key is not already there. * This has no side effects if the insert does not happen. * Returns true if the element was inserted. */ bool insert_no_overwrite(const Key& k, const Data& d){ bool res = d_trailMap->insert_no_overwrite(k, d); if(res){ internalMakeCurrent(); ++d_trailSize; } Assert(d_trailMap->trailSize() == d_trailSize); return res; } /** Returns true if k is a mapped key in the context. */ bool contains(const Key& k) const { return d_trailMap->contains(k); } /** * Returns a reference the data mapped by k. * k must be in the map in this context. */ const Data& operator[](const Key& k) const { return (*d_trailMap)[k]; } /* // While the following code "works", I wonder if it is not better to disable it? // Non-const operator[] has strange semantics for a context-dependent // data structure. Data& operator[](const Key& k) { internalMakeCurrent(); std::pair res = d_trailMap->hasAfter(k, d_prevTrailSize); if(!res.first){ std::pair res = d_trailMap->compacting_push_back(k, Data(), d_prevTrailSize); if(res.second){ ++d_trailSize; } }else if(!res.second){ std::pair res = d_trailMap->compacting_push_back(k, (*d_trailMap)[k], d_prevTrailSize); if(res.second){ ++d_trailSize; } } return d_trailMap->lookup(k); } */ /** * Returns a const_iterator to the value_type if k is a mapped key in * the context. */ const_iterator find(const Key& k) const { return d_trailMap->find(k); } /** Returns an iterator to the beginning of the map. */ const_iterator begin() const{ return d_trailMap->begin(); } /** Returns an iterator to the end of the map. */ const_iterator end() const{ return d_trailMap->end(); } };/* class CDTrailHashMap<> */ template class CDTrailHashMap : public ContextObj { /* CDTrailHashMap is challenging to get working with TNode. * Consider using CDHashMap instead. * * Explanation: * CDTrailHashMap uses keys during deallocation. * If the key is a TNode and the backing (the hard node reference) * for the key in another data structure removes the key at the same context * the ref count could drop to 0. The key would then not be eligible to be * hashed. Getting the order right with a guarantee is too hard. */ BOOST_STATIC_ASSERT(sizeof(Data) == 0); }; }/* CVC4::context namespace */ }/* CVC4 namespace */ cvc4-1.5/src/context/cdtrail_hashmap_forward.h000066400000000000000000000024661313116454100215200ustar00rootroot00000000000000/********************* */ /*! \file cdtrail_hashmap_forward.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a forward declaration header to declare the ** CDTrailHashMap<> template ** ** This is a forward declaration header to declare the CDTrailHashMap<> ** template. It's useful if you want to forward-declare CDTrailHashMap<> ** without including the full cdtrail_hash_map.h header, for example, in a ** public header context. ** ** For CDTrailHashMap<> in particular, it's difficult to forward-declare it ** yourself, because it has a default template argument. **/ #include "cvc4_public.h" #pragma once namespace __gnu_cxx { template struct hash; }/* __gnu_cxx namespace */ namespace CVC4 { namespace context { template > class CDTrailHashMap; }/* CVC4::context namespace */ }/* CVC4 namespace */ cvc4-1.5/src/context/cdtrail_queue.h000066400000000000000000000044451313116454100174760ustar00rootroot00000000000000/********************* */ /*! \file cdtrail_queue.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context-dependent queue class with an explicit trail of elements ** ** Context-dependent First-In-First-Out queue class. ** The implementation is based on a combination of CDList and a CDO ** for tracking the next element to dequeue from the list. ** The implementation is currently not full featured. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDTRAIL_QUEUE_H #define __CVC4__CONTEXT__CDTRAIL_QUEUE_H #include "context/context.h" #include "context/cdlist.h" namespace CVC4 { namespace context { template class CDTrailQueue { private: /** List of elements in the queue. */ CDList d_list; /** Points to the next element in the current context to dequeue. */ CDO d_iter; public: /** Creates a new CDTrailQueue associated with the current context. */ CDTrailQueue(Context* context) : d_list(context), d_iter(context, 0) {} /** Returns true if the queue is empty in the current context. */ bool empty() const{ return d_iter >= d_list.size(); } /** * Enqueues an element in the current context. * Returns its index in the queue. */ size_t enqueue(const T& data){ size_t res = d_list.size(); d_list.push_back(data); return res; } size_t frontIndex() const{ return d_iter; } const T& front() const{ return d_list[frontIndex()]; } /** Moves the iterator for the queue forward. */ void dequeue(){ Assert(!empty(), "Attempting to queue from an empty queue."); d_iter = d_iter + 1; } const T& operator[](size_t index) const{ Assert(index < d_list.size()); return d_list[index]; } size_t size() const{ return d_list.size(); } };/* class CDTrailQueue<> */ }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDTRAIL_QUEUE_H */ cvc4-1.5/src/context/cdvector.h000066400000000000000000000100621313116454100164510ustar00rootroot00000000000000/********************* */ /*! \file cdvector.h ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CDVECTOR_H #define __CVC4__CONTEXT__CDVECTOR_H #include #include "base/cvc4_assert.h" #include "context/context.h" #include "context/cdlist.h" namespace CVC4 { namespace context { /** * Generic context-dependent dynamic vector. * This is quite different than CDList. * It provides the ability to destructively update the i'th item. * * The back of the vector may only be popped if there have been no updates to it * at this context level. */ template class CDVector { private: static const int ImpossibleLevel = -1; struct UpdatableElement { public: T d_data; int d_contextLevelOfLastUpdate; UpdatableElement(const T& data) : d_data(data), d_contextLevelOfLastUpdate(ImpossibleLevel) { } };/* struct CDVector::UpdatableElement */ struct HistoryElement { public: UpdatableElement d_cached; size_t d_index; HistoryElement(const UpdatableElement& cache, size_t index) : d_cached(cache), d_index(index) { } };/* struct CDVector::HistoryElement */ typedef std::vector< UpdatableElement > CurrentVector; CurrentVector d_current; class HistoryListCleanUp{ private: CurrentVector& d_current; public: HistoryListCleanUp(CurrentVector& current) : d_current(current) {} void operator()(HistoryElement* back){ d_current[back->d_index] = back->d_cached; } };/* class CDVector::HistoryListCleanUp */ typedef CDList< HistoryElement, HistoryListCleanUp > HistoryVector; HistoryVector d_history; Context* d_context; // no copy or assignment CDVector(const CDVector&) CVC4_UNDEFINED; CDVector& operator=(const CDVector&) CVC4_UNDEFINED; public: CDVector(Context* c) : d_current(), d_history(c, true, HistoryListCleanUp(d_current)), d_context(c) {} size_t size() const { return d_current.size(); } /** * Return true iff there are no valid objects in the list. */ bool empty() const { return d_current.empty(); } /** * Add an item to the end of the list. * Assigns its state at level 0 to be equal to data. */ void push_back(const T& data) { d_current.push_back(UpdatableElement(data)); } /** * Access to the ith item in the list. */ const T& operator[](size_t i) const { return get(i); } const T& get(size_t i) const { Assert(i < size(), "index out of bounds in CDVector::get()"); //makeConsistent(); return d_current[i].d_data; } void set(size_t index, const T& data) { Assert(index < size(), "index out of bounds in CDVector::set()"); //makeConsistent(); if(d_current[index].d_contextLevelOfLastUpdate == d_context->getLevel()) { d_current[index].d_data = data; }else{ d_history.push_back(HistoryElement(d_current[index], index)); d_current[index].d_data = data; d_current[index].d_contextLevelOfLastUpdate = d_context->getLevel(); } } bool hasUpdates(size_t index) const { Assert(index < size(), "index out of bounds in CDVector::hasUpdates()"); return d_current[index].d_contextLevelOfLastUpdate == ImpossibleLevel; } void pop_back() { Assert(!empty(), "pop_back() on an empty CDVector"); Assert(!hasUpdates(size() - 1), "popping an element with updates."); d_current.pop_back(); } };/* class CDVector */ }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CDVECTOR_H */ cvc4-1.5/src/context/context.cpp000066400000000000000000000255041313116454100166660ustar00rootroot00000000000000/********************* */ /*! \file context.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Clark Barrett, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Implementation of base context operations. ** ** Implementation of base context operations. **/ #include #include #include "base/cvc4_assert.h" #include "context/context.h" namespace CVC4 { namespace context { Context::Context() : d_pCNOpre(NULL), d_pCNOpost(NULL) { // Create new memory manager d_pCMM = new ContextMemoryManager(); // Create initial Scope d_scopeList.push_back(new(d_pCMM) Scope(this, d_pCMM, 0)); } Context::~Context() { // Delete all Scopes popto(0); // Delete the memory manager delete d_pCMM; // Clear ContextNotifyObj lists so there are no dangling pointers ContextNotifyObj* pCNO; while(d_pCNOpre != NULL) { pCNO = d_pCNOpre; pCNO->d_ppCNOprev = NULL; d_pCNOpre = pCNO->d_pCNOnext; pCNO->d_pCNOnext = NULL; } while(d_pCNOpost != NULL) { pCNO = d_pCNOpost; pCNO->d_ppCNOprev = NULL; d_pCNOpost = pCNO->d_pCNOnext; pCNO->d_pCNOnext = NULL; } } void Context::push() { Trace("pushpop") << std::string(2 * getLevel(), ' ') << "Push [to " << getLevel() + 1 << "] { " << this << std::endl; // Create a new memory region d_pCMM->push(); // Create a new top Scope d_scopeList.push_back(new(d_pCMM) Scope(this, d_pCMM, getLevel()+1)); } void Context::pop() { Assert(getLevel() > 0, "Cannot pop below level 0"); // Notify the (pre-pop) ContextNotifyObj objects ContextNotifyObj* pCNO = d_pCNOpre; while(pCNO != NULL) { // pre-store the "next" pointer in case pCNO deletes itself on notify() ContextNotifyObj* next = pCNO->d_pCNOnext; pCNO->contextNotifyPop(); pCNO = next; } // Grab the top Scope Scope* pScope = d_scopeList.back(); // Restore the previous Scope d_scopeList.pop_back(); // Restore all objects in the top Scope delete pScope; // Pop the memory region d_pCMM->pop(); // Notify the (post-pop) ContextNotifyObj objects pCNO = d_pCNOpost; while(pCNO != NULL) { // pre-store the "next" pointer in case pCNO deletes itself on notify() ContextNotifyObj* next = pCNO->d_pCNOnext; pCNO->contextNotifyPop(); pCNO = next; } Trace("pushpop") << std::string(2 * getLevel(), ' ') << "} Pop [to " << getLevel() << "] " << this << std::endl; } void Context::popto(int toLevel) { // Pop scopes until there are none left or toLevel is reached if(toLevel < 0) toLevel = 0; while(toLevel < getLevel()) pop(); } void Context::addNotifyObjPre(ContextNotifyObj* pCNO) { // Insert pCNO at *front* of list if(d_pCNOpre != NULL) d_pCNOpre->prev() = &(pCNO->next()); pCNO->next() = d_pCNOpre; pCNO->prev() = &d_pCNOpre; d_pCNOpre = pCNO; } void Context::addNotifyObjPost(ContextNotifyObj* pCNO) { // Insert pCNO at *front* of list if(d_pCNOpost != NULL) d_pCNOpost->prev() = &(pCNO->next()); pCNO->next() = d_pCNOpost; pCNO->prev() = &d_pCNOpost; d_pCNOpost = pCNO; } void ContextObj::update() throw(AssertionException) { Debug("context") << "before update(" << this << "):" << std::endl << "context is " << getContext() << std::endl << *getContext() << std::endl; // Call save() to save the information in the current object ContextObj* pContextObjSaved = save(d_pScope->getCMM()); Debug("context") << "in update(" << this << ") with restore " << pContextObjSaved << ": waypoint 1" << std::endl << *getContext() << std::endl; // Check that base class data was saved Assert( ( pContextObjSaved->d_pContextObjNext == d_pContextObjNext && pContextObjSaved->d_ppContextObjPrev == d_ppContextObjPrev && pContextObjSaved->d_pContextObjRestore == d_pContextObjRestore && pContextObjSaved->d_pScope == d_pScope ), "save() did not properly copy information in base class" ); // Link the "saved" object in place of this ContextObj in the scope // we're moving it FROM. Debug("context") << "in update(" << this << "): next() == " << next() << std::endl; if(next() != NULL) { Debug("context") << "in update(" << this << "): next()->prev() == " << next()->prev() << std::endl; next()->prev() = &pContextObjSaved->next(); Debug("context") << "in update(" << this << "): next()->prev() is now " << next()->prev() << std::endl; } Debug("context") << "in update(" << this << "): prev() == " << prev() << std::endl; Debug("context") << "in update(" << this << "): *prev() == " << *prev() << std::endl; *prev() = pContextObjSaved; Debug("context") << "in update(" << this << "): *prev() is now " << *prev() << std::endl; Debug("context") << "in update(" << this << ") with restore " << pContextObjSaved << ": waypoint 3" << std::endl << *getContext() << std::endl; // Update Scope pointer to current top Scope d_pScope = d_pScope->getContext()->getTopScope(); // Store the saved copy in the restore pointer d_pContextObjRestore = pContextObjSaved; // Insert object into the list of objects that need to be restored when this // Scope is popped. d_pScope->addToChain(this); Debug("context") << "after update(" << this << ") with restore " << pContextObjSaved << ":" << std::endl << *getContext() << std::endl; } ContextObj* ContextObj::restoreAndContinue() throw(AssertionException) { // Variable to hold next object in list ContextObj* pContextObjNext; // Check the restore pointer. If NULL, this must be the bottom Scope if(d_pContextObjRestore == NULL) { // might not be bottom scope, since objects allocated in context // memory don't get linked to scope 0 // // Assert(d_pScope == d_pScope->getContext()->getBottomScope(), // "Expected bottom scope"); Debug("context") << "NULL restore object! " << this << std::endl; pContextObjNext = d_pContextObjNext; // Nothing else to do } else { // Call restore to update the subclass data restore(d_pContextObjRestore); // Remember the next object in the list pContextObjNext = d_pContextObjNext; // Restore the base class data d_pScope = d_pContextObjRestore->d_pScope; next() = d_pContextObjRestore->d_pContextObjNext; prev() = d_pContextObjRestore->d_ppContextObjPrev; d_pContextObjRestore = d_pContextObjRestore->d_pContextObjRestore; // Re-link this ContextObj to the list in this scope if(next() != NULL) { next()->prev() = &next(); } *prev() = this; } // Return the next object in the list return pContextObjNext; } void ContextObj::destroy() throw(AssertionException) { /* Context can be big and complicated, so we only want to process this output * if we're really going to use it. (Same goes below.) */ Debug("context") << "before destroy " << this << " (level " << getLevel() << "):" << std::endl << *getContext() << std::endl; for(;;) { // If valgrind reports invalid writes on the next few lines, // here's a hint: make sure all classes derived from ContextObj in // the system properly call destroy() in their destructors. // That's needed to maintain this linked list properly. if(next() != NULL) { next()->prev() = prev(); } *prev() = next(); if(d_pContextObjRestore == NULL) { break; } Debug("context") << "in destroy " << this << ", restore object is " << d_pContextObjRestore << " at level " << d_pContextObjRestore->getLevel() << ":" << std::endl << *getContext() << std::endl; restoreAndContinue(); } Debug("context") << "after destroy " << this << ":" << std::endl << *getContext() << std::endl; } ContextObj::ContextObj(Context* pContext) : d_pScope(NULL), d_pContextObjRestore(NULL), d_pContextObjNext(NULL), d_ppContextObjPrev(NULL) { Assert(pContext != NULL, "NULL context pointer"); Debug("context") << "create new ContextObj(" << this << " inCMM=false)" << std::endl; d_pScope = pContext->getBottomScope(); d_pScope->addToChain(this); } ContextObj::ContextObj(bool allocatedInCMM, Context* pContext) : d_pScope(NULL), d_pContextObjRestore(NULL), d_pContextObjNext(NULL), d_ppContextObjPrev(NULL) { Assert(pContext != NULL, "NULL context pointer"); Debug("context") << "create new ContextObj(" << this << " inCMM=" << allocatedInCMM << ")" << std::endl; if(allocatedInCMM) { d_pScope = pContext->getTopScope(); } else { d_pScope = pContext->getBottomScope(); } d_pScope->addToChain(this); } ContextNotifyObj::ContextNotifyObj(Context* pContext, bool preNotify) { if(preNotify) { pContext->addNotifyObjPre(this); } else { pContext->addNotifyObjPost(this); } } ContextNotifyObj::~ContextNotifyObj() { if(d_pCNOnext != NULL) { d_pCNOnext->d_ppCNOprev = d_ppCNOprev; } if(d_ppCNOprev != NULL) { *d_ppCNOprev = d_pCNOnext; } } std::ostream& operator<<(std::ostream& out, const Context& context) throw(AssertionException) { static const std::string separator(79, '-'); int level = context.d_scopeList.size() - 1; typedef std::vector::const_reverse_iterator const_reverse_iterator; for(const_reverse_iterator i = context.d_scopeList.rbegin(); i != context.d_scopeList.rend(); ++i, --level) { Scope* pScope = *i; Assert(pScope->getLevel() == level); Assert(pScope->getContext() == &context); out << separator << std::endl << *pScope << std::endl; } return out << separator << std::endl; } std::ostream& operator<<(std::ostream& out, const Scope& scope) throw(AssertionException) { out << "Scope " << scope.d_level << " [" << &scope << "]:"; ContextObj* pContextObj = scope.d_pContextObjList; Assert(pContextObj == NULL || pContextObj->prev() == &scope.d_pContextObjList); while(pContextObj != NULL) { out << " <--> " << pContextObj; if(pContextObj->d_pScope != &scope) { out << " XXX bad scope" << std::endl; } Assert(pContextObj->d_pScope == &scope); Assert(pContextObj->next() == NULL || pContextObj->next()->prev() == &pContextObj->next()); pContextObj = pContextObj->next(); } return out << " --> NULL"; } } /* CVC4::context namespace */ } /* CVC4 namespace */ cvc4-1.5/src/context/context.h000066400000000000000000000615131313116454100163330ustar00rootroot00000000000000/********************* */ /*! \file context.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Clark Barrett, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Context class and context manager. ** ** Context class and context manager. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CONTEXT_H #define __CVC4__CONTEXT__CONTEXT_H #include #include #include #include #include #include #include "base/cvc4_assert.h" #include "base/output.h" #include "context/context_mm.h" namespace CVC4 { namespace context { class Context; class Scope; class ContextObj; class ContextNotifyObj; /** Pretty-printing of Contexts (for debugging) */ std::ostream& operator<<(std::ostream&, const Context&) throw(AssertionException); /** Pretty-printing of Scopes (for debugging) */ std::ostream& operator<<(std::ostream&, const Scope&) throw(AssertionException); /** * A Context encapsulates all of the dynamic state of the system. Its main * methods are push() and pop(). A call to push() saves the current state, * and a call to pop() restores the state saved by the most recent call to * push(). * * Objects which want to participate in this global save and restore * mechanism must inherit from ContextObj (see below). * * For more flexible context-dependent behavior, objects may implement the * ContextNotifyObj interface and simply get a notification when a pop has * occurred. * * Context also uses a helper class called Scope which stores information * specific to the portion of the Context since the last call to push() (see * below). * * Memory allocation in Contexts is done with the help of the * ContextMemoryManager. A copy is stored in each Scope object for quick * access. */ class Context { /** * Pointer to the ContextMemoryManager for this Context. */ ContextMemoryManager* d_pCMM; /** * List of all scopes for this context. */ std::vector d_scopeList; /** * Doubly-linked list of objects to notify before every pop. See * ContextNotifyObj for structure of linked list. */ ContextNotifyObj* d_pCNOpre; /** * Doubly-linked list of objects to notify after every pop. See * ContextNotifyObj for structure of linked list. */ ContextNotifyObj* d_pCNOpost; friend std::ostream& operator<<(std::ostream&, const Context&) throw(AssertionException); // disable copy, assignment Context(const Context&) CVC4_UNDEFINED; Context& operator=(const Context&) CVC4_UNDEFINED; public: /** * A mechanism by which a "scoped" bit of contextual speculation can * be applied. One might create a Context::ScopedPush in a function * (as a local variable on the stack), then manipulate some * context-dependent data structures in some fashion, speculatively. * When the ScopedPush goes out of scope and is destructed, the * context-dependent data structures will return to their original * state. * * When such speculation occurs in a lexically-scoped manner, like * described above, it is FAR preferable to use ScopedPush than to * call ->push() and ->pop() on the Context directly. If you do the * latter, it's extremely easy to forget to pop() on exceptional * exit of the function, or if a short-circuited "early" return is * later added to the function, etc. Further, ScopedPush includes * an assertion that the Context at the end looks like the Context * at the beginning (the topmost Scope pointer should be the same). * This assertion is only an approximate check for correct behavior, * but should catch egregious mismatches of ->push() and ->pop() * while the ScopedPush is being applied---egregious mismatches that * could exist, for example, if a Theory does some speculative * reasoning but accidently gives control back to some other mechanism * which does some speculation which isn't properly scoped inside the * first. */ class ScopedPush { Context* const d_context; const Scope* const d_scope; public: ScopedPush(Context* ctxt) : d_context(ctxt), d_scope(d_context->getTopScope()) { d_context->push(); } ~ScopedPush() { d_context->pop(); AlwaysAssert(d_context->getTopScope() == d_scope, "Context::ScopedPush observed an uneven Context (at pop, " "top scope doesn't match what it was at the time the " "ScopedPush was applied)"); } };/* Context::ScopedPush */ /** * Constructor: create ContextMemoryManager and initial Scope */ Context(); /** * Destructor: pop all scopes, delete ContextMemoryManager */ ~Context(); /** * Return the current (top) scope */ Scope* getTopScope() const { return d_scopeList.back(); } /** * Return the initial (bottom) scope */ Scope* getBottomScope() const { return d_scopeList[0]; } /** * Return the current Scope level. */ int getLevel() const { return d_scopeList.size() - 1; } /** * Return the ContextMemoryManager associated with the context. */ ContextMemoryManager* getCMM() { return d_pCMM; } /** * Save the current state, create a new Scope */ void push(); /** * Restore the previous state, delete the top Scope */ void pop(); /** * Pop all the way back to given level */ void popto(int toLevel); /** * Add pCNO to the list of objects notified before every pop */ void addNotifyObjPre(ContextNotifyObj* pCNO); /** * Add pCNO to the list of objects notified after every pop */ void addNotifyObjPost(ContextNotifyObj* pCNO); };/* class Context */ /** * A UserContext is different from a Context only because it's used for * different purposes---so separating the two types gives type errors where * appropriate. */ class UserContext : public Context { private: // disable copy, assignment UserContext(const UserContext&) CVC4_UNDEFINED; UserContext& operator=(const UserContext&) CVC4_UNDEFINED; public: UserContext() {} };/* class UserContext */ /** * Conceptually, a Scope encapsulates that portion of the context that * changes after a call to push() and must be undone on a subsequent call to * pop(). In particular, each call to push() creates a new Scope object . * This new Scope object becomes the top scope and it points (via the * d_pScopePrev member) to the previous top Scope. Each call to pop() * deletes the current top scope and restores the previous one. The main * purpose of a Scope is to maintain a linked list of ContexObj objects which * change while the Scope is the top scope and which must be restored when * the Scope is deleted. * * A Scope is also associated with a ContextMemoryManager. All memory * allocated by the Scope is allocated in a single region using the * ContextMemoryManager and released all at once when the Scope is popped. */ class Scope { /** * Context that created this Scope */ Context* d_pContext; /** * Memory manager for this Scope. Same as in Context, but stored here too * for faster access by ContextObj objects. */ ContextMemoryManager* d_pCMM; /** * Scope level (total number of outstanding push() calls when this Scope was * created). */ int d_level; /** * Linked list of objects which changed in this scope, * and thus need to be restored when the scope is deleted. */ ContextObj* d_pContextObjList; friend std::ostream& operator<<(std::ostream&, const Scope&) throw(AssertionException); public: /** * Constructor: Create a new Scope; set the level and the previous Scope * if any. */ Scope(Context* pContext, ContextMemoryManager* pCMM, int level) throw() : d_pContext(pContext), d_pCMM(pCMM), d_level(level), d_pContextObjList(NULL) { } /** * Destructor: Restore all of the objects in ContextObjList. Defined inline * below. */ ~Scope(); /** * Get the Context for this Scope */ Context* getContext() const throw() { return d_pContext; } /** * Get the ContextMemoryManager for this Scope */ ContextMemoryManager* getCMM() const throw() { return d_pCMM; } /** * Get the level of the current Scope */ int getLevel() const throw() { return d_level; } /** * Return true iff this Scope is the current top Scope */ bool isCurrent() const throw() { return this == d_pContext->getTopScope(); } /** * When a ContextObj object is modified for the first time in this * Scope, it should call this method to add itself to the list of * objects that will need to be restored. Defined inline below. */ void addToChain(ContextObj* pContextObj) throw(AssertionException); /** * Overload operator new for use with ContextMemoryManager to allow * creation of new Scope objects in the current memory region. */ static void* operator new(size_t size, ContextMemoryManager* pCMM) { Trace("context_mm") << "Scope::new " << size << " in " << pCMM << std::endl; return pCMM->newData(size); } /** * Overload operator delete for Scope objects allocated using * ContextMemoryManager. No need to do anything because memory is * freed automatically when the ContextMemoryManager pop() method is * called. Include both placement and standard delete for * completeness. */ static void operator delete(void* pMem, ContextMemoryManager* pCMM) {} static void operator delete(void* pMem) {} //FIXME: //! Check for memory leaks // void check(); };/* class Scope */ /** * This is an abstract base class from which all objects that are * context-dependent should inherit. For any data structure that you * want to have be automatically backtracked, do the following: * * 1. Create a class for the data structure that inherits from ContextObj * * 2. Implement save() * The role of save() is to create a new ContexObj object that contains * enough information to restore the object to its current state, even if * it gets changed later. Note that save should call the (default) * ContextObj Copy Constructor to copy the information in the base class. * It is recommended that any memory allocated by save() should be done * through the ContextMemoryManager. This way, it does not need to be * explicitly freed when restore is called. However, it is only required * that the ContextObj itself be allocated using the * ContextMemoryManager. If other memory is allocated not using the * ContextMemoryManager, it should be freed when restore() is called. In * fact, any clean-up work on a saved object must be done by restore(). * This is because the destructor is never called explicitly on saved * objects. * * 3. Implement restore() * The role of restore() is, given the ContextObj returned by a previous * call to save(), to restore the current object to the state it was in * when save() was called. Note that the implementation of restore does * *not* need to worry about restoring the base class data. This is done * automatically. Ideally, restore() should not have to free any memory * as any memory allocated by save() should have been done using the * ContextMemoryManager (see item 2 above). * * 4. In the subclass implementation, any time the state is about to be * changed, first call makeCurrent(). * * 5. In the subclass implementation, the destructor should call destroy(), * which repeatedly calls restore() until the object is restored to context * level 0. Note, however, that if there is additional cleanup required at * level 0, destroy() does not do this. It has to be implemented in the * destructor of the subclass. The reason the destroy() functionality * cannot be in the ContextObj destructor is that it needs to call the * subclass-specific restore() method in order to properly clean up saved * copies. * * GOTCHAS WHEN ALLOCATING CONTEXTUAL OBJECTS WITH NON-STANDARD ALLOCATORS * * Be careful if you intend to allocate ContextObj in (for example) * ContextMemoryManager memory. ContextMemoryManager doesn't call the * destructors of contained objects, which means the objects aren't * properly unregistered from the Context (as in point #5, above). * This can be remedied by allocating the ContextObj in the "top * scope" rather than the "bottom scope" (which is what the * "allocatedInCMM" flag to the special constructor in ContextObj * does). * * But why allocate in CMM if it's so complicated? There's a big * advantage: you don't have to track the lifetime of the ContextObj. * The object simply ceases to exist when the Context is popped. Thus * you can create an object in context memory, and if you stow * pointers to it only in context memory as well, all is cleaned up * for you when the scope pops. Here's a list of gotchas: * * 1. For data structures intended solely to be allocated in context * memory, privately declare (but don't define) an operator * new(size_t) and destructor (as currently in the Link class, in * src/theory/uf/ecdata.h). * * 2. For data structures that may or may not be allocated in context * memory, and are designed to be that way (esp. if they contain * ContextObj instances), they should be heavily documented -- * especially the destructor, since it _may_or_may_not_be_called_. * * 3. There's also an issue for generic code -- some class Foo * might be allocated in context memory, and that might normally be * fine, but if T is a ContextObj this requires certain care. * * 4. Note that certain care is required for ContextObj inside of data * structures. If the (enclosing) data structure can be allocated * in CMM, that means the (enclosed) ContextObj can be, even if it * was not designed to be allocated in that way. In many * instances, it may be required that data structures enclosing * ContextObj be parameterized with a similar "bool allocatedInCMM" * argument as the special constructor in this class (and pass it * on to all ContextObj instances). */ class ContextObj { /** * Pointer to Scope in which this object was last modified. */ Scope* d_pScope; /** * Pointer to most recent version of same ContextObj in a previous Scope */ ContextObj* d_pContextObjRestore; /** * Next link in ContextObjList list maintained by Scope class. */ ContextObj* d_pContextObjNext; /** * Previous link in ContextObjList list maintained by Scope class. We use * double-indirection here to make element deletion easy. */ ContextObj** d_ppContextObjPrev; /** * Helper method for makeCurrent (see below). Separated out to allow common * case to be inlined without making a function call. It calls save() and * does the necessary bookkeeping to ensure that object can be restored to * its current state when restore is called. */ void update() throw(AssertionException); // The rest of the private methods are for the benefit of the Scope. We make // Scope our friend so it is the only one that can use them. friend class Scope; friend std::ostream& operator<<(std::ostream&, const Scope&) throw(AssertionException); /** * Return reference to next link in ContextObjList. Used by * Scope::addToChain method. */ ContextObj*& next() throw() { return d_pContextObjNext; } /** * Return reference to prev link in ContextObjList. Used by * Scope::addToChain method. */ ContextObj**& prev() throw() { return d_ppContextObjPrev; } /** * This method is called by Scope during a pop: it does the necessary work to * restore the object from its saved copy and then returns the next object in * the list that needs to be restored. */ ContextObj* restoreAndContinue() throw(AssertionException); protected: /** * This is a method that must be implemented by all classes inheriting from * ContextObj. See the comment before the class declaration. */ virtual ContextObj* save(ContextMemoryManager* pCMM) = 0; /** * This is a method that must be implemented by all classes inheriting from * ContextObj. See the comment before the class declaration. */ virtual void restore(ContextObj* pContextObjRestore) = 0; /** * This method checks if the object has been modified in this Scope * yet. If not, it calls update(). */ inline void makeCurrent() throw(AssertionException); /** * Just calls update(), but given a different name for the derived * class-facing interface. This is a "forced" makeCurrent(), useful * for ContextObjs allocated in CMM that need a special "bottom" * case when they disappear out of existence (kind of a destructor). * See CDOhash_map (in cdhashmap.h) for an example. */ inline void makeSaveRestorePoint() throw(AssertionException); /** * Should be called from sub-class destructor: calls restore until restored * to initial version (version at context level 0). Also removes object from * all Scope lists. Note that this doesn't actually free the memory * allocated by the ContextMemoryManager for this object. This isn't done * until the corresponding Scope is popped. */ void destroy() throw(AssertionException); ///// // // These next four accessors return properties of the Scope to // derived classes without giving them the Scope object directly. // ///// /** * Get the Context with which this ContextObj was created. This is * part of the protected interface, intended for derived classes to * use if necessary. */ Context* getContext() const throw() { return d_pScope->getContext(); } /** * Get the ContextMemoryManager with which this ContextObj was * created. This is part of the protected interface, intended for * derived classes to use if necessary. If a ContextObj-derived * class needs to allocate memory somewhere other than the save() * member function (where it is explicitly given a * ContextMemoryManager), it can use this accessor to get the memory * manager. */ ContextMemoryManager* getCMM() const throw() { return d_pScope->getCMM(); } /** * Get the level associated to this ContextObj. Useful if a * ContextObj-derived class needs to compare the level of its last * update with another ContextObj. */ int getLevel() const throw() { return d_pScope->getLevel(); } /** * Returns true if the object is "current"-- that is, updated in the * topmost contextual scope. Useful if a ContextObj-derived class * needs to determine if it has been modified in the current scope. * Note that it is always safe to call makeCurrent() without first * checking if the object is current, so this function need not be * used under normal circumstances. */ bool isCurrent() const throw() { return d_pScope->isCurrent(); } public: /** * Disable delete: objects allocated with new(ContextMemorymanager) should * never be deleted. Objects allocated with new(bool) should be deleted by * calling deleteSelf(). */ static void operator delete(void* pMem) { AlwaysAssert(false, "It is not allowed to delete a ContextObj this way!"); } /** * operator new using ContextMemoryManager (common case used by * subclasses during save()). No delete is required for memory * allocated this way, since it is automatically released when the * context is popped. Also note that allocations using this * operator never have their destructor called, so any clean-up has * to be done using the restore method. */ static void* operator new(size_t size, ContextMemoryManager* pCMM) { Trace("context_mm") << "Context::new " << size << " in " << pCMM << std::endl; return pCMM->newData(size); } /** * Corresponding placement delete. Note that this is provided just * to satisfy the requirement that a placement delete should be * provided for every placement new. It would only be called if a * ContextObj constructor throws an exception after a successful * call to the above new operator. */ static void operator delete(void* pMem, ContextMemoryManager* pCMM) {} /** * Create a new ContextObj. The initial scope is set to the bottom * scope of the Context. Note that in the common case, the copy * constructor is called to create new ContextObj objects. The * default copy constructor does the right thing, so we do not * explicitly define it. */ ContextObj(Context* context); /** * Create a new ContextObj. This constructor takes an argument that * specifies whether this ContextObj is itself allocated in context * memory. If it is, it's invalid below the current scope level, so * we don't put it in scope 0. * * WARNING: Read the notes above on "Gotchas when allocating * contextual objects with non-standard allocators." */ ContextObj(bool allocatedInCMM, Context* context); /** * Destructor does nothing: subclass must explicitly call destroy() instead. */ virtual ~ContextObj() {} /** * If you want to allocate a ContextObj object on the heap, use this * special new operator. To free this memory, instead of * "delete p", use "p->deleteSelf()". */ static void* operator new(size_t size, bool) { return ::operator new(size); } /** * Corresponding placement delete. Note that this is provided for * the compiler in case the ContextObj constructor throws an * exception. The client can't call it. */ static void operator delete(void* pMem, bool) { ::operator delete(pMem); } /** * Use this instead of delete to delete memory allocated using the special * new function provided above that takes a bool argument. Do not call this * function on memory allocated using the new that takes a * ContextMemoryManager as an argument. */ void deleteSelf() { Debug("context") << "deleteSelf(" << this << ") " << typeid(*this).name() << std::endl; this->~ContextObj(); ::operator delete(this); } };/* class ContextObj */ /** * For more flexible context-dependent behavior than that provided by * ContextObj, objects may implement the ContextNotifyObj interface * and simply get a notification when a pop has occurred. See * Context class for how to register a ContextNotifyObj with the * Context (you can choose to have notification come before or after * the ContextObj objects have been restored). */ class ContextNotifyObj { /** * Context is our friend so that when the Context is deleted, any * remaining ContextNotifyObj can be removed from the Context list. */ friend class Context; /** * Pointer to next ContextNotifyObject in this List */ ContextNotifyObj* d_pCNOnext; /** * Pointer to previous ContextNotifyObject in this list */ ContextNotifyObj** d_ppCNOprev; /** * Return reference to next link in ContextNotifyObj list. Used by * Context::addNotifyObj methods. */ ContextNotifyObj*& next() throw() { return d_pCNOnext; } /** * Return reference to prev link in ContextNotifyObj list. Used by * Context::addNotifyObj methods. */ ContextNotifyObj**& prev() throw() { return d_ppCNOprev; } protected: /** * This is the method called to notify the object of a pop. It must be * implemented by the subclass. It is protected since context is out * friend. */ virtual void contextNotifyPop() = 0; public: /** * Constructor for ContextNotifyObj. Parameters are the context to * which this notify object will be added, and a flag which, if * true, tells the context to notify this object *before* the * ContextObj objects are restored. Otherwise, the context notifies * the object after the ContextObj objects are restored. The * default is for notification after. */ ContextNotifyObj(Context* pContext, bool preNotify = false); /** * Destructor: removes object from list */ virtual ~ContextNotifyObj(); };/* class ContextNotifyObj */ inline void ContextObj::makeCurrent() throw(AssertionException) { if(!(d_pScope->isCurrent())) { update(); } } inline void ContextObj::makeSaveRestorePoint() throw(AssertionException) { update(); } inline Scope::~Scope() { // Call restore() method on each ContextObj object in the list. // Note that it is the responsibility of restore() to return the // next item in the list. while(d_pContextObjList != NULL) { d_pContextObjList = d_pContextObjList->restoreAndContinue(); } } inline void Scope::addToChain(ContextObj* pContextObj) throw(AssertionException) { if(d_pContextObjList != NULL) { d_pContextObjList->prev() = &pContextObj->next(); } pContextObj->next() = d_pContextObjList; pContextObj->prev() = &d_pContextObjList; d_pContextObjList = pContextObj; } }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CONTEXT_H */ cvc4-1.5/src/context/context_mm.cpp000066400000000000000000000070331313116454100173540ustar00rootroot00000000000000/********************* */ /*! \file context_mm.cpp ** \verbatim ** Top contributors (to current version): ** Clark Barrett, Morgan Deters, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Implementation of Context Memory Manager. ** ** Implementation of Context Memory Manager **/ #include #include #include #include #include "base/cvc4_assert.h" #include "base/output.h" #include "context/context_mm.h" namespace CVC4 { namespace context { void ContextMemoryManager::newChunk() { // Increment index to chunk list ++d_indexChunkList; Assert(d_chunkList.size() == d_indexChunkList, "Index should be at the end of the list"); // Create new chunk if no free chunk available if(d_freeChunks.empty()) { d_chunkList.push_back((char*)malloc(chunkSizeBytes)); if(d_chunkList.back() == NULL) { throw std::bad_alloc(); } } // If there is a free chunk, use that else { d_chunkList.push_back(d_freeChunks.back()); d_freeChunks.pop_back(); } // Set up the current chunk pointers d_nextFree = d_chunkList.back(); d_endChunk = d_nextFree + chunkSizeBytes; } ContextMemoryManager::ContextMemoryManager() : d_indexChunkList(0) { // Create initial chunk d_chunkList.push_back((char*)malloc(chunkSizeBytes)); d_nextFree = d_chunkList.back(); if(d_nextFree == NULL) { throw std::bad_alloc(); } d_endChunk = d_nextFree + chunkSizeBytes; } ContextMemoryManager::~ContextMemoryManager() { // Delete all chunks while(!d_chunkList.empty()) { free(d_chunkList.back()); d_chunkList.pop_back(); } while(!d_freeChunks.empty()) { free(d_freeChunks.back()); d_freeChunks.pop_back(); } } void* ContextMemoryManager::newData(size_t size) { // Use next available free location in current chunk void* res = (void*)d_nextFree; d_nextFree += size; // Check if the request is too big for the chunk if(d_nextFree > d_endChunk) { newChunk(); res = (void*)d_nextFree; d_nextFree += size; AlwaysAssert(d_nextFree <= d_endChunk, "Request is bigger than memory chunk size"); } Debug("context") << "ContextMemoryManager::newData(" << size << ") returning " << res << " at level " << d_chunkList.size() << std::endl; return res; } void ContextMemoryManager::push() { // Store current state on the stack d_nextFreeStack.push_back(d_nextFree); d_endChunkStack.push_back(d_endChunk); d_indexChunkListStack.push_back(d_indexChunkList); } void ContextMemoryManager::pop() { Assert(d_nextFreeStack.size() > 0 && d_endChunkStack.size() > 0); // Restore state from stack d_nextFree = d_nextFreeStack.back(); d_nextFreeStack.pop_back(); d_endChunk = d_endChunkStack.back(); d_endChunkStack.pop_back(); // Free all the new chunks since the last push while(d_indexChunkList > d_indexChunkListStack.back()) { d_freeChunks.push_back(d_chunkList.back()); d_chunkList.pop_back(); --d_indexChunkList; } d_indexChunkListStack.pop_back(); // Delete excess free chunks while(d_freeChunks.size() > maxFreeChunks) { free(d_freeChunks.front()); d_freeChunks.pop_front(); } } } /* CVC4::context namespace */ } /* CVC4 namespace */ cvc4-1.5/src/context/context_mm.h000066400000000000000000000123411313116454100170170ustar00rootroot00000000000000/********************* */ /*! \file context_mm.h ** \verbatim ** Top contributors (to current version): ** Clark Barrett, Morgan Deters, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Region-based memory manager with stack-based push and pop. ** ** Region-based memory manager with stack-based push and pop. Designed ** for use by ContextManager. **/ #include "cvc4_private.h" #ifndef __CVC4__CONTEXT__CONTEXT_MM_H #define __CVC4__CONTEXT__CONTEXT_MM_H #include #include namespace CVC4 { namespace context { /** * Region-based memory manager for contexts. Calls to newData provide memory * from the current region. This memory will persist until the entire * region is deallocated (by calling pop). * * If push is called, the current region is deactivated and pushed on a * stack, and a new current region is created. A subsequent call to pop * releases the new region and restores the top region from the stack. * */ class ContextMemoryManager { /** * Memory in regions is allocated in chunks. This is the chunk size */ static const unsigned chunkSizeBytes = 16384; /** * A list of free chunks is maintained. This is the maximum number of * free chunks. */ static const unsigned maxFreeChunks = 100; /** * List of all chunks that are currently active */ std::vector d_chunkList; /** * Queue of free chunks (for best cache performance, LIFO order is used) */ std::deque d_freeChunks; /** * Pointer to the beginning of available memory in the current chunk in * the current region. */ char* d_nextFree; /** * Pointer to one past the last available byte in the current chunk in * the current region. */ char* d_endChunk; /** * The index in d_chunkList of the current chunk in the current region */ unsigned d_indexChunkList; /** * Part of the stack of saved regions. This vector stores the saved value * of d_nextFree */ std::vector d_nextFreeStack; /** * Part of the stack of saved regions. This vector stores the saved value * of d_endChunk. */ std::vector d_endChunkStack; /** * Part of the stack of saved regions. This vector stores the saved value * of d_indexChunkList */ std::vector d_indexChunkListStack; /** * Private method to grab a new chunk for the current region. Uses chunk * from d_freeChunks if available. Creates a new one otherwise. Sets the * new chunk to be the current chunk. */ void newChunk(); public: /** * Get the maximum allocation size for this memory manager. */ static unsigned getMaxAllocationSize() { return chunkSizeBytes; } /** * Constructor - creates an initial region and an empty stack */ ContextMemoryManager(); /** * Destructor - deletes all memory in all regions */ ~ContextMemoryManager(); /** * Allocate size bytes from the current region */ void* newData(size_t size); /** * Create a new region. Push old region on the stack. */ void push(); /** * Delete all memory allocated in the current region and restore the top * region from the stack */ void pop(); };/* class ContextMemoryManager */ /** * An STL-like allocator class for allocating from context memory. */ template class ContextMemoryAllocator { ContextMemoryManager* d_mm; public: typedef size_t size_type; typedef std::ptrdiff_t difference_type; typedef T* pointer; typedef T const* const_pointer; typedef T& reference; typedef T const& const_reference; typedef T value_type; template struct rebind { typedef ContextMemoryAllocator other; }; ContextMemoryAllocator(ContextMemoryManager* mm) throw() : d_mm(mm) {} template ContextMemoryAllocator(const ContextMemoryAllocator& alloc) throw() : d_mm(alloc.getCMM()) {} ~ContextMemoryAllocator() {} ContextMemoryManager* getCMM() const { return d_mm; } T* address(T& v) const { return &v; } T const* address(T const& v) const { return &v; } size_t max_size() const throw() { return ContextMemoryManager::getMaxAllocationSize() / sizeof(T); } T* allocate(size_t n, const void* = 0) const { return static_cast(d_mm->newData(n * sizeof(T))); } void deallocate(T* p, size_t n) const { /* no explicit delete */ } void construct(T* p, T const& v) const { ::new(reinterpret_cast(p)) T(v); } void destroy(T* p) const { p->~T(); } };/* class ContextMemoryAllocator */ template inline bool operator==(const ContextMemoryAllocator& a1, const ContextMemoryAllocator& a2) { return a1.d_mm == a2.d_mm; } template inline bool operator!=(const ContextMemoryAllocator& a1, const ContextMemoryAllocator& a2) { return a1.d_mm != a2.d_mm; } }/* CVC4::context namespace */ }/* CVC4 namespace */ #endif /* __CVC4__CONTEXT__CONTEXT_MM_H */ cvc4-1.5/src/cvc4.i000066400000000000000000000306701313116454100140230ustar00rootroot00000000000000%import "bindings/swig.h" %include "stdint.i" %include "stl.i" %module CVC4 // nspace completely broken with Java packaging //%nspace; namespace std { class istream; class ostream; template class set {}; template class hash_map {}; } %{ // Perl's headers define "seed" to Perl_seed, which breaks // gmpxx.h; undo the damage for our CVC4 module. #ifdef SWIGPERL # undef seed #endif /* SWIGPERL */ // OCaml's headers define "invalid_argument" and "flush" to // caml_invalid_argument and caml_flush, which breaks C++ // standard headers; undo this damage // // Unfortunately, this code isn't inserted early enough. swig puts // an include very early, which breaks linking due to a // nonexistent std::caml_invalid_argument symbol.. ridiculous! // #ifdef SWIGOCAML # if defined(flush) || defined(invalid_argument) # error "flush" or "invalid_argument" (or both) is defined by the ocaml headers. You must #undef it above before inclusion of . # endif /* flush */ # undef flush # undef invalid_argument #endif /* SWIGOCAML */ namespace CVC4 {} using namespace CVC4; #include #include #include #include #include #include #include #include "base/exception.h" #include "base/modal_exception.h" #include "expr/datatype.h" #include "expr/expr.h" #include "expr/type.h" #include "options/option_exception.h" #include "smt/command.h" #include "util/bitvector.h" #include "util/integer.h" #include "util/sexpr.h" #include "util/unsafe_interrupt_exception.h" #ifdef SWIGJAVA #include "bindings/java_stream_adapters.h" std::set CVC4::JavaInputStreamAdapter::s_adapters; #endif %} #ifdef SWIGPYTHON %pythonappend CVC4::SmtEngine::SmtEngine %{ self.thisown = 0 %} %pythonappend CVC4::ExprManager::ExprManager %{ self.thisown = 0 %} #endif /* SWIGPYTHON */ %template(vectorCommandPtr) std::vector< CVC4::Command* >; %template(vectorType) std::vector< CVC4::Type >; %template(vectorExpr) std::vector< CVC4::Expr >; %template(vectorUnsignedInt) std::vector< unsigned int >; %template(vectorVectorExpr) std::vector< std::vector< CVC4::Expr > >; %template(vectorDatatypeType) std::vector< CVC4::DatatypeType >; %template(vectorSExpr) std::vector< CVC4::SExpr >; %template(vectorString) std::vector< std::string >; %template(vectorPairStringType) std::vector< std::pair< std::string, CVC4::Type > >; %template(pairStringType) std::pair< std::string, CVC4::Type >; %template(setOfType) std::set< CVC4::Type >; %template(hashmapExpr) std::hash_map< CVC4::Expr, CVC4::Expr, CVC4::ExprHashFunction >; // This is unfortunate, but seems to be necessary; if we leave NULL // defined, swig will expand it to "(void*) 0", and some of swig's // helper functions won't compile properly. #undef NULL #ifdef SWIGJAVA #include "bindings/java_iterator_adapter.h" #include "bindings/java_stream_adapters.h" %exception %{ try { $action } catch(CVC4::Exception& e) { std::stringstream ss; ss << e.what() << ": " << e.getMessage(); std::string explanation = ss.str(); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, explanation.c_str()); } %} // Create a mapping from C++ Exceptions to Java Exceptions. // This is in a couple of throws typemaps, simply because it's sensitive to SWIG's concept of which namespace we're in. %typemap(throws) Exception %{ std::string name = "edu/nyu/acsys/CVC4/$1_type"; /* size_t i = name.find("::"); if(i != std::string::npos) { size_t j = name.rfind("::"); assert(i <= j); name.replace(i, j - i + 2, "/"); } */ jclass clazz = jenv->FindClass(name.c_str()); assert(clazz != NULL && jenv->ExceptionOccurred() == NULL); jmethodID method = jenv->GetMethodID(clazz, "", "(JZ)V"); assert(method != NULL && jenv->ExceptionOccurred() == NULL); jthrowable t = static_cast(jenv->NewObject(clazz, method, reinterpret_cast(new $1_type($1)), true)); assert(t != NULL && jenv->ExceptionOccurred() == NULL); int status = jenv->Throw(t); assert(status == 0); %} %typemap(throws) CVC4::Exception %{ std::string name = "edu/nyu/acsys/$1_type"; size_t i = name.find("::"); if(i != std::string::npos) { size_t j = name.rfind("::"); assert(i <= j); name.replace(i, j - i + 2, "/"); } jclass clazz = jenv->FindClass(name.c_str()); assert(clazz != NULL && jenv->ExceptionOccurred() == NULL); jmethodID method = jenv->GetMethodID(clazz, "", "(JZ)V"); assert(method != NULL && jenv->ExceptionOccurred() == NULL); jthrowable t = static_cast(jenv->NewObject(clazz, method, reinterpret_cast(new $1_type($1)), true)); assert(t != NULL && jenv->ExceptionOccurred() == NULL); int status = jenv->Throw(t); assert(status == 0); %} %typemap(throws) CVC4::ModalException = CVC4::Exception; %typemap(throws) CVC4::LogicException = CVC4::Exception; %typemap(throws) CVC4::OptionException = CVC4::Exception; %typemap(throws) CVC4::IllegalArgumentException = CVC4::Exception; %typemap(throws) CVC4::AssertionException = CVC4::Exception; %typemap(throws) CVC4::TypeCheckingException = CVC4::Exception; %typemap(throws) CVC4::ScopeException = CVC4::Exception; %typemap(throws) CVC4::IllegalArgumentException = CVC4::Exception; %typemap(throws) IllegalArgumentException = Exception; %typemap(throws) CVC4::AssertionException = CVC4::Exception; // TIM: Really unclear why both of these are required %typemap(throws) CVC4::UnsafeInterruptException = CVC4::Exception; %typemap(throws) UnsafeInterruptException = CVC4::Exception; %typemap(throws) CVC4::parser::InputStreamException = CVC4::Exception; %typemap(throws) CVC4::parser::ParserException = CVC4::Exception; %typemap(throws) CVC4::RationalFromDoubleException = Exception; // Generate an error if the mapping from C++ CVC4 Exception to Java CVC4 Exception doesn't exist above %typemap(throws) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [], SWIGTYPE [ANY] %{ #error "exception $1_type doesn't map to Java correctly---please edit src/cvc4.i and add it" %} %include "java/typemaps.i" // primitive pointers and references %include "java/std_string.i" // map std::string to java.lang.String %include "java/arrays_java.i" // C arrays to Java arrays %include "java/various.i" // map char** to java.lang.String[] // Functions on the C++ side taking std::ostream& should on the Java side // take a java.io.OutputStream. A JavaOutputStreamAdapter is created in // the wrapper which creates and passes on a std::stringstream to the C++ // function. Then on exit, the string from the stringstream is dumped to // the Java-side OutputStream. %typemap(jni) std::ostream& "jlong" %typemap(jtype) std::ostream& "long" %typemap(jstype) std::ostream& "java.io.OutputStream" %typemap(javain, pre=" edu.nyu.acsys.CVC4.JavaOutputStreamAdapter temp$javainput = new edu.nyu.acsys.CVC4.JavaOutputStreamAdapter();", pgcppname="temp$javainput", post=" new java.io.PrintStream($javainput).print(temp$javainput.toString());") std::ostream& "edu.nyu.acsys.CVC4.JavaOutputStreamAdapter.getCPtr(temp$javainput)" %typemap(jni) std::istream& "jlong" %typemap(jtype) std::istream& "long" %typemap(jstype) std::istream& "java.io.InputStream" %typemap(javain, pre=" edu.nyu.acsys.CVC4.JavaInputStreamAdapter temp$javainput = edu.nyu.acsys.CVC4.JavaInputStreamAdapter.get($javainput);", pgcppname="temp$javainput", post="") std::istream& "edu.nyu.acsys.CVC4.JavaInputStreamAdapter.getCPtr(temp$javainput)" %typemap(in) jobject inputStream %{ $1 = jenv->NewGlobalRef($input); %} %typemap(out) CVC4::JavaInputStreamAdapter* %{ $1->pull(jenv); *(CVC4::JavaInputStreamAdapter **)&$result = $1; %} %typemap(javacode) CVC4::JavaInputStreamAdapter %{ private static java.util.HashMap streams = new java.util.HashMap(); public static JavaInputStreamAdapter get(java.io.InputStream is) { if(streams.containsKey(is)) { return (JavaInputStreamAdapter) streams.get(is); } JavaInputStreamAdapter adapter = new JavaInputStreamAdapter(is); streams.put(is, adapter); return adapter; } %} %typemap(javafinalize) CVC4::JavaInputStreamAdapter %{ protected void finalize() { streams.remove(getInputStream()); delete(); } %} %ignore CVC4::JavaInputStreamAdapter::init(JNIEnv*); %ignore CVC4::JavaInputStreamAdapter::pullAdapters(JNIEnv*); %ignore CVC4::JavaInputStreamAdapter::pull(JNIEnv*); %javamethodmodifiers CVC4::JavaInputStreamAdapter::getInputStream() const "private"; %javamethodmodifiers CVC4::JavaInputStreamAdapter::JavaInputStreamAdapter(jobject) "private"; %exception CVC4::parser::Parser::nextCommand() %{ try { CVC4::JavaInputStreamAdapter::pullAdapters(jenv); $action } catch(CVC4::Exception& e) { std::stringstream ss; ss << e.what() << ": " << e.getMessage(); std::string explanation = ss.str(); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, explanation.c_str()); } %} %exception CVC4::parser::Parser::nextExpression() %{ try { CVC4::JavaInputStreamAdapter::pullAdapters(jenv); $action } catch(CVC4::Exception& e) { std::stringstream ss; ss << e.what() << ": " << e.getMessage(); std::string explanation = ss.str(); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, explanation.c_str()); } %} %exception CVC4::JavaInputStreamAdapter::~JavaInputStreamAdapter() %{ try { jenv->DeleteGlobalRef(arg1->getInputStream()); $action } catch(CVC4::Exception& e) { std::stringstream ss; ss << e.what() << ": " << e.getMessage(); std::string explanation = ss.str(); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, explanation.c_str()); } %} /* Copied (and modified) from java.swg; the standard swig version causes * negative BigInteger to be interpreted unsigned. Here we throw an * exception. */ %typemap(in) unsigned long long { jclass clazz; jmethodID mid; jbyteArray ba; jbyte* bae; jsize sz; int i; if (!$input) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "BigInteger null"); return $null; } clazz = JCALL1(GetObjectClass, jenv, $input); mid = JCALL3(GetMethodID, jenv, clazz, "toByteArray", "()[B"); ba = (jbyteArray)JCALL2(CallObjectMethod, jenv, $input, mid); bae = JCALL2(GetByteArrayElements, jenv, ba, 0); sz = JCALL1(GetArrayLength, jenv, ba); if((bae[0] & 0x80) != 0) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "BigInteger argument must be nonnegative."); } jsize test_sz = sz; if(sz > 1 && bae[0] == 0) { --test_sz; } if(test_sz > sizeof(unsigned long long)) { SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "BigInteger argument out of bounds."); } $1 = 0; for(i=0; i DecisionWeightAttr; }/* CVC4::decision namespace */ }/* CVC4 namespace */ #endif /* __CVC4__DECISION__DECISION_ATTRIBUTES_H */ cvc4-1.5/src/decision/decision_engine.cpp000066400000000000000000000075221313116454100204350ustar00rootroot00000000000000/********************* */ /*! \file decision_engine.cpp ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Decision engine ** ** Decision engine **/ #include "decision/decision_engine.h" #include "decision/decision_attributes.h" #include "decision/justification_heuristic.h" #include "expr/node.h" #include "options/decision_mode.h" #include "options/decision_options.h" #include "options/smt_options.h" using namespace std; namespace CVC4 { DecisionEngine::DecisionEngine(context::Context *sc, context::UserContext *uc) : d_enabledStrategies(), d_needIteSkolemMap(), d_relevancyStrategy(NULL), d_assertions(uc), d_cnfStream(NULL), d_satSolver(NULL), d_satContext(sc), d_userContext(uc), d_result(sc, SAT_VALUE_UNKNOWN), d_engineState(0) { Trace("decision") << "Creating decision engine" << std::endl; } void DecisionEngine::init() { Assert(d_engineState == 0); d_engineState = 1; Trace("decision-init") << "DecisionEngine::init()" << std::endl; Trace("decision-init") << " * options->decisionMode: " << options::decisionMode() << std:: endl; Trace("decision-init") << " * options->decisionStopOnly: " << options::decisionStopOnly() << std::endl; if(options::decisionMode() == decision::DECISION_STRATEGY_INTERNAL) { } if(options::decisionMode() == decision::DECISION_STRATEGY_JUSTIFICATION) { ITEDecisionStrategy* ds = new decision::JustificationHeuristic(this, d_userContext, d_satContext); enableStrategy(ds); d_needIteSkolemMap.push_back(ds); } } void DecisionEngine::enableStrategy(DecisionStrategy* ds) { d_enabledStrategies.push_back(ds); } void DecisionEngine::clearStrategies(){ for(unsigned i = 0; i < d_enabledStrategies.size(); ++i){ delete d_enabledStrategies[i]; } d_enabledStrategies.clear(); d_needIteSkolemMap.clear(); } bool DecisionEngine::isRelevant(SatVariable var) { Debug("decision") << "isRelevant(" << var <<")" << std::endl; if(d_relevancyStrategy != NULL) { //Assert(d_cnfStream->hasNode(var)); return d_relevancyStrategy->isRelevant( d_cnfStream->getNode(SatLiteral(var)) ); } else { return true; } } SatValue DecisionEngine::getPolarity(SatVariable var) { Debug("decision") << "getPolarity(" << var <<")" << std::endl; if(d_relevancyStrategy != NULL) { Assert(isRelevant(var)); return d_relevancyStrategy->getPolarity( d_cnfStream->getNode(SatLiteral(var)) ); } else { return SAT_VALUE_UNKNOWN; } } void DecisionEngine::addAssertions(const vector &assertions) { Assert(false); // doing this so that we revisit what to do // here. Currently not being used. // d_result = SAT_VALUE_UNKNOWN; // d_assertions.reserve(assertions.size()); // for(unsigned i = 0; i < assertions.size(); ++i) // d_assertions.push_back(assertions[i]); } void DecisionEngine::addAssertions(const vector &assertions, unsigned assertionsEnd, IteSkolemMap iteSkolemMap) { // new assertions, reset whatever result we knew d_result = SAT_VALUE_UNKNOWN; // d_assertions.reserve(assertions.size()); for(unsigned i = 0; i < assertions.size(); ++i) d_assertions.push_back(assertions[i]); for(unsigned i = 0; i < d_needIteSkolemMap.size(); ++i) d_needIteSkolemMap[i]-> addAssertions(assertions, assertionsEnd, iteSkolemMap); } }/* CVC4 namespace */ cvc4-1.5/src/decision/decision_engine.h000066400000000000000000000147151313116454100201040ustar00rootroot00000000000000/********************* */ /*! \file decision_engine.h ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Decision engine ** ** Decision engine **/ #include "cvc4_private.h" #ifndef __CVC4__DECISION__DECISION_ENGINE_H #define __CVC4__DECISION__DECISION_ENGINE_H #include #include "base/output.h" #include "decision/decision_strategy.h" #include "expr/node.h" #include "prop/cnf_stream.h" #include "prop/prop_engine.h" #include "prop/sat_solver_types.h" #include "smt/term_formula_removal.h" #include "smt/smt_engine_scope.h" using namespace std; using namespace CVC4::prop; using namespace CVC4::decision; namespace CVC4 { class DecisionEngine { vector d_enabledStrategies; vector d_needIteSkolemMap; RelevancyStrategy* d_relevancyStrategy; typedef context::CDList AssertionsList; AssertionsList d_assertions; // PropEngine* d_propEngine; CnfStream* d_cnfStream; DPLLSatSolverInterface* d_satSolver; context::Context* d_satContext; context::UserContext* d_userContext; // Does decision engine know the answer? context::CDO d_result; // Disable creating decision engine without required parameters DecisionEngine(); // init/shutdown state unsigned d_engineState; // 0=pre-init; 1=init,pre-shutdown; 2=shutdown public: // Necessary functions /** Constructor */ DecisionEngine(context::Context *sc, context::UserContext *uc); /** Destructor, currently does nothing */ ~DecisionEngine() { Trace("decision") << "Destroying decision engine" << std::endl; } // void setPropEngine(PropEngine* pe) { // // setPropEngine should not be called more than once // Assert(d_propEngine == NULL); // Assert(pe != NULL); // d_propEngine = pe; // } void setSatSolver(DPLLSatSolverInterface* ss) { // setPropEngine should not be called more than once Assert(d_satSolver == NULL); Assert(ss != NULL); d_satSolver = ss; } void setCnfStream(CnfStream* cs) { // setPropEngine should not be called more than once Assert(d_cnfStream == NULL); Assert(cs != NULL); d_cnfStream = cs; } /* enables decision stragies based on options */ void init(); /* clears all of the strategies */ void clearStrategies(); /** * This is called by SmtEngine, at shutdown time, just before * destruction. It is important because there are destruction * ordering issues between some parts of the system. */ void shutdown() { Assert(d_engineState == 1); d_engineState = 2; Trace("decision") << "Shutting down decision engine" << std::endl; clearStrategies(); } // Interface for External World to use our services /** Gets the next decision based on strategies that are enabled */ SatLiteral getNext(bool &stopSearch) { NodeManager::currentResourceManager()->spendResource(options::decisionStep()); Assert(d_cnfStream != NULL, "Forgot to set cnfStream for decision engine?"); Assert(d_satSolver != NULL, "Forgot to set satSolver for decision engine?"); SatLiteral ret = undefSatLiteral; for(unsigned i = 0; i < d_enabledStrategies.size() and ret == undefSatLiteral and stopSearch == false; ++i) { ret = d_enabledStrategies[i]->getNext(stopSearch); } return ret; } /** Is a sat variable relevant */ bool isRelevant(SatVariable var); /** * Try to get tell SAT solver what polarity to try for a * decision. Return SAT_VALUE_UNKNOWN if it can't help */ SatValue getPolarity(SatVariable var); /** Is the DecisionEngine in a state where it has solved everything? */ bool isDone() { Trace("decision") << "DecisionEngine::isDone() returning " << (d_result != SAT_VALUE_UNKNOWN) << (d_result != SAT_VALUE_UNKNOWN ? "true" : "false") << std::endl; return (d_result != SAT_VALUE_UNKNOWN); } /** */ Result getResult() { switch(d_result.get()) { case SAT_VALUE_TRUE: return Result(Result::SAT); case SAT_VALUE_FALSE: return Result(Result::UNSAT); case SAT_VALUE_UNKNOWN: return Result(Result::SAT_UNKNOWN, Result::UNKNOWN_REASON); default: Assert(false, "d_result is garbage"); } return Result(); } /** */ void setResult(SatValue val) { d_result = val; } // External World helping us help the Strategies /** If one of the enabled strategies needs them */ /* bool needIteSkolemMap() { */ /* return d_needIteSkolemMap.size() > 0; */ /* } */ /* add a set of assertions */ void addAssertions(const vector &assertions); /** * add a set of assertions, while providing a mapping between skolem * variables and corresponding assertions. It is assumed that all * assertions after assertionEnd were generated by ite * removal. Hence, iteSkolemMap maps into only these. */ void addAssertions(const vector &assertions, unsigned assertionsEnd, IteSkolemMap iteSkolemMap); /* add a single assertion */ void addAssertion(Node n); // Interface for Strategies to use stuff stored in Decision Engine // (which was possibly requested by them on initialization) /** * Get the assertions. Strategies are notified when these are available. */ AssertionsList& getAssertions() { return d_assertions; } // Interface for Strategies to get information about External World bool hasSatLiteral(TNode n) { return d_cnfStream->hasLiteral(n); } SatLiteral getSatLiteral(TNode n) { return d_cnfStream->getLiteral(n); } SatValue getSatValue(SatLiteral l) { return d_satSolver->value(l); } SatValue getSatValue(TNode n) { return getSatValue(getSatLiteral(n)); } Node getNode(SatLiteral l) { return d_cnfStream->getNode(l); } private: /** * Enable a particular decision strategy, also updating * corresponding vector-s is the engine */ void enableStrategy(DecisionStrategy* ds); };/* DecisionEngine class */ }/* CVC4 namespace */ #endif /* __CVC4__DECISION__DECISION_ENGINE_H */ cvc4-1.5/src/decision/decision_strategy.h000066400000000000000000000041251313116454100204730ustar00rootroot00000000000000/********************* */ /*! \file decision_strategy.h ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Decision strategy ** ** Decision strategy **/ #include "cvc4_private.h" #ifndef __CVC4__DECISION__DECISION_STRATEGY_H #define __CVC4__DECISION__DECISION_STRATEGY_H #include "prop/sat_solver_types.h" #include "smt/term_formula_removal.h" namespace CVC4 { class DecisionEngine; namespace context { class Context; }/* CVC4::context namespace */ namespace decision { class DecisionStrategy { protected: DecisionEngine* d_decisionEngine; public: DecisionStrategy(DecisionEngine* de, context::Context *c) : d_decisionEngine(de) { } virtual ~DecisionStrategy() { } virtual prop::SatLiteral getNext(bool&) = 0; virtual bool needIteSkolemMap() { return false; } virtual void notifyAssertionsAvailable() { return; } };/* class DecisionStrategy */ class ITEDecisionStrategy : public DecisionStrategy { public: ITEDecisionStrategy(DecisionEngine* de, context::Context *c) : DecisionStrategy(de, c) { } bool needIteSkolemMap() { return true; } virtual void addAssertions(const std::vector &assertions, unsigned assertionsEnd, IteSkolemMap iteSkolemMap) = 0; };/* class ITEDecisionStrategy */ class RelevancyStrategy : public ITEDecisionStrategy { public: RelevancyStrategy(DecisionEngine* de, context::Context *c) : ITEDecisionStrategy(de, c) { } virtual bool isRelevant(TNode n) = 0; virtual prop::SatValue getPolarity(TNode n) = 0; };/* class RelevancyStrategy */ }/* CVC4::decision namespace */ }/* CVC4 namespace */ #endif /* __CVC4__DECISION__DECISION_STRATEGY_H */ cvc4-1.5/src/decision/justification_heuristic.cpp000066400000000000000000000551041313116454100222440ustar00rootroot00000000000000/********************* */ /*! \file justification_heuristic.cpp ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Justification heuristic for decision making ** ** A ATGP-inspired justification-based decision heuristic. This code is based ** on the CVC3 implementation of the same heuristic -- note below. ** ** It needs access to the simplified but non-clausal formula. **/ #include "justification_heuristic.h" #include "expr/kind.h" #include "expr/node_manager.h" #include "options/decision_options.h" #include "theory/rewriter.h" #include "smt/term_formula_removal.h" #include "smt/smt_statistics_registry.h" namespace CVC4 { JustificationHeuristic::JustificationHeuristic(CVC4::DecisionEngine* de, context::UserContext *uc, context::Context *c): ITEDecisionStrategy(de, c), d_justified(c), d_exploredThreshold(c), d_prvsIndex(c, 0), d_threshPrvsIndex(c, 0), d_helfulness("decision::jh::helpfulness", 0), d_giveup("decision::jh::giveup", 0), d_timestat("decision::jh::time"), d_assertions(uc), d_iteAssertions(uc), d_iteCache(uc), d_visited(), d_visitedComputeITE(), d_curDecision(), d_curThreshold(0), d_childCache(uc), d_weightCache(uc), d_startIndexCache(c) { smtStatisticsRegistry()->registerStat(&d_helfulness); smtStatisticsRegistry()->registerStat(&d_giveup); smtStatisticsRegistry()->registerStat(&d_timestat); Trace("decision") << "Justification heuristic enabled" << std::endl; } JustificationHeuristic::~JustificationHeuristic() throw() { smtStatisticsRegistry()->unregisterStat(&d_helfulness); smtStatisticsRegistry()->unregisterStat(&d_giveup); smtStatisticsRegistry()->unregisterStat(&d_timestat); } CVC4::prop::SatLiteral JustificationHeuristic::getNext(bool &stopSearch) { if(options::decisionThreshold() > 0) { bool stopSearchTmp = false; SatLiteral lit = getNextThresh(stopSearchTmp, options::decisionThreshold()); if(lit != undefSatLiteral) { Assert(stopSearchTmp == false); return lit; } Assert(stopSearchTmp == true); } return getNextThresh(stopSearch, 0); } CVC4::prop::SatLiteral JustificationHeuristic::getNextThresh(bool &stopSearch, DecisionWeight threshold) { Trace("decision") << "JustificationHeuristic::getNextThresh(stopSearch, "<hasSatLiteral(n) ? d_decisionEngine->getSatLiteral(n) : -1; SatValue v = tryGetSatValue(n); Trace("justified") <<"{ "<setResult(SAT_VALUE_TRUE); return prop::undefSatLiteral; } inline void computeXorIffDesiredValues (Kind k, SatValue desiredVal, SatValue &desiredVal1, SatValue &desiredVal2) { Assert(k == kind::EQUAL || k == kind::XOR); bool shouldInvert = (desiredVal == SAT_VALUE_TRUE && k == kind::EQUAL) || (desiredVal == SAT_VALUE_FALSE && k == kind::XOR); if(desiredVal1 == SAT_VALUE_UNKNOWN && desiredVal2 == SAT_VALUE_UNKNOWN) { // CHOICE: pick one of them arbitarily desiredVal1 = SAT_VALUE_FALSE; } if(desiredVal2 == SAT_VALUE_UNKNOWN) { desiredVal2 = shouldInvert ? invertValue(desiredVal1) : desiredVal1; } else if(desiredVal1 == SAT_VALUE_UNKNOWN) { desiredVal1 = shouldInvert ? invertValue(desiredVal2) : desiredVal2; } } void JustificationHeuristic::addAssertions (const std::vector &assertions, unsigned assertionsEnd, IteSkolemMap iteSkolemMap) { Trace("decision") << "JustificationHeuristic::addAssertions()" << " size = " << assertions.size() << " assertionsEnd = " << assertionsEnd << std::endl; // Save the 'real' assertions locally for(unsigned i = 0; i < assertionsEnd; ++i) d_assertions.push_back(assertions[i]); // Save mapping between ite skolems and ite assertions for(IteSkolemMap::iterator i = iteSkolemMap.begin(); i != iteSkolemMap.end(); ++i) { Trace("decision::jh::ite") << " jh-ite: " << (i->first) << " maps to " << assertions[(i->second)] << std::endl; Assert(i->second >= assertionsEnd && i->second < assertions.size()); d_iteAssertions[i->first] = assertions[i->second]; } // Automatic weight computation } SatLiteral JustificationHeuristic::findSplitter(TNode node, SatValue desiredVal) { d_curDecision = undefSatLiteral; findSplitterRec(node, desiredVal); return d_curDecision; } void JustificationHeuristic::setJustified(TNode n) { d_justified.insert(n); } bool JustificationHeuristic::checkJustified(TNode n) { return d_justified.find(n) != d_justified.end(); } DecisionWeight JustificationHeuristic::getExploredThreshold(TNode n) { return d_exploredThreshold.find(n) == d_exploredThreshold.end() ? numeric_limits::max() : d_exploredThreshold[n]; } void JustificationHeuristic::setExploredThreshold(TNode n) { d_exploredThreshold[n] = d_curThreshold; } int JustificationHeuristic::getPrvsIndex() { if(d_curThreshold == 0) return d_prvsIndex; else return d_threshPrvsIndex; } void JustificationHeuristic::setPrvsIndex(int prvsIndex) { if(d_curThreshold == 0) d_prvsIndex = prvsIndex; else d_threshPrvsIndex = prvsIndex; } DecisionWeight JustificationHeuristic::getWeightPolarized(TNode n, SatValue satValue) { Assert(satValue == SAT_VALUE_TRUE || satValue == SAT_VALUE_FALSE); return getWeightPolarized(n, satValue == SAT_VALUE_TRUE); } DecisionWeight JustificationHeuristic::getWeightPolarized(TNode n, bool polarity) { if(options::decisionWeightInternal() != DECISION_WEIGHT_INTERNAL_USR1) { return getWeight(n); } if(d_weightCache.find(n) == d_weightCache.end()) { Kind k = n.getKind(); theory::TheoryId tId = theory::kindToTheoryId(k); DecisionWeight dW1, dW2; if(tId != theory::THEORY_BOOL) { dW1 = dW2 = getWeight(n); } else { if(k == kind::OR) { dW1 = numeric_limits::max(), dW2 = 0; for(TNode::iterator i=n.begin(); i != n.end(); ++i) { dW1 = min(dW1, getWeightPolarized(*i, true)); dW2 = max(dW2, getWeightPolarized(*i, false)); } } else if(k == kind::AND) { dW1 = 0, dW2 = numeric_limits::max(); for(TNode::iterator i=n.begin(); i != n.end(); ++i) { dW1 = max(dW1, getWeightPolarized(*i, true)); dW2 = min(dW2, getWeightPolarized(*i, false)); } } else if(k == kind::IMPLIES) { dW1 = min(getWeightPolarized(n[0], false), getWeightPolarized(n[1], true)); dW2 = max(getWeightPolarized(n[0], true), getWeightPolarized(n[1], false)); } else if(k == kind::NOT) { dW1 = getWeightPolarized(n[0], false); dW2 = getWeightPolarized(n[0], true); } else { dW1 = 0; for(TNode::iterator i=n.begin(); i != n.end(); ++i) { dW1 = max(dW1, getWeightPolarized(*i, true)); dW1 = max(dW1, getWeightPolarized(*i, false)); } dW2 = dW1; } } d_weightCache[n] = make_pair(dW1, dW2); } return polarity ? d_weightCache[n].get().first : d_weightCache[n].get().second; } DecisionWeight JustificationHeuristic::getWeight(TNode n) { if(!n.hasAttribute(DecisionWeightAttr()) ) { DecisionWeightInternal combiningFn = options::decisionWeightInternal(); if(combiningFn == DECISION_WEIGHT_INTERNAL_OFF || n.getNumChildren() == 0) { if(options::decisionRandomWeight() != 0) { n.setAttribute(DecisionWeightAttr(), rand() % options::decisionRandomWeight()); } } else if(combiningFn == DECISION_WEIGHT_INTERNAL_MAX) { DecisionWeight dW = 0; for(TNode::iterator i=n.begin(); i != n.end(); ++i) dW = max(dW, getWeight(*i)); n.setAttribute(DecisionWeightAttr(), dW); } else if(combiningFn == DECISION_WEIGHT_INTERNAL_SUM || combiningFn == DECISION_WEIGHT_INTERNAL_USR1) { DecisionWeight dW = 0; for(TNode::iterator i=n.begin(); i != n.end(); ++i) dW = max(dW, getWeight(*i)); n.setAttribute(DecisionWeightAttr(), dW); } else { Unreachable(); } } return n.getAttribute(DecisionWeightAttr()); } typedef vector ChildList; TNode JustificationHeuristic::getChildByWeight(TNode n, int i, bool polarity) { if(options::decisionUseWeight()) { // TODO: Optimize storing & access if(d_childCache.find(n) == d_childCache.end()) { ChildList list0(n.begin(), n.end()), list1(n.begin(), n.end()); std::sort(list0.begin(), list0.end(), JustificationHeuristic::myCompareClass(this,false)); std::sort(list1.begin(), list1.end(), JustificationHeuristic::myCompareClass(this,true)); d_childCache[n] = make_pair(list0, list1); } return polarity ? d_childCache[n].get().second[i] : d_childCache[n].get().first[i]; } else { return n[i]; } } SatValue JustificationHeuristic::tryGetSatValue(Node n) { Debug("decision") << " " << n << " has sat value " << " "; if(d_decisionEngine->hasSatLiteral(n) ) { Debug("decision") << d_decisionEngine->getSatValue(n) << std::endl; return d_decisionEngine->getSatValue(n); } else { Debug("decision") << "NO SAT LITERAL" << std::endl; return SAT_VALUE_UNKNOWN; }//end of else } JustificationHeuristic::IteList JustificationHeuristic::getITEs(TNode n) { IteCache::iterator it = d_iteCache.find(n); if(it != d_iteCache.end()) { return (*it).second; } else { // Compute the list of ITEs // TODO: optimize by avoiding multiple lookup for d_iteCache[n] d_visitedComputeITE.clear(); IteList ilist; computeITEs(n, ilist); d_iteCache.insert(n, ilist); return ilist; } } void JustificationHeuristic::computeITEs(TNode n, IteList &l) { Trace("decision::jh::ite") << " computeITEs( " << n << ", &l)\n"; d_visitedComputeITE.insert(n); for(unsigned i=0; ihasSatLiteral(node); if(Debug.isOn("decision")) { if(!litPresent) { Debug("decision") << "no sat literal for this node" << std::endl; } } #endif // Get value of sat literal for the node, if there is one SatValue litVal = tryGetSatValue(node); /* You'd better know what you want */ Assert(desiredVal != SAT_VALUE_UNKNOWN, "expected known value"); /* Good luck, hope you can get what you want */ // See bug 374 // Assert(litVal == desiredVal || litVal == SAT_VALUE_UNKNOWN, // "invariant violated"); /* What type of node is this */ Kind k = node.getKind(); theory::TheoryId tId = theory::kindToTheoryId(k); bool isAtom = (k == kind::BOOLEAN_TERM_VARIABLE ) || ( (tId != theory::THEORY_BOOL) && (k != kind::EQUAL || (!node[0].getType().isBoolean())) ); /* Some debugging stuff */ Debug("decision::jh") << "kind = " << k << std::endl << "theoryId = " << tId << std::endl << "node = " << node << std::endl << "litVal = " << litVal << std::endl; /** * If not in theory of booleans, check if this is something to split-on. */ if(isAtom) { // if node has embedded ites, resolve that first if(handleEmbeddedITEs(node) == FOUND_SPLITTER) return FOUND_SPLITTER; if(litVal != SAT_VALUE_UNKNOWN) { Assert(litVal == desiredVal); setJustified(node); return NO_SPLITTER; } else { Assert(d_decisionEngine->hasSatLiteral(node)); if(d_curThreshold != 0 && getWeightPolarized(node, desiredVal) >= d_curThreshold) return DONT_KNOW; SatVariable v = d_decisionEngine->getSatLiteral(node).getSatVariable(); d_curDecision = SatLiteral(v, /* negated = */ desiredVal != SAT_VALUE_TRUE ); Trace("decision-node") << "[decision-node] requesting split on " << d_curDecision << ", node: " << node << ", polarity: " << (desiredVal == SAT_VALUE_TRUE ? "true" : "false") << std::endl; return FOUND_SPLITTER; } } SearchResult ret = NO_SPLITTER; switch (k) { case kind::CONST_BOOLEAN: Assert(node.getConst() == false || desiredVal == SAT_VALUE_TRUE); Assert(node.getConst() == true || desiredVal == SAT_VALUE_FALSE); break; case kind::AND: if (desiredVal == SAT_VALUE_FALSE) ret = handleAndOrEasy(node, desiredVal); else ret = handleAndOrHard(node, desiredVal); break; case kind::OR: if (desiredVal == SAT_VALUE_FALSE) ret = handleAndOrHard(node, desiredVal); else ret = handleAndOrEasy(node, desiredVal); break; case kind::IMPLIES: if (desiredVal == SAT_VALUE_FALSE) ret = handleBinaryHard(node[0], SAT_VALUE_TRUE, node[1], SAT_VALUE_FALSE); else ret = handleBinaryEasy(node[0], SAT_VALUE_FALSE, node[1], SAT_VALUE_TRUE); break; case kind::XOR: case kind::EQUAL: { SatValue desiredVal1 = tryGetSatValue(node[0]); SatValue desiredVal2 = tryGetSatValue(node[1]); computeXorIffDesiredValues(k, desiredVal, desiredVal1, desiredVal2); ret = handleBinaryHard(node[0], desiredVal1, node[1], desiredVal2); break; } case kind::ITE: ret = handleITE(node, desiredVal); break; default: Assert(false, "Unexpected Boolean operator"); break; }//end of switch(k) if(ret == DONT_KNOW) { setExploredThreshold(node); } if(ret == NO_SPLITTER) { Assert( litPresent == false || litVal == desiredVal, "Output should be justified"); setJustified(node); } return ret; }/* findRecSplit method */ JustificationHeuristic::SearchResult JustificationHeuristic::handleAndOrEasy(TNode node, SatValue desiredVal) { Assert( (node.getKind() == kind::AND and desiredVal == SAT_VALUE_FALSE) or (node.getKind() == kind::OR and desiredVal == SAT_VALUE_TRUE) ); int numChildren = node.getNumChildren(); SatValue desiredValInverted = invertValue(desiredVal); for(int i = 0; i < numChildren; ++i) { TNode curNode = getChildByWeight(node, i, desiredVal); if ( tryGetSatValue(curNode) != desiredValInverted ) { SearchResult ret = findSplitterRec(curNode, desiredVal); if(ret != DONT_KNOW) { return ret; } } } Assert(d_curThreshold != 0, "handleAndOrEasy: No controlling input found"); return DONT_KNOW; } int JustificationHeuristic::getStartIndex(TNode node) { return d_startIndexCache[node]; } void JustificationHeuristic::saveStartIndex(TNode node, int val) { d_startIndexCache[node] = val; } JustificationHeuristic::SearchResult JustificationHeuristic::handleAndOrHard(TNode node, SatValue desiredVal) { Assert( (node.getKind() == kind::AND and desiredVal == SAT_VALUE_TRUE) or (node.getKind() == kind::OR and desiredVal == SAT_VALUE_FALSE) ); int numChildren = node.getNumChildren(); bool noSplitter = true; int i_st = getStartIndex(node); for(int i = i_st; i < numChildren; ++i) { TNode curNode = getChildByWeight(node, i, desiredVal); SearchResult ret = findSplitterRec(curNode, desiredVal); if (ret == FOUND_SPLITTER) { if(i != i_st) saveStartIndex(node, i); return FOUND_SPLITTER; } noSplitter = noSplitter && (ret == NO_SPLITTER); } return noSplitter ? NO_SPLITTER : DONT_KNOW; } JustificationHeuristic::SearchResult JustificationHeuristic::handleBinaryEasy(TNode node1, SatValue desiredVal1, TNode node2, SatValue desiredVal2) { if(options::decisionUseWeight() && getWeightPolarized(node1, desiredVal1) > getWeightPolarized(node2, desiredVal2)) { swap(node1, node2); swap(desiredVal1, desiredVal2); } if ( tryGetSatValue(node1) != invertValue(desiredVal1) ) { SearchResult ret = findSplitterRec(node1, desiredVal1); if(ret != DONT_KNOW) return ret; } if ( tryGetSatValue(node2) != invertValue(desiredVal2) ) { SearchResult ret = findSplitterRec(node2, desiredVal2); if(ret != DONT_KNOW) return ret; } Assert(d_curThreshold != 0, "handleBinaryEasy: No controlling input found"); return DONT_KNOW; } JustificationHeuristic::SearchResult JustificationHeuristic::handleBinaryHard(TNode node1, SatValue desiredVal1, TNode node2, SatValue desiredVal2) { if(options::decisionUseWeight() && getWeightPolarized(node1, desiredVal1) > getWeightPolarized(node2, desiredVal2)) { swap(node1, node2); swap(desiredVal1, desiredVal2); } bool noSplitter = true; SearchResult ret; ret = findSplitterRec(node1, desiredVal1); if (ret == FOUND_SPLITTER) return FOUND_SPLITTER; noSplitter &= (ret == NO_SPLITTER); ret = findSplitterRec(node2, desiredVal2); if (ret == FOUND_SPLITTER) return FOUND_SPLITTER; noSplitter &= (ret == NO_SPLITTER); return noSplitter ? NO_SPLITTER : DONT_KNOW; } JustificationHeuristic::SearchResult JustificationHeuristic::handleITE(TNode node, SatValue desiredVal) { Debug("decision::jh") << " handleITE (" << node << ", " << desiredVal << std::endl; //[0]: if, [1]: then, [2]: else SatValue ifVal = tryGetSatValue(node[0]); if (ifVal == SAT_VALUE_UNKNOWN) { SatValue trueChildVal = tryGetSatValue(node[1]); SatValue falseChildVal = tryGetSatValue(node[2]); SatValue ifDesiredVal; if(trueChildVal == desiredVal || falseChildVal == invertValue(desiredVal)) { ifDesiredVal = SAT_VALUE_TRUE; } else if(trueChildVal == invertValue(desiredVal) || falseChildVal == desiredVal || (options::decisionUseWeight() && getWeightPolarized(node[1], true) > getWeightPolarized(node[2], false)) ) { ifDesiredVal = SAT_VALUE_FALSE; } else { ifDesiredVal = SAT_VALUE_TRUE; } if(findSplitterRec(node[0], ifDesiredVal) == FOUND_SPLITTER) return FOUND_SPLITTER; Assert(d_curThreshold != 0, "No controlling input found (6)"); return DONT_KNOW; } else { // Try to justify 'if' if(findSplitterRec(node[0], ifVal) == FOUND_SPLITTER) return FOUND_SPLITTER; // If that was successful, we need to go into only one of 'then' // or 'else' int ch = (ifVal == SAT_VALUE_TRUE) ? 1 : 2; if( findSplitterRec(node[ch], desiredVal) == FOUND_SPLITTER ) { return FOUND_SPLITTER; } return NO_SPLITTER; }// else (...ifVal...) } JustificationHeuristic::SearchResult JustificationHeuristic::handleEmbeddedITEs(TNode node) { const IteList l = getITEs(node); Trace("decision::jh::ite") << " ite size = " << l.size() << std::endl; bool noSplitter = true; for(IteList::const_iterator i = l.begin(); i != l.end(); ++i) { if(d_visited.find((*i).first) == d_visited.end()) { d_visited.insert((*i).first); SearchResult ret = findSplitterRec((*i).second, SAT_VALUE_TRUE); if (ret == FOUND_SPLITTER) return FOUND_SPLITTER; noSplitter = noSplitter && (ret == NO_SPLITTER); d_visited.erase((*i).first); } } return noSplitter ? NO_SPLITTER : DONT_KNOW; } } /* namespace CVC4 */ cvc4-1.5/src/decision/justification_heuristic.h000066400000000000000000000142371313116454100217130ustar00rootroot00000000000000/********************* */ /*! \file justification_heuristic.h ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Justification heuristic for decision making ** ** A ATGP-inspired justification-based decision heuristic. See ** [insert reference] for more details. This code is, or not, based ** on the CVC3 implementation of the same heuristic. ** ** It needs access to the simplified but non-clausal formula. **/ #include "cvc4_private.h" #ifndef __CVC4__DECISION__JUSTIFICATION_HEURISTIC #define __CVC4__DECISION__JUSTIFICATION_HEURISTIC #include "context/cdhashmap.h" #include "context/cdhashset.h" #include "context/cdlist.h" #include "decision/decision_attributes.h" #include "decision/decision_engine.h" #include "decision/decision_strategy.h" #include "expr/node.h" #include "prop/sat_solver_types.h" namespace CVC4 { namespace decision { class JustificationHeuristic : public ITEDecisionStrategy { // TRUE FALSE MEH enum SearchResult {FOUND_SPLITTER, NO_SPLITTER, DONT_KNOW}; typedef std::vector > IteList; typedef context::CDHashMap IteCache; typedef std::vector ChildList; typedef context::CDHashMap,TNodeHashFunction> ChildCache; typedef context::CDHashMap SkolemMap; typedef context::CDHashMap,TNodeHashFunction> WeightCache; // being 'justified' is monotonic with respect to decisions typedef context::CDHashSet JustifiedSet; JustifiedSet d_justified; typedef context::CDHashMap ExploredThreshold; ExploredThreshold d_exploredThreshold; context::CDO d_prvsIndex; context::CDO d_threshPrvsIndex; IntStat d_helfulness; IntStat d_giveup; TimerStat d_timestat; /** * A copy of the assertions that need to be justified * directly. Doesn't have ones introduced during during ITE-removal. */ context::CDList d_assertions; //TNode is fine since decisionEngine has them too /** map from ite-rewrite skolem to a boolean-ite assertion */ SkolemMap d_iteAssertions; // 'key' being TNode is fine since if a skolem didn't exist anywhere, // we won't look it up. as for 'value', same reason as d_assertions /** Cache for ITE skolems present in a atomic formula */ IteCache d_iteCache; /** * This is used to prevent infinite loop when trying to find a * splitter. Can happen when exploring assertion corresponding to a * term-ITE. */ hash_set d_visited; /** * Set to track visited nodes in a dfs search done in computeITE * function */ hash_set d_visitedComputeITE; /** current decision for the recursive call */ SatLiteral d_curDecision; /** current threshold for the recursive call */ DecisionWeight d_curThreshold; /** child cache */ ChildCache d_childCache; /** computed polarized weight cache */ WeightCache d_weightCache; class myCompareClass { JustificationHeuristic* d_jh; bool d_b; public: myCompareClass(JustificationHeuristic* jh, bool b):d_jh(jh),d_b(b) {}; bool operator() (TNode n1, TNode n2) { return d_jh->getWeightPolarized(n1, d_b) < d_jh->getWeightPolarized(n2, d_b); } }; public: JustificationHeuristic(CVC4::DecisionEngine* de, context::UserContext *uc, context::Context *c); ~JustificationHeuristic() throw(); prop::SatLiteral getNext(bool &stopSearch); void addAssertions(const std::vector &assertions, unsigned assertionsEnd, IteSkolemMap iteSkolemMap); private: /* getNext with an option to specify threshold */ prop::SatLiteral getNextThresh(bool &stopSearch, DecisionWeight threshold); SatLiteral findSplitter(TNode node, SatValue desiredVal); /** * Do all the hard work. */ SearchResult findSplitterRec(TNode node, SatValue value); /* Helper functions */ void setJustified(TNode); bool checkJustified(TNode); DecisionWeight getExploredThreshold(TNode); void setExploredThreshold(TNode); void setPrvsIndex(int); int getPrvsIndex(); DecisionWeight getWeightPolarized(TNode n, bool polarity); DecisionWeight getWeightPolarized(TNode n, SatValue); static DecisionWeight getWeight(TNode); bool compareByWeightFalse(TNode, TNode); bool compareByWeightTrue(TNode, TNode); TNode getChildByWeight(TNode n, int i, bool polarity); /* If literal exists corresponding to the node return that. Otherwise an UNKNOWN */ SatValue tryGetSatValue(Node n); /* Get list of all term-ITEs for the atomic formula v */ JustificationHeuristic::IteList getITEs(TNode n); /** * For big and/or nodes, a cache to save starting index into children * for efficiently. */ typedef context::CDHashMap StartIndexCache; StartIndexCache d_startIndexCache; int getStartIndex(TNode node); void saveStartIndex(TNode node, int val); /* Compute all term-ITEs in a node recursively */ void computeITEs(TNode n, IteList &l); SearchResult handleAndOrEasy(TNode node, SatValue desiredVal); SearchResult handleAndOrHard(TNode node, SatValue desiredVal); SearchResult handleBinaryEasy(TNode node1, SatValue desiredVal1, TNode node2, SatValue desiredVal2); SearchResult handleBinaryHard(TNode node1, SatValue desiredVal1, TNode node2, SatValue desiredVal2); SearchResult handleITE(TNode node, SatValue desiredVal); SearchResult handleEmbeddedITEs(TNode node); };/* class JustificationHeuristic */ }/* namespace decision */ }/* namespace CVC4 */ #endif /* __CVC4__DECISION__JUSTIFICATION_HEURISTIC */ cvc4-1.5/src/expr/000077500000000000000000000000001313116454100137625ustar00rootroot00000000000000cvc4-1.5/src/expr/Makefile.am000066400000000000000000000136741313116454100160310ustar00rootroot00000000000000# if coverage is enabled: # COVERAGE_ON = yes from configure.ac # Using an inline conditional function to choose between absolute and # relative paths for options files # lcov does not support relative paths and src/options and src/expr # in particular were breaking it # Building with coverage will cause portability issues in some cases VPATH = $(if $(COVERAGE_ON), $(realpath @srcdir@), @srcdir@) AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ $(if $(COVERAGE_ON), -I@abs_builddir@/.. -I@abs_srcdir@/../include -I@abs_srcdir@/.., \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/..) AM_CXXFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = libexpr.la # For some reason statistics were in libutil. No idea why though. libexpr_la_SOURCES = \ array.h \ array_store_all.cpp \ array_store_all.h \ ascription_type.h \ attribute.h \ attribute.cpp \ attribute_internals.h \ attribute_unique_id.h \ convenience_node_builders.h \ chain.h \ emptyset.cpp \ emptyset.h \ expr_iomanip.cpp \ expr_iomanip.h \ expr_manager_scope.h \ expr_stream.h \ kind_map.h \ matcher.h \ node.cpp \ node.h \ node_builder.h \ node_manager.cpp \ node_manager.h \ node_manager_attributes.h \ node_manager_listeners.cpp \ node_manager_listeners.h \ node_self_iterator.h \ node_value.cpp \ node_value.h \ pickle_data.cpp \ pickle_data.h \ pickler.cpp \ pickler.h \ symbol_table.cpp \ symbol_table.h \ type.cpp \ type.h \ type_checker.h \ type_node.cpp \ type_node.h \ variable_type_map.h \ datatype.h \ datatype.cpp \ predicate.h \ predicate.cpp \ record.cpp \ record.h \ uninterpreted_constant.cpp \ uninterpreted_constant.h nodist_libexpr_la_SOURCES = \ kind.h \ metakind.h \ type_properties.h \ expr.h \ expr.cpp \ expr_manager.h \ expr_manager.cpp \ type_checker.cpp EXTRA_DIST = \ array.i \ chain.i \ array_store_all.i \ ascription_type.i \ datatype.i \ emptyset.i \ kind_template.h \ metakind_template.h \ type_properties_template.h \ expr_manager_template.h \ expr_manager_template.cpp \ expr_template.h \ expr_template.cpp \ type_checker_template.cpp \ mkkind \ mkmetakind \ mkexpr \ expr_stream.i \ expr_manager.i \ symbol_table.i \ type.i \ kind.i \ expr.i \ record.i \ predicate.i \ variable_type_map.i \ uninterpreted_constant.i BUILT_SOURCES = \ kind.h \ metakind.h \ type_properties.h \ expr.h \ expr.cpp \ expr_manager.h \ expr_manager.cpp \ type_checker.cpp \ $(top_builddir)/src/expr/.subdirs CLEANFILES = \ kind.h \ metakind.h \ expr.h \ expr.cpp \ expr_manager.h \ expr_manager.cpp \ type_checker.cpp \ type_properties.h \ $(top_builddir)/src/expr/.subdirs $(top_builddir)/src/expr/.subdirs: $(top_srcdir)/src/Makefile.theories @top_srcdir@/src/mksubdirs $(AM_V_at)test -d $(top_builddir)/src/expr || mkdir $(top_builddir)/src/expr $(AM_V_at)chmod +x @top_srcdir@/src/mksubdirs $(AM_V_at)( @top_srcdir@/src/mksubdirs $(if $(COVERAGE_ON), "$(abs_top_srcdir)", "$(top_srcdir)")) > $(top_builddir)/src/expr/.subdirs.tmp @if ! diff -q $(top_builddir)/src/expr/.subdirs $(top_builddir)/src/expr/.subdirs.tmp &>/dev/null; then \ echo " GEN " $@; \ $(am__mv) $(top_builddir)/src/expr/.subdirs.tmp $(top_builddir)/src/expr/.subdirs; \ fi kind.h: kind_template.h mkkind @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkkind $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkkind \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) metakind.h: metakind_template.h mkmetakind @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkmetakind $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkmetakind \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) type_properties.h: type_properties_template.h mkkind @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkkind $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkkind \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr.h: expr_template.h mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr.cpp: expr_template.cpp mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr_manager.h: expr_manager_template.h mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr_manager.cpp: expr_manager_template.cpp mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) type_checker.cpp: type_checker_template.cpp mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) .PHONY: builts builts: $(BUILT_SOURCES) cvc4-1.5/src/expr/Makefile.in000066400000000000000000000753171313116454100160440ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ # if coverage is enabled: # COVERAGE_ON = yes from configure.ac # Using an inline conditional function to choose between absolute and # relative paths for options files # lcov does not support relative paths and src/options and src/expr # in particular were breaking it # Building with coverage will cause portability issues in some cases am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = src/expr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libexpr_la_LIBADD = am_libexpr_la_OBJECTS = array_store_all.lo attribute.lo emptyset.lo \ expr_iomanip.lo node.lo node_manager.lo \ node_manager_listeners.lo node_value.lo pickle_data.lo \ pickler.lo symbol_table.lo type.lo type_node.lo datatype.lo \ predicate.lo record.lo uninterpreted_constant.lo nodist_libexpr_la_OBJECTS = expr.lo expr_manager.lo type_checker.lo libexpr_la_OBJECTS = $(am_libexpr_la_OBJECTS) \ $(nodist_libexpr_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libexpr_la_SOURCES) $(nodist_libexpr_la_SOURCES) DIST_SOURCES = $(libexpr_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(if $(COVERAGE_ON), $(realpath @srcdir@), @srcdir@) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ $(if $(COVERAGE_ON), -I@abs_builddir@/.. -I@abs_srcdir@/../include -I@abs_srcdir@/.., \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/..) AM_CXXFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = libexpr.la # For some reason statistics were in libutil. No idea why though. libexpr_la_SOURCES = \ array.h \ array_store_all.cpp \ array_store_all.h \ ascription_type.h \ attribute.h \ attribute.cpp \ attribute_internals.h \ attribute_unique_id.h \ convenience_node_builders.h \ chain.h \ emptyset.cpp \ emptyset.h \ expr_iomanip.cpp \ expr_iomanip.h \ expr_manager_scope.h \ expr_stream.h \ kind_map.h \ matcher.h \ node.cpp \ node.h \ node_builder.h \ node_manager.cpp \ node_manager.h \ node_manager_attributes.h \ node_manager_listeners.cpp \ node_manager_listeners.h \ node_self_iterator.h \ node_value.cpp \ node_value.h \ pickle_data.cpp \ pickle_data.h \ pickler.cpp \ pickler.h \ symbol_table.cpp \ symbol_table.h \ type.cpp \ type.h \ type_checker.h \ type_node.cpp \ type_node.h \ variable_type_map.h \ datatype.h \ datatype.cpp \ predicate.h \ predicate.cpp \ record.cpp \ record.h \ uninterpreted_constant.cpp \ uninterpreted_constant.h nodist_libexpr_la_SOURCES = \ kind.h \ metakind.h \ type_properties.h \ expr.h \ expr.cpp \ expr_manager.h \ expr_manager.cpp \ type_checker.cpp EXTRA_DIST = \ array.i \ chain.i \ array_store_all.i \ ascription_type.i \ datatype.i \ emptyset.i \ kind_template.h \ metakind_template.h \ type_properties_template.h \ expr_manager_template.h \ expr_manager_template.cpp \ expr_template.h \ expr_template.cpp \ type_checker_template.cpp \ mkkind \ mkmetakind \ mkexpr \ expr_stream.i \ expr_manager.i \ symbol_table.i \ type.i \ kind.i \ expr.i \ record.i \ predicate.i \ variable_type_map.i \ uninterpreted_constant.i BUILT_SOURCES = \ kind.h \ metakind.h \ type_properties.h \ expr.h \ expr.cpp \ expr_manager.h \ expr_manager.cpp \ type_checker.cpp \ $(top_builddir)/src/expr/.subdirs CLEANFILES = \ kind.h \ metakind.h \ expr.h \ expr.cpp \ expr_manager.h \ expr_manager.cpp \ type_checker.cpp \ type_properties.h \ $(top_builddir)/src/expr/.subdirs all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/expr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/expr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libexpr.la: $(libexpr_la_OBJECTS) $(libexpr_la_DEPENDENCIES) $(EXTRA_libexpr_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libexpr_la_OBJECTS) $(libexpr_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array_store_all.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/attribute.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datatype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emptyset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr_iomanip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node_manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node_manager_listeners.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pickle_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pickler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/predicate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symbol_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type_checker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type_node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uninterpreted_constant.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile $(top_builddir)/src/expr/.subdirs: $(top_srcdir)/src/Makefile.theories @top_srcdir@/src/mksubdirs $(AM_V_at)test -d $(top_builddir)/src/expr || mkdir $(top_builddir)/src/expr $(AM_V_at)chmod +x @top_srcdir@/src/mksubdirs $(AM_V_at)( @top_srcdir@/src/mksubdirs $(if $(COVERAGE_ON), "$(abs_top_srcdir)", "$(top_srcdir)")) > $(top_builddir)/src/expr/.subdirs.tmp @if ! diff -q $(top_builddir)/src/expr/.subdirs $(top_builddir)/src/expr/.subdirs.tmp &>/dev/null; then \ echo " GEN " $@; \ $(am__mv) $(top_builddir)/src/expr/.subdirs.tmp $(top_builddir)/src/expr/.subdirs; \ fi kind.h: kind_template.h mkkind @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkkind $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkkind \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) metakind.h: metakind_template.h mkmetakind @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkmetakind $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkmetakind \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) type_properties.h: type_properties_template.h mkkind @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkkind $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkkind \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr.h: expr_template.h mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr.cpp: expr_template.cpp mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr_manager.h: expr_manager_template.h mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) expr_manager.cpp: expr_manager_template.cpp mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) type_checker.cpp: type_checker_template.cpp mkexpr @top_builddir@/src/expr/.subdirs $(if $(COVERAGE_ON), @abs_top_srcdir@, @top_srcdir@)/src/theory/*/kinds $(AM_V_at)chmod +x @srcdir@/mkexpr $(AM_V_at)$(am__mv) $@ $@~ 2>/dev/null || true $(AM_V_GEN)(@srcdir@/mkexpr \ $< \ `cat @top_builddir@/src/expr/.subdirs` \ > $@) || (rm -f $@ && exit 1) .PHONY: builts builts: $(BUILT_SOURCES) # 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: cvc4-1.5/src/expr/array.h000066400000000000000000000014431313116454100152530ustar00rootroot00000000000000/********************* */ /*! \file array.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Array types. ** ** Array types. **/ #include "cvc4_public.h" #ifndef __CVC4__ARRAY_H #define __CVC4__ARRAY_H // we get ArrayType right now by #including type.h. // array.h is still useful for the auto-generated kinds #includes. #include "expr/type.h" #endif /* __CVC4__ARRAY_H */ cvc4-1.5/src/expr/array.i000066400000000000000000000000671313116454100152550ustar00rootroot00000000000000%{ #include "expr/array.h" %} %include "expr/array.h" cvc4-1.5/src/expr/array_store_all.cpp000066400000000000000000000065501313116454100176560ustar00rootroot00000000000000/********************* */ /*! \file array_store_all.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Representation of a constant array (an array in which the ** element is the same for all indices) ** ** Representation of a constant array (an array in which the element is ** the same for all indices). **/ #include "expr/array_store_all.h" #include #include "base/cvc4_assert.h" #include "expr/expr.h" #include "expr/type.h" using namespace std; namespace CVC4 { ArrayStoreAll::ArrayStoreAll(const ArrayType& type, const Expr& expr) throw(IllegalArgumentException) : d_type(NULL), d_expr(NULL) { // this check is stronger than the assertion check in the expr manager that // ArrayTypes are actually array types // because this check is done in production builds too PrettyCheckArgument( type.isArray(), type, "array store-all constants can only be created for array types, not `%s'", type.toString().c_str()); PrettyCheckArgument( expr.getType().isComparableTo(type.getConstituentType()), expr, "expr type `%s' does not match constituent type of array type `%s'", expr.getType().toString().c_str(), type.toString().c_str()); PrettyCheckArgument(expr.isConst(), expr, "ArrayStoreAll requires a constant expression"); // Delay allocation until the checks above have been performed. If these fail, // the memory for d_type and d_expr should not leak. The alternative is catch, // delete and re-throw. d_type = new ArrayType(type); d_expr = new Expr(expr); } ArrayStoreAll::ArrayStoreAll(const ArrayStoreAll& other) : d_type(new ArrayType(other.getType())), d_expr(new Expr(other.getExpr())) {} ArrayStoreAll::~ArrayStoreAll() throw() { delete d_expr; delete d_type; } ArrayStoreAll& ArrayStoreAll::operator=(const ArrayStoreAll& other) { (*d_type) = other.getType(); (*d_expr) = other.getExpr(); return *this; } const ArrayType& ArrayStoreAll::getType() const throw() { return *d_type; } const Expr& ArrayStoreAll::getExpr() const throw() { return *d_expr; } bool ArrayStoreAll::operator==(const ArrayStoreAll& asa) const throw() { return getType() == asa.getType() && getExpr() == asa.getExpr(); } bool ArrayStoreAll::operator<(const ArrayStoreAll& asa) const throw() { return (getType() < asa.getType()) || (getType() == asa.getType() && getExpr() < asa.getExpr()); } bool ArrayStoreAll::operator<=(const ArrayStoreAll& asa) const throw() { return (getType() < asa.getType()) || (getType() == asa.getType() && getExpr() <= asa.getExpr()); } std::ostream& operator<<(std::ostream& out, const ArrayStoreAll& asa) { return out << "__array_store_all__(" << asa.getType() << ", " << asa.getExpr() << ')'; } size_t ArrayStoreAllHashFunction::operator()(const ArrayStoreAll& asa) const { return TypeHashFunction()(asa.getType()) * ExprHashFunction()(asa.getExpr()); } } /* CVC4 namespace */ cvc4-1.5/src/expr/array_store_all.h000066400000000000000000000043131313116454100173160ustar00rootroot00000000000000/********************* */ /*! \file array_store_all.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Representation of a constant array (an array in which the ** element is the same for all indices) ** ** Representation of a constant array (an array in which the element is ** the same for all indices). **/ #include "cvc4_public.h" #pragma once #include #include "base/exception.h" namespace CVC4 { // messy; Expr needs ArrayStoreAll (because it's the payload of a // CONSTANT-kinded expression), and ArrayStoreAll needs Expr. class Expr; class ArrayType; }/* CVC4 namespace */ namespace CVC4 { class CVC4_PUBLIC ArrayStoreAll { public: ArrayStoreAll(const ArrayStoreAll& other); ArrayStoreAll& operator=(const ArrayStoreAll& other); ArrayStoreAll(const ArrayType& type, const Expr& expr) throw(IllegalArgumentException); ~ArrayStoreAll() throw(); const ArrayType& getType() const throw(); const Expr& getExpr() const throw(); bool operator==(const ArrayStoreAll& asa) const throw(); bool operator!=(const ArrayStoreAll& asa) const throw() { return !(*this == asa); } bool operator<(const ArrayStoreAll& asa) const throw(); bool operator<=(const ArrayStoreAll& asa) const throw(); bool operator>(const ArrayStoreAll& asa) const throw() { return !(*this <= asa); } bool operator>=(const ArrayStoreAll& asa) const throw() { return !(*this < asa); } private: ArrayType* d_type; Expr* d_expr; };/* class ArrayStoreAll */ std::ostream& operator<<(std::ostream& out, const ArrayStoreAll& asa) CVC4_PUBLIC; /** * Hash function for the ArrayStoreAll constants. */ struct CVC4_PUBLIC ArrayStoreAllHashFunction { size_t operator()(const ArrayStoreAll& asa) const; };/* struct ArrayStoreAllHashFunction */ }/* CVC4 namespace */ cvc4-1.5/src/expr/array_store_all.i000066400000000000000000000013101313116454100173110ustar00rootroot00000000000000%{ #include "expr/array_store_all.h" %} %rename(equals) CVC4::ArrayStoreAll::operator==(const ArrayStoreAll&) const; %ignore CVC4::ArrayStoreAll::operator!=(const ArrayStoreAll&) const; %rename(less) CVC4::ArrayStoreAll::operator<(const ArrayStoreAll&) const; %rename(lessEqual) CVC4::ArrayStoreAll::operator<=(const ArrayStoreAll&) const; %rename(greater) CVC4::ArrayStoreAll::operator>(const ArrayStoreAll&) const; %rename(greaterEqual) CVC4::ArrayStoreAll::operator>=(const ArrayStoreAll&) const; %rename(apply) CVC4::ArrayStoreAllHashFunction::operator()(const ArrayStoreAll&) const; %ignore CVC4::operator<<(std::ostream&, const ArrayStoreAll&); %include "expr/type.i" %include "expr/array_store_all.h" cvc4-1.5/src/expr/ascription_type.h000066400000000000000000000036611313116454100173550ustar00rootroot00000000000000/********************* */ /*! \file ascription_type.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A class representing a type ascription ** ** A class representing a parameter for the type ascription operator. **/ #include "cvc4_public.h" #ifndef __CVC4__ASCRIPTION_TYPE_H #define __CVC4__ASCRIPTION_TYPE_H #include "expr/type.h" namespace CVC4 { /** * A class used to parameterize a type ascription. For example, * "nil :: list" is an expression of kind APPLY_TYPE_ASCRIPTION. * The parameter is an ASCRIPTION_TYPE-kinded expression with an * AscriptionType payload. (Essentially, all of this is a way to * coerce a Type into the expression tree.) */ class CVC4_PUBLIC AscriptionType { Type d_type; public: AscriptionType(Type t) throw() : d_type(t) {} Type getType() const throw() { return d_type; } bool operator==(const AscriptionType& other) const throw() { return d_type == other.d_type; } bool operator!=(const AscriptionType& other) const throw() { return d_type != other.d_type; } };/* class AscriptionType */ /** * A hash function for type ascription operators. */ struct CVC4_PUBLIC AscriptionTypeHashFunction { inline size_t operator()(const AscriptionType& at) const { return TypeHashFunction()(at.getType()); } };/* struct AscriptionTypeHashFunction */ /** An output routine for AscriptionTypes */ inline std::ostream& operator<<(std::ostream& out, AscriptionType at) { out << at.getType(); return out; } }/* CVC4 namespace */ #endif /* __CVC4__ASCRIPTION_TYPE_H */ cvc4-1.5/src/expr/ascription_type.i000066400000000000000000000005671313116454100173600ustar00rootroot00000000000000%{ #include "expr/ascription_type.h" %} %rename(equals) CVC4::AscriptionType::operator==(const AscriptionType&) const; %ignore CVC4::AscriptionType::operator!=(const AscriptionType&) const; %rename(apply) CVC4::AscriptionTypeHashFunction::operator()(const AscriptionType&) const; %ignore CVC4::operator<<(std::ostream&, AscriptionType); %include "expr/ascription_type.h" cvc4-1.5/src/expr/attribute.cpp000066400000000000000000000103261313116454100164730ustar00rootroot00000000000000/********************* */ /*! \file attribute.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief AttributeManager implementation. ** ** AttributeManager implementation. **/ #include #include "base/output.h" #include "expr/attribute.h" #include "expr/node_value.h" #include "smt/smt_engine.h" using namespace std; namespace CVC4 { namespace expr { namespace attr { SmtAttributes::SmtAttributes(context::Context* ctxt) : d_cdbools(ctxt), d_cdints(ctxt), d_cdtnodes(ctxt), d_cdnodes(ctxt), d_cdstrings(ctxt), d_cdptrs(ctxt) { } AttributeManager::AttributeManager() : d_inGarbageCollection(false) {} bool AttributeManager::inGarbageCollection() const { return d_inGarbageCollection; } SmtAttributes& AttributeManager::getSmtAttributes(SmtEngine* smt) { Assert(smt != NULL); return *smt->d_smtAttributes; } const SmtAttributes& AttributeManager::getSmtAttributes(SmtEngine* smt) const { return *smt->d_smtAttributes; } void AttributeManager::debugHook(int debugFlag) { /* DO NOT CHECK IN ANY CODE INTO THE DEBUG HOOKS! * debugHook() is an empty function for the purpose of debugging * the AttributeManager without recompiling all of CVC4. * Formally this is a nop. */ } void AttributeManager::deleteAllAttributes(NodeValue* nv) { Assert(!inGarbageCollection()); d_bools.erase(nv); deleteFromTable(d_ints, nv); deleteFromTable(d_tnodes, nv); deleteFromTable(d_nodes, nv); deleteFromTable(d_types, nv); deleteFromTable(d_strings, nv); deleteFromTable(d_ptrs, nv); } void SmtAttributes::deleteAllAttributes(TNode n) { NodeValue* nv = n.d_nv; d_cdbools.erase(nv); deleteFromTable(d_cdints, nv); deleteFromTable(d_cdtnodes, nv); deleteFromTable(d_cdnodes, nv); deleteFromTable(d_cdstrings, nv); deleteFromTable(d_cdptrs, nv); } void AttributeManager::deleteAllAttributes() { d_bools.clear(); deleteAllFromTable(d_ints); deleteAllFromTable(d_tnodes); deleteAllFromTable(d_nodes); deleteAllFromTable(d_types); deleteAllFromTable(d_strings); deleteAllFromTable(d_ptrs); } void AttributeManager::deleteAttributes(const AttrIdVec& atids) { typedef std::map > AttrToVecMap; AttrToVecMap perTableIds; for(AttrIdVec::const_iterator it = atids.begin(), it_end = atids.end(); it != it_end; ++it) { const AttributeUniqueId& pair = *(*it); std::vector< uint64_t>& inTable = perTableIds[pair.getTableId()]; inTable.push_back(pair.getWithinTypeId()); } AttrToVecMap::iterator it = perTableIds.begin(), it_end = perTableIds.end(); for(; it != it_end; ++it) { Assert(((*it).first) <= LastAttrTable); AttrTableId tableId = (AttrTableId) ((*it).first); std::vector< uint64_t>& ids = (*it).second; std::sort(ids.begin(), ids.end()); switch(tableId) { case AttrTableBool: Unimplemented("delete attributes is unimplemented for bools"); break; case AttrTableUInt64: deleteAttributesFromTable(d_ints, ids); break; case AttrTableTNode: deleteAttributesFromTable(d_tnodes, ids); break; case AttrTableNode: deleteAttributesFromTable(d_nodes, ids); break; case AttrTableTypeNode: deleteAttributesFromTable(d_types, ids); break; case AttrTableString: deleteAttributesFromTable(d_strings, ids); break; case AttrTablePointer: deleteAttributesFromTable(d_ptrs, ids); break; case AttrTableCDBool: case AttrTableCDUInt64: case AttrTableCDTNode: case AttrTableCDNode: case AttrTableCDString: case AttrTableCDPointer: Unimplemented("CDAttributes cannot be deleted. Contact Tim/Morgan if this behavior is desired."); break; case LastAttrTable: default: Unreachable(); } } } }/* CVC4::expr::attr namespace */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/attribute.h000066400000000000000000000610771313116454100161510ustar00rootroot00000000000000/********************* */ /*! \file attribute.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Node attributes. ** ** Node attributes. **/ #include "cvc4_private.h" /* There are strong constraints on ordering of declarations of * attributes and nodes due to template use */ #include "expr/node.h" #include "expr/type_node.h" #include "context/context.h" #ifndef __CVC4__EXPR__ATTRIBUTE_H #define __CVC4__EXPR__ATTRIBUTE_H #include #include #include "expr/attribute_unique_id.h" // include supporting templates #define CVC4_ATTRIBUTE_H__INCLUDING__ATTRIBUTE_INTERNALS_H #include "expr/attribute_internals.h" #undef CVC4_ATTRIBUTE_H__INCLUDING__ATTRIBUTE_INTERNALS_H namespace CVC4 { class SmtEngine; namespace smt { extern CVC4_THREADLOCAL(SmtEngine*) s_smtEngine_current; }/* CVC4::smt namespace */ namespace expr { namespace attr { // ATTRIBUTE MANAGER =========================================================== struct SmtAttributes { SmtAttributes(context::Context*); // IF YOU ADD ANY TABLES, don't forget to add them also to the // implementation of deleteAllAttributes(). /** Underlying hash table for context-dependent boolean-valued attributes */ CDAttrHash d_cdbools; /** Underlying hash table for context-dependent integral-valued attributes */ CDAttrHash d_cdints; /** Underlying hash table for context-dependent node-valued attributes */ CDAttrHash d_cdtnodes; /** Underlying hash table for context-dependent node-valued attributes */ CDAttrHash d_cdnodes; /** Underlying hash table for context-dependent string-valued attributes */ CDAttrHash d_cdstrings; /** Underlying hash table for context-dependent pointer-valued attributes */ CDAttrHash d_cdptrs; /** Delete all attributes of given node */ void deleteAllAttributes(TNode n); template void deleteFromTable(CDAttrHash& table, NodeValue* nv); };/* struct SmtAttributes */ /** * A container for the main attribute tables of the system. There's a * one-to-one NodeManager : AttributeManager correspondence. */ class AttributeManager { template void deleteFromTable(AttrHash& table, NodeValue* nv); template void deleteAllFromTable(AttrHash& table); template void deleteAttributesFromTable(AttrHash& table, const std::vector& ids); template void reconstructTable(AttrHash& table); /** * getTable<> is a helper template that gets the right table from an * AttributeManager given its type. */ template friend struct getTable; bool d_inGarbageCollection; void clearDeleteAllAttributesBuffer(); SmtAttributes& getSmtAttributes(SmtEngine*); const SmtAttributes& getSmtAttributes(SmtEngine*) const; public: /** Construct an attribute manager. */ AttributeManager(); // IF YOU ADD ANY TABLES, don't forget to add them also to the // implementation of deleteAllAttributes(). /** Underlying hash table for boolean-valued attributes */ AttrHash d_bools; /** Underlying hash table for integral-valued attributes */ AttrHash d_ints; /** Underlying hash table for node-valued attributes */ AttrHash d_tnodes; /** Underlying hash table for node-valued attributes */ AttrHash d_nodes; /** Underlying hash table for types attributes */ AttrHash d_types; /** Underlying hash table for string-valued attributes */ AttrHash d_strings; /** Underlying hash table for pointer-valued attributes */ AttrHash d_ptrs; /** * Get a particular attribute on a particular node. * * @param nv the node about which to inquire * @param attr the attribute kind to get * @return the attribute value, if set, or a default-constructed * AttrKind::value_type if not. */ template typename AttrKind::value_type getAttribute(NodeValue* nv, const AttrKind& attr) const; /** * Determine if a particular attribute exists for a particular node. * * @param nv the node about which to inquire * @param attr the attribute kind to inquire about * @return true if the given node has the given attribute */ template bool hasAttribute(NodeValue* nv, const AttrKind& attr) const; /** * Determine if a particular attribute exists for a particular node, * and get it if it does. * * @param nv the node about which to inquire * @param attr the attribute kind to inquire about * @param ret a pointer to a return value, set in case the node has * the attribute * @return true if the given node has the given attribute */ template bool getAttribute(NodeValue* nv, const AttrKind& attr, typename AttrKind::value_type& ret) const; /** * Set a particular attribute on a particular node. * * @param nv the node for which to set the attribute * @param attr the attribute kind to set * @param value a pointer to a return value, set in case the node has * the attribute * @return true if the given node has the given attribute */ template void setAttribute(NodeValue* nv, const AttrKind& attr, const typename AttrKind::value_type& value); /** * Remove all attributes associated to the given node. * * @param nv the node from which to delete attributes */ void deleteAllAttributes(NodeValue* nv); /** * Remove all attributes from the tables. */ void deleteAllAttributes(); /** * Returns true if a table is currently being deleted. */ bool inGarbageCollection() const ; /** * Determines the AttrTableId of an attribute. * * @param attr the attribute * @return the id of the attribute table. */ template static AttributeUniqueId getAttributeId(const AttrKind& attr); /** A list of attributes. */ typedef std::vector< const AttributeUniqueId* > AttrIdVec; /** Deletes a list of attributes. */ void deleteAttributes(const AttrIdVec& attributeIds); /** * debugHook() is an empty function for the purpose of debugging * the AttributeManager without recompiling all of CVC4. * Formally this is a nop. */ void debugHook(int debugFlag); }; }/* CVC4::expr::attr namespace */ // MAPPING OF ATTRIBUTE KINDS TO TABLES IN THE ATTRIBUTE MANAGER =============== namespace attr { /** * The getTable<> template provides (static) access to the * AttributeManager field holding the table. */ template struct getTable; /** Access the "d_bools" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableBool; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_bools; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_bools; } }; /** Access the "d_ints" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableUInt64; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_ints; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_ints; } }; /** Access the "d_tnodes" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableTNode; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_tnodes; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_tnodes; } }; /** Access the "d_nodes" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableNode; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_nodes; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_nodes; } }; /** Access the "d_types" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableTypeNode; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_types; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_types; } }; /** Access the "d_strings" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableString; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_strings; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_strings; } }; /** Access the "d_ptrs" member of AttributeManager. */ template struct getTable { static const AttrTableId id = AttrTablePointer; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_ptrs; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_ptrs; } }; /** Access the "d_ptrs" member of AttributeManager. */ template struct getTable { static const AttrTableId id = AttrTablePointer; typedef AttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.d_ptrs; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.d_ptrs; } }; /** Access the "d_cdbools" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableCDBool; typedef CDAttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdbools; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdbools; } }; /** Access the "d_cdints" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableCDUInt64; typedef CDAttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdints; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdints; } }; /** Access the "d_tnodes" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableCDTNode; typedef CDAttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdtnodes; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdtnodes; } }; /** Access the "d_cdnodes" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableCDNode; typedef CDAttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdnodes; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdnodes; } }; /** Access the "d_cdstrings" member of AttributeManager. */ template <> struct getTable { static const AttrTableId id = AttrTableCDString; typedef CDAttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdstrings; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdstrings; } }; /** Access the "d_cdptrs" member of AttributeManager. */ template struct getTable { static const AttrTableId id = AttrTableCDPointer; typedef CDAttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdptrs; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdptrs; } }; /** Access the "d_cdptrs" member of AttributeManager. */ template struct getTable { static const AttrTableId id = AttrTableCDPointer; typedef CDAttrHash table_type; static inline table_type& get(AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdptrs; } static inline const table_type& get(const AttributeManager& am, SmtEngine* smt) { return am.getSmtAttributes(smt).d_cdptrs; } }; }/* CVC4::expr::attr namespace */ // ATTRIBUTE MANAGER IMPLEMENTATIONS =========================================== namespace attr { // implementation for AttributeManager::getAttribute() template typename AttrKind::value_type AttributeManager::getAttribute(NodeValue* nv, const AttrKind&) const { typedef typename AttrKind::value_type value_type; typedef KindValueToTableValueMapping mapping; typedef typename getTable:: table_type table_type; const table_type& ah = getTable::get(*this, smt::s_smtEngine_current); typename table_type::const_iterator i = ah.find(std::make_pair(AttrKind::getId(), nv)); if(i == ah.end()) { return typename AttrKind::value_type(); } return mapping::convertBack((*i).second); } /* Helper template class for hasAttribute(), specialized based on * whether AttrKind has a "default value" that all Nodes implicitly * have or not. */ template struct HasAttribute; /** * Specialization of HasAttribute<> helper template for AttrKinds * with a default value. */ template struct HasAttribute { /** This implementation is simple; it's always true. */ static inline bool hasAttribute(const AttributeManager* am, NodeValue* nv) { return true; } /** * This implementation returns the AttrKind's default value if the * Node doesn't have the given attribute. */ static inline bool getAttribute(const AttributeManager* am, NodeValue* nv, typename AttrKind::value_type& ret) { typedef typename AttrKind::value_type value_type; typedef KindValueToTableValueMapping mapping; typedef typename getTable::table_type table_type; const table_type& ah = getTable::get(*am, smt::s_smtEngine_current); typename table_type::const_iterator i = ah.find(std::make_pair(AttrKind::getId(), nv)); if(i == ah.end()) { ret = AttrKind::default_value; } else { ret = mapping::convertBack((*i).second); } return true; } }; /** * Specialization of HasAttribute<> helper template for AttrKinds * without a default value. */ template struct HasAttribute { static inline bool hasAttribute(const AttributeManager* am, NodeValue* nv) { typedef typename AttrKind::value_type value_type; //typedef KindValueToTableValueMapping mapping; typedef typename getTable:: table_type table_type; const table_type& ah = getTable::get(*am, smt::s_smtEngine_current); typename table_type::const_iterator i = ah.find(std::make_pair(AttrKind::getId(), nv)); if(i == ah.end()) { return false; } return true; } static inline bool getAttribute(const AttributeManager* am, NodeValue* nv, typename AttrKind::value_type& ret) { typedef typename AttrKind::value_type value_type; typedef KindValueToTableValueMapping mapping; typedef typename getTable:: table_type table_type; const table_type& ah = getTable::get(*am, smt::s_smtEngine_current); typename table_type::const_iterator i = ah.find(std::make_pair(AttrKind::getId(), nv)); if(i == ah.end()) { return false; } ret = mapping::convertBack((*i).second); return true; } }; template bool AttributeManager::hasAttribute(NodeValue* nv, const AttrKind&) const { return HasAttribute:: hasAttribute(this, nv); } template bool AttributeManager::getAttribute(NodeValue* nv, const AttrKind&, typename AttrKind::value_type& ret) const { return HasAttribute:: getAttribute(this, nv, ret); } template inline void AttributeManager::setAttribute(NodeValue* nv, const AttrKind&, const typename AttrKind::value_type& value) { typedef typename AttrKind::value_type value_type; typedef KindValueToTableValueMapping mapping; typedef typename getTable:: table_type table_type; table_type& ah = getTable::get(*this, smt::s_smtEngine_current); ah[std::make_pair(AttrKind::getId(), nv)] = mapping::convert(value); } /** * Search for the NodeValue in all attribute tables and remove it, * calling the cleanup function if one is defined. * * This cannot use nv as anything other than a pointer! */ template inline void AttributeManager::deleteFromTable(AttrHash& table, NodeValue* nv) { for(uint64_t id = 0; id < attr::LastAttributeId::getId(); ++id) { typedef AttributeTraits traits_t; typedef AttrHash hash_t; std::pair pr = std::make_pair(id, nv); if(traits_t::getCleanup()[id] != NULL) { typename hash_t::iterator i = table.find(pr); if(i != table.end()) { traits_t::getCleanup()[id]((*i).second); table.erase(pr); } } else { table.erase(pr); } } } /** * Obliterate a NodeValue from a (context-dependent) attribute table. */ template inline void SmtAttributes::deleteFromTable(CDAttrHash& table, NodeValue* nv) { for(unsigned id = 0; id < attr::LastAttributeId::getId(); ++id) { table.obliterate(std::make_pair(id, nv)); } } /** * Remove all attributes from the table calling the cleanup function * if one is defined. */ template inline void AttributeManager::deleteAllFromTable(AttrHash& table) { Assert(!d_inGarbageCollection); d_inGarbageCollection = true; bool anyRequireClearing = false; typedef AttributeTraits traits_t; typedef AttrHash hash_t; for(uint64_t id = 0; id < attr::LastAttributeId::getId(); ++id) { if(traits_t::getCleanup()[id] != NULL) { anyRequireClearing = true; } } if(anyRequireClearing) { typename hash_t::iterator it = table.begin(); typename hash_t::iterator it_end = table.end(); while (it != it_end){ uint64_t id = (*it).first.first; /* Debug("attrgc") << "id " << id << " node_value: " << ((*it).first.second) << std::endl; */ if(traits_t::getCleanup()[id] != NULL) { traits_t::getCleanup()[id]((*it).second); } ++it; } } table.clear(); d_inGarbageCollection = false; Assert(!d_inGarbageCollection); } template AttributeUniqueId AttributeManager::getAttributeId(const AttrKind& attr){ typedef typename AttrKind::value_type value_type; AttrTableId tableId = getTable::id; return AttributeUniqueId(tableId, attr.getId()); } template void AttributeManager::deleteAttributesFromTable(AttrHash& table, const std::vector& ids){ d_inGarbageCollection = true; typedef AttributeTraits traits_t; typedef AttrHash hash_t; typename hash_t::iterator it = table.begin(); typename hash_t::iterator tmp; typename hash_t::iterator it_end = table.end(); std::vector::const_iterator begin_ids = ids.begin(); std::vector::const_iterator end_ids = ids.end(); size_t initialSize = table.size(); while (it != it_end){ uint64_t id = (*it).first.first; if(std::binary_search(begin_ids, end_ids, id)){ tmp = it; ++it; if(traits_t::getCleanup()[id] != NULL) { traits_t::getCleanup()[id]((*tmp).second); } table.erase(tmp); }else{ ++it; } } d_inGarbageCollection = false; static const size_t ReconstructShrinkRatio = 8; if(initialSize/ReconstructShrinkRatio > table.size()){ reconstructTable(table); } } template void AttributeManager::reconstructTable(AttrHash& table){ d_inGarbageCollection = true; typedef AttrHash hash_t; hash_t cpy; cpy.insert(table.begin(), table.end()); cpy.swap(table); d_inGarbageCollection = false; } }/* CVC4::expr::attr namespace */ }/* CVC4::expr namespace */ template inline typename AttrKind::value_type NodeManager::getAttribute(expr::NodeValue* nv, const AttrKind&) const { return d_attrManager->getAttribute(nv, AttrKind()); } template inline bool NodeManager::hasAttribute(expr::NodeValue* nv, const AttrKind&) const { return d_attrManager->hasAttribute(nv, AttrKind()); } template inline bool NodeManager::getAttribute(expr::NodeValue* nv, const AttrKind&, typename AttrKind::value_type& ret) const { return d_attrManager->getAttribute(nv, AttrKind(), ret); } template inline void NodeManager::setAttribute(expr::NodeValue* nv, const AttrKind&, const typename AttrKind::value_type& value) { d_attrManager->setAttribute(nv, AttrKind(), value); } template inline typename AttrKind::value_type NodeManager::getAttribute(TNode n, const AttrKind&) const { return d_attrManager->getAttribute(n.d_nv, AttrKind()); } template inline bool NodeManager::hasAttribute(TNode n, const AttrKind&) const { return d_attrManager->hasAttribute(n.d_nv, AttrKind()); } template inline bool NodeManager::getAttribute(TNode n, const AttrKind&, typename AttrKind::value_type& ret) const { return d_attrManager->getAttribute(n.d_nv, AttrKind(), ret); } template inline void NodeManager::setAttribute(TNode n, const AttrKind&, const typename AttrKind::value_type& value) { d_attrManager->setAttribute(n.d_nv, AttrKind(), value); } template inline typename AttrKind::value_type NodeManager::getAttribute(TypeNode n, const AttrKind&) const { return d_attrManager->getAttribute(n.d_nv, AttrKind()); } template inline bool NodeManager::hasAttribute(TypeNode n, const AttrKind&) const { return d_attrManager->hasAttribute(n.d_nv, AttrKind()); } template inline bool NodeManager::getAttribute(TypeNode n, const AttrKind&, typename AttrKind::value_type& ret) const { return d_attrManager->getAttribute(n.d_nv, AttrKind(), ret); } template inline void NodeManager::setAttribute(TypeNode n, const AttrKind&, const typename AttrKind::value_type& value) { d_attrManager->setAttribute(n.d_nv, AttrKind(), value); } }/* CVC4 namespace */ #endif /* __CVC4__EXPR__ATTRIBUTE_H */ cvc4-1.5/src/expr/attribute_internals.h000066400000000000000000000666141313116454100202320ustar00rootroot00000000000000/********************* */ /*! \file attribute_internals.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Node attributes' internals. ** ** Node attributes' internals. **/ #include "cvc4_private.h" #ifndef CVC4_ATTRIBUTE_H__INCLUDING__ATTRIBUTE_INTERNALS_H # error expr/attribute_internals.h should only be included by expr/attribute.h #endif /* CVC4_ATTRIBUTE_H__INCLUDING__ATTRIBUTE_INTERNALS_H */ #ifndef __CVC4__EXPR__ATTRIBUTE_INTERNALS_H #define __CVC4__EXPR__ATTRIBUTE_INTERNALS_H #include #include "context/cdhashmap.h" namespace CVC4 { namespace expr { // ATTRIBUTE HASH FUNCTIONS ==================================================== namespace attr { /** * A hash function for attribute table keys. Attribute table keys are * pairs, (unique-attribute-id, Node). */ struct AttrHashFunction { enum { LARGE_PRIME = 32452843ul }; std::size_t operator()(const std::pair& p) const { return p.first * LARGE_PRIME + p.second->getId(); } };/* struct AttrHashFunction */ /** * A hash function for boolean-valued attribute table keys; here we * don't have to store a pair as the key, because we use a known bit * in [0..63] for each attribute */ struct AttrBoolHashFunction { std::size_t operator()(NodeValue* nv) const { return (size_t)nv->getId(); } };/* struct AttrBoolHashFunction */ }/* CVC4::expr::attr namespace */ // ATTRIBUTE TYPE MAPPINGS ===================================================== namespace attr { /** * KindValueToTableValueMapping is a compile-time-only mechanism to * convert "attribute value types" into "table value types" and back * again. * * Each instantiation < T > is expected to have three members: * * typename table_value_type * * A type representing the underlying table's value_type for * attribute value type (T). It may be different from T, e.g. T * could be a pointer-to-Foo, but the underlying table value_type * might be pointer-to-void. * * static [convertible-to-table_value_type] convert([convertible-from-T]) * * Converts a T into a table_value_type. Used to convert an * attribute value on setting it (and assigning it into the * underlying table). See notes on specializations of * KindValueToTableValueMapping, below. * * static [convertible-to-T] convertBack([convertible-from-table_value_type]) * * Converts a table_value_type back into a T. Used to convert an * underlying table value back into the attribute's expected type * when retrieving it from the table. See notes on * specializations of KindValueToTableValueMapping, below. * * This general (non-specialized) implementation of the template does * nothing. */ template struct KindValueToTableValueMapping { /** Simple case: T == table_value_type */ typedef T table_value_type; /** No conversion necessary */ inline static T convert(const T& t) { return t; } /** No conversion necessary */ inline static T convertBack(const T& t) { return t; } }; /** * Specialization of KindValueToTableValueMapping<> for pointer-valued * attributes. */ template struct KindValueToTableValueMapping { /** Table's value type is void* */ typedef void* table_value_type; /** A simple reinterpret_cast<>() conversion from T* to void* */ inline static void* convert(const T* const& t) { return reinterpret_cast(const_cast(t)); } /** A simple reinterpret_cast<>() conversion from void* to T* */ inline static T* convertBack(void* const& t) { return reinterpret_cast(t); } }; /** * Specialization of KindValueToTableValueMapping<> for const * pointer-valued attributes. */ template struct KindValueToTableValueMapping { /** Table's value type is void* */ typedef void* table_value_type; /** A simple reinterpret_cast<>() conversion from const T* const to void* */ inline static void* convert(const T* const& t) { return reinterpret_cast(const_cast(t)); } /** A simple reinterpret_cast<>() conversion from const void* const to T* */ inline static const T* convertBack(const void* const& t) { return reinterpret_cast(t); } }; }/* CVC4::expr::attr namespace */ // ATTRIBUTE HASH TABLES ======================================================= namespace attr { /** * An "AttrHash"---the hash table underlying * attributes---is simply a mapping of pair * to value_type using our specialized hash function for these pairs. */ template class AttrHash : public __gnu_cxx::hash_map, value_type, AttrHashFunction> { };/* class AttrHash<> */ /** * In the case of Boolean-valued attributes we have a special * "AttrHash" to pack bits together in words. */ template <> class AttrHash : protected __gnu_cxx::hash_map { /** A "super" type, like in Java, for easy reference below. */ typedef __gnu_cxx::hash_map super; /** * BitAccessor allows us to return a bit "by reference." Of course, * we don't require bit-addressibility supported by the system, we * do it with a complex type. */ class BitAccessor { uint64_t& d_word; unsigned d_bit; public: BitAccessor(uint64_t& word, unsigned bit) : d_word(word), d_bit(bit) { } BitAccessor& operator=(bool b) { if(b) { // set the bit d_word |= (1 << d_bit); } else { // clear the bit d_word &= ~(1 << d_bit); } return *this; } operator bool() const { return (d_word & (1 << d_bit)) ? true : false; } };/* class AttrHash::BitAccessor */ /** * A (somewhat degenerate) iterator over boolean-valued attributes. * This iterator doesn't support anything except comparison and * dereference. It's intended just for the result of find() on the * table. */ class BitIterator { std::pair* d_entry; unsigned d_bit; public: BitIterator() : d_entry(NULL), d_bit(0) { } BitIterator(std::pair& entry, unsigned bit) : d_entry(&entry), d_bit(bit) { } std::pair operator*() { return std::make_pair(d_entry->first, BitAccessor(d_entry->second, d_bit)); } bool operator==(const BitIterator& b) { return d_entry == b.d_entry && d_bit == b.d_bit; } };/* class AttrHash::BitIterator */ /** * A (somewhat degenerate) const_iterator over boolean-valued * attributes. This const_iterator doesn't support anything except * comparison and dereference. It's intended just for the result of * find() on the table. */ class ConstBitIterator { const std::pair* d_entry; unsigned d_bit; public: ConstBitIterator() : d_entry(NULL), d_bit(0) { } ConstBitIterator(const std::pair& entry, unsigned bit) : d_entry(&entry), d_bit(bit) { } std::pair operator*() { return std::make_pair(d_entry->first, (d_entry->second & (1 << d_bit)) ? true : false); } bool operator==(const ConstBitIterator& b) { return d_entry == b.d_entry && d_bit == b.d_bit; } };/* class AttrHash::ConstBitIterator */ public: typedef std::pair key_type; typedef bool data_type; typedef std::pair value_type; /** an iterator type; see above for limitations */ typedef BitIterator iterator; /** a const_iterator type; see above for limitations */ typedef ConstBitIterator const_iterator; /** * Find the boolean value in the hash table. Returns something == * end() if not found. */ BitIterator find(const std::pair& k) { super::iterator i = super::find(k.second); if(i == super::end()) { return BitIterator(); } /* Debug.printf("boolattr", "underlying word at 0x%p looks like 0x%016llx, bit is %u\n", &(*i).second, (unsigned long long)((*i).second), unsigned(k.first)); */ return BitIterator(*i, k.first); } /** The "off the end" iterator */ BitIterator end() { return BitIterator(); } /** * Find the boolean value in the hash table. Returns something == * end() if not found. */ ConstBitIterator find(const std::pair& k) const { super::const_iterator i = super::find(k.second); if(i == super::end()) { return ConstBitIterator(); } /* Debug.printf("boolattr", "underlying word at 0x%p looks like 0x%016llx, bit is %u\n", &(*i).second, (unsigned long long)((*i).second), unsigned(k.first)); */ return ConstBitIterator(*i, k.first); } /** The "off the end" const_iterator */ ConstBitIterator end() const { return ConstBitIterator(); } /** * Access the hash table using the underlying operator[]. Inserts * the key into the table (associated to default value) if it's not * already there. */ BitAccessor operator[](const std::pair& k) { uint64_t& word = super::operator[](k.second); return BitAccessor(word, k.first); } /** * Delete all flags from the given node. */ void erase(NodeValue* nv) { super::erase(nv); } /** * Clear the hash table. */ void clear() { super::clear(); } /** Is the hash table empty? */ bool empty() const { return super::empty(); } /** This is currently very misleading! */ size_t size() const { return super::size(); } };/* class AttrHash */ /** * A "CDAttrHash"---the hash table underlying * attributes---is simply a context-dependent mapping of * pair to value_type using our specialized * hash function for these pairs. */ template class CDAttrHash : public context::CDHashMap, value_type, AttrHashFunction> { public: CDAttrHash(context::Context* ctxt) : context::CDHashMap, value_type, AttrHashFunction>(ctxt) { } };/* class CDAttrHash<> */ /** * In the case of Boolean-valued attributes we have a special * "CDAttrHash" to pack bits together in words. */ template <> class CDAttrHash : protected context::CDHashMap { /** A "super" type, like in Java, for easy reference below. */ typedef context::CDHashMap super; /** * BitAccessor allows us to return a bit "by reference." Of course, * we don't require bit-addressibility supported by the system, we * do it with a complex type. */ class BitAccessor { super& d_map; NodeValue* d_key; uint64_t d_word; unsigned d_bit; public: BitAccessor(super& map, NodeValue* key, uint64_t word, unsigned bit) : d_map(map), d_key(key), d_word(word), d_bit(bit) { /* Debug.printf("cdboolattr", "CDAttrHash::BitAccessor(%p, %p, %016llx, %u)\n", &map, key, (unsigned long long) word, bit); */ } BitAccessor& operator=(bool b) { if(b) { // set the bit d_word |= (1 << d_bit); d_map.insert(d_key, d_word); /* Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::set(%p, %p, %016llx, %u)\n", &d_map, d_key, (unsigned long long) d_word, d_bit); */ } else { // clear the bit d_word &= ~(1 << d_bit); d_map.insert(d_key, d_word); /* Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::clr(%p, %p, %016llx, %u)\n", &d_map, d_key, (unsigned long long) d_word, d_bit); */ } return *this; } operator bool() const { /* Debug.printf("cdboolattr", "CDAttrHash::BitAccessor::toBool(%p, %p, %016llx, %u)\n", &d_map, d_key, (unsigned long long) d_word, d_bit); */ return (d_word & (1 << d_bit)) ? true : false; } };/* class CDAttrHash::BitAccessor */ /** * A (somewhat degenerate) const_iterator over boolean-valued * attributes. This const_iterator doesn't support anything except * comparison and dereference. It's intended just for the result of * find() on the table. */ class ConstBitIterator { const std::pair d_entry; unsigned d_bit; public: ConstBitIterator() : d_entry(), d_bit(0) { } ConstBitIterator(const std::pair& entry, unsigned bit) : d_entry(entry), d_bit(bit) { } std::pair operator*() { return std::make_pair(d_entry.first, (d_entry.second & (1 << d_bit)) ? true : false); } bool operator==(const ConstBitIterator& b) { return d_entry == b.d_entry && d_bit == b.d_bit; } };/* class CDAttrHash::ConstBitIterator */ /* remove non-permitted operations */ CDAttrHash(const CDAttrHash&) CVC4_UNDEFINED; CDAttrHash& operator=(const CDAttrHash&) CVC4_UNDEFINED; public: CDAttrHash(context::Context* context) : super(context) { } typedef std::pair key_type; typedef bool data_type; typedef std::pair value_type; /** an iterator type; see above for limitations */ typedef ConstBitIterator iterator; /** a const_iterator type; see above for limitations */ typedef ConstBitIterator const_iterator; /** * Find the boolean value in the hash table. Returns something == * end() if not found. */ ConstBitIterator find(const std::pair& k) const { super::const_iterator i = super::find(k.second); if(i == super::end()) { return ConstBitIterator(); } /* Debug.printf("cdboolattr", "underlying word at address looks like 0x%016llx, bit is %u\n", (unsigned long long)((*i).second), unsigned(k.first)); */ return ConstBitIterator(*i, k.first); } /** The "off the end" const_iterator */ ConstBitIterator end() const { return ConstBitIterator(); } /** * Access the hash table using the underlying operator[]. Inserts * the key into the table (associated to default value) if it's not * already there. */ BitAccessor operator[](const std::pair& k) { uint64_t word = super::operator[](k.second); return BitAccessor(*this, k.second, word, k.first); } /** * Delete all flags from the given node. Simply calls superclass's * obliterate(). Note this removes all attributes at all context * levels for this NodeValue! This is important when the NodeValue * is no longer referenced and is being collected, but otherwise * it probably isn't useful to do this. */ void erase(NodeValue* nv) { super::obliterate(nv); } /** * Clear the hash table. This simply exposes the protected superclass * version of clear() to clients. */ void clear() { super::clear(); } /** Is the hash table empty? */ bool empty() const { return super::empty(); } /** This is currently very misleading! */ size_t size() const { return super::size(); } };/* class CDAttrHash */ }/* CVC4::expr::attr namespace */ // ATTRIBUTE CLEANUP FUNCTIONS ================================================= namespace attr { /** Default cleanup for unmanaged Attribute<> */ struct NullCleanupStrategy { };/* struct NullCleanupStrategy */ /** Default cleanup for ManagedAttribute<> */ template struct ManagedAttributeCleanupStrategy { };/* struct ManagedAttributeCleanupStrategy<> */ /** Specialization for T* */ template struct ManagedAttributeCleanupStrategy { static inline void cleanup(T* p) { delete p; } };/* struct ManagedAttributeCleanupStrategy */ /** Specialization for const T* */ template struct ManagedAttributeCleanupStrategy { static inline void cleanup(const T* p) { delete p; } };/* struct ManagedAttributeCleanupStrategy */ /** * Helper for Attribute<> class below to determine whether a cleanup * is defined or not. */ template struct getCleanupStrategy { typedef T value_type; typedef KindValueToTableValueMapping mapping; static void fn(typename mapping::table_value_type t) { C::cleanup(mapping::convertBack(t)); } };/* struct getCleanupStrategy<> */ /** * Specialization for NullCleanupStrategy. */ template struct getCleanupStrategy { typedef T value_type; typedef KindValueToTableValueMapping mapping; static void (*const fn)(typename mapping::table_value_type); };/* struct getCleanupStrategy */ // out-of-class initialization required (because it's a non-integral type) template void (*const getCleanupStrategy::fn) (typename getCleanupStrategy:: mapping::table_value_type) = NULL; /** * Specialization for ManagedAttributeCleanupStrategy. */ template struct getCleanupStrategy > { typedef T value_type; typedef KindValueToTableValueMapping mapping; static void (*const fn)(typename mapping::table_value_type); };/* struct getCleanupStrategy > */ // out-of-class initialization required (because it's a non-integral type) template void (*const getCleanupStrategy >::fn) (typename getCleanupStrategy >:: mapping::table_value_type) = NULL; /** * Specialization for ManagedAttributeCleanupStrategy. */ template struct getCleanupStrategy > { typedef T* value_type; typedef ManagedAttributeCleanupStrategy C; typedef KindValueToTableValueMapping mapping; static void fn(typename mapping::table_value_type t) { C::cleanup(mapping::convertBack(t)); } };/* struct getCleanupStrategy > */ /** * Specialization for ManagedAttributeCleanupStrategy. */ template struct getCleanupStrategy > { typedef const T* value_type; typedef ManagedAttributeCleanupStrategy C; typedef KindValueToTableValueMapping mapping; static void fn(typename mapping::table_value_type t) { C::cleanup(mapping::convertBack(t)); } };/* struct getCleanupStrategy > */ /** * Cause compile-time error for improperly-instantiated * getCleanupStrategy<>. */ template struct getCleanupStrategy >; }/* CVC4::expr::attr namespace */ // ATTRIBUTE IDENTIFIER ASSIGNMENT TEMPLATE ==================================== namespace attr { /** * This is the last-attribute-assigner. IDs are not globally * unique; rather, they are unique for each table_value_type. */ template struct LastAttributeId { static uint64_t& getId() { static uint64_t s_id = 0; return s_id; } }; }/* CVC4::expr::attr namespace */ // ATTRIBUTE TRAITS ============================================================ namespace attr { /** * This is the last-attribute-assigner. IDs are not globally * unique; rather, they are unique for each table_value_type. */ template struct AttributeTraits { typedef void (*cleanup_t)(T); static std::vector& getCleanup() { static std::vector cleanup; return cleanup; } }; }/* CVC4::expr::attr namespace */ // ATTRIBUTE DEFINITION ======================================================== /** * An "attribute type" structure. * * @param T the tag for the attribute kind. * * @param value_t the underlying value_type for the attribute kind * * @param CleanupStrategy Clean-up routine for associated values when the * Node goes away. Useful, e.g., for pointer-valued attributes when * the values are "owned" by the table. * * @param context_dep whether this attribute kind is * context-dependent */ template class Attribute { /** * The unique ID associated to this attribute. Assigned statically, * at load time. */ static const uint64_t s_id; public: /** The value type for this attribute. */ typedef value_t value_type; /** Get the unique ID associated to this attribute. */ static inline uint64_t getId() { return s_id; } /** * This attribute does not have a default value: calling * hasAttribute() for a Node that hasn't had this attribute set will * return false, and getAttribute() for the Node will return a * default-constructed value_type. */ static const bool has_default_value = false; /** * Expose this setting to the users of this Attribute kind. */ static const bool context_dependent = context_dep; /** * Register this attribute kind and check that the ID is a valid ID * for bool-valued attributes. Fail an assert if not. Otherwise * return the id. */ static inline uint64_t registerAttribute() { typedef typename attr::KindValueToTableValueMapping:: table_value_type table_value_type; typedef attr::AttributeTraits traits; uint64_t id = attr::LastAttributeId::getId()++; Assert(traits::getCleanup().size() == id);// sanity check traits::getCleanup().push_back(attr::getCleanupStrategy::fn); return id; } };/* class Attribute<> */ /** * An "attribute type" structure for boolean flags (special). The * full one is below; the existence of this one disallows for boolean * flag attributes with a specialized cleanup function. */ /* -- doesn't work; other specialization is "more specific" ?? template class Attribute { template struct ERROR_bool_attributes_cannot_have_cleanup_functions; ERROR_bool_attributes_cannot_have_cleanup_functions blah; }; */ /** * An "attribute type" structure for boolean flags (special). */ template class Attribute { /** IDs for bool-valued attributes are actually bit assignments. */ static const uint64_t s_id; public: /** The value type for this attribute; here, bool. */ typedef bool value_type; /** Get the unique ID associated to this attribute. */ static inline uint64_t getId() { return s_id; } /** * Such bool-valued attributes ("flags") have a default value: they * are false for all nodes on entry. Calling hasAttribute() for a * Node that hasn't had this attribute set will return true, and * getAttribute() for the Node will return the default_value below. */ static const bool has_default_value = true; /** * Default value of the attribute for Nodes without one explicitly * set. */ static const bool default_value = false; /** * Expose this setting to the users of this Attribute kind. */ static const bool context_dependent = context_dep; /** * Register this attribute kind and check that the ID is a valid ID * for bool-valued attributes. Fail an assert if not. Otherwise * return the id. */ static inline uint64_t registerAttribute() { uint64_t id = attr::LastAttributeId::getId()++; AlwaysAssert( id <= 63, "Too many boolean node attributes registered " "during initialization !" ); return id; } };/* class Attribute<..., bool, ...> */ /** * This is a context-dependent attribute kind (the only difference * between CDAttribute<> and Attribute<> (with the fourth argument * "true") is that you cannot supply a cleanup function (a no-op one * is used). */ template struct CDAttribute : public Attribute {}; /** * This is a managed attribute kind (the only difference between * ManagedAttribute<> and Attribute<> is the default cleanup function * and the fact that ManagedAttributes cannot be context-dependent). * In the default ManagedAttribute cleanup function, the value is * destroyed with the delete operator. If the value is allocated with * the array version of new[], an alternate cleanup function should be * provided that uses array delete[]. It is an error to create a * ManagedAttribute<> kind with a non-pointer value_type if you don't * also supply a custom cleanup function. */ template > struct ManagedAttribute : public Attribute {}; // ATTRIBUTE IDENTIFIER ASSIGNMENT ============================================= /** Assign unique IDs to attributes at load time. */ // Use of the comma-operator here forces instantiation (and // initialization) of the AttributeTraits<> structure and its // "cleanup" vector before registerAttribute() is called. This is // important because otherwise the vector is initialized later, // clearing the first-pushed cleanup function. template const uint64_t Attribute::s_id = ( attr::AttributeTraits:: table_value_type, context_dep>::getCleanup().size(), Attribute::registerAttribute() ); /** Assign unique IDs to attributes at load time. */ template const uint64_t Attribute::s_id = Attribute:: registerAttribute(); }/* CVC4::expr namespace */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR__ATTRIBUTE_INTERNALS_H */ cvc4-1.5/src/expr/attribute_unique_id.h000066400000000000000000000033521313116454100202030ustar00rootroot00000000000000/********************* */ /*! \file attribute_unique_id.h ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_private.h" #pragma once #include // ATTRIBUTE IDs ============================================================ namespace CVC4 { namespace expr { namespace attr { /** A unique id for each attribute table. */ enum AttrTableId { AttrTableBool, AttrTableUInt64, AttrTableTNode, AttrTableNode, AttrTableTypeNode, AttrTableString, AttrTablePointer, AttrTableCDBool, AttrTableCDUInt64, AttrTableCDTNode, AttrTableCDNode, AttrTableCDString, AttrTableCDPointer, LastAttrTable }; /** * This uniquely identifies attributes across tables. */ class AttributeUniqueId { AttrTableId d_tableId; uint64_t d_withinTypeId; public: AttributeUniqueId() : d_tableId(LastAttrTable), d_withinTypeId(0){} AttributeUniqueId(AttrTableId tableId, uint64_t within) : d_tableId(tableId), d_withinTypeId(within) {} AttrTableId getTableId() const{ return d_tableId; } uint64_t getWithinTypeId() const{ return d_withinTypeId; } };/* CVC4::expr::attr::AttributeUniqueId */ }/* CVC4::expr::attr namespace */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/chain.h000066400000000000000000000030221313116454100152120ustar00rootroot00000000000000/********************* */ /*! \file chain.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_public.h" #ifndef __CVC4__CHAIN_H #define __CVC4__CHAIN_H #include "expr/kind.h" #include namespace CVC4 { /** A class to represent a chained, built-in operator. */ class CVC4_PUBLIC Chain { Kind d_kind; public: explicit Chain(Kind k) : d_kind(k) { } bool operator==(const Chain& ch) const { return d_kind == ch.d_kind; } bool operator!=(const Chain& ch) const { return d_kind != ch.d_kind; } Kind getOperator() const { return d_kind; } };/* class Chain */ inline std::ostream& operator<<(std::ostream& out, const Chain& ch) CVC4_PUBLIC; inline std::ostream& operator<<(std::ostream& out, const Chain& ch) { return out << ch.getOperator(); } struct CVC4_PUBLIC ChainHashFunction { size_t operator()(const Chain& ch) const { return kind::KindHashFunction()(ch.getOperator()); } };/* struct ChainHashFunction */ }/* CVC4 namespace */ #endif /* __CVC4__CHAIN_H */ cvc4-1.5/src/expr/chain.i000066400000000000000000000004611313116454100152170ustar00rootroot00000000000000%{ #include "expr/chain.h" %} %rename(equals) CVC4::Chain::operator==(const Chain&) const; %ignore CVC4::Chain::operator!=(const Chain&) const; %ignore CVC4::operator<<(std::ostream&, const Chain&); %rename(apply) CVC4::ChainHashFunction::operator()(const CVC4::Chain&) const; %include "expr/chain.h" cvc4-1.5/src/expr/convenience_node_builders.h000066400000000000000000000305141313116454100213300ustar00rootroot00000000000000/********************* */ /*! \file convenience_node_builders.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Convenience node builders. ** ** These are convenience node builders for building AND, OR, PLUS, ** and MULT expressions. ** ** \todo These should be moved into theory code (say, ** src/theory/booleans/node_builders.h and ** src/theory/arith/node_builders.h), but for now they're here ** because their design requires CVC4::NodeBuilder to friend them. **/ // TODO: add templatized NodeTemplate to all these inlines // for 'const [T]Node&' arguments? Technically a lot of time is spent // in the TNode conversion and copy constructor, but this should be // optimized into a simple pointer copy (?) // TODO: double-check this. #include "cvc4_private.h" #ifndef __CVC4__CONVENIENCE_NODE_BUILDERS_H #define __CVC4__CONVENIENCE_NODE_BUILDERS_H #include "expr/node_builder.h" namespace CVC4 { class AndNodeBuilder { public: NodeBuilder<> d_eb; inline AndNodeBuilder(const NodeBuilder<>& eb) : d_eb(eb) { d_eb.collapseTo(kind::AND); } inline AndNodeBuilder(TNode a, TNode b) : d_eb(kind::AND) { d_eb << a << b; } template inline AndNodeBuilder& operator&&(const NodeTemplate&); template inline OrNodeBuilder operator||(const NodeTemplate&); inline operator NodeBuilder<>() { return d_eb; } inline operator Node() { return d_eb; } };/* class AndNodeBuilder */ class OrNodeBuilder { public: NodeBuilder<> d_eb; inline OrNodeBuilder(const NodeBuilder<>& eb) : d_eb(eb) { d_eb.collapseTo(kind::OR); } inline OrNodeBuilder(TNode a, TNode b) : d_eb(kind::OR) { d_eb << a << b; } template inline AndNodeBuilder operator&&(const NodeTemplate&); template inline OrNodeBuilder& operator||(const NodeTemplate&); inline operator NodeBuilder<>() { return d_eb; } inline operator Node() { return d_eb; } };/* class OrNodeBuilder */ class PlusNodeBuilder { public: NodeBuilder<> d_eb; inline PlusNodeBuilder(const NodeBuilder<>& eb) : d_eb(eb) { d_eb.collapseTo(kind::PLUS); } inline PlusNodeBuilder(TNode a, TNode b) : d_eb(kind::PLUS) { d_eb << a << b; } template inline PlusNodeBuilder& operator+(const NodeTemplate&); template inline PlusNodeBuilder& operator-(const NodeTemplate&); template inline MultNodeBuilder operator*(const NodeTemplate&); inline operator NodeBuilder<>() { return d_eb; } inline operator Node() { return d_eb; } };/* class PlusNodeBuilder */ class MultNodeBuilder { public: NodeBuilder<> d_eb; inline MultNodeBuilder(const NodeBuilder<>& eb) : d_eb(eb) { d_eb.collapseTo(kind::MULT); } inline MultNodeBuilder(TNode a, TNode b) : d_eb(kind::MULT) { d_eb << a << b; } template inline PlusNodeBuilder operator+(const NodeTemplate&); template inline PlusNodeBuilder operator-(const NodeTemplate&); template inline MultNodeBuilder& operator*(const NodeTemplate&); inline operator NodeBuilder<>() { return d_eb; } inline operator Node() { return d_eb; } };/* class MultNodeBuilder */ template inline NodeBuilder& NodeBuilder::operator&=(TNode e) { return collapseTo(kind::AND).append(e); } template inline NodeBuilder& NodeBuilder::operator|=(TNode e) { return collapseTo(kind::OR).append(e); } template inline NodeBuilder& NodeBuilder::operator+=(TNode e) { return collapseTo(kind::PLUS).append(e); } template inline NodeBuilder& NodeBuilder::operator-=(TNode e) { return collapseTo(kind::PLUS). append(NodeManager::currentNM()->mkNode(kind::UMINUS, e)); } template inline NodeBuilder& NodeBuilder::operator*=(TNode e) { return collapseTo(kind::MULT).append(e); } template inline AndNodeBuilder& AndNodeBuilder::operator&&(const NodeTemplate& n) { d_eb.append(n); return *this; } template inline OrNodeBuilder AndNodeBuilder::operator||(const NodeTemplate& n) { return OrNodeBuilder(Node(d_eb), n); } inline AndNodeBuilder& operator&&(AndNodeBuilder& a, const AndNodeBuilder& b) { return a && Node(const_cast&>(b.d_eb)); } inline AndNodeBuilder& operator&&(AndNodeBuilder& a, const OrNodeBuilder& b) { return a && Node(const_cast&>(b.d_eb)); } inline OrNodeBuilder operator||(AndNodeBuilder& a, const AndNodeBuilder& b) { return a || Node(const_cast&>(b.d_eb)); } inline OrNodeBuilder operator||(AndNodeBuilder& a, const OrNodeBuilder& b) { return a || Node(const_cast&>(b.d_eb)); } template inline AndNodeBuilder OrNodeBuilder::operator&&(const NodeTemplate& n) { return AndNodeBuilder(Node(d_eb), n); } template inline OrNodeBuilder& OrNodeBuilder::operator||(const NodeTemplate& n) { d_eb.append(n); return *this; } inline AndNodeBuilder operator&&(OrNodeBuilder& a, const AndNodeBuilder& b) { return a && Node(const_cast&>(b.d_eb)); } inline AndNodeBuilder operator&&(OrNodeBuilder& a, const OrNodeBuilder& b) { return a && Node(const_cast&>(b.d_eb)); } inline OrNodeBuilder& operator||(OrNodeBuilder& a, const AndNodeBuilder& b) { return a || Node(const_cast&>(b.d_eb)); } inline OrNodeBuilder& operator||(OrNodeBuilder& a, const OrNodeBuilder& b) { return a || Node(const_cast&>(b.d_eb)); } template inline PlusNodeBuilder& PlusNodeBuilder::operator+(const NodeTemplate& n) { d_eb.append(n); return *this; } template inline PlusNodeBuilder& PlusNodeBuilder::operator-(const NodeTemplate& n) { d_eb.append(NodeManager::currentNM()->mkNode(kind::UMINUS, n)); return *this; } template inline MultNodeBuilder PlusNodeBuilder::operator*(const NodeTemplate& n) { return MultNodeBuilder(Node(d_eb), n); } inline PlusNodeBuilder& operator+(PlusNodeBuilder& a, const PlusNodeBuilder& b) { return a + Node(const_cast&>(b.d_eb)); } inline PlusNodeBuilder& operator+(PlusNodeBuilder& a, const MultNodeBuilder& b) { return a + Node(const_cast&>(b.d_eb)); } inline PlusNodeBuilder& operator-(PlusNodeBuilder&a, const PlusNodeBuilder& b) { return a - Node(const_cast&>(b.d_eb)); } inline PlusNodeBuilder& operator-(PlusNodeBuilder& a, const MultNodeBuilder& b) { return a - Node(const_cast&>(b.d_eb)); } inline MultNodeBuilder operator*(PlusNodeBuilder& a, const PlusNodeBuilder& b) { return a * Node(const_cast&>(b.d_eb)); } inline MultNodeBuilder operator*(PlusNodeBuilder& a, const MultNodeBuilder& b) { return a * Node(const_cast&>(b.d_eb)); } template inline PlusNodeBuilder MultNodeBuilder::operator+(const NodeTemplate& n) { return PlusNodeBuilder(Node(d_eb), n); } template inline PlusNodeBuilder MultNodeBuilder::operator-(const NodeTemplate& n) { return PlusNodeBuilder(Node(d_eb), NodeManager::currentNM()->mkNode(kind::UMINUS, n)); } template inline MultNodeBuilder& MultNodeBuilder::operator*(const NodeTemplate& n) { d_eb.append(n); return *this; } inline PlusNodeBuilder operator+(MultNodeBuilder& a, const PlusNodeBuilder& b) { return a + Node(const_cast&>(b.d_eb)); } inline PlusNodeBuilder operator+(MultNodeBuilder& a, const MultNodeBuilder& b) { return a + Node(const_cast&>(b.d_eb)); } inline PlusNodeBuilder operator-(MultNodeBuilder& a, const PlusNodeBuilder& b) { return a - Node(const_cast&>(b.d_eb)); } inline PlusNodeBuilder operator-(MultNodeBuilder& a, const MultNodeBuilder& b) { return a - Node(const_cast&>(b.d_eb)); } inline MultNodeBuilder& operator*(MultNodeBuilder& a, const PlusNodeBuilder& b) { return a * Node(const_cast&>(b.d_eb)); } inline MultNodeBuilder& operator*(MultNodeBuilder& a, const MultNodeBuilder& b) { return a * Node(const_cast&>(b.d_eb)); } template inline AndNodeBuilder operator&&(const NodeTemplate& a, const NodeTemplate& b) { return AndNodeBuilder(a, b); } template inline OrNodeBuilder operator||(const NodeTemplate& a, const NodeTemplate& b) { return OrNodeBuilder(a, b); } template inline PlusNodeBuilder operator+(const NodeTemplate& a, const NodeTemplate& b) { return PlusNodeBuilder(a, b); } template inline PlusNodeBuilder operator-(const NodeTemplate& a, const NodeTemplate& b) { return PlusNodeBuilder(a, NodeManager::currentNM()->mkNode(kind::UMINUS, b)); } template inline MultNodeBuilder operator*(const NodeTemplate& a, const NodeTemplate& b) { return MultNodeBuilder(a, b); } template inline AndNodeBuilder operator&&(const NodeTemplate& a, const AndNodeBuilder& b) { return a && Node(const_cast&>(b.d_eb)); } template inline AndNodeBuilder operator&&(const NodeTemplate& a, const OrNodeBuilder& b) { return a && Node(const_cast&>(b.d_eb)); } template inline OrNodeBuilder operator||(const NodeTemplate& a, const AndNodeBuilder& b) { return a || Node(const_cast&>(b.d_eb)); } template inline OrNodeBuilder operator||(const NodeTemplate& a, const OrNodeBuilder& b) { return a || Node(const_cast&>(b.d_eb)); } template inline PlusNodeBuilder operator+(const NodeTemplate& a, const PlusNodeBuilder& b) { return a + Node(const_cast&>(b.d_eb)); } template inline PlusNodeBuilder operator+(const NodeTemplate& a, const MultNodeBuilder& b) { return a + Node(const_cast&>(b.d_eb)); } template inline PlusNodeBuilder operator-(const NodeTemplate& a, const PlusNodeBuilder& b) { return a - Node(const_cast&>(b.d_eb)); } template inline PlusNodeBuilder operator-(const NodeTemplate& a, const MultNodeBuilder& b) { return a - Node(const_cast&>(b.d_eb)); } template inline MultNodeBuilder operator*(const NodeTemplate& a, const PlusNodeBuilder& b) { return a * Node(const_cast&>(b.d_eb)); } template inline MultNodeBuilder operator*(const NodeTemplate& a, const MultNodeBuilder& b) { return a * Node(const_cast&>(b.d_eb)); } template inline NodeTemplate operator-(const NodeTemplate& a) { return NodeManager::currentNM()->mkNode(kind::UMINUS, a); } }/* CVC4 namespace */ #endif /* __CVC4__CONVENIENCE_NODE_BUILDERS_H */ cvc4-1.5/src/expr/datatype.cpp000066400000000000000000001321011313116454100162770ustar00rootroot00000000000000/********************* */ /*! \file datatype.cpp ** \verbatim ** Top contributors (to current version): ** Andrew Reynolds, Morgan Deters, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A class representing a Datatype definition ** ** A class representing a Datatype definition for the theory of ** inductive datatypes. **/ #include "expr/datatype.h" #include #include #include "base/cvc4_assert.h" #include "expr/attribute.h" #include "expr/expr_manager.h" #include "expr/expr_manager_scope.h" #include "expr/matcher.h" #include "expr/node.h" #include "expr/node_manager.h" #include "expr/type.h" #include "options/set_language.h" using namespace std; namespace CVC4 { namespace expr { namespace attr { struct DatatypeIndexTag {}; struct DatatypeConsIndexTag {}; struct DatatypeFiniteTag {}; struct DatatypeFiniteComputedTag {}; struct DatatypeUFiniteTag {}; struct DatatypeUFiniteComputedTag {}; }/* CVC4::expr::attr namespace */ }/* CVC4::expr namespace */ typedef expr::Attribute DatatypeIndexAttr; typedef expr::Attribute DatatypeConsIndexAttr; typedef expr::Attribute DatatypeFiniteAttr; typedef expr::Attribute DatatypeFiniteComputedAttr; typedef expr::Attribute DatatypeUFiniteAttr; typedef expr::Attribute DatatypeUFiniteComputedAttr; Datatype::~Datatype(){ delete d_record; } const Datatype& Datatype::datatypeOf(Expr item) { ExprManagerScope ems(item); TypeNode t = Node::fromExpr(item).getType(); switch(t.getKind()) { case kind::CONSTRUCTOR_TYPE: return DatatypeType(t[t.getNumChildren() - 1].toType()).getDatatype(); case kind::SELECTOR_TYPE: case kind::TESTER_TYPE: return DatatypeType(t[0].toType()).getDatatype(); default: Unhandled("arg must be a datatype constructor, selector, or tester"); } } size_t Datatype::indexOf(Expr item) { ExprManagerScope ems(item); PrettyCheckArgument(item.getType().isConstructor() || item.getType().isTester() || item.getType().isSelector(), item, "arg must be a datatype constructor, selector, or tester"); TNode n = Node::fromExpr(item); if( item.getKind()==kind::APPLY_TYPE_ASCRIPTION ){ return indexOf( item[0] ); }else{ Assert(n.hasAttribute(DatatypeIndexAttr())); return n.getAttribute(DatatypeIndexAttr()); } } size_t Datatype::cindexOf(Expr item) { ExprManagerScope ems(item); PrettyCheckArgument(item.getType().isSelector(), item, "arg must be a datatype selector"); TNode n = Node::fromExpr(item); if( item.getKind()==kind::APPLY_TYPE_ASCRIPTION ){ return cindexOf( item[0] ); }else{ Assert(n.hasAttribute(DatatypeConsIndexAttr())); return n.getAttribute(DatatypeConsIndexAttr()); } } void Datatype::resolve(ExprManager* em, const std::map& resolutions, const std::vector& placeholders, const std::vector& replacements, const std::vector< SortConstructorType >& paramTypes, const std::vector< DatatypeType >& paramReplacements) throw(IllegalArgumentException, DatatypeResolutionException) { PrettyCheckArgument(em != NULL, em, "cannot resolve a Datatype with a NULL expression manager"); PrettyCheckArgument(!d_resolved, this, "cannot resolve a Datatype twice"); PrettyCheckArgument(resolutions.find(d_name) != resolutions.end(), resolutions, "Datatype::resolve(): resolutions doesn't contain me!"); PrettyCheckArgument(placeholders.size() == replacements.size(), placeholders, "placeholders and replacements must be the same size"); PrettyCheckArgument(paramTypes.size() == paramReplacements.size(), paramTypes, "paramTypes and paramReplacements must be the same size"); PrettyCheckArgument(getNumConstructors() > 0, *this, "cannot resolve a Datatype that has no constructors"); DatatypeType self = (*resolutions.find(d_name)).second; PrettyCheckArgument(&self.getDatatype() == this, resolutions, "Datatype::resolve(): resolutions doesn't contain me!"); d_resolved = true; size_t index = 0; for(std::vector::iterator i = d_constructors.begin(), i_end = d_constructors.end(); i != i_end; ++i) { (*i).resolve(em, self, resolutions, placeholders, replacements, paramTypes, paramReplacements, index); Node::fromExpr((*i).d_constructor).setAttribute(DatatypeIndexAttr(), index); Node::fromExpr((*i).d_tester).setAttribute(DatatypeIndexAttr(), index++); } d_self = self; d_involvesExt = false; d_involvesUt = false; for(const_iterator i = begin(); i != end(); ++i) { if( (*i).involvesExternalType() ){ d_involvesExt = true; } if( (*i).involvesUninterpretedType() ){ d_involvesUt = true; } } if( d_isRecord ){ std::vector< std::pair > fields; for( unsigned i=0; i<(*this)[0].getNumArgs(); i++ ){ fields.push_back( std::pair( (*this)[0][i].getName(), (*this)[0][i].getRangeType() ) ); } d_record = new Record(fields); } //make the sygus evaluation function if( isSygus() ){ PrettyCheckArgument(d_params.empty(), this, "sygus types cannot be parametric"); NodeManager* nm = NodeManager::fromExprManager(em); std::string name = "eval_" + getName(); std::vector evalType; evalType.push_back(TypeNode::fromType(d_self)); if( !d_sygus_bvl.isNull() ){ for(size_t j = 0; j < d_sygus_bvl.getNumChildren(); ++j) { evalType.push_back(TypeNode::fromType(d_sygus_bvl[j].getType())); } } evalType.push_back(TypeNode::fromType(d_sygus_type)); TypeNode eval_func_type = nm->mkFunctionType(evalType); d_sygus_eval = nm->mkSkolem(name, eval_func_type, "sygus evaluation function").toExpr(); } } void Datatype::addConstructor(const DatatypeConstructor& c) { PrettyCheckArgument(!d_resolved, this, "cannot add a constructor to a finalized Datatype"); d_constructors.push_back(c); } void Datatype::setSygus( Type st, Expr bvl, bool allow_const, bool allow_all ){ PrettyCheckArgument(!d_resolved, this, "cannot set sygus type to a finalized Datatype"); d_sygus_type = st; d_sygus_bvl = bvl; d_sygus_allow_const = allow_const || allow_all; d_sygus_allow_all = allow_all; } void Datatype::setTuple() { PrettyCheckArgument(!d_resolved, this, "cannot set tuple to a finalized Datatype"); d_isTuple = true; } void Datatype::setRecord() { PrettyCheckArgument(!d_resolved, this, "cannot set record to a finalized Datatype"); d_isRecord = true; } Cardinality Datatype::getCardinality( Type t ) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved"); Assert( t.isDatatype() && ((DatatypeType)t).getDatatype()==*this ); std::vector< Type > processing; computeCardinality( t, processing ); return d_card; } Cardinality Datatype::getCardinality() const throw(IllegalArgumentException) { PrettyCheckArgument(!isParametric(), this, "for getCardinality, this datatype cannot be parametric"); return getCardinality( d_self ); } Cardinality Datatype::computeCardinality( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException){ PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved"); if( std::find( processing.begin(), processing.end(), d_self )!=processing.end() ){ d_card = Cardinality::INTEGERS; }else{ processing.push_back( d_self ); Cardinality c = 0; for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { c += (*i).computeCardinality( t, processing ); } d_card = c; processing.pop_back(); } return d_card; } bool Datatype::isRecursiveSingleton( Type t ) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved"); Assert( t.isDatatype() && ((DatatypeType)t).getDatatype()==*this ); if( d_card_rec_singleton.find( t )==d_card_rec_singleton.end() ){ if( isCodatatype() ){ Assert( d_card_u_assume[t].empty() ); std::vector< Type > processing; if( computeCardinalityRecSingleton( t, processing, d_card_u_assume[t] ) ){ d_card_rec_singleton[t] = 1; }else{ d_card_rec_singleton[t] = -1; } if( d_card_rec_singleton[t]==1 ){ Trace("dt-card") << "Datatype " << getName() << " is recursive singleton, dependent upon " << d_card_u_assume[t].size() << " uninterpreted sorts: " << std::endl; for( unsigned i=0; i& processing, std::vector< Type >& u_assume ) const throw(IllegalArgumentException){ if( std::find( processing.begin(), processing.end(), d_self )!=processing.end() ){ return true; }else{ if( d_card_rec_singleton[t]==0 ){ //if not yet computed if( d_constructors.size()==1 ){ bool success = false; processing.push_back( d_self ); for(unsigned i = 0; i processing; if( computeWellFounded( processing ) ){ d_well_founded = 1; }else{ d_well_founded = -1; } } return d_well_founded==1; } bool Datatype::computeWellFounded( std::vector< Type >& processing ) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved"); if( std::find( processing.begin(), processing.end(), d_self )!=processing.end() ){ return d_isCo; }else{ processing.push_back( d_self ); for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { if( (*i).computeWellFounded( processing ) ){ processing.pop_back(); return true; }else{ Trace("dt-wf") << "Constructor " << (*i).getName() << " is not well-founded." << std::endl; } } processing.pop_back(); Trace("dt-wf") << "Datatype " << getName() << " is not well-founded." << std::endl; return false; } } Expr Datatype::mkGroundTerm( Type t ) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), this, "this datatype is not yet resolved"); ExprManagerScope ems(d_self); Debug("datatypes") << "mkGroundTerm of type " << t << std::endl; // is this already in the cache ? std::map< Type, Expr >::iterator it = d_ground_term.find( t ); if( it != d_ground_term.end() ){ Debug("datatypes") << "\nin cache: " << d_self << " => " << it->second << std::endl; return it->second; } else { std::vector< Type > processing; Expr groundTerm = computeGroundTerm( t, processing ); if(!groundTerm.isNull() ) { // we found a ground-term-constructing constructor! d_ground_term[t] = groundTerm; Debug("datatypes") << "constructed: " << getName() << " => " << groundTerm << std::endl; } if( groundTerm.isNull() ){ if( !d_isCo ){ // if we get all the way here, we aren't well-founded IllegalArgument(*this, "datatype is not well-founded, cannot construct a ground term!"); }else{ return groundTerm; } }else{ return groundTerm; } } } Expr getSubtermWithType( Expr e, Type t, bool isTop ){ if( !isTop && e.getType()==t ){ return e; }else{ for( unsigned i=0; i& processing ) const throw(IllegalArgumentException) { if( std::find( processing.begin(), processing.end(), t )==processing.end() ){ processing.push_back( t ); for( unsigned r=0; r<2; r++ ){ for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { //do nullary constructors first if( ((*i).getNumArgs()==0)==(r==0)){ Debug("datatypes") << "Try constructing for " << (*i).getName() << ", processing = " << processing.size() << std::endl; Expr e = (*i).computeGroundTerm( t, processing, d_ground_term ); if( !e.isNull() ){ //must check subterms for the same type to avoid infinite loops in type enumeration Expr se = getSubtermWithType( e, t, true ); if( !se.isNull() ){ Debug("datatypes") << "Take subterm " << se << std::endl; e = se; } processing.pop_back(); return e; }else{ Debug("datatypes") << "...failed." << std::endl; } } } } processing.pop_back(); }else{ Debug("datatypes") << "...already processing " << t << " " << d_self << std::endl; } return Expr(); } DatatypeType Datatype::getDatatypeType() const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), *this, "Datatype must be resolved to get its DatatypeType"); PrettyCheckArgument(!d_self.isNull(), *this); return DatatypeType(d_self); } DatatypeType Datatype::getDatatypeType(const std::vector& params) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), *this, "Datatype must be resolved to get its DatatypeType"); PrettyCheckArgument(!d_self.isNull() && DatatypeType(d_self).isParametric(), this); return DatatypeType(d_self).instantiate(params); } bool Datatype::operator==(const Datatype& other) const throw() { // two datatypes are == iff the name is the same and they have // exactly matching constructors (in the same order) if(this == &other) { return true; } if(isResolved() != other.isResolved()) { return false; } if( d_name != other.d_name || getNumConstructors() != other.getNumConstructors() ) { return false; } for(const_iterator i = begin(), j = other.begin(); i != end(); ++i, ++j) { Assert(j != other.end()); // two constructors are == iff they have the same name, their // constructors and testers are equal and they have exactly // matching args (in the same order) if((*i).getName() != (*j).getName() || (*i).getNumArgs() != (*j).getNumArgs()) { return false; } // testing equivalence of constructors and testers is harder b/c // this constructor might not be resolved yet; only compare them // if they are both resolved Assert(isResolved() == !(*i).d_constructor.isNull() && isResolved() == !(*i).d_tester.isNull() && (*i).d_constructor.isNull() == (*j).d_constructor.isNull() && (*i).d_tester.isNull() == (*j).d_tester.isNull()); if(!(*i).d_constructor.isNull() && (*i).d_constructor != (*j).d_constructor) { return false; } if(!(*i).d_tester.isNull() && (*i).d_tester != (*j).d_tester) { return false; } for(DatatypeConstructor::const_iterator k = (*i).begin(), l = (*j).begin(); k != (*i).end(); ++k, ++l) { Assert(l != (*j).end()); if((*k).getName() != (*l).getName()) { return false; } // testing equivalence of selectors is harder b/c args might not // be resolved yet Assert(isResolved() == (*k).isResolved() && (*k).isResolved() == (*l).isResolved()); if((*k).isResolved()) { // both are resolved, so simply compare the selectors directly if((*k).d_selector != (*l).d_selector) { return false; } } else { // neither is resolved, so compare their (possibly unresolved) // types; we don't know if they'll be resolved the same way, // so we can't ever say unresolved types are equal if(!(*k).d_selector.isNull() && !(*l).d_selector.isNull()) { if((*k).d_selector.getType() != (*l).d_selector.getType()) { return false; } } else { if((*k).isUnresolvedSelf() && (*l).isUnresolvedSelf()) { // Fine, the selectors are equal if the rest of the // enclosing datatypes are equal... } else { return false; } } } } } return true; } const DatatypeConstructor& Datatype::operator[](size_t index) const { PrettyCheckArgument(index < getNumConstructors(), index, "index out of bounds"); return d_constructors[index]; } const DatatypeConstructor& Datatype::operator[](std::string name) const { for(const_iterator i = begin(); i != end(); ++i) { if((*i).getName() == name) { return *i; } } IllegalArgument(name, "No such constructor `%s' of datatype `%s'", name.c_str(), d_name.c_str()); } Expr Datatype::getConstructor(std::string name) const { return (*this)[name].getConstructor(); } Type Datatype::getSygusType() const { return d_sygus_type; } Expr Datatype::getSygusVarList() const { return d_sygus_bvl; } bool Datatype::getSygusAllowConst() const { return d_sygus_allow_const; } bool Datatype::getSygusAllowAll() const { return d_sygus_allow_all; } Expr Datatype::getSygusEvaluationFunc() const { return d_sygus_eval; } bool Datatype::involvesExternalType() const{ return d_involvesExt; } bool Datatype::involvesUninterpretedType() const{ return d_involvesUt; } void DatatypeConstructor::resolve(ExprManager* em, DatatypeType self, const std::map& resolutions, const std::vector& placeholders, const std::vector& replacements, const std::vector< SortConstructorType >& paramTypes, const std::vector< DatatypeType >& paramReplacements, size_t cindex) throw(IllegalArgumentException, DatatypeResolutionException) { PrettyCheckArgument(em != NULL, em, "cannot resolve a Datatype with a NULL expression manager"); PrettyCheckArgument(!isResolved(), "cannot resolve a Datatype constructor twice; " "perhaps the same constructor was added twice, " "or to two datatypes?"); // we're using some internals, so we have to set up this library context ExprManagerScope ems(*em); NodeManager* nm = NodeManager::fromExprManager(em); TypeNode selfTypeNode = TypeNode::fromType(self); size_t index = 0; for(std::vector::iterator i = d_args.begin(), i_end = d_args.end(); i != i_end; ++i) { if((*i).d_selector.isNull()) { // the unresolved type wasn't created here; do name resolution string typeName = (*i).d_name.substr((*i).d_name.find('\0') + 1); (*i).d_name.resize((*i).d_name.find('\0')); if(typeName == "") { (*i).d_selector = nm->mkSkolem((*i).d_name, nm->mkSelectorType(selfTypeNode, selfTypeNode), "is a selector", NodeManager::SKOLEM_EXACT_NAME | NodeManager::SKOLEM_NO_NOTIFY).toExpr(); } else { map::const_iterator j = resolutions.find(typeName); if(j == resolutions.end()) { stringstream msg; msg << "cannot resolve type \"" << typeName << "\" " << "in selector \"" << (*i).d_name << "\" " << "of constructor \"" << d_name << "\""; throw DatatypeResolutionException(msg.str()); } else { (*i).d_selector = nm->mkSkolem((*i).d_name, nm->mkSelectorType(selfTypeNode, TypeNode::fromType((*j).second)), "is a selector", NodeManager::SKOLEM_EXACT_NAME | NodeManager::SKOLEM_NO_NOTIFY).toExpr(); } } } else { // the type for the selector already exists; may need // complex-type substitution Type range = (*i).d_selector.getType(); if(!placeholders.empty()) { range = range.substitute(placeholders, replacements); } if(!paramTypes.empty() ) { range = doParametricSubstitution( range, paramTypes, paramReplacements ); } (*i).d_selector = nm->mkSkolem((*i).d_name, nm->mkSelectorType(selfTypeNode, TypeNode::fromType(range)), "is a selector", NodeManager::SKOLEM_EXACT_NAME | NodeManager::SKOLEM_NO_NOTIFY).toExpr(); } Node::fromExpr((*i).d_selector).setAttribute(DatatypeConsIndexAttr(), cindex); Node::fromExpr((*i).d_selector).setAttribute(DatatypeIndexAttr(), index++); (*i).d_resolved = true; } Assert(index == getNumArgs()); // Set constructor/tester last, since DatatypeConstructor::isResolved() // returns true when d_tester is not the null Expr. If something // fails above, we want Constuctor::isResolved() to remain "false". // Further, mkConstructorType() iterates over the selectors, so // should get the results of any resolutions we did above. d_tester = nm->mkSkolem(getTesterName(), nm->mkTesterType(selfTypeNode), "is a tester", NodeManager::SKOLEM_EXACT_NAME | NodeManager::SKOLEM_NO_NOTIFY).toExpr(); d_constructor = nm->mkSkolem(getName(), nm->mkConstructorType(*this, selfTypeNode), "is a constructor", NodeManager::SKOLEM_EXACT_NAME | NodeManager::SKOLEM_NO_NOTIFY).toExpr(); // associate constructor with all selectors for(std::vector::iterator i = d_args.begin(), i_end = d_args.end(); i != i_end; ++i) { (*i).d_constructor = d_constructor; } } Type DatatypeConstructor::doParametricSubstitution( Type range, const std::vector< SortConstructorType >& paramTypes, const std::vector< DatatypeType >& paramReplacements ) { TypeNode typn = TypeNode::fromType( range ); if(typn.getNumChildren() == 0) { return range; } else { std::vector< Type > origChildren; std::vector< Type > children; for(TypeNode::const_iterator i = typn.begin(), iend = typn.end();i != iend; ++i) { origChildren.push_back( (*i).toType() ); children.push_back( doParametricSubstitution( (*i).toType(), paramTypes, paramReplacements ) ); } for( unsigned i = 0; i < paramTypes.size(); ++i ) { if( paramTypes[i].getArity() == origChildren.size() ) { Type tn = paramTypes[i].instantiate( origChildren ); if( range == tn ) { return paramReplacements[i].instantiate( children ); } } } NodeBuilder<> nb(typn.getKind()); for( unsigned i = 0; i < children.size(); ++i ) { nb << TypeNode::fromType( children[i] ); } return nb.constructTypeNode().toType(); } } DatatypeConstructor::DatatypeConstructor(std::string name) : // We don't want to introduce a new data member, because eventually // we're going to be a constant stuffed inside a node. So we stow // the tester name away inside the constructor name until // resolution. d_name(name + '\0' + "is_" + name), // default tester name is "is_FOO" d_tester(), d_args() { PrettyCheckArgument(name != "", name, "cannot construct a datatype constructor without a name"); } DatatypeConstructor::DatatypeConstructor(std::string name, std::string tester) : // We don't want to introduce a new data member, because eventually // we're going to be a constant stuffed inside a node. So we stow // the tester name away inside the constructor name until // resolution. d_name(name + '\0' + tester), d_tester(), d_args() { PrettyCheckArgument(name != "", name, "cannot construct a datatype constructor without a name"); PrettyCheckArgument(!tester.empty(), tester, "cannot construct a datatype constructor without a tester"); } void DatatypeConstructor::setSygus( Expr op, Expr let_body, std::vector< Expr >& let_args, unsigned num_let_input_args ){ d_sygus_op = op; d_sygus_let_body = let_body; d_sygus_let_args.insert( d_sygus_let_args.end(), let_args.begin(), let_args.end() ); d_sygus_num_let_input_args = num_let_input_args; } void DatatypeConstructor::addArg(std::string selectorName, Type selectorType) { // We don't want to introduce a new data member, because eventually // we're going to be a constant stuffed inside a node. So we stow // the selector type away inside a var until resolution (when we can // create the proper selector type) PrettyCheckArgument(!isResolved(), this, "cannot modify a finalized Datatype constructor"); PrettyCheckArgument(!selectorType.isNull(), selectorType, "cannot add a null selector type"); // we're using some internals, so we have to set up this library context ExprManagerScope ems(selectorType); Expr type = NodeManager::currentNM()->mkSkolem("unresolved_" + selectorName, TypeNode::fromType(selectorType), "is an unresolved selector type placeholder", NodeManager::SKOLEM_EXACT_NAME | NodeManager::SKOLEM_NO_NOTIFY).toExpr(); Debug("datatypes") << type << endl; d_args.push_back(DatatypeConstructorArg(selectorName, type)); } void DatatypeConstructor::addArg(std::string selectorName, DatatypeUnresolvedType selectorType) { // We don't want to introduce a new data member, because eventually // we're going to be a constant stuffed inside a node. So we stow // the selector type away after a NUL in the name string until // resolution (when we can create the proper selector type) PrettyCheckArgument(!isResolved(), this, "cannot modify a finalized Datatype constructor"); PrettyCheckArgument(selectorType.getName() != "", selectorType, "cannot add a null selector type"); d_args.push_back(DatatypeConstructorArg(selectorName + '\0' + selectorType.getName(), Expr())); } void DatatypeConstructor::addArg(std::string selectorName, DatatypeSelfType) { // We don't want to introduce a new data member, because eventually // we're going to be a constant stuffed inside a node. So we mark // the name string with a NUL to indicate that we have a // self-selecting selector until resolution (when we can create the // proper selector type) PrettyCheckArgument(!isResolved(), this, "cannot modify a finalized Datatype constructor"); d_args.push_back(DatatypeConstructorArg(selectorName + '\0', Expr())); } std::string DatatypeConstructor::getName() const throw() { return d_name.substr(0, d_name.find('\0')); } std::string DatatypeConstructor::getTesterName() const throw() { return d_name.substr(d_name.find('\0') + 1); } Expr DatatypeConstructor::getConstructor() const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_constructor; } Type DatatypeConstructor::getSpecializedConstructorType(Type returnType) const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); ExprManagerScope ems(d_constructor); const Datatype& dt = Datatype::datatypeOf(d_constructor); PrettyCheckArgument(dt.isParametric(), this, "this datatype constructor is not parametric"); DatatypeType dtt = dt.getDatatypeType(); Matcher m(dtt); m.doMatching( TypeNode::fromType(dtt), TypeNode::fromType(returnType) ); vector subst; m.getMatches(subst); vector params = dt.getParameters(); return d_constructor.getType().substitute(params, subst); } Expr DatatypeConstructor::getTester() const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_tester; } Expr DatatypeConstructor::getSygusOp() const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_sygus_op; } Expr DatatypeConstructor::getSygusLetBody() const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_sygus_let_body; } unsigned DatatypeConstructor::getNumSygusLetArgs() const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_sygus_let_args.size(); } Expr DatatypeConstructor::getSygusLetArg( unsigned i ) const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_sygus_let_args[i]; } unsigned DatatypeConstructor::getNumSygusLetInputArgs() const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_sygus_num_let_input_args; } bool DatatypeConstructor::isSygusIdFunc() const { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); return d_sygus_let_args.size()==1 && d_sygus_let_args[0]==d_sygus_let_body; } Cardinality DatatypeConstructor::getCardinality( Type t ) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); Cardinality c = 1; for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { c *= SelectorType((*i).getSelector().getType()).getRangeType().getCardinality(); } return c; } /** compute the cardinality of this datatype */ Cardinality DatatypeConstructor::computeCardinality( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException){ Cardinality c = 1; std::vector< Type > instTypes; std::vector< Type > paramTypes; if( DatatypeType(t).isParametric() ){ paramTypes = DatatypeType(t).getDatatype().getParameters(); instTypes = DatatypeType(t).getParamTypes(); } for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { Type tc = SelectorType((*i).getSelector().getType()).getRangeType(); if( DatatypeType(t).isParametric() ){ tc = tc.substitute( paramTypes, instTypes ); } if( tc.isDatatype() ){ const Datatype& dt = ((DatatypeType)tc).getDatatype(); c *= dt.computeCardinality( t, processing ); }else{ c *= tc.getCardinality(); } } return c; } bool DatatypeConstructor::computeWellFounded( std::vector< Type >& processing ) const throw(IllegalArgumentException){ for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { Type t = SelectorType((*i).getSelector().getType()).getRangeType(); if( t.isDatatype() ){ const Datatype& dt = ((DatatypeType)t).getDatatype(); if( !dt.computeWellFounded( processing ) ){ return false; } } } return true; } bool DatatypeConstructor::isFinite( Type t ) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); // we're using some internals, so we have to set up this library context ExprManagerScope ems(d_constructor); TNode self = Node::fromExpr(d_constructor); // is this already in the cache ? if(self.getAttribute(DatatypeFiniteComputedAttr())) { return self.getAttribute(DatatypeFiniteAttr()); } std::vector< Type > instTypes; std::vector< Type > paramTypes; if( DatatypeType(t).isParametric() ){ paramTypes = DatatypeType(t).getDatatype().getParameters(); instTypes = DatatypeType(t).getParamTypes(); } for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { Type tc = (*i).getRangeType(); if( DatatypeType(t).isParametric() ){ tc = tc.substitute( paramTypes, instTypes ); } if(! tc.getCardinality().isFinite()) { self.setAttribute(DatatypeFiniteComputedAttr(), true); self.setAttribute(DatatypeFiniteAttr(), false); return false; } } self.setAttribute(DatatypeFiniteComputedAttr(), true); self.setAttribute(DatatypeFiniteAttr(), true); return true; } bool DatatypeConstructor::isInterpretedFinite( Type t ) const throw(IllegalArgumentException) { PrettyCheckArgument(isResolved(), this, "this datatype constructor is not yet resolved"); // we're using some internals, so we have to set up this library context ExprManagerScope ems(d_constructor); TNode self = Node::fromExpr(d_constructor); // is this already in the cache ? if(self.getAttribute(DatatypeUFiniteComputedAttr())) { return self.getAttribute(DatatypeUFiniteAttr()); } std::vector< Type > instTypes; std::vector< Type > paramTypes; if( DatatypeType(t).isParametric() ){ paramTypes = DatatypeType(t).getDatatype().getParameters(); instTypes = DatatypeType(t).getParamTypes(); } for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { Type tc = (*i).getRangeType(); if( DatatypeType(t).isParametric() ){ tc = tc.substitute( paramTypes, instTypes ); } TypeNode tcn = TypeNode::fromType( tc ); if(!tcn.isInterpretedFinite()) { self.setAttribute(DatatypeUFiniteComputedAttr(), true); self.setAttribute(DatatypeUFiniteAttr(), false); return false; } } self.setAttribute(DatatypeUFiniteComputedAttr(), true); self.setAttribute(DatatypeUFiniteAttr(), true); return true; } Expr DatatypeConstructor::computeGroundTerm( Type t, std::vector< Type >& processing, std::map< Type, Expr >& gt ) const throw(IllegalArgumentException) { // we're using some internals, so we have to set up this library context ExprManagerScope ems(d_constructor); std::vector groundTerms; groundTerms.push_back(getConstructor()); // for each selector, get a ground term std::vector< Type > instTypes; std::vector< Type > paramTypes; if( DatatypeType(t).isParametric() ){ paramTypes = DatatypeType(t).getDatatype().getParameters(); instTypes = DatatypeType(t).getParamTypes(); } for(const_iterator i = begin(), i_end = end(); i != i_end; ++i) { Type selType = SelectorType((*i).getSelector().getType()).getRangeType(); if( DatatypeType(t).isParametric() ){ selType = selType.substitute( paramTypes, instTypes ); } Expr arg; if( selType.isDatatype() ){ std::map< Type, Expr >::iterator itgt = gt.find( selType ); if( itgt != gt.end() ){ arg = itgt->second; }else{ const Datatype & dt = DatatypeType(selType).getDatatype(); arg = dt.computeGroundTerm( selType, processing ); } }else{ arg = selType.mkGroundTerm(); } if( arg.isNull() ){ Debug("datatypes") << "...unable to construct arg of " << (*i).getName() << std::endl; return Expr(); }else{ Debug("datatypes") << "...constructed arg " << arg.getType() << std::endl; groundTerms.push_back(arg); } } Expr groundTerm = getConstructor().getExprManager()->mkExpr(kind::APPLY_CONSTRUCTOR, groundTerms); if( groundTerm.getType()!=t ){ Assert( Datatype::datatypeOf( d_constructor ).isParametric() ); //type is ambiguous, must apply type ascription Debug("datatypes-gt") << "ambiguous type for " << groundTerm << ", ascribe to " << t << std::endl; groundTerms[0] = getConstructor().getExprManager()->mkExpr(kind::APPLY_TYPE_ASCRIPTION, getConstructor().getExprManager()->mkConst(AscriptionType(getSpecializedConstructorType(t))), groundTerms[0]); groundTerm = getConstructor().getExprManager()->mkExpr(kind::APPLY_CONSTRUCTOR, groundTerms); } return groundTerm; } const DatatypeConstructorArg& DatatypeConstructor::operator[](size_t index) const { PrettyCheckArgument(index < getNumArgs(), index, "index out of bounds"); return d_args[index]; } const DatatypeConstructorArg& DatatypeConstructor::operator[](std::string name) const { for(const_iterator i = begin(); i != end(); ++i) { if((*i).getName() == name) { return *i; } } IllegalArgument(name, "No such arg `%s' of constructor `%s'", name.c_str(), d_name.c_str()); } Expr DatatypeConstructor::getSelector(std::string name) const { return (*this)[name].getSelector(); } bool DatatypeConstructor::involvesExternalType() const{ for(const_iterator i = begin(); i != end(); ++i) { if(! SelectorType((*i).getSelector().getType()).getRangeType().isDatatype()) { return true; } } return false; } bool DatatypeConstructor::involvesUninterpretedType() const{ for(const_iterator i = begin(); i != end(); ++i) { if(SelectorType((*i).getSelector().getType()).getRangeType().isSort()) { return true; } } return false; } DatatypeConstructorArg::DatatypeConstructorArg(std::string name, Expr selector) : d_name(name), d_selector(selector), d_resolved(false) { PrettyCheckArgument(name != "", name, "cannot construct a datatype constructor arg without a name"); } std::string DatatypeConstructorArg::getName() const throw() { string name = d_name; const size_t nul = name.find('\0'); if(nul != string::npos) { name.resize(nul); } return name; } Expr DatatypeConstructorArg::getSelector() const { PrettyCheckArgument(isResolved(), this, "cannot get a selector for an unresolved datatype constructor"); return d_selector; } Expr DatatypeConstructorArg::getConstructor() const { PrettyCheckArgument(isResolved(), this, "cannot get a associated constructor for argument of an unresolved datatype constructor"); return d_constructor; } SelectorType DatatypeConstructorArg::getType() const { return getSelector().getType(); } Type DatatypeConstructorArg::getRangeType() const { return getType().getRangeType(); } bool DatatypeConstructorArg::isUnresolvedSelf() const throw() { return d_selector.isNull() && d_name.size() == d_name.find('\0') + 1; } static const int s_printDatatypeNamesOnly = std::ios_base::xalloc(); std::string DatatypeConstructorArg::getTypeName() const { Type t; if(isResolved()) { t = SelectorType(d_selector.getType()).getRangeType(); } else { if(d_selector.isNull()) { string typeName = d_name.substr(d_name.find('\0') + 1); return (typeName == "") ? "[self]" : typeName; } else { t = d_selector.getType(); } } // Unfortunately, in the case of complex selector types, we can // enter nontrivial recursion here. Make sure that doesn't happen. stringstream ss; ss << language::SetLanguage(language::output::LANG_CVC4); ss.iword(s_printDatatypeNamesOnly) = 1; t.toStream(ss); return ss.str(); } std::ostream& operator<<(std::ostream& os, const Datatype& dt) { // These datatype things are recursive! Be very careful not to // print an infinite chain of them. long& printNameOnly = os.iword(s_printDatatypeNamesOnly); Debug("datatypes-output") << "printNameOnly is " << printNameOnly << std::endl; if(printNameOnly) { return os << dt.getName(); } class Scope { long& d_ref; long d_oldValue; public: Scope(long& ref, long value) : d_ref(ref), d_oldValue(ref) { d_ref = value; } ~Scope() { d_ref = d_oldValue; } } scope(printNameOnly, 1); // when scope is destructed, the value pops back Debug("datatypes-output") << "printNameOnly is now " << printNameOnly << std::endl; // can only output datatypes in the CVC4 native language language::SetLanguage::Scope ls(os, language::output::LANG_CVC4); os << "DATATYPE " << dt.getName(); if(dt.isParametric()) { os << '['; for(size_t i = 0; i < dt.getNumParameters(); ++i) { if(i > 0) { os << ','; } os << dt.getParameter(i); } os << ']'; } os << " =" << endl; Datatype::const_iterator i = dt.begin(), i_end = dt.end(); if(i != i_end) { os << " "; do { os << *i << endl; if(++i != i_end) { os << "| "; } } while(i != i_end); } os << "END;" << endl; return os; } std::ostream& operator<<(std::ostream& os, const DatatypeConstructor& ctor) { // can only output datatypes in the CVC4 native language language::SetLanguage::Scope ls(os, language::output::LANG_CVC4); os << ctor.getName(); DatatypeConstructor::const_iterator i = ctor.begin(), i_end = ctor.end(); if(i != i_end) { os << "("; do { os << *i; if(++i != i_end) { os << ", "; } } while(i != i_end); os << ")"; } return os; } std::ostream& operator<<(std::ostream& os, const DatatypeConstructorArg& arg) { // can only output datatypes in the CVC4 native language language::SetLanguage::Scope ls(os, language::output::LANG_CVC4); os << arg.getName() << ": " << arg.getTypeName(); return os; } DatatypeIndexConstant::DatatypeIndexConstant(unsigned index) throw(IllegalArgumentException) : d_index(index){ } std::ostream& operator<<(std::ostream& out, const DatatypeIndexConstant& dic) { return out << "index_" << dic.getIndex(); } }/* CVC4 namespace */ cvc4-1.5/src/expr/datatype.h000066400000000000000000001046271313116454100157600ustar00rootroot00000000000000/********************* */ /*! \file datatype.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Andrew Reynolds, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A class representing a Datatype definition ** ** A class representing a Datatype definition for the theory of ** inductive datatypes. **/ #include "cvc4_public.h" #ifndef __CVC4__DATATYPE_H #define __CVC4__DATATYPE_H #include #include #include #include namespace CVC4 { // messy; Expr needs Datatype (because it's the payload of a // CONSTANT-kinded expression), and Datatype needs Expr. //class CVC4_PUBLIC Datatype; class CVC4_PUBLIC DatatypeIndexConstant; }/* CVC4 namespace */ #include "base/exception.h" #include "expr/expr.h" #include "expr/type.h" #include "util/hash.h" namespace CVC4 { class CVC4_PUBLIC ExprManager; class CVC4_PUBLIC DatatypeConstructor; class CVC4_PUBLIC DatatypeConstructorArg; class CVC4_PUBLIC DatatypeConstructorIterator { const std::vector* d_v; size_t d_i; friend class Datatype; DatatypeConstructorIterator(const std::vector& v, bool start) : d_v(&v), d_i(start ? 0 : v.size()) { } public: typedef const DatatypeConstructor& value_type; const DatatypeConstructor& operator*() const { return (*d_v)[d_i]; } const DatatypeConstructor* operator->() const { return &(*d_v)[d_i]; } DatatypeConstructorIterator& operator++() { ++d_i; return *this; } DatatypeConstructorIterator operator++(int) { DatatypeConstructorIterator i(*this); ++d_i; return i; } bool operator==(const DatatypeConstructorIterator& other) const { return d_v == other.d_v && d_i == other.d_i; } bool operator!=(const DatatypeConstructorIterator& other) const { return d_v != other.d_v || d_i != other.d_i; } };/* class DatatypeConstructorIterator */ class CVC4_PUBLIC DatatypeConstructorArgIterator { const std::vector* d_v; size_t d_i; friend class DatatypeConstructor; DatatypeConstructorArgIterator(const std::vector& v, bool start) : d_v(&v), d_i(start ? 0 : v.size()) { } public: typedef const DatatypeConstructorArg& value_type; const DatatypeConstructorArg& operator*() const { return (*d_v)[d_i]; } const DatatypeConstructorArg* operator->() const { return &(*d_v)[d_i]; } DatatypeConstructorArgIterator& operator++() { ++d_i; return *this; } DatatypeConstructorArgIterator operator++(int) { DatatypeConstructorArgIterator i(*this); ++d_i; return i; } bool operator==(const DatatypeConstructorArgIterator& other) const { return d_v == other.d_v && d_i == other.d_i; } bool operator!=(const DatatypeConstructorArgIterator& other) const { return d_v != other.d_v || d_i != other.d_i; } };/* class DatatypeConstructorArgIterator */ /** * An exception that is thrown when a datatype resolution fails. */ class CVC4_PUBLIC DatatypeResolutionException : public Exception { public: inline DatatypeResolutionException(std::string msg); };/* class DatatypeResolutionException */ /** * A holder type (used in calls to DatatypeConstructor::addArg()) * to allow a Datatype to refer to itself. Self-typed fields of * Datatypes will be properly typed when a Type is created for the * Datatype by the ExprManager (which calls Datatype::resolve()). */ class CVC4_PUBLIC DatatypeSelfType { };/* class DatatypeSelfType */ /** * An unresolved type (used in calls to * DatatypeConstructor::addArg()) to allow a Datatype to refer to * itself or to other mutually-recursive Datatypes. Unresolved-type * fields of Datatypes will be properly typed when a Type is created * for the Datatype by the ExprManager (which calls * Datatype::resolve()). */ class CVC4_PUBLIC DatatypeUnresolvedType { std::string d_name; public: inline DatatypeUnresolvedType(std::string name); inline std::string getName() const throw(); };/* class DatatypeUnresolvedType */ /** * A Datatype constructor argument (i.e., a Datatype field). */ class CVC4_PUBLIC DatatypeConstructorArg { std::string d_name; Expr d_selector; /** the constructor associated with this selector */ Expr d_constructor; bool d_resolved; DatatypeConstructorArg(std::string name, Expr selector); friend class DatatypeConstructor; friend class Datatype; bool isUnresolvedSelf() const throw(); public: /** Get the name of this constructor argument. */ std::string getName() const throw(); /** * Get the selector for this constructor argument; this call is * only permitted after resolution. */ Expr getSelector() const; /** * Get the associated constructor for this constructor argument; * this call is only permitted after resolution. */ Expr getConstructor() const; /** * Get the type of the selector for this constructor argument; * this call is only permitted after resolution. */ SelectorType getType() const; /** * Get the range type of this argument. */ Type getRangeType() const; /** * Get the name of the type of this constructor argument * (Datatype field). Can be used for not-yet-resolved Datatypes * (in which case the name of the unresolved type, or "[self]" * for a self-referential type is returned). */ std::string getTypeName() const; /** * Returns true iff this constructor argument has been resolved. */ bool isResolved() const throw(); };/* class DatatypeConstructorArg */ /** * A constructor for a Datatype. */ class CVC4_PUBLIC DatatypeConstructor { public: /** The type for iterators over constructor arguments. */ typedef DatatypeConstructorArgIterator iterator; /** The (const) type for iterators over constructor arguments. */ typedef DatatypeConstructorArgIterator const_iterator; private: std::string d_name; Expr d_constructor; Expr d_tester; std::vector d_args; /** the operator associated with this constructor (for sygus) */ Expr d_sygus_op; Expr d_sygus_let_body; std::vector< Expr > d_sygus_let_args; unsigned d_sygus_num_let_input_args; void resolve(ExprManager* em, DatatypeType self, const std::map& resolutions, const std::vector& placeholders, const std::vector& replacements, const std::vector< SortConstructorType >& paramTypes, const std::vector< DatatypeType >& paramReplacements, size_t cindex) throw(IllegalArgumentException, DatatypeResolutionException); friend class Datatype; /** Helper function for resolving parametric datatypes. This replaces instances of the SortConstructorType produced for unresolved parametric datatypes, with the corresponding resolved DatatypeType. For example, take the parametric definition of a list, list[T] = cons(car : T, cdr : list[T]) | null. If "range" is the unresolved parametric datatype: DATATYPE list = cons(car: SORT_TAG_1, cdr: SORT_TAG_2(SORT_TAG_1)) | null END;, this function will return the resolved type: DATATYPE list = cons(car: SORT_TAG_1, cdr: (list PARAMETERIC_DATATYPE SORT_TAG_1)) | null END; */ Type doParametricSubstitution(Type range, const std::vector< SortConstructorType >& paramTypes, const std::vector< DatatypeType >& paramReplacements); /** compute the cardinality of this datatype */ Cardinality computeCardinality( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException); /** compute whether this datatype is well-founded */ bool computeWellFounded( std::vector< Type >& processing ) const throw(IllegalArgumentException); /** compute ground term */ Expr computeGroundTerm( Type t, std::vector< Type >& processing, std::map< Type, Expr >& gt ) const throw(IllegalArgumentException); public: /** * Create a new Datatype constructor with the given name for the * constructor and the same name (prefixed with "is_") for the * tester. The actual constructor and tester (meaning, the Exprs * representing operators for these entities) aren't created until * resolution time. */ explicit DatatypeConstructor(std::string name); /** * Create a new Datatype constructor with the given name for the * constructor and the given name for the tester. The actual * constructor and tester aren't created until resolution time. */ DatatypeConstructor(std::string name, std::string tester); /** * Add an argument (i.e., a data field) of the given name and type * to this Datatype constructor. Selector names need not be unique; * they are for convenience and pretty-printing only. */ void addArg(std::string selectorName, Type selectorType); /** * Add an argument (i.e., a data field) of the given name to this * Datatype constructor that refers to an as-yet-unresolved * Datatype (which may be mutually-recursive). Selector names need * not be unique; they are for convenience and pretty-printing only. */ void addArg(std::string selectorName, DatatypeUnresolvedType selectorType); /** * Add a self-referential (i.e., a data field) of the given name * to this Datatype constructor that refers to the enclosing * Datatype. For example, using the familiar "nat" Datatype, to * create the "pred" field for "succ" constructor, one uses * succ::addArg("pred", DatatypeSelfType())---the actual Type * cannot be passed because the Datatype is still under * construction. Selector names need not be unique; they are for * convenience and pretty-printing only. * * This is a special case of * DatatypeConstructor::addArg(std::string, DatatypeUnresolvedType). */ void addArg(std::string selectorName, DatatypeSelfType); /** Get the name of this Datatype constructor. */ std::string getName() const throw(); /** * Get the constructor operator of this Datatype constructor. The * Datatype must be resolved. */ Expr getConstructor() const; /** * Get the tester operator of this Datatype constructor. The * Datatype must be resolved. */ Expr getTester() const; /** get sygus op */ Expr getSygusOp() const; /** get sygus let body */ Expr getSygusLetBody() const; /** get number of sygus let args */ unsigned getNumSygusLetArgs() const; /** get sygus let arg */ Expr getSygusLetArg( unsigned i ) const; /** get number of let arguments that should be printed as arguments to let */ unsigned getNumSygusLetInputArgs() const; /** is this a sygus identity function */ bool isSygusIdFunc() const; /** * Get the tester name for this Datatype constructor. */ std::string getTesterName() const throw(); /** * Get the number of arguments (so far) of this Datatype constructor. */ inline size_t getNumArgs() const throw(); /** * Get the specialized constructor type for a parametric * constructor; this call is only permitted after resolution. * Given a (concrete) returnType, the constructor's concrete * type in this parametric datatype is returned. * * For instance, if the datatype is list[T], with constructor * "cons[T]" of type "T -> list[T] -> list[T]", then calling * this function with "list[int]" will return the concrete * "cons" constructor type for lists of int---namely, * "int -> list[int] -> list[int]". */ Type getSpecializedConstructorType(Type returnType) const; /** * Return the cardinality of this constructor (the product of the * cardinalities of its arguments). */ Cardinality getCardinality( Type t ) const throw(IllegalArgumentException); /** * Return true iff this constructor is finite (it is nullary or * each of its argument types are finite). This function can * only be called for resolved constructors. */ bool isFinite( Type t ) const throw(IllegalArgumentException); /** * Return true iff this constructor is finite (it is nullary or * each of its argument types are finite) under assumption * uninterpreted sorts are finite. This function can * only be called for resolved constructors. */ bool isInterpretedFinite( Type t ) const throw(IllegalArgumentException); /** * Returns true iff this Datatype constructor has already been * resolved. */ inline bool isResolved() const throw(); /** Get the beginning iterator over DatatypeConstructor args. */ inline iterator begin() throw(); /** Get the ending iterator over DatatypeConstructor args. */ inline iterator end() throw(); /** Get the beginning const_iterator over DatatypeConstructor args. */ inline const_iterator begin() const throw(); /** Get the ending const_iterator over DatatypeConstructor args. */ inline const_iterator end() const throw(); /** Get the ith DatatypeConstructor arg. */ const DatatypeConstructorArg& operator[](size_t index) const; /** * Get the DatatypeConstructor arg named. This is a linear search * through the arguments, so in the case of multiple, * similarly-named arguments, the first is returned. */ const DatatypeConstructorArg& operator[](std::string name) const; /** * Get the selector named. This is a linear search * through the arguments, so in the case of multiple, * similarly-named arguments, the selector for the first * is returned. */ Expr getSelector(std::string name) const; /** * Get whether this datatype involves an external type. If so, * then we will pose additional requirements for sharing. */ bool involvesExternalType() const; bool involvesUninterpretedType() const; /** set sygus */ void setSygus( Expr op, Expr let_body, std::vector< Expr >& let_args, unsigned num_let_input_argus ); };/* class DatatypeConstructor */ /** * The representation of an inductive datatype. * * This is far more complicated than it first seems. Consider this * datatype definition: * * DATATYPE nat = * succ(pred: nat) * | zero * END; * * You cannot define "nat" until you have a Type for it, but you * cannot have a Type for it until you fill in the type of the "pred" * selector, which needs the Type. So we have a chicken-and-egg * problem. It's even more complicated when we have mutual recursion * between datatypes, since the CVC presentation language does not * require forward-declarations. Here, we define trees of lists that * contain trees of lists (etc): * * DATATYPE * tree = node(left: tree, right: tree) | leaf(list), * list = cons(car: tree, cdr: list) | nil * END; * * Note that while parsing the "tree" definition, we have to take it * on faith that "list" is a valid type. We build Datatype objects to * describe "tree" and "list", and their constructors and constructor * arguments, but leave any unknown types (including self-references) * in an "unresolved" state. After parsing the whole DATATYPE block, * we create a DatatypeType through * ExprManager::mkMutualDatatypeTypes(). The ExprManager creates a * DatatypeType for each, but before "releasing" this type into the * wild, it does a round of in-place "resolution" on each Datatype by * calling Datatype::resolve() with a map of string -> DatatypeType to * allow the datatype to construct the necessary testers and * selectors. * * An additional point to make is that we want to ease the burden on * both the parser AND the users of the CVC4 API, so this class takes * on the task of generating its own selectors and testers, for * instance. That means that, after reifying the Datatype with the * ExprManager, the parser needs to go through the (now-resolved) * Datatype and request the constructor, selector, and tester terms. * See src/parser/parser.cpp for how this is done. For API usage * ideas, see test/unit/util/datatype_black.h. * * Datatypes may also be defined parametrically, such as this example: * * DATATYPE * list[T] = cons(car : T, cdr : list[T]) | null, * tree = node(children : list[tree]) | leaf * END; * * Here, the definition of the parametric datatype list, where T is a type variable. * In other words, this defines a family of types list[C] where C is any concrete * type. Datatypes can be parameterized over multiple type variables using the * syntax sym[ T1, ..., Tn ] = ..., * */ class CVC4_PUBLIC Datatype { friend class DatatypeConstructor; public: /** * Get the datatype of a constructor, selector, or tester operator. */ static const Datatype& datatypeOf(Expr item) CVC4_PUBLIC; /** * Get the index of a constructor or tester in its datatype, or the * index of a selector in its constructor. (Zero is always the * first index.) */ static size_t indexOf(Expr item) CVC4_PUBLIC; /** * Get the index of constructor corresponding to selector. (Zero is * always the first index.) */ static size_t cindexOf(Expr item) CVC4_PUBLIC; /** The type for iterators over constructors. */ typedef DatatypeConstructorIterator iterator; /** The (const) type for iterators over constructors. */ typedef DatatypeConstructorIterator const_iterator; private: std::string d_name; std::vector d_params; bool d_isCo; bool d_isTuple; bool d_isRecord; Record * d_record; std::vector d_constructors; bool d_resolved; Type d_self; bool d_involvesExt; bool d_involvesUt; /** information for sygus */ Type d_sygus_type; Expr d_sygus_bvl; bool d_sygus_allow_const; bool d_sygus_allow_all; Expr d_sygus_eval; // "mutable" because computing the cardinality can be expensive, // and so it's computed just once, on demand---this is the cache mutable Cardinality d_card; // is this type a recursive singleton type mutable std::map< Type, int > d_card_rec_singleton; // if d_card_rec_singleton is true, // infinite cardinality depends on at least one of the following uninterpreted sorts having cardinality > 1 mutable std::map< Type, std::vector< Type > > d_card_u_assume; // is this well-founded mutable int d_well_founded; // ground term for this datatype mutable std::map< Type, Expr > d_ground_term; /** * Datatypes refer to themselves, recursively, and we have a * chicken-and-egg problem. The DatatypeType around the Datatype * cannot exist until the Datatype is finalized, and the Datatype * cannot refer to the DatatypeType representing itself until it * exists. resolve() is called by the ExprManager when a Type is * ultimately requested of the Datatype specification (that is, when * ExprManager::mkDatatypeType() or ExprManager::mkMutualDatatypeTypes() * is called). Has the effect of freezing the object, too; that is, * addConstructor() will fail after a call to resolve(). * * The basic goal of resolution is to assign constructors, selectors, * and testers. To do this, any UnresolvedType/SelfType references * must be cleared up. This is the purpose of the "resolutions" map; * it includes any mutually-recursive datatypes that are currently * under resolution. The four vectors come in two pairs (so, really * they are two maps). placeholders->replacements give type variables * that should be resolved in the case of parametric datatypes. * * @param em the ExprManager at play * @param resolutions a map of strings to DatatypeTypes currently under resolution * @param placeholders the types in these Datatypes under resolution that must be replaced * @param replacements the corresponding replacements * @param paramTypes the sort constructors in these Datatypes under resolution that must be replaced * @param paramReplacements the corresponding (parametric) DatatypeTypes */ void resolve(ExprManager* em, const std::map& resolutions, const std::vector& placeholders, const std::vector& replacements, const std::vector< SortConstructorType >& paramTypes, const std::vector< DatatypeType >& paramReplacements) throw(IllegalArgumentException, DatatypeResolutionException); friend class ExprManager;// for access to resolve() /** compute the cardinality of this datatype */ Cardinality computeCardinality( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException); /** compute whether this datatype is a recursive singleton */ bool computeCardinalityRecSingleton( Type t, std::vector< Type >& processing, std::vector< Type >& u_assume ) const throw(IllegalArgumentException); /** compute whether this datatype is well-founded */ bool computeWellFounded( std::vector< Type >& processing ) const throw(IllegalArgumentException); /** compute ground term */ Expr computeGroundTerm( Type t, std::vector< Type >& processing ) const throw(IllegalArgumentException); public: /** Create a new Datatype of the given name. */ inline explicit Datatype(std::string name, bool isCo = false); /** * Create a new Datatype of the given name, with the given * parameterization. */ inline Datatype(std::string name, const std::vector& params, bool isCo = false); ~Datatype(); /** * Add a constructor to this Datatype. Constructor names need not * be unique; they are for convenience and pretty-printing only. */ void addConstructor(const DatatypeConstructor& c); /** set the sygus information of this datatype * st : the builtin type for this grammar * bvl : the list of arguments for the synth-fun * allow_const : whether all constants are (implicitly) included in the grammar */ void setSygus( Type st, Expr bvl, bool allow_const, bool allow_all ); /** set tuple */ void setTuple(); /** set tuple */ void setRecord(); /** Get the name of this Datatype. */ inline std::string getName() const throw(); /** Get the number of constructors (so far) for this Datatype. */ inline size_t getNumConstructors() const throw(); /** Is this datatype parametric? */ inline bool isParametric() const throw(); /** Get the nubmer of type parameters */ inline size_t getNumParameters() const throw(); /** Get parameter */ inline Type getParameter( unsigned int i ) const; /** Get parameters */ inline std::vector getParameters() const; /** is this a co-datatype? */ inline bool isCodatatype() const; /** is this a sygus datatype? */ inline bool isSygus() const; /** is this a tuple datatype? */ inline bool isTuple() const; /** is this a record datatype? */ inline bool isRecord() const; /** get the record representation for this datatype */ inline Record * getRecord() const; /** * Return the cardinality of this datatype (the sum of the * cardinalities of its constructors). The Datatype must be * resolved. * Version taking Type t is required for parametric datatypes. */ Cardinality getCardinality( Type t ) const throw(IllegalArgumentException); Cardinality getCardinality() const throw(IllegalArgumentException); /** * Return true iff this Datatype is finite (all constructors are * finite, i.e., there are finitely many ground terms). If the * datatype is not well-founded, this function returns false. The * Datatype must be resolved or an exception is thrown. * Version taking Type t is required for parametric. */ bool isFinite( Type t ) const throw(IllegalArgumentException); bool isFinite() const throw(IllegalArgumentException); /** * Return true iff this Datatype is finite (all constructors are * finite, i.e., there are finitely many ground terms) under the * assumption unintepreted sorts are finite. If the * datatype is not well-founded, this function returns false. The * Datatype must be resolved or an exception is thrown. * Version taking Type t is required for parametric datatypes. */ bool isInterpretedFinite( Type t ) const throw(IllegalArgumentException); bool isInterpretedFinite() const throw(IllegalArgumentException); /** * Return true iff this datatype is well-founded (there exist ground * terms). The Datatype must be resolved or an exception is thrown. */ bool isWellFounded() const throw(IllegalArgumentException); /** * Return true iff this datatype is a recursive singleton * Version taking Type t is required for parametric datatypes. */ bool isRecursiveSingleton( Type t ) const throw(IllegalArgumentException); bool isRecursiveSingleton() const throw(IllegalArgumentException); /** * Get recursive singleton argument types (uninterpreted sorts that the singleton cardinality * of this datatype is dependent upon). * Versions taking Type t are required for parametric datatypes. */ unsigned getNumRecursiveSingletonArgTypes( Type t ) const throw(IllegalArgumentException); Type getRecursiveSingletonArgType( Type t, unsigned i ) const throw(IllegalArgumentException); unsigned getNumRecursiveSingletonArgTypes() const throw(IllegalArgumentException); Type getRecursiveSingletonArgType( unsigned i ) const throw(IllegalArgumentException); /** * Construct and return a ground term of this Datatype. The * Datatype must be both resolved and well-founded, or else an * exception is thrown. */ Expr mkGroundTerm( Type t ) const throw(IllegalArgumentException); /** * Get the DatatypeType associated to this Datatype. Can only be * called post-resolution. */ DatatypeType getDatatypeType() const throw(IllegalArgumentException); /** * Get the DatatypeType associated to this (parameterized) Datatype. Can only be * called post-resolution. */ DatatypeType getDatatypeType(const std::vector& params) const throw(IllegalArgumentException); /** * Return true iff the two Datatypes are the same. * * We need == for mkConst(Datatype) to properly work---since if the * Datatype Expr requested is the same as an already-existing one, * we need to return that one. For that, we have a hash and * operator==. We provide != for symmetry. We don't provide * operator<() etc. because given two Datatype Exprs, you could * simply compare those rather than the (bare) Datatypes. This * means, though, that Datatype cannot be stored in a sorted list or * RB tree directly, so maybe we can consider adding these * comparison operators later on. */ bool operator==(const Datatype& other) const throw(); /** Return true iff the two Datatypes are not the same. */ inline bool operator!=(const Datatype& other) const throw(); /** Return true iff this Datatype has already been resolved. */ inline bool isResolved() const throw(); /** Get the beginning iterator over DatatypeConstructors. */ inline iterator begin() throw(); /** Get the ending iterator over DatatypeConstructors. */ inline iterator end() throw(); /** Get the beginning const_iterator over DatatypeConstructors. */ inline const_iterator begin() const throw(); /** Get the ending const_iterator over DatatypeConstructors. */ inline const_iterator end() const throw(); /** Get the ith DatatypeConstructor. */ const DatatypeConstructor& operator[](size_t index) const; /** * Get the DatatypeConstructor named. This is a linear search * through the constructors, so in the case of multiple, * similarly-named constructors, the first is returned. */ const DatatypeConstructor& operator[](std::string name) const; /** * Get the constructor operator for the named constructor. * This is a linear search through the constructors, so in * the case of multiple, similarly-named constructors, the * first is returned. * * This Datatype must be resolved. */ Expr getConstructor(std::string name) const; /** get sygus type */ Type getSygusType() const; /** get sygus var list */ Expr getSygusVarList() const; /** does it allow constants */ bool getSygusAllowConst() const; /** does it allow constants */ bool getSygusAllowAll() const; /** get the evaluation function for this datatype for the deep embedding */ Expr getSygusEvaluationFunc() const; /** * Get whether this datatype involves an external type. If so, * then we will pose additional requirements for sharing. */ bool involvesExternalType() const; bool involvesUninterpretedType() const; };/* class Datatype */ /** * A hash function for Datatypes. Needed to store them in hash sets * and hash maps. */ struct CVC4_PUBLIC DatatypeHashFunction { inline size_t operator()(const Datatype& dt) const { return StringHashFunction()(dt.getName()); } inline size_t operator()(const Datatype* dt) const { return StringHashFunction()(dt->getName()); } inline size_t operator()(const DatatypeConstructor& dtc) const { return StringHashFunction()(dtc.getName()); } inline size_t operator()(const DatatypeConstructor* dtc) const { return StringHashFunction()(dtc->getName()); } };/* struct DatatypeHashFunction */ /* stores an index to Datatype residing in NodeManager */ class CVC4_PUBLIC DatatypeIndexConstant { public: DatatypeIndexConstant(unsigned index) throw(IllegalArgumentException); ~DatatypeIndexConstant() throw() { } const unsigned getIndex() const throw() { return d_index; } bool operator==(const DatatypeIndexConstant& uc) const throw() { return d_index == uc.d_index; } bool operator!=(const DatatypeIndexConstant& uc) const throw() { return !(*this == uc); } bool operator<(const DatatypeIndexConstant& uc) const throw() { return d_index < uc.d_index; } bool operator<=(const DatatypeIndexConstant& uc) const throw() { return d_index <= uc.d_index; } bool operator>(const DatatypeIndexConstant& uc) const throw() { return !(*this <= uc); } bool operator>=(const DatatypeIndexConstant& uc) const throw() { return !(*this < uc); } private: const unsigned d_index; };/* class DatatypeIndexConstant */ std::ostream& operator<<(std::ostream& out, const DatatypeIndexConstant& dic) CVC4_PUBLIC; struct CVC4_PUBLIC DatatypeIndexConstantHashFunction { inline size_t operator()(const DatatypeIndexConstant& dic) const { return IntegerHashFunction()(dic.getIndex()); } };/* struct DatatypeIndexConstantHashFunction */ // FUNCTION DECLARATIONS FOR OUTPUT STREAMS std::ostream& operator<<(std::ostream& os, const Datatype& dt) CVC4_PUBLIC; std::ostream& operator<<(std::ostream& os, const DatatypeConstructor& ctor) CVC4_PUBLIC; std::ostream& operator<<(std::ostream& os, const DatatypeConstructorArg& arg) CVC4_PUBLIC; // INLINE FUNCTIONS inline DatatypeResolutionException::DatatypeResolutionException(std::string msg) : Exception(msg) { } inline DatatypeUnresolvedType::DatatypeUnresolvedType(std::string name) : d_name(name) { } inline std::string DatatypeUnresolvedType::getName() const throw() { return d_name; } inline Datatype::Datatype(std::string name, bool isCo) : d_name(name), d_params(), d_isCo(isCo), d_isTuple(false), d_isRecord(false), d_record(NULL), d_constructors(), d_resolved(false), d_self(), d_involvesExt(false), d_involvesUt(false), d_card(CardinalityUnknown()), d_well_founded(0) { } inline Datatype::Datatype(std::string name, const std::vector& params, bool isCo) : d_name(name), d_params(params), d_isCo(isCo), d_isTuple(false), d_isRecord(false), d_record(NULL), d_constructors(), d_resolved(false), d_self(), d_involvesExt(false), d_involvesUt(false), d_card(CardinalityUnknown()), d_well_founded(0) { } inline std::string Datatype::getName() const throw() { return d_name; } inline size_t Datatype::getNumConstructors() const throw() { return d_constructors.size(); } inline bool Datatype::isParametric() const throw() { return d_params.size() > 0; } inline size_t Datatype::getNumParameters() const throw() { return d_params.size(); } inline Type Datatype::getParameter( unsigned int i ) const { CheckArgument(isParametric(), this, "Cannot get type parameter of a non-parametric datatype."); CheckArgument(i < d_params.size(), i, "Type parameter index out of range for datatype."); return d_params[i]; } inline std::vector Datatype::getParameters() const { CheckArgument(isParametric(), this, "Cannot get type parameters of a non-parametric datatype."); return d_params; } inline bool Datatype::isCodatatype() const { return d_isCo; } inline bool Datatype::isSygus() const { return !d_sygus_type.isNull(); } inline bool Datatype::isTuple() const { return d_isTuple; } inline bool Datatype::isRecord() const { return d_isRecord; } inline Record * Datatype::getRecord() const { return d_record; } inline bool Datatype::operator!=(const Datatype& other) const throw() { return !(*this == other); } inline bool Datatype::isResolved() const throw() { return d_resolved; } inline Datatype::iterator Datatype::begin() throw() { return iterator(d_constructors, true); } inline Datatype::iterator Datatype::end() throw() { return iterator(d_constructors, false); } inline Datatype::const_iterator Datatype::begin() const throw() { return const_iterator(d_constructors, true); } inline Datatype::const_iterator Datatype::end() const throw() { return const_iterator(d_constructors, false); } inline bool DatatypeConstructor::isResolved() const throw() { return !d_tester.isNull(); } inline size_t DatatypeConstructor::getNumArgs() const throw() { return d_args.size(); } inline bool DatatypeConstructorArg::isResolved() const throw() { // We could just write: // // return !d_selector.isNull() && d_selector.getType().isSelector(); // // HOWEVER, this causes problems in ExprManager tear-down, because // the attributes are removed before the pool is purged. When the // pool is purged, this triggers an equality test between Datatypes, // and this triggers a call to isResolved(), which breaks because // d_selector has no type after attributes are stripped. // // This problem, coupled with the fact that this function is called // _often_, means we should just use a boolean flag. // return d_resolved; } inline DatatypeConstructor::iterator DatatypeConstructor::begin() throw() { return iterator(d_args, true); } inline DatatypeConstructor::iterator DatatypeConstructor::end() throw() { return iterator(d_args, false); } inline DatatypeConstructor::const_iterator DatatypeConstructor::begin() const throw() { return const_iterator(d_args, true); } inline DatatypeConstructor::const_iterator DatatypeConstructor::end() const throw() { return const_iterator(d_args, false); } }/* CVC4 namespace */ #endif /* __CVC4__DATATYPE_H */ cvc4-1.5/src/expr/datatype.i000066400000000000000000000163771313116454100157650ustar00rootroot00000000000000%{ #include "expr/datatype.h" #ifdef SWIGJAVA #include "bindings/java_iterator_adapter.h" #include "bindings/java_stream_adapters.h" #endif /* SWIGJAVA */ %} %extend std::vector< CVC4::Datatype > { /* These member functions have slightly different signatures in * different swig language packages. The underlying issue is that * DatatypeConstructor doesn't have a default constructor */ #if defined(SWIGOCAML) || defined(SWIGPERL) || defined(SWIGTCL) %ignore vector(unsigned int size = 0); %ignore set( int i, const CVC4::Datatype &x ); %ignore to_array(); #endif /* SWIGOCAML || SWIGPERL || SWIGTCL */ %ignore vector(size_type);// java/python/perl/others? %ignore resize(size_type);// java/python/perl/others? %ignore set(int i, const CVC4::Datatype& x); %ignore to_array(); }; %template(vectorDatatype) std::vector< CVC4::Datatype >; %extend std::vector< CVC4::DatatypeConstructor > { /* These member functions have slightly different signatures in * different swig language packages. The underlying issue is that * DatatypeConstructor doesn't have a default constructor */ #if defined(SWIGOCAML) || defined(SWIGPERL) || defined(SWIGTCL) %ignore vector(unsigned int size = 0); %ignore set( int i, const CVC4::DatatypeConstructor &x ); %ignore to_array(); #endif /* SWIGOCAML || SWIGPERL || SWIGTCL */ %ignore vector(size_type);// java/python/perl/others? %ignore resize(size_type);// java/python/perl/others? %ignore set(int i, const CVC4::Datatype::Constructor& x); %ignore to_array(); }; //%template(vectorDatatypeConstructor) std::vector< CVC4::DatatypeConstructor >; %rename(equals) CVC4::Datatype::operator==(const Datatype&) const; %ignore CVC4::Datatype::operator!=(const Datatype&) const; %ignore CVC4::Datatype::begin(); %ignore CVC4::Datatype::end(); %ignore CVC4::Datatype::begin() const; %ignore CVC4::Datatype::end() const; %rename(get) CVC4::Datatype::operator[](size_t) const; %rename(get) CVC4::Datatype::operator[](std::string) const; %rename(apply) CVC4::DatatypeHashFunction::operator()(const Datatype&) const; %ignore CVC4::DatatypeHashFunction::operator()(const Datatype*) const; %rename(apply) CVC4::DatatypeHashFunction::operator()(const DatatypeConstructor&) const; %ignore CVC4::DatatypeHashFunction::operator()(const DatatypeConstructor*) const; %ignore CVC4::DatatypeConstructor::begin(); %ignore CVC4::DatatypeConstructor::end(); %ignore CVC4::DatatypeConstructor::begin() const; %ignore CVC4::DatatypeConstructor::end() const; %rename(get) CVC4::DatatypeConstructor::operator[](size_t) const; %rename(get) CVC4::DatatypeConstructor::operator[](std::string) const; %ignore CVC4::operator<<(std::ostream&, const Datatype&); %ignore CVC4::operator<<(std::ostream&, const DatatypeConstructor&); %ignore CVC4::operator<<(std::ostream&, const DatatypeConstructorArg&); %ignore CVC4::DatatypeConstructorIterator; %ignore CVC4::DatatypeConstructorArgIterator; %feature("valuewrapper") CVC4::DatatypeUnresolvedType; %feature("valuewrapper") CVC4::DatatypeConstructor; %rename(equals) CVC4::DatatypeIndexConstant::operator==(const DatatypeIndexConstant&) const; %ignore CVC4::DatatypeIndexConstant::operator!=(const DatatypeIndexConstant&) const; %rename(less) CVC4::DatatypeIndexConstant::operator<(const DatatypeIndexConstant&) const; %rename(lessEqual) CVC4::DatatypeIndexConstant::operator<=(const DatatypeIndexConstant&) const; %rename(greater) CVC4::DatatypeIndexConstant::operator>(const DatatypeIndexConstant&) const; %rename(greaterEqual) CVC4::DatatypeIndexConstant::operator>=(const DatatypeIndexConstant&) const; %rename(apply) CVC4::DatatypeIndexConstantFunction::operator()(const DatatypeIndexConstant&) const; %ignore CVC4::operator<<(std::ostream& out, const DatatypeIndexConstant& es); #ifdef SWIGJAVA // Instead of Datatype::begin() and end(), create an // iterator() method on the Java side that returns a Java-style // Iterator. %extend CVC4::Datatype { CVC4::JavaIteratorAdapter iterator() { return CVC4::JavaIteratorAdapter(*$self); } std::string toString() const { std::stringstream ss; ss << *$self; return ss.str(); } } %extend CVC4::DatatypeConstructor { CVC4::JavaIteratorAdapter iterator() { return CVC4::JavaIteratorAdapter(*$self); } std::string toString() const { std::stringstream ss; ss << *$self; return ss.str(); } } %extend CVC4::DatatypeConstructorArg { std::string toString() const { std::stringstream ss; ss << *$self; return ss.str(); } } // Datatype is "iterable" on the Java side %typemap(javainterfaces) CVC4::Datatype "java.lang.Iterable"; %typemap(javainterfaces) CVC4::DatatypeConstructor "java.lang.Iterable"; // the JavaIteratorAdapter should not be public, and implements Iterator %typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter "class"; %typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter "class"; %typemap(javainterfaces) CVC4::JavaIteratorAdapter "java.util.Iterator"; %typemap(javainterfaces) CVC4::JavaIteratorAdapter "java.util.Iterator"; // add some functions to the Java side (do it here because there's no way to do these in C++) %typemap(javacode) CVC4::JavaIteratorAdapter " public void remove() { throw new java.lang.UnsupportedOperationException(); } public DatatypeConstructor next() { if(hasNext()) { return getNext(); } else { throw new java.util.NoSuchElementException(); } } " %typemap(javacode) CVC4::JavaIteratorAdapter " public void remove() { throw new java.lang.UnsupportedOperationException(); } public DatatypeConstructorArg next() { if(hasNext()) { return getNext(); } else { throw new java.util.NoSuchElementException(); } } " // getNext() just allows C++ iterator access from Java-side next(), make it private %javamethodmodifiers CVC4::JavaIteratorAdapter::getNext() "private"; %javamethodmodifiers CVC4::JavaIteratorAdapter::getNext() "private"; // map the types appropriately. %typemap(jni) CVC4::Datatype::iterator::value_type "jobject"; %typemap(jtype) CVC4::Datatype::iterator::value_type "edu.nyu.acsys.CVC4.DatatypeConstructor"; %typemap(jstype) CVC4::Datatype::iterator::value_type "edu.nyu.acsys.CVC4.DatatypeConstructor"; %typemap(javaout) CVC4::Datatype::iterator::value_type { return $jnicall; } %typemap(jni) CVC4::DatatypeConstructor::iterator::value_type "jobject"; %typemap(jtype) CVC4::DatatypeConstructor::iterator::value_type "edu.nyu.acsys.CVC4.DatatypeConstructorArg"; %typemap(jstype) CVC4::DatatypeConstructor::iterator::value_type "edu.nyu.acsys.CVC4.DatatypeConstructorArg"; %typemap(javaout) CVC4::DatatypeConstructor::iterator::value_type { return $jnicall; } #endif /* SWIGJAVA */ %include "expr/datatype.h" #ifdef SWIGJAVA %include "bindings/java_iterator_adapter.h" %include "bindings/java_stream_adapters.h" %template(JavaIteratorAdapter_Datatype) CVC4::JavaIteratorAdapter; %template(JavaIteratorAdapter_DatatypeConstructor) CVC4::JavaIteratorAdapter; #endif /* SWIGJAVA */ cvc4-1.5/src/expr/emptyset.cpp000066400000000000000000000041161313116454100163420ustar00rootroot00000000000000/********************* */ /*! \file emptyset.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Kshitij Bansal, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "expr/emptyset.h" #include #include "expr/expr.h" #include "expr/type.h" namespace CVC4 { std::ostream& operator<<(std::ostream& out, const EmptySet& asa) { return out << "emptyset(" << asa.getType() << ')'; } size_t EmptySetHashFunction::operator()(const EmptySet& es) const { return TypeHashFunction()(es.getType()); } /** * Constructs an emptyset of the specified type. Note that the argument * is the type of the set itself, NOT the type of the elements. */ EmptySet::EmptySet(const SetType& setType) : d_type(new SetType(setType)) { } EmptySet::EmptySet(const EmptySet& es) : d_type(new SetType(es.getType())) { } EmptySet& EmptySet::operator=(const EmptySet& es) { (*d_type) = es.getType(); return *this; } EmptySet::~EmptySet() throw() { delete d_type; } const SetType& EmptySet::getType() const { return *d_type; } bool EmptySet::operator==(const EmptySet& es) const throw() { return getType() == es.getType(); } bool EmptySet::operator!=(const EmptySet& es) const throw() { return !(*this == es); } bool EmptySet::operator<(const EmptySet& es) const throw() { return getType() < es.getType(); } bool EmptySet::operator<=(const EmptySet& es) const throw() { return getType() <= es.getType(); } bool EmptySet::operator>(const EmptySet& es) const throw() { return !(*this <= es); } bool EmptySet::operator>=(const EmptySet& es) const throw() { return !(*this < es); } }/* CVC4 namespace */ cvc4-1.5/src/expr/emptyset.h000066400000000000000000000041211313116454100160030ustar00rootroot00000000000000/********************* */ /*! \file emptyset.h ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_public.h" #pragma once #include namespace CVC4 { // messy; Expr needs EmptySet (because it's the payload of a // CONSTANT-kinded expression), EmptySet needs SetType, and // SetType needs Expr. Using a forward declaration here in // order to break the build cycle. // Uses of SetType need to be as an incomplete type throughout // this header. class SetType; }/* CVC4 namespace */ namespace CVC4 { class CVC4_PUBLIC EmptySet { public: /** * Constructs an emptyset of the specified type. Note that the argument * is the type of the set itself, NOT the type of the elements. */ EmptySet(const SetType& setType); ~EmptySet() throw(); EmptySet(const EmptySet& other); EmptySet& operator=(const EmptySet& other); const SetType& getType() const; bool operator==(const EmptySet& es) const throw(); bool operator!=(const EmptySet& es) const throw(); bool operator<(const EmptySet& es) const throw(); bool operator<=(const EmptySet& es) const throw(); bool operator>(const EmptySet& es) const throw() ; bool operator>=(const EmptySet& es) const throw(); private: /** Pointer to the SetType node. This is never NULL. */ SetType* d_type; EmptySet(); };/* class EmptySet */ std::ostream& operator<<(std::ostream& out, const EmptySet& es) CVC4_PUBLIC; struct CVC4_PUBLIC EmptySetHashFunction { size_t operator()(const EmptySet& es) const; };/* struct EmptySetHashFunction */ }/* CVC4 namespace */ cvc4-1.5/src/expr/emptyset.i000066400000000000000000000011401313116454100160020ustar00rootroot00000000000000%{ #include "expr/emptyset.h" %} %rename(equals) CVC4::EmptySet::operator==(const EmptySet&) const; %ignore CVC4::EmptySet::operator!=(const EmptySet&) const; %rename(less) CVC4::EmptySet::operator<(const EmptySet&) const; %rename(lessEqual) CVC4::EmptySet::operator<=(const EmptySet&) const; %rename(greater) CVC4::EmptySet::operator>(const EmptySet&) const; %rename(greaterEqual) CVC4::EmptySet::operator>=(const EmptySet&) const; %rename(apply) CVC4::EmptySetHashFunction::operator()(const EmptySet&) const; %ignore CVC4::operator<<(std::ostream& out, const EmptySet& es); %include "expr/emptyset.h" cvc4-1.5/src/expr/expr.i000066400000000000000000000144571313116454100151250ustar00rootroot00000000000000%{ #include "expr/expr.h" #ifdef SWIGJAVA #include "bindings/java_iterator_adapter.h" #include "bindings/java_stream_adapters.h" #endif /* SWIGJAVA */ %} #ifdef SWIGPYTHON %rename(doApply) CVC4::ExprHashFunction::operator()(CVC4::Expr) const; #else /* SWIGPYTHON */ %rename(apply) CVC4::ExprHashFunction::operator()(CVC4::Expr) const; #endif /* SWIGPYTHON */ #ifdef SWIGJAVA %typemap(javabody) CVC4::Expr %{ private long swigCPtr; protected boolean swigCMemOwn; protected $javaclassname(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; this.em = SmtEngine.mkRef(getExprManager()); // keep ref to em in SWIG proxy class } protected static long getCPtr($javaclassname obj) { return (obj == null) ? 0 : obj.swigCPtr; } %} %javamethodmodifiers CVC4::Expr::operator=(const Expr&) "protected"; %typemap(javacode) CVC4::Expr %{ // a ref is kept here to keep Java GC from collecting the ExprManager // before the Expr private Object em; public Expr assign(Expr e) { Expr r = assignInternal(e); this.em = SmtEngine.mkRef(getExprManager()); // keep ref to em in SWIG proxy class return r; } %} %typemap(javaconstruct) Expr { this($imcall, true); this.em = SmtEngine.mkRef(getExprManager()); // keep ref to em in SWIG proxy class } %typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") CVC4::Expr { SmtEngine.dlRef(em); em = null; if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; CVC4JNI.delete_Expr(swigCPtr); } swigCPtr = 0; } } #endif /* SWIGJAVA */ %ignore CVC4::operator<<(std::ostream&, const Expr&); %ignore CVC4::operator<<(std::ostream&, const TypeCheckingException&); %ignore CVC4::expr::operator<<(std::ostream&, ExprSetDepth); %ignore CVC4::expr::operator<<(std::ostream&, ExprPrintTypes); %ignore CVC4::expr::operator<<(std::ostream&, ExprDag); %ignore CVC4::expr::operator<<(std::ostream&, ExprSetLanguage); %rename(assignInternal) CVC4::Expr::operator=(const Expr&); %rename(equals) CVC4::Expr::operator==(const Expr&) const; %ignore CVC4::Expr::operator!=(const Expr&) const; %rename(less) CVC4::Expr::operator<(const Expr&) const; %rename(lessEqual) CVC4::Expr::operator<=(const Expr&) const; %rename(greater) CVC4::Expr::operator>(const Expr&) const; %rename(greaterEqual) CVC4::Expr::operator>=(const Expr&) const; %rename(getChild) CVC4::Expr::operator[](unsigned i) const; %ignore CVC4::Expr::operator bool() const;// can just use isNull() namespace CVC4 { namespace expr { %ignore exportInternal; }/* CVC4::expr namespace */ }/* CVC4 namespace */ #ifdef SWIGJAVA // Instead of Expr::begin() and end(), create an // iterator() method on the Java side that returns a Java-style // Iterator. %ignore CVC4::Expr::begin() const; %ignore CVC4::Expr::end() const; %extend CVC4::Expr { CVC4::JavaIteratorAdapter iterator() { return CVC4::JavaIteratorAdapter(*$self); } } // Expr is "iterable" on the Java side %typemap(javainterfaces) CVC4::Expr "java.lang.Iterable"; // the JavaIteratorAdapter should not be public, and implements Iterator %typemap(javaclassmodifiers) CVC4::JavaIteratorAdapter "class"; %typemap(javainterfaces) CVC4::JavaIteratorAdapter "java.util.Iterator"; // add some functions to the Java side (do it here because there's no way to do these in C++) %typemap(javacode) CVC4::JavaIteratorAdapter " public void remove() { throw new java.lang.UnsupportedOperationException(); } public edu.nyu.acsys.CVC4.Expr next() { if(hasNext()) { return getNext(); } else { throw new java.util.NoSuchElementException(); } } " // getNext() just allows C++ iterator access from Java-side next(), make it private %javamethodmodifiers CVC4::JavaIteratorAdapter::getNext() "private"; // map the types appropriately %typemap(jni) CVC4::Expr::const_iterator::value_type "jobject"; %typemap(jtype) CVC4::Expr::const_iterator::value_type "edu.nyu.acsys.CVC4.Expr"; %typemap(jstype) CVC4::Expr::const_iterator::value_type "edu.nyu.acsys.CVC4.Expr"; %typemap(javaout) CVC4::Expr::const_iterator::value_type { return $jnicall; } #endif /* SWIGJAVA */ %include "expr/expr.h" #ifdef SWIGPYTHON /* The python bindings on Mac OS X have trouble with this one - leave it * out for now. */ //%template(getConstTypeConstant) CVC4::Expr::getConst; #else %template(getConstTypeConstant) CVC4::Expr::getConst; #endif %template(getConstArrayStoreAll) CVC4::Expr::getConst; %template(getConstBitVectorSize) CVC4::Expr::getConst; %template(getConstAscriptionType) CVC4::Expr::getConst; %template(getConstBitVectorBitOf) CVC4::Expr::getConst; %template(getConstSubrangeBounds) CVC4::Expr::getConst; %template(getConstBitVectorRepeat) CVC4::Expr::getConst; %template(getConstBitVectorExtract) CVC4::Expr::getConst; %template(getConstBitVectorRotateLeft) CVC4::Expr::getConst; %template(getConstBitVectorSignExtend) CVC4::Expr::getConst; %template(getConstBitVectorZeroExtend) CVC4::Expr::getConst; %template(getConstBitVectorRotateRight) CVC4::Expr::getConst; %template(getConstUninterpretedConstant) CVC4::Expr::getConst; %template(getConstKind) CVC4::Expr::getConst; %template(getConstDatatypeIndexConstant) CVC4::Expr::getConst; %template(getConstRational) CVC4::Expr::getConst; %template(getConstBitVector) CVC4::Expr::getConst; %template(getConstPredicate) CVC4::Expr::getConst; %template(getConstString) CVC4::Expr::getConst; %template(getConstRegExp) CVC4::Expr::getConst; %template(getConstEmptySet) CVC4::Expr::getConst; %template(getConstBoolean) CVC4::Expr::getConst; #ifdef SWIGJAVA %include "bindings/java_iterator_adapter.h" %include "bindings/java_stream_adapters.h" %template(JavaIteratorAdapter_Expr) CVC4::JavaIteratorAdapter; #endif /* SWIGJAVA */ %include "expr/expr.h" cvc4-1.5/src/expr/expr_iomanip.cpp000066400000000000000000000104741313116454100171660ustar00rootroot00000000000000/********************* */ /*! \file expr_iomanip.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Expr IO manipulation classes. ** ** Expr IO manipulation classes. **/ #include "expr/expr_iomanip.h" #include #include #include "options/options.h" #include "options/expr_options.h" namespace CVC4 { namespace expr { const int ExprSetDepth::s_iosIndex = std::ios_base::xalloc(); const int ExprPrintTypes::s_iosIndex = std::ios_base::xalloc(); const int ExprDag::s_iosIndex = std::ios_base::xalloc(); ExprSetDepth::ExprSetDepth(long depth) : d_depth(depth) {} void ExprSetDepth::applyDepth(std::ostream& out) { out.iword(s_iosIndex) = d_depth; } long ExprSetDepth::getDepth(std::ostream& out) { long& l = out.iword(s_iosIndex); if(l == 0) { // set the default print depth on this ostream if(not Options::isCurrentNull()) { l = options::defaultExprDepth(); } if(l == 0) { // if called from outside the library, we may not have options // available to us at this point (or perhaps the output language // is not set in Options). Default to something reasonable, but // don't set "l" since that would make it "sticky" for this // stream. return s_defaultPrintDepth; } } return l; } void ExprSetDepth::setDepth(std::ostream& out, long depth) { out.iword(s_iosIndex) = depth; } ExprSetDepth::Scope::Scope(std::ostream& out, long depth) : d_out(out), d_oldDepth(ExprSetDepth::getDepth(out)) { ExprSetDepth::setDepth(out, depth); } ExprSetDepth::Scope::~Scope() { ExprSetDepth::setDepth(d_out, d_oldDepth); } ExprPrintTypes::ExprPrintTypes(bool printTypes) : d_printTypes(printTypes) {} void ExprPrintTypes::applyPrintTypes(std::ostream& out) { out.iword(s_iosIndex) = d_printTypes; } bool ExprPrintTypes::getPrintTypes(std::ostream& out) { return out.iword(s_iosIndex); } void ExprPrintTypes::setPrintTypes(std::ostream& out, bool printTypes) { out.iword(s_iosIndex) = printTypes; } ExprPrintTypes::Scope::Scope(std::ostream& out, bool printTypes) : d_out(out), d_oldPrintTypes(ExprPrintTypes::getPrintTypes(out)) { ExprPrintTypes::setPrintTypes(out, printTypes); } ExprPrintTypes::Scope::~Scope() { ExprPrintTypes::setPrintTypes(d_out, d_oldPrintTypes); } ExprDag::ExprDag(bool dag) : d_dag(dag ? 1 : 0) {} ExprDag::ExprDag(int dag) : d_dag(dag < 0 ? 0 : dag) {} void ExprDag::applyDag(std::ostream& out) { // (offset by one to detect whether default has been set yet) out.iword(s_iosIndex) = static_cast(d_dag) + 1; } size_t ExprDag::getDag(std::ostream& out) { long& l = out.iword(s_iosIndex); if(l == 0) { // set the default dag setting on this ostream // (offset by one to detect whether default has been set yet) if(not Options::isCurrentNull()) { l = options::defaultDagThresh() + 1; } if(l == 0) { // if called from outside the library, we may not have options // available to us at this point (or perhaps the output language // is not set in Options). Default to something reasonable, but // don't set "l" since that would make it "sticky" for this // stream. return s_defaultDag + 1; } } return static_cast(l - 1); } void ExprDag::setDag(std::ostream& out, size_t dag) { // (offset by one to detect whether default has been set yet) out.iword(s_iosIndex) = static_cast(dag) + 1; } ExprDag::Scope::Scope(std::ostream& out, size_t dag) : d_out(out), d_oldDag(ExprDag::getDag(out)) { ExprDag::setDag(out, dag); } ExprDag::Scope::~Scope() { ExprDag::setDag(d_out, d_oldDag); } std::ostream& operator<<(std::ostream& out, ExprDag d) { d.applyDag(out); return out; } std::ostream& operator<<(std::ostream& out, ExprPrintTypes pt) { pt.applyPrintTypes(out); return out; } std::ostream& operator<<(std::ostream& out, ExprSetDepth sd) { sd.applyDepth(out); return out; } }/* namespace CVC4::expr */ }/* namespace CVC4 */ cvc4-1.5/src/expr/expr_iomanip.h000066400000000000000000000137331313116454100166340ustar00rootroot00000000000000/********************* */ /*! \file expr_iomanip.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Expr IO manipulation classes. ** ** Expr IO manipulation classes. **/ #include "cvc4_public.h" #ifndef __CVC4__EXPR__EXPR_IOMANIP_H #define __CVC4__EXPR__EXPR_IOMANIP_H #include namespace CVC4 { namespace expr { /** * IOStream manipulator to set the maximum depth of Exprs when * pretty-printing. -1 means print to any depth. E.g.: * * // let a, b, c, and d be VARIABLEs * Expr e = em->mkExpr(OR, a, b, em->mkExpr(AND, c, em->mkExpr(NOT, d))) * out << setdepth(3) << e; * * gives "(OR a b (AND c (NOT d)))", but * * out << setdepth(1) << [same expr as above] * * gives "(OR a b (...))". * * The implementation of this class serves two purposes; it holds * information about the depth setting (such as the index of the * allocated word in ios_base), and serves also as the manipulator * itself (as above). */ class CVC4_PUBLIC ExprSetDepth { public: /** * Construct a ExprSetDepth with the given depth. */ ExprSetDepth(long depth); void applyDepth(std::ostream& out); static long getDepth(std::ostream& out); static void setDepth(std::ostream& out, long depth); /** * Set the expression depth on the output stream for the current * stack scope. This makes sure the old depth is reset on the stream * after normal OR exceptional exit from the scope, using the RAII * C++ idiom. */ class Scope { public: Scope(std::ostream& out, long depth); ~Scope(); private: std::ostream& d_out; long d_oldDepth; };/* class ExprSetDepth::Scope */ private: /** * The allocated index in ios_base for our depth setting. */ static const int s_iosIndex; /** * The default depth to print, for ostreams that haven't yet had a * setdepth() applied to them. */ static const int s_defaultPrintDepth = -1; /** * When this manipulator is used, the depth is stored here. */ long d_depth; };/* class ExprSetDepth */ /** * IOStream manipulator to print type ascriptions or not. * * // let a, b, c, and d be variables of sort U * Expr e = em->mkExpr(OR, a, b, em->mkExpr(AND, c, em->mkExpr(NOT, d))) * out << e; * * gives "(OR a:U b:U (AND c:U (NOT d:U)))", but */ class CVC4_PUBLIC ExprPrintTypes { public: /** * Construct a ExprPrintTypes with the given setting. */ ExprPrintTypes(bool printTypes); void applyPrintTypes(std::ostream& out); static bool getPrintTypes(std::ostream& out); static void setPrintTypes(std::ostream& out, bool printTypes); /** * Set the print-types state on the output stream for the current * stack scope. This makes sure the old state is reset on the * stream after normal OR exceptional exit from the scope, using the * RAII C++ idiom. */ class Scope { public: Scope(std::ostream& out, bool printTypes); ~Scope(); private: std::ostream& d_out; bool d_oldPrintTypes; };/* class ExprPrintTypes::Scope */ private: /** * The allocated index in ios_base for our setting. */ static const int s_iosIndex; /** * When this manipulator is used, the setting is stored here. */ bool d_printTypes; };/* class ExprPrintTypes */ /** * IOStream manipulator to print expressions as a dag (or not). */ class CVC4_PUBLIC ExprDag { public: /** * Construct a ExprDag with the given setting (dagification on or off). */ explicit ExprDag(bool dag); /** * Construct a ExprDag with the given setting (letify only common * subexpressions that appear more than 'dag' times). dag <= 0 means * don't dagify. */ explicit ExprDag(int dag); void applyDag(std::ostream& out); static size_t getDag(std::ostream& out); static void setDag(std::ostream& out, size_t dag); /** * Set the dag state on the output stream for the current * stack scope. This makes sure the old state is reset on the * stream after normal OR exceptional exit from the scope, using the * RAII C++ idiom. */ class Scope { public: Scope(std::ostream& out, size_t dag); ~Scope(); private: std::ostream& d_out; size_t d_oldDag; };/* class ExprDag::Scope */ private: /** * The allocated index in ios_base for our setting. */ static const int s_iosIndex; /** * The default setting, for ostreams that haven't yet had a * dag() applied to them. */ static const size_t s_defaultDag = 1; /** * When this manipulator is used, the setting is stored here. */ size_t d_dag; };/* class ExprDag */ /** * Sets the default dag setting when pretty-printing a Expr to an ostream. * Use like this: * * // let out be an ostream, e an Expr * out << Expr::dag(true) << e << endl; * * The setting stays permanently (until set again) with the stream. */ std::ostream& operator<<(std::ostream& out, ExprDag d) CVC4_PUBLIC; /** * Sets the default print-types setting when pretty-printing an Expr * to an ostream. Use like this: * * // let out be an ostream, e an Expr * out << Expr::printtypes(true) << e << endl; * * The setting stays permanently (until set again) with the stream. */ std::ostream& operator<<(std::ostream& out, ExprPrintTypes pt) CVC4_PUBLIC; /** * Sets the default depth when pretty-printing a Expr to an ostream. * Use like this: * * // let out be an ostream, e an Expr * out << Expr::setdepth(n) << e << endl; * * The depth stays permanently (until set again) with the stream. */ std::ostream& operator<<(std::ostream& out, ExprSetDepth sd) CVC4_PUBLIC; }/* namespace CVC4::expr */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR__EXPR_IOMANIP_H */ cvc4-1.5/src/expr/expr_manager.i000066400000000000000000000113251313116454100166060ustar00rootroot00000000000000%{ #include "expr/expr_manager.h" %} %typemap(javacode) CVC4::ExprManager %{ // a ref is kept here to keep Java GC from collecting the Options // before the ExprManager private Object options; %} %typemap(javaconstruct) ExprManager { this($imcall, true); this.options = SmtEngine.mkRef(options); // keep ref to options in SWIG proxy class } %typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") CVC4::ExprManager { SmtEngine.dlRef(options); options = null; if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; CVC4JNI.delete_ExprManager(swigCPtr); } swigCPtr = 0; } } #ifdef SWIGOCAML /* OCaml bindings cannot deal with this degree of overloading */ %ignore CVC4::ExprManager::mkExpr(Kind, const std::vector&); %ignore CVC4::ExprManager::mkExpr(Kind, Expr, const std::vector&); %ignore CVC4::ExprManager::mkExpr(Expr); %ignore CVC4::ExprManager::mkExpr(Expr, Expr); %ignore CVC4::ExprManager::mkExpr(Expr, Expr, Expr); %ignore CVC4::ExprManager::mkExpr(Expr, Expr, Expr, Expr); %ignore CVC4::ExprManager::mkExpr(Expr, Expr, Expr, Expr, Expr); %ignore CVC4::ExprManager::mkExpr(Expr, Expr, Expr, Expr, Expr, Expr); %ignore CVC4::ExprManager::mkExpr(Expr, const std::vector&); #endif /* SWIGOCAML */ %ignore CVC4::stats::getStatisticsRegistry(ExprManager*); %include "expr/expr_manager.h" %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; #ifdef SWIGPYTHON /* The python bindings cannot differentiate between bool and other basic * types like enum and int. Therefore, we rename mkConst for the bool * case into mkBoolConst. */ %template(mkBoolConst) CVC4::ExprManager::mkConst; // These cases have trouble too. Remove them for now. //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; //%template(mkConst) CVC4::ExprManager::mkConst; #else %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; %template(mkConst) CVC4::ExprManager::mkConst; #endif %include "expr/expr_manager.h" cvc4-1.5/src/expr/expr_manager_scope.h000066400000000000000000000050061313116454100177750ustar00rootroot00000000000000/********************* */ /*! \file expr_manager_scope.h ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_private.h" #ifndef __CVC4__EXPR_MANAGER_SCOPE_H #define __CVC4__EXPR_MANAGER_SCOPE_H #include "expr/expr.h" #include "expr/node_manager.h" #include "expr/expr_manager.h" namespace CVC4 { /** * Creates a NodeManagerScope with the underlying * NodeManager of a given Expr or * ExprManager. The NodeManagerScope is * destroyed when the ExprManagerScope is destroyed. See * NodeManagerScope for more information. */ // NOTE: Here, it seems ExprManagerScope is redundant, since we have // NodeManagerScope already. However, without this class, we'd need // Expr to be a friend of ExprManager, because in the implementation // of Expr functions, it needs to set the current NodeManager // correctly (and to do that it needs access to // ExprManager::getNodeManager()). So, we make ExprManagerScope a // friend of ExprManager's, since its implementation is simple to // read and understand (and verify that it doesn't do any mischief). // // ExprManager::getNodeManager() can't just be made public, since // ExprManager is exposed to clients of the library and NodeManager is // not. Similarly, ExprManagerScope shouldn't go in expr_manager.h, // since that's a public header. class ExprManagerScope { NodeManagerScope d_nms; public: inline ExprManagerScope(const Expr& e) : d_nms(e.getExprManager() == NULL ? NodeManager::currentNM() : e.getExprManager()->getNodeManager()) { } inline ExprManagerScope(const Type& t) : d_nms(t.getExprManager() == NULL ? NodeManager::currentNM() : t.getExprManager()->getNodeManager()) { } inline ExprManagerScope(const ExprManager& exprManager) : d_nms(exprManager.getNodeManager()) { } };/* class ExprManagerScope */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR_MANAGER_SCOPE_H */ cvc4-1.5/src/expr/expr_manager_template.cpp000066400000000000000000001231011313116454100210270ustar00rootroot00000000000000/********************* */ /*! \file expr_manager_template.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Christopher L. Conway ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Public-facing expression manager interface, implementation ** ** Public-facing expression manager interface, implementation. **/ #include "expr/expr_manager.h" #include #include "expr/node_manager.h" #include "expr/variable_type_map.h" #include "expr/node_manager_attributes.h" #include "options/options.h" #include "util/statistics_registry.h" ${includes} // This is a hack, but an important one: if there's an error, the // compiler directs the user to the template file instead of the // generated one. We don't want the user to modify the generated one, // since it'll get overwritten on a later build. #line 34 "${template}" #ifdef CVC4_STATISTICS_ON #define INC_STAT(kind) \ { \ if (d_exprStatistics[kind] == NULL) { \ stringstream statName; \ statName << "expr::ExprManager::" << kind; \ d_exprStatistics[kind] = new IntStat(statName.str(), 0); \ d_nodeManager->getStatisticsRegistry()->registerStat(d_exprStatistics[kind]); \ } \ ++ *(d_exprStatistics[kind]); \ } #define INC_STAT_VAR(type, bound_var) \ { \ TypeNode* typeNode = Type::getTypeNode(type); \ TypeConstant type = typeNode->getKind() == kind::TYPE_CONSTANT ? typeNode->getConst() : LAST_TYPE; \ if (d_exprStatisticsVars[type] == NULL) { \ stringstream statName; \ if (type == LAST_TYPE) { \ statName << "expr::ExprManager::" << ((bound_var) ? "BOUND_VARIABLE" : "VARIABLE") << ":Parameterized type"; \ } else { \ statName << "expr::ExprManager::" << ((bound_var) ? "BOUND_VARIABLE" : "VARIABLE") << ":" << type; \ } \ d_exprStatisticsVars[type] = new IntStat(statName.str(), 0); \ d_nodeManager->getStatisticsRegistry()->registerStat(d_exprStatisticsVars[type]); \ } \ ++ *(d_exprStatisticsVars[type]); \ } #else #define INC_STAT(kind) #define INC_STAT_VAR(type, bound_var) #endif using namespace std; using namespace CVC4::kind; namespace CVC4 { ExprManager::ExprManager() : d_nodeManager(new NodeManager(this)) { #ifdef CVC4_STATISTICS_ON for (unsigned i = 0; i < kind::LAST_KIND; ++ i) { d_exprStatistics[i] = NULL; } for (unsigned i = 0; i <= LAST_TYPE; ++ i) { d_exprStatisticsVars[i] = NULL; } #endif } ExprManager::ExprManager(const Options& options) : d_nodeManager(new NodeManager(this, options)) { #ifdef CVC4_STATISTICS_ON for (unsigned i = 0; i <= LAST_TYPE; ++ i) { d_exprStatisticsVars[i] = NULL; } for (unsigned i = 0; i < kind::LAST_KIND; ++ i) { d_exprStatistics[i] = NULL; } #endif } ExprManager::~ExprManager() throw() { NodeManagerScope nms(d_nodeManager); try { #ifdef CVC4_STATISTICS_ON for (unsigned i = 0; i < kind::LAST_KIND; ++ i) { if (d_exprStatistics[i] != NULL) { d_nodeManager->getStatisticsRegistry()->unregisterStat(d_exprStatistics[i]); delete d_exprStatistics[i]; d_exprStatistics[i] = NULL; } } for (unsigned i = 0; i <= LAST_TYPE; ++ i) { if (d_exprStatisticsVars[i] != NULL) { d_nodeManager->getStatisticsRegistry()->unregisterStat(d_exprStatisticsVars[i]); delete d_exprStatisticsVars[i]; d_exprStatisticsVars[i] = NULL; } } #endif delete d_nodeManager; d_nodeManager = NULL; } catch(Exception& e) { Warning() << "CVC4 threw an exception during cleanup." << std::endl << e << std::endl; } } const Options& ExprManager::getOptions() const { return d_nodeManager->getOptions(); } ResourceManager* ExprManager::getResourceManager() throw() { return d_nodeManager->getResourceManager(); } BooleanType ExprManager::booleanType() const { NodeManagerScope nms(d_nodeManager); return BooleanType(Type(d_nodeManager, new TypeNode(d_nodeManager->booleanType()))); } StringType ExprManager::stringType() const { NodeManagerScope nms(d_nodeManager); return StringType(Type(d_nodeManager, new TypeNode(d_nodeManager->stringType()))); } RegExpType ExprManager::regExpType() const { NodeManagerScope nms(d_nodeManager); return StringType(Type(d_nodeManager, new TypeNode(d_nodeManager->regExpType()))); } RealType ExprManager::realType() const { NodeManagerScope nms(d_nodeManager); return RealType(Type(d_nodeManager, new TypeNode(d_nodeManager->realType()))); } IntegerType ExprManager::integerType() const { NodeManagerScope nms(d_nodeManager); return IntegerType(Type(d_nodeManager, new TypeNode(d_nodeManager->integerType()))); } RoundingModeType ExprManager::roundingModeType() const { NodeManagerScope nms(d_nodeManager); return RoundingModeType(Type(d_nodeManager, new TypeNode(d_nodeManager->roundingModeType()))); } Expr ExprManager::mkExpr(Kind kind, Expr child1) { const kind::MetaKind mk = kind::metaKindOf(kind); const unsigned n = 1 - (mk == kind::metakind::PARAMETERIZED ? 1 : 0); PrettyCheckArgument( mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, kind, "Only operator-style expressions are made with mkExpr(); " "to make variables and constants, see mkVar(), mkBoundVar(), " "and mkConst()."); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(kind, child1.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2) { const kind::MetaKind mk = kind::metaKindOf(kind); const unsigned n = 2 - (mk == kind::metakind::PARAMETERIZED ? 1 : 0); PrettyCheckArgument( mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, kind, "Only operator-style expressions are made with mkExpr(); " "to make variables and constants, see mkVar(), mkBoundVar(), " "and mkConst()."); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(kind, child1.getNode(), child2.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2, Expr child3) { const kind::MetaKind mk = kind::metaKindOf(kind); const unsigned n = 3 - (mk == kind::metakind::PARAMETERIZED ? 1 : 0); PrettyCheckArgument( mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, kind, "Only operator-style expressions are made with mkExpr(); " "to make variables and constants, see mkVar(), mkBoundVar(), " "and mkConst()."); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(kind, child1.getNode(), child2.getNode(), child3.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2, Expr child3, Expr child4) { const kind::MetaKind mk = kind::metaKindOf(kind); const unsigned n = 4 - (mk == kind::metakind::PARAMETERIZED ? 1 : 0); PrettyCheckArgument( mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, kind, "Only operator-style expressions are made with mkExpr(); " "to make variables and constants, see mkVar(), mkBoundVar(), " "and mkConst()."); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(kind, child1.getNode(), child2.getNode(), child3.getNode(), child4.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2, Expr child3, Expr child4, Expr child5) { const kind::MetaKind mk = kind::metaKindOf(kind); const unsigned n = 5 - (mk == kind::metakind::PARAMETERIZED ? 1 : 0); PrettyCheckArgument( mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, kind, "Only operator-style expressions are made with mkExpr(); " "to make variables and constants, see mkVar(), mkBoundVar(), " "and mkConst()."); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(kind, child1.getNode(), child2.getNode(), child3.getNode(), child4.getNode(), child5.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Kind kind, const std::vector& children) { const kind::MetaKind mk = kind::metaKindOf(kind); const unsigned n = children.size() - (mk == kind::metakind::PARAMETERIZED ? 1 : 0); PrettyCheckArgument( mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, kind, "Only operator-style expressions are made with mkExpr(); " "to make variables and constants, see mkVar(), mkBoundVar(), " "and mkConst()."); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); vector nodes; vector::const_iterator it = children.begin(); vector::const_iterator it_end = children.end(); while(it != it_end) { nodes.push_back(it->getNode()); ++it; } try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(kind, nodes)); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Kind kind, Expr child1, const std::vector& otherChildren) { const kind::MetaKind mk = kind::metaKindOf(kind); const unsigned n = otherChildren.size() - (mk == kind::metakind::PARAMETERIZED ? 1 : 0) + 1; PrettyCheckArgument( mk == kind::metakind::PARAMETERIZED || mk == kind::metakind::OPERATOR, kind, "Only operator-style expressions are made with mkExpr(); " "to make variables and constants, see mkVar(), mkBoundVar(), " "and mkConst()."); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); vector nodes; nodes.push_back(child1.getNode()); vector::const_iterator it = otherChildren.begin(); vector::const_iterator it_end = otherChildren.end(); while(it != it_end) { nodes.push_back(it->getNode()); ++it; } try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(kind, nodes)); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Expr opExpr) { const unsigned n = 0; Kind kind = NodeManager::operatorToKind(opExpr.getNode()); PrettyCheckArgument( opExpr.getKind() == kind::BUILTIN || kind::metaKindOf(kind) == kind::metakind::PARAMETERIZED, opExpr, "This Expr constructor is for parameterized kinds only"); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(opExpr.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Expr opExpr, Expr child1) { const unsigned n = 1; Kind kind = NodeManager::operatorToKind(opExpr.getNode()); PrettyCheckArgument( (opExpr.getKind() == kind::BUILTIN || kind::metaKindOf(kind) == kind::metakind::PARAMETERIZED), opExpr, "This Expr constructor is for parameterized kinds only"); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(opExpr.getNode(), child1.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Expr opExpr, Expr child1, Expr child2) { const unsigned n = 2; Kind kind = NodeManager::operatorToKind(opExpr.getNode()); PrettyCheckArgument( (opExpr.getKind() == kind::BUILTIN || kind::metaKindOf(kind) == kind::metakind::PARAMETERIZED), opExpr, "This Expr constructor is for parameterized kinds only"); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(opExpr.getNode(), child1.getNode(), child2.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Expr opExpr, Expr child1, Expr child2, Expr child3) { const unsigned n = 3; Kind kind = NodeManager::operatorToKind(opExpr.getNode()); PrettyCheckArgument( (opExpr.getKind() == kind::BUILTIN || kind::metaKindOf(kind) == kind::metakind::PARAMETERIZED), opExpr, "This Expr constructor is for parameterized kinds only"); PrettyCheckArgument(n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(opExpr.getNode(), child1.getNode(), child2.getNode(), child3.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Expr opExpr, Expr child1, Expr child2, Expr child3, Expr child4) { const unsigned n = 4; Kind kind = NodeManager::operatorToKind(opExpr.getNode()); PrettyCheckArgument( (opExpr.getKind() == kind::BUILTIN || kind::metaKindOf(kind) == kind::metakind::PARAMETERIZED), opExpr, "This Expr constructor is for parameterized kinds only"); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(opExpr.getNode(), child1.getNode(), child2.getNode(), child3.getNode(), child4.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Expr opExpr, Expr child1, Expr child2, Expr child3, Expr child4, Expr child5) { const unsigned n = 5; Kind kind = NodeManager::operatorToKind(opExpr.getNode()); PrettyCheckArgument( (opExpr.getKind() == kind::BUILTIN || kind::metaKindOf(kind) == kind::metakind::PARAMETERIZED), opExpr, "This Expr constructor is for parameterized kinds only"); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); try { INC_STAT(kind); return Expr(this, d_nodeManager->mkNodePtr(opExpr.getNode(), child1.getNode(), child2.getNode(), child3.getNode(), child4.getNode(), child5.getNode())); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } Expr ExprManager::mkExpr(Expr opExpr, const std::vector& children) { const unsigned n = children.size(); Kind kind = NodeManager::operatorToKind(opExpr.getNode()); PrettyCheckArgument( (opExpr.getKind() == kind::BUILTIN || kind::metaKindOf(kind) == kind::metakind::PARAMETERIZED), opExpr, "This Expr constructor is for parameterized kinds only"); PrettyCheckArgument( n >= minArity(kind) && n <= maxArity(kind), kind, "Exprs with kind %s must have at least %u children and " "at most %u children (the one under construction has %u)", kind::kindToString(kind).c_str(), minArity(kind), maxArity(kind), n); NodeManagerScope nms(d_nodeManager); vector nodes; vector::const_iterator it = children.begin(); vector::const_iterator it_end = children.end(); while(it != it_end) { nodes.push_back(it->getNode()); ++it; } try { INC_STAT(kind); return Expr(this,d_nodeManager->mkNodePtr(opExpr.getNode(), nodes)); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } bool ExprManager::hasOperator(Kind k) { return NodeManager::hasOperator(k); } Expr ExprManager::operatorOf(Kind k) { NodeManagerScope nms(d_nodeManager); return d_nodeManager->operatorOf(k).toExpr(); } Kind ExprManager::operatorToKind(Expr e) { NodeManagerScope nms(d_nodeManager); return d_nodeManager->operatorToKind( e.getNode() ); } /** Make a function type from domain to range. */ FunctionType ExprManager::mkFunctionType(Type domain, Type range) { NodeManagerScope nms(d_nodeManager); return FunctionType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkFunctionType(*domain.d_typeNode, *range.d_typeNode)))); } /** Make a function type with input types from argTypes. */ FunctionType ExprManager::mkFunctionType(const std::vector& argTypes, Type range) { NodeManagerScope nms(d_nodeManager); Assert( argTypes.size() >= 1 ); std::vector argTypeNodes; for (unsigned i = 0, i_end = argTypes.size(); i < i_end; ++ i) { argTypeNodes.push_back(*argTypes[i].d_typeNode); } return FunctionType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkFunctionType(argTypeNodes, *range.d_typeNode)))); } FunctionType ExprManager::mkFunctionType(const std::vector& sorts) { NodeManagerScope nms(d_nodeManager); Assert( sorts.size() >= 2 ); std::vector sortNodes; for (unsigned i = 0, i_end = sorts.size(); i < i_end; ++ i) { sortNodes.push_back(*sorts[i].d_typeNode); } return FunctionType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkFunctionType(sortNodes)))); } FunctionType ExprManager::mkPredicateType(const std::vector& sorts) { NodeManagerScope nms(d_nodeManager); Assert( sorts.size() >= 1 ); std::vector sortNodes; for (unsigned i = 0, i_end = sorts.size(); i < i_end; ++ i) { sortNodes.push_back(*sorts[i].d_typeNode); } return FunctionType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkPredicateType(sortNodes)))); } DatatypeType ExprManager::mkTupleType(const std::vector& types) { NodeManagerScope nms(d_nodeManager); std::vector typeNodes; for (unsigned i = 0, i_end = types.size(); i < i_end; ++ i) { typeNodes.push_back(*types[i].d_typeNode); } return DatatypeType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkTupleType(typeNodes)))); } DatatypeType ExprManager::mkRecordType(const Record& rec) { NodeManagerScope nms(d_nodeManager); return DatatypeType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkRecordType(rec)))); } SExprType ExprManager::mkSExprType(const std::vector& types) { NodeManagerScope nms(d_nodeManager); std::vector typeNodes; for (unsigned i = 0, i_end = types.size(); i < i_end; ++ i) { typeNodes.push_back(*types[i].d_typeNode); } return SExprType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkSExprType(typeNodes)))); } FloatingPointType ExprManager::mkFloatingPointType(unsigned exp, unsigned sig) const { NodeManagerScope nms(d_nodeManager); return FloatingPointType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkFloatingPointType(exp,sig)))); } BitVectorType ExprManager::mkBitVectorType(unsigned size) const { NodeManagerScope nms(d_nodeManager); return BitVectorType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkBitVectorType(size)))); } ArrayType ExprManager::mkArrayType(Type indexType, Type constituentType) const { NodeManagerScope nms(d_nodeManager); return ArrayType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkArrayType(*indexType.d_typeNode, *constituentType.d_typeNode)))); } SetType ExprManager::mkSetType(Type elementType) const { NodeManagerScope nms(d_nodeManager); return SetType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkSetType(*elementType.d_typeNode)))); } DatatypeType ExprManager::mkDatatypeType(Datatype& datatype) { // Not worth a special implementation; this doesn't need to be fast // code anyway. vector datatypes; datatypes.push_back(datatype); std::vector result = mkMutualDatatypeTypes(datatypes); Assert(result.size() == 1); return result.front(); } std::vector ExprManager::mkMutualDatatypeTypes(std::vector& datatypes) { std::set unresolvedTypes; return mkMutualDatatypeTypes(datatypes, unresolvedTypes); } std::vector ExprManager::mkMutualDatatypeTypes(std::vector& datatypes, std::set& unresolvedTypes) { NodeManagerScope nms(d_nodeManager); std::map nameResolutions; std::vector dtts; //have to build deep copy so that datatypes will live in NodeManager std::vector< Datatype* > dt_copies; for(std::vector::iterator i = datatypes.begin(), i_end = datatypes.end(); i != i_end; ++i) { dt_copies.push_back( new Datatype( *i ) ); } // First do some sanity checks, set up the final Type to be used for // each datatype, and set up the "named resolutions" used to handle // simple self- and mutual-recursion, for example in the definition // "nat = succ(pred:nat) | zero", a named resolution can handle the // pred selector. for(std::vector::iterator i = dt_copies.begin(), i_end = dt_copies.end(); i != i_end; ++i) { TypeNode* typeNode; if( (*i)->getNumParameters() == 0 ) { unsigned index = d_nodeManager->registerDatatype( *i ); typeNode = new TypeNode(d_nodeManager->mkTypeConst(DatatypeIndexConstant(index))); //typeNode = new TypeNode(d_nodeManager->mkTypeConst(*i)); } else { unsigned index = d_nodeManager->registerDatatype( *i ); TypeNode cons = d_nodeManager->mkTypeConst(DatatypeIndexConstant(index)); //TypeNode cons = d_nodeManager->mkTypeConst(*i); std::vector< TypeNode > params; params.push_back( cons ); for( unsigned int ip = 0; ip < (*i)->getNumParameters(); ++ip ) { params.push_back( TypeNode::fromType( (*i)->getParameter( ip ) ) ); } typeNode = new TypeNode(d_nodeManager->mkTypeNode(kind::PARAMETRIC_DATATYPE, params)); } Type type(d_nodeManager, typeNode); DatatypeType dtt(type); PrettyCheckArgument( nameResolutions.find((*i)->getName()) == nameResolutions.end(), dt_copies, "cannot construct two datatypes at the same time " "with the same name `%s'", (*i)->getName().c_str()); nameResolutions.insert(std::make_pair((*i)->getName(), dtt)); dtts.push_back(dtt); //d_keep_dtt.push_back(dtt); //d_keep_dt.push_back(*i); //Assert( dtt.getDatatype()==(*i) ); } // Second, set up the type substitution map for complex type // resolution (e.g. if "list" is the type we're defining, and it has // a selector of type "ARRAY INT OF list", this can't be taken care // of using the named resolutions that we set up above. A // preliminary array type was set up, and now needs to have "list" // substituted in it for the correct type. // // @TODO get rid of named resolutions altogether and handle // everything with these resolutions? std::vector< SortConstructorType > paramTypes; std::vector< DatatypeType > paramReplacements; std::vector placeholders;// to hold the "unresolved placeholders" std::vector replacements;// to hold our final, resolved types for(std::set::iterator i = unresolvedTypes.begin(), i_end = unresolvedTypes.end(); i != i_end; ++i) { std::string name; if( (*i).isSort() ) { name = SortType(*i).getName(); } else { Assert( (*i).isSortConstructor() ); name = SortConstructorType(*i).getName(); } std::map::const_iterator resolver = nameResolutions.find(name); PrettyCheckArgument( resolver != nameResolutions.end(), unresolvedTypes, "cannot resolve type `%s'; it's not among " "the datatypes being defined", name.c_str()); // We will instruct the Datatype to substitute "*i" (the // unresolved SortType used as a placeholder in complex types) // with "(*resolver).second" (the DatatypeType we created in the // first step, above). if( (*i).isSort() ) { placeholders.push_back(*i); replacements.push_back( (*resolver).second ); } else { Assert( (*i).isSortConstructor() ); paramTypes.push_back( SortConstructorType(*i) ); paramReplacements.push_back( (*resolver).second ); } } // Lastly, perform the final resolutions and checks. for(std::vector::iterator i = dtts.begin(), i_end = dtts.end(); i != i_end; ++i) { const Datatype& dt = (*i).getDatatype(); if(!dt.isResolved()) { const_cast(dt).resolve(this, nameResolutions, placeholders, replacements, paramTypes, paramReplacements); } // Now run some checks, including a check to make sure that no // selector is function-valued. checkResolvedDatatype(*i); } for(std::vector::iterator i = d_nodeManager->d_listeners.begin(); i != d_nodeManager->d_listeners.end(); ++i) { (*i)->nmNotifyNewDatatypes(dtts); } return dtts; } void ExprManager::checkResolvedDatatype(DatatypeType dtt) const { const Datatype& dt = dtt.getDatatype(); AssertArgument(dt.isResolved(), dtt, "datatype should have been resolved"); // for all constructors... for(Datatype::const_iterator i = dt.begin(), i_end = dt.end(); i != i_end; ++i) { const DatatypeConstructor& c = *i; Type testerType CVC4_UNUSED = c.getTester().getType(); Assert(c.isResolved() && testerType.isTester() && TesterType(testerType).getDomain() == dtt && TesterType(testerType).getRangeType() == booleanType(), "malformed tester in datatype post-resolution"); Type ctorType CVC4_UNUSED = c.getConstructor().getType(); Assert(ctorType.isConstructor() && ConstructorType(ctorType).getArity() == c.getNumArgs() && ConstructorType(ctorType).getRangeType() == dtt, "malformed constructor in datatype post-resolution"); // for all selectors... for(DatatypeConstructor::const_iterator j = c.begin(), j_end = c.end(); j != j_end; ++j) { const DatatypeConstructorArg& a = *j; Type selectorType = a.getType(); Assert(a.isResolved() && selectorType.isSelector() && SelectorType(selectorType).getDomain() == dtt, "malformed selector in datatype post-resolution"); // This next one's a "hard" check, performed in non-debug builds // as well; the other ones should all be guaranteed by the // CVC4::Datatype class, but this actually needs to be checked. AlwaysAssert(!SelectorType(selectorType).getRangeType().d_typeNode->isFunctionLike(), "cannot put function-like things in datatypes"); } } } ConstructorType ExprManager::mkConstructorType(const DatatypeConstructor& constructor, Type range) const { NodeManagerScope nms(d_nodeManager); return Type(d_nodeManager, new TypeNode(d_nodeManager->mkConstructorType(constructor, *range.d_typeNode))); } SelectorType ExprManager::mkSelectorType(Type domain, Type range) const { NodeManagerScope nms(d_nodeManager); return Type(d_nodeManager, new TypeNode(d_nodeManager->mkSelectorType(*domain.d_typeNode, *range.d_typeNode))); } TesterType ExprManager::mkTesterType(Type domain) const { NodeManagerScope nms(d_nodeManager); return Type(d_nodeManager, new TypeNode(d_nodeManager->mkTesterType(*domain.d_typeNode))); } SortType ExprManager::mkSort(const std::string& name, uint32_t flags) const { NodeManagerScope nms(d_nodeManager); return SortType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkSort(name, flags)))); } SortConstructorType ExprManager::mkSortConstructor(const std::string& name, size_t arity) const { NodeManagerScope nms(d_nodeManager); return SortConstructorType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkSortConstructor(name, arity)))); } /* - not in release 1.0 Type ExprManager::mkPredicateSubtype(Expr lambda) throw(TypeCheckingException) { NodeManagerScope nms(d_nodeManager); try { return PredicateSubtype(Type(d_nodeManager, new TypeNode(d_nodeManager->mkPredicateSubtype(lambda)))); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } */ /* - not in release 1.0 Type ExprManager::mkPredicateSubtype(Expr lambda, Expr witness) throw(TypeCheckingException) { NodeManagerScope nms(d_nodeManager); try { return PredicateSubtype(Type(d_nodeManager, new TypeNode(d_nodeManager->mkPredicateSubtype(lambda, witness)))); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } */ Type ExprManager::mkSubrangeType(const SubrangeBounds& bounds) throw(TypeCheckingException) { NodeManagerScope nms(d_nodeManager); try { return SubrangeType(Type(d_nodeManager, new TypeNode(d_nodeManager->mkSubrangeType(bounds)))); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } } /** * Get the type for the given Expr and optionally do type checking. * * Initial type computation will be near-constant time if * type checking is not requested. Results are memoized, so that * subsequent calls to getType() without type checking will be * constant time. * * Initial type checking is linear in the size of the expression. * Again, the results are memoized, so that subsequent calls to * getType(), with or without type checking, will be constant * time. * * NOTE: A TypeCheckingException can be thrown even when type * checking is not requested. getType() will always return a * valid and correct type and, thus, an exception will be thrown * when no valid or correct type can be computed (e.g., if the * arguments to a bit-vector operation aren't bit-vectors). When * type checking is not requested, getType() will do the minimum * amount of checking required to return a valid result. * * @param e the Expr for which we want a type * @param check whether we should check the type as we compute it * (default: false) */ Type ExprManager::getType(Expr e, bool check) throw (TypeCheckingException) { NodeManagerScope nms(d_nodeManager); Type t; try { t = Type(d_nodeManager, new TypeNode(d_nodeManager->getType(e.getNode(), check))); } catch (const TypeCheckingExceptionPrivate& e) { throw TypeCheckingException(this, &e); } return t; } Expr ExprManager::mkVar(const std::string& name, Type type, uint32_t flags) { Assert(NodeManager::currentNM() == NULL, "ExprManager::mkVar() should only be called externally, not from within CVC4 code. Please use mkSkolem()."); NodeManagerScope nms(d_nodeManager); Node* n = d_nodeManager->mkVarPtr(name, *type.d_typeNode, flags); Debug("nm") << "set " << name << " on " << *n << std::endl; INC_STAT_VAR(type, false); return Expr(this, n); } Expr ExprManager::mkVar(Type type, uint32_t flags) { Assert(NodeManager::currentNM() == NULL, "ExprManager::mkVar() should only be called externally, not from within CVC4 code. Please use mkSkolem()."); NodeManagerScope nms(d_nodeManager); INC_STAT_VAR(type, false); return Expr(this, d_nodeManager->mkVarPtr(*type.d_typeNode, flags)); } Expr ExprManager::mkBoundVar(const std::string& name, Type type) { NodeManagerScope nms(d_nodeManager); Node* n = d_nodeManager->mkBoundVarPtr(name, *type.d_typeNode); Debug("nm") << "set " << name << " on " << *n << std::endl; INC_STAT_VAR(type, true); return Expr(this, n); } Expr ExprManager::mkBoundVar(Type type) { NodeManagerScope nms(d_nodeManager); INC_STAT_VAR(type, true); return Expr(this, d_nodeManager->mkBoundVarPtr(*type.d_typeNode)); } Expr ExprManager::mkNullaryOperator(Type type, Kind k){ NodeManagerScope nms(d_nodeManager); Node n = d_nodeManager->mkNullaryOperator(*type.d_typeNode, k); return n.toExpr(); } Expr ExprManager::mkAssociative(Kind kind, const std::vector& children) { PrettyCheckArgument( kind::isAssociative(kind), kind, "Illegal kind in mkAssociative: %s", kind::kindToString(kind).c_str()); NodeManagerScope nms(d_nodeManager); const unsigned int max = maxArity(kind); const unsigned int min = minArity(kind); unsigned int numChildren = children.size(); /* If the number of children is within bounds, then there's nothing to do. */ if( numChildren <= max ) { return mkExpr(kind,children); } std::vector::const_iterator it = children.begin() ; std::vector::const_iterator end = children.end() ; /* The new top-level children and the children of each sub node */ std::vector newChildren; std::vector subChildren; while( it != end && numChildren > max ) { /* Grab the next max children and make a node for them. */ for( std::vector::const_iterator next = it + max; it != next; ++it, --numChildren ) { subChildren.push_back(it->getNode()); } Node subNode = d_nodeManager->mkNode(kind,subChildren); newChildren.push_back(subNode); subChildren.clear(); } /* If there's children left, "top off" the Expr. */ if(numChildren > 0) { /* If the leftovers are too few, just copy them into newChildren; * otherwise make a new sub-node */ if(numChildren < min) { for(; it != end; ++it) { newChildren.push_back(it->getNode()); } } else { for(; it != end; ++it) { subChildren.push_back(it->getNode()); } Node subNode = d_nodeManager->mkNode(kind, subChildren); newChildren.push_back(subNode); } } /* It's inconceivable we could have enough children for this to fail * (more than 2^32, in most cases?). */ AlwaysAssert( newChildren.size() <= max, "Too many new children in mkAssociative" ); /* It would be really weird if this happened (it would require * min > 2, for one thing), but let's make sure. */ AlwaysAssert( newChildren.size() >= min, "Too few new children in mkAssociative" ); return Expr(this, d_nodeManager->mkNodePtr(kind,newChildren) ); } unsigned ExprManager::minArity(Kind kind) { return metakind::getLowerBoundForKind(kind); } unsigned ExprManager::maxArity(Kind kind) { return metakind::getUpperBoundForKind(kind); } NodeManager* ExprManager::getNodeManager() const { return d_nodeManager; } Statistics ExprManager::getStatistics() const throw() { return Statistics(*d_nodeManager->getStatisticsRegistry()); } SExpr ExprManager::getStatistic(const std::string& name) const throw() { return d_nodeManager->getStatisticsRegistry()->getStatistic(name); } void ExprManager::safeFlushStatistics(int fd) const { d_nodeManager->getStatisticsRegistry()->safeFlushInformation(fd); } namespace expr { Node exportInternal(TNode n, ExprManager* from, ExprManager* to, ExprManagerMapCollection& vmap); TypeNode exportTypeInternal(TypeNode n, NodeManager* from, NodeManager* to, ExprManagerMapCollection& vmap) { Debug("export") << "type: " << n << " " << n.getId() << std::endl; if(theory::kindToTheoryId(n.getKind()) == theory::THEORY_DATATYPES) { throw ExportUnsupportedException ("export of types belonging to theory of DATATYPES kinds unsupported"); } if(n.getMetaKind() == kind::metakind::PARAMETERIZED && n.getKind() != kind::SORT_TYPE) { throw ExportUnsupportedException ("export of PARAMETERIZED-kinded types (other than SORT_KIND) not supported"); } if(n.getKind() == kind::TYPE_CONSTANT) { return to->mkTypeConst(n.getConst()); } else if(n.getKind() == kind::BITVECTOR_TYPE) { return to->mkBitVectorType(n.getConst()); } else if(n.getKind() == kind::SUBRANGE_TYPE) { return to->mkSubrangeType(n.getSubrangeBounds()); } Type from_t = from->toType(n); Type& to_t = vmap.d_typeMap[from_t]; if(! to_t.isNull()) { Debug("export") << "+ mapped `" << from_t << "' to `" << to_t << "'" << std::endl; return *Type::getTypeNode(to_t); } NodeBuilder<> children(to, n.getKind()); if(n.getKind() == kind::SORT_TYPE) { Debug("export") << "type: operator: " << n.getOperator() << std::endl; // make a new sort tag in target node manager Node sortTag = NodeBuilder<0>(to, kind::SORT_TAG); children << sortTag; } for(TypeNode::iterator i = n.begin(), i_end = n.end(); i != i_end; ++i) { Debug("export") << "type: child: " << *i << std::endl; children << exportTypeInternal(*i, from, to, vmap); } TypeNode out = children.constructTypeNode();// FIXME thread safety to_t = to->toType(out); return out; }/* exportTypeInternal() */ }/* CVC4::expr namespace */ Type ExprManager::exportType(const Type& t, ExprManager* em, ExprManagerMapCollection& vmap) { Assert(t.d_nodeManager != em->d_nodeManager, "Can't export a Type to the same ExprManager"); NodeManagerScope ems(t.d_nodeManager); return Type(em->d_nodeManager, new TypeNode(expr::exportTypeInternal(*t.d_typeNode, t.d_nodeManager, em->d_nodeManager, vmap))); } ${mkConst_implementations} }/* CVC4 namespace */ cvc4-1.5/src/expr/expr_manager_template.h000066400000000000000000000474641313116454100205150ustar00rootroot00000000000000/********************* */ /*! \file expr_manager_template.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Christopher L. Conway ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Public-facing expression manager interface ** ** Public-facing expression manager interface. **/ #include "cvc4_public.h" #ifndef __CVC4__EXPR_MANAGER_H #define __CVC4__EXPR_MANAGER_H #include #include "expr/expr.h" #include "expr/kind.h" #include "expr/type.h" #include "util/statistics.h" #include "util/subrange_bound.h" ${includes} // This is a hack, but an important one: if there's an error, the // compiler directs the user to the template file instead of the // generated one. We don't want the user to modify the generated one, // since it'll get overwritten on a later build. #line 37 "${template}" namespace CVC4 { class Expr; class SmtEngine; class NodeManager; class Options; class IntStat; struct ExprManagerMapCollection; class ResourceManager; namespace expr { namespace pickle { class Pickler; }/* CVC4::expr::pickle namespace */ }/* CVC4::expr namespace */ class CVC4_PUBLIC ExprManager { private: /** The internal node manager */ NodeManager* d_nodeManager; /** Counts of expressions and variables created of a given kind */ IntStat* d_exprStatisticsVars[LAST_TYPE + 1]; IntStat* d_exprStatistics[kind::LAST_KIND]; /** * Returns the internal node manager. This should only be used by * internal users, i.e. the friend classes. */ NodeManager* getNodeManager() const; /** * Check some things about a newly-created DatatypeType. */ void checkResolvedDatatype(DatatypeType dtt) const; /** * SmtEngine will use all the internals, so it will grab the * NodeManager. */ friend class SmtEngine; /** ExprManagerScope reaches in to get the NodeManager */ friend class ExprManagerScope; /** NodeManager reaches in to get the NodeManager */ friend class NodeManager; // undefined, private copy constructor and assignment op (disallow copy) ExprManager(const ExprManager&) CVC4_UNDEFINED; ExprManager& operator=(const ExprManager&) CVC4_UNDEFINED; std::vector d_keep_dtt; std::vector d_keep_dt; public: /** * Creates an expression manager with default options. */ ExprManager(); /** * Creates an expression manager. * * @param options the earlyTypeChecking field is used to configure * whether to do at Expr creation time. */ explicit ExprManager(const Options& options); /** * Destroys the expression manager. No will be deallocated at this point, so * any expression references that used to be managed by this expression * manager and are left-over are bad. */ ~ExprManager() throw(); /** Get this expr manager's options */ const Options& getOptions() const; /** Get this expr manager's resource manager */ ResourceManager* getResourceManager() throw(); /** Get the type for booleans */ BooleanType booleanType() const; /** Get the type for strings. */ StringType stringType() const; /** Get the type for regular expressions. */ RegExpType regExpType() const; /** Get the type for reals. */ RealType realType() const; /** Get the type for integers */ IntegerType integerType() const; /** Get the type for rounding modes */ RoundingModeType roundingModeType() const; /** * Make a unary expression of a given kind (NOT, BVNOT, ...). * @param kind the kind of expression * @param child1 kind the kind of expression * @return the expression */ Expr mkExpr(Kind kind, Expr child1); /** * Make a binary expression of a given kind (AND, PLUS, ...). * @param kind the kind of expression * @param child1 the first child of the new expression * @param child2 the second child of the new expression * @return the expression */ Expr mkExpr(Kind kind, Expr child1, Expr child2); /** * Make a 3-ary expression of a given kind (AND, PLUS, ...). * @param kind the kind of expression * @param child1 the first child of the new expression * @param child2 the second child of the new expression * @param child3 the third child of the new expression * @return the expression */ Expr mkExpr(Kind kind, Expr child1, Expr child2, Expr child3); /** * Make a 4-ary expression of a given kind (AND, PLUS, ...). * @param kind the kind of expression * @param child1 the first child of the new expression * @param child2 the second child of the new expression * @param child3 the third child of the new expression * @param child4 the fourth child of the new expression * @return the expression */ Expr mkExpr(Kind kind, Expr child1, Expr child2, Expr child3, Expr child4); /** * Make a 5-ary expression of a given kind (AND, PLUS, ...). * @param kind the kind of expression * @param child1 the first child of the new expression * @param child2 the second child of the new expression * @param child3 the third child of the new expression * @param child4 the fourth child of the new expression * @param child5 the fifth child of the new expression * @return the expression */ Expr mkExpr(Kind kind, Expr child1, Expr child2, Expr child3, Expr child4, Expr child5); /** * Make an n-ary expression of given kind given a vector of its * children * * @param kind the kind of expression to build * @param children the subexpressions * @return the n-ary expression */ Expr mkExpr(Kind kind, const std::vector& children); /** * Make an n-ary expression of given kind given a first arg and * a vector of its remaining children (this can be useful where the * kind is parameterized operator, so the first arg is really an * arg to the kind to construct an operator) * * @param kind the kind of expression to build * @param child1 the first subexpression * @param otherChildren the remaining subexpressions * @return the n-ary expression */ Expr mkExpr(Kind kind, Expr child1, const std::vector& otherChildren); /** * Make a nullary parameterized expression with the given operator. * * @param opExpr the operator expression * @return the nullary expression */ Expr mkExpr(Expr opExpr); /** * Make a unary parameterized expression with the given operator. * * @param opExpr the operator expression * @param child1 the subexpression * @return the unary expression */ Expr mkExpr(Expr opExpr, Expr child1); /** * Make a binary parameterized expression with the given operator. * * @param opExpr the operator expression * @param child1 the first subexpression * @param child2 the second subexpression * @return the binary expression */ Expr mkExpr(Expr opExpr, Expr child1, Expr child2); /** * Make a ternary parameterized expression with the given operator. * * @param opExpr the operator expression * @param child1 the first subexpression * @param child2 the second subexpression * @param child3 the third subexpression * @return the ternary expression */ Expr mkExpr(Expr opExpr, Expr child1, Expr child2, Expr child3); /** * Make a quaternary parameterized expression with the given operator. * * @param opExpr the operator expression * @param child1 the first subexpression * @param child2 the second subexpression * @param child3 the third subexpression * @param child4 the fourth subexpression * @return the quaternary expression */ Expr mkExpr(Expr opExpr, Expr child1, Expr child2, Expr child3, Expr child4); /** * Make a quinary parameterized expression with the given operator. * * @param opExpr the operator expression * @param child1 the first subexpression * @param child2 the second subexpression * @param child3 the third subexpression * @param child4 the fourth subexpression * @param child5 the fifth subexpression * @return the quinary expression */ Expr mkExpr(Expr opExpr, Expr child1, Expr child2, Expr child3, Expr child4, Expr child5); /** * Make an n-ary expression of given operator to apply and a vector * of its children * * @param opExpr the operator expression * @param children the subexpressions * @return the n-ary expression */ Expr mkExpr(Expr opExpr, const std::vector& children); /** Create a constant of type T */ template Expr mkConst(const T&); /** * Create an Expr by applying an associative operator to the children. * If children.size() is greater than the max arity for * kind, then the expression will be broken up into * suitably-sized chunks, taking advantage of the associativity of * kind. For example, if kind FOO has max arity * 2, then calling mkAssociative(FOO,a,b,c) will return * (FOO (FOO a b) c) or (FOO a (FOO b c)). * The order of the arguments will be preserved in a left-to-right * traversal of the resulting tree. */ Expr mkAssociative(Kind kind, const std::vector& children); /** * Determine whether Exprs of a particular Kind have operators. * @returns true if Exprs of Kind k have operators. */ static bool hasOperator(Kind k); /** * Get the (singleton) operator of an OPERATOR-kinded kind. The * returned Expr e will have kind BUILTIN, and calling * e.getConst() will yield k. */ Expr operatorOf(Kind k); /** Get a Kind from an operator expression */ Kind operatorToKind(Expr e); /** Make a function type from domain to range. */ FunctionType mkFunctionType(Type domain, Type range); /** * Make a function type with input types from argTypes. * argTypes must have at least one element. */ FunctionType mkFunctionType(const std::vector& argTypes, Type range); /** * Make a function type with input types from * sorts[0..sorts.size()-2] and result type * sorts[sorts.size()-1]. sorts must have * at least 2 elements. */ FunctionType mkFunctionType(const std::vector& sorts); /** * Make a predicate type with input types from * sorts. The result with be a function type with range * BOOLEAN. sorts must have at least one * element. */ FunctionType mkPredicateType(const std::vector& sorts); /** * Make a tuple type with types from * types[0..types.size()-1]. types must * have at least one element. */ DatatypeType mkTupleType(const std::vector& types); /** * Make a record type with types from the rec parameter. */ DatatypeType mkRecordType(const Record& rec); /** * Make a symbolic expressiontype with types from * types[0..types.size()-1]. types may * have any number of elements. */ SExprType mkSExprType(const std::vector& types); /** Make a type representing a floating-point type with the given parameters. */ FloatingPointType mkFloatingPointType(unsigned exp, unsigned sig) const; /** Make a type representing a bit-vector of the given size. */ BitVectorType mkBitVectorType(unsigned size) const; /** Make the type of arrays with the given parameterization. */ ArrayType mkArrayType(Type indexType, Type constituentType) const; /** Make the type of set with the given parameterization. */ SetType mkSetType(Type elementType) const; /** Make a type representing the given datatype. */ DatatypeType mkDatatypeType(Datatype& datatype); /** * Make a set of types representing the given datatypes, which may be * mutually recursive. */ std::vector mkMutualDatatypeTypes(std::vector& datatypes); /** * Make a set of types representing the given datatypes, which may * be mutually recursive. unresolvedTypes is a set of SortTypes * that were used as placeholders in the Datatypes for the Datatypes * of the same name. This is just a more complicated version of the * above mkMutualDatatypeTypes() function, but is required to handle * complex types. * * For example, unresolvedTypes might contain the single sort "list" * (with that name reported from SortType::getName()). The * datatypes list might have the single datatype * * DATATYPE * list = cons(car:ARRAY INT OF list, cdr:list) | nil; * END; * * To represent the Type of the array, the user had to create a * placeholder type (an uninterpreted sort) to stand for "list" in * the type of "car". It is this placeholder sort that should be * passed in unresolvedTypes. If the datatype was of the simpler * form: * * DATATYPE * list = cons(car:list, cdr:list) | nil; * END; * * then no complicated Type needs to be created, and the above, * simpler form of mkMutualDatatypeTypes() is enough. */ std::vector mkMutualDatatypeTypes(std::vector& datatypes, std::set& unresolvedTypes); /** * Make a type representing a constructor with the given parameterization. */ ConstructorType mkConstructorType(const DatatypeConstructor& constructor, Type range) const; /** Make a type representing a selector with the given parameterization. */ SelectorType mkSelectorType(Type domain, Type range) const; /** Make a type representing a tester with the given parameterization. */ TesterType mkTesterType(Type domain) const; /** Bits for use in mkSort() flags. */ enum { SORT_FLAG_NONE = 0, SORT_FLAG_PLACEHOLDER = 1 };/* enum */ /** Make a new sort with the given name. */ SortType mkSort(const std::string& name, uint32_t flags = SORT_FLAG_NONE) const; /** Make a sort constructor from a name and arity. */ SortConstructorType mkSortConstructor(const std::string& name, size_t arity) const; /** * Make a predicate subtype type defined by the given LAMBDA * expression. A TypeCheckingException can be thrown if lambda is * not a LAMBDA, or is ill-typed, or if CVC4 fails at proving that * the resulting predicate subtype is inhabited. */ // not in release 1.0 //Type mkPredicateSubtype(Expr lambda) // throw(TypeCheckingException); /** * Make a predicate subtype type defined by the given LAMBDA * expression and whose non-emptiness is witnessed by the given * witness. A TypeCheckingException can be thrown if lambda is not * a LAMBDA, or is ill-typed, or if the witness is not a witness or * ill-typed. */ // not in release 1.0 //Type mkPredicateSubtype(Expr lambda, Expr witness) // throw(TypeCheckingException); /** * Make an integer subrange type as defined by the argument. */ Type mkSubrangeType(const SubrangeBounds& bounds) throw(TypeCheckingException); /** Get the type of an expression */ Type getType(Expr e, bool check = false) throw(TypeCheckingException); /** Bits for use in mkVar() flags. */ enum { VAR_FLAG_NONE = 0, VAR_FLAG_GLOBAL = 1, VAR_FLAG_DEFINED = 2 };/* enum */ /** * Create a new, fresh variable. This variable is guaranteed to be * distinct from every variable thus far in the ExprManager, even * if it shares a name with another; this is to support any kind of * scoping policy on top of ExprManager. The SymbolTable class * can be used to store and lookup symbols by name, if desired. * * @param name a name to associate to the fresh new variable * @param type the type for the new variable * @param flags - VAR_FLAG_NONE - no flags; * VAR_FLAG_GLOBAL - whether this variable is to be * considered "global" or not. Note that this information isn't * used by the ExprManager, but is passed on to the ExprManager's * event subscribers like the model-building service; if isGlobal * is true, this newly-created variable will still available in * models generated after an intervening pop. * VAR_FLAG_DEFINED - if this is to be a "defined" symbol, e.g., for * use with SmtEngine::defineFunction(). This keeps a declaration * from being emitted in API dumps (since a subsequent definition is * expected to be dumped instead). */ Expr mkVar(const std::string& name, Type type, uint32_t flags = VAR_FLAG_NONE); /** * Create a (nameless) new, fresh variable. This variable is guaranteed * to be distinct from every variable thus far in the ExprManager. * * @param type the type for the new variable * @param flags - VAR_FLAG_GLOBAL - whether this variable is to be considered "global" * or not. Note that this information isn't used by the ExprManager, * but is passed on to the ExprManager's event subscribers like the * model-building service; if isGlobal is true, this newly-created * variable will still available in models generated after an * intervening pop. */ Expr mkVar(Type type, uint32_t flags = VAR_FLAG_NONE); /** * Create a new, fresh variable for use in a binder expression * (the BOUND_VAR_LIST of a FORALL, EXISTS, or LAMBDA). It is * an error for this bound variable to exist outside of a binder, * and it should also only be used in a single binder expression. * That is, two distinct FORALL expressions should use entirely * disjoint sets of bound variables (however, a single FORALL * expression can be used in multiple places in a formula without * a problem). This newly-created bound variable is guaranteed to * be distinct from every variable thus far in the ExprManager, even * if it shares a name with another; this is to support any kind of * scoping policy on top of ExprManager. The SymbolTable class * can be used to store and lookup symbols by name, if desired. * * @param name a name to associate to the fresh new bound variable * @param type the type for the new bound variable */ Expr mkBoundVar(const std::string& name, Type type); /** * Create a (nameless) new, fresh variable for use in a binder * expression (the BOUND_VAR_LIST of a FORALL, EXISTS, or LAMBDA). * It is an error for this bound variable to exist outside of a * binder, and it should also only be used in a single binder * expression. That is, two distinct FORALL expressions should use * entirely disjoint sets of bound variables (however, a single FORALL * expression can be used in multiple places in a formula without * a problem). This newly-created bound variable is guaranteed to * be distinct from every variable thus far in the ExprManager. * * @param type the type for the new bound variable */ Expr mkBoundVar(Type type); /** * Create unique variable of type */ Expr mkNullaryOperator( Type type, Kind k); /** Get a reference to the statistics registry for this ExprManager */ Statistics getStatistics() const throw(); /** Get a reference to the statistics registry for this ExprManager */ SExpr getStatistic(const std::string& name) const throw(); /** * Flushes statistics for this ExprManager to a file descriptor. Safe to use * in a signal handler. */ void safeFlushStatistics(int fd) const; /** Export an expr to a different ExprManager */ //static Expr exportExpr(const Expr& e, ExprManager* em); /** Export a type to a different ExprManager */ static Type exportType(const Type& t, ExprManager* em, ExprManagerMapCollection& vmap); /** Returns the minimum arity of the given kind. */ static unsigned minArity(Kind kind); /** Returns the maximum arity of the given kind. */ static unsigned maxArity(Kind kind); };/* class ExprManager */ ${mkConst_instantiations} }/* CVC4 namespace */ #endif /* __CVC4__EXPR_MANAGER_H */ cvc4-1.5/src/expr/expr_stream.h000066400000000000000000000023261313116454100164670ustar00rootroot00000000000000/********************* */ /*! \file expr_stream.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A stream interface for expressions ** ** A stream interface for expressions. **/ #include "cvc4_public.h" #ifndef __CVC4__EXPR_STREAM_H #define __CVC4__EXPR_STREAM_H #include "expr/expr.h" namespace CVC4 { /** * A pure-virtual stream interface for expressions. Can be used to * communicate streams of expressions between different parts of CVC4. */ class CVC4_PUBLIC ExprStream { public: /** Virtual destructor; this implementation does nothing. */ virtual ~ExprStream() {} /** * Get the next expression in the stream (advancing the stream * pointer as a side effect.) */ virtual Expr nextExpr() = 0; };/* class ExprStream */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR_STREAM_H */ cvc4-1.5/src/expr/expr_stream.i000066400000000000000000000001031313116454100164570ustar00rootroot00000000000000%{ #include "expr/expr_stream.h" %} %include "expr/expr_stream.h" cvc4-1.5/src/expr/expr_template.cpp000066400000000000000000000516711313116454100173510ustar00rootroot00000000000000/********************* */ /*! \file expr_template.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Kshitij Bansal, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Public-facing expression interface, implementation. ** ** Public-facing expression interface, implementation. **/ #include "expr/expr.h" #include #include #include #include "base/cvc4_assert.h" #include "expr/node.h" #include "expr/expr_manager_scope.h" #include "expr/variable_type_map.h" #include "expr/node_manager_attributes.h" ${includes} // This is a hack, but an important one: if there's an error, the // compiler directs the user to the template file instead of the // generated one. We don't want the user to modify the generated one, // since it'll get overwritten on a later build. #line 35 "${template}" using namespace CVC4::kind; using namespace std; namespace CVC4 { class ExprManager; std::ostream& operator<<(std::ostream& out, const TypeCheckingException& e) { return out << e.getMessage() << ": " << e.getExpression(); } std::ostream& operator<<(std::ostream& out, const Expr& e) { if(e.isNull()) { return out << "null"; } else { ExprManagerScope ems(*e.getExprManager()); return out << e.getNode(); } } TypeCheckingException::TypeCheckingException(const TypeCheckingException& t) throw() : Exception(t.d_msg), d_expr(new Expr(t.getExpression())) { } TypeCheckingException::TypeCheckingException(const Expr& expr, std::string message) throw() : Exception(message), d_expr(new Expr(expr)) { } TypeCheckingException::TypeCheckingException(ExprManager* em, const TypeCheckingExceptionPrivate* exc) throw() : Exception(exc->getMessage()), d_expr(new Expr(em, new Node(exc->getNode()))) { } TypeCheckingException::~TypeCheckingException() throw() { delete d_expr; } void TypeCheckingException::toStream(std::ostream& os) const throw() { os << "Error during type checking: " << d_msg << endl << "The ill-typed expression: " << *d_expr; } Expr TypeCheckingException::getExpression() const throw() { return *d_expr; } Expr::Expr() : d_node(new Node), d_exprManager(NULL) { // We do not need to wrap this in an ExprManagerScope as `new Node` is backed // by NodeValue::null which is a static outside of a NodeManager. } Expr::Expr(ExprManager* em, Node* node) : d_node(node), d_exprManager(em) { // We do not need to wrap this in an ExprManagerScope as this only initializes // pointers } Expr::Expr(const Expr& e) : d_node(NULL), d_exprManager(e.d_exprManager) { ExprManagerScope ems(*this); d_node = new Node(*e.d_node); } Expr::~Expr() { ExprManagerScope ems(*this); delete d_node; } ExprManager* Expr::getExprManager() const { return d_exprManager; } namespace expr { static Node exportConstant(TNode n, NodeManager* to, ExprManagerMapCollection& vmap); class ExportPrivate { private: typedef std::hash_map , NodeTemplate, TNodeHashFunction> ExportCache; ExprManager* from; ExprManager* to; ExprManagerMapCollection& vmap; uint32_t flags; ExportCache exportCache; public: ExportPrivate(ExprManager* from, ExprManager* to, ExprManagerMapCollection& vmap, uint32_t flags) : from(from), to(to), vmap(vmap), flags(flags) {} Node exportInternal(TNode n) { if(n.isNull()) return Node::null(); if(theory::kindToTheoryId(n.getKind()) == theory::THEORY_DATATYPES) { throw ExportUnsupportedException ("export of node belonging to theory of DATATYPES kinds unsupported"); } if(n.getMetaKind() == metakind::CONSTANT) { if(n.getKind() == kind::EMPTYSET) { Type type = from->exportType(n.getConst< ::CVC4::EmptySet >().getType(), to, vmap); return to->mkConst(::CVC4::EmptySet(type)); } return exportConstant(n, NodeManager::fromExprManager(to), vmap); } else if(n.getMetaKind() == metakind::NULLARY_OPERATOR ){ Expr from_e(from, new Node(n)); Type type = from->exportType(from_e.getType(), to, vmap); NodeManagerScope nullScope(NULL); return to->mkNullaryOperator(type, n.getKind()); // FIXME thread safety } else if(n.getMetaKind() == metakind::VARIABLE) { Expr from_e(from, new Node(n)); Expr& to_e = vmap.d_typeMap[from_e]; if(! to_e.isNull()) { Debug("export") << "+ mapped `" << from_e << "' to `" << to_e << "'" << std::endl; return to_e.getNode(); } else { // construct new variable in other manager: // to_e is a ref, so this inserts from_e -> to_e std::string name; Type type = from->exportType(from_e.getType(), to, vmap); if(Node::fromExpr(from_e).getAttribute(VarNameAttr(), name)) { // temporarily set the node manager to NULL; this gets around // a check that mkVar isn't called internally if(n.getKind() == kind::BOUND_VAR_LIST || n.getKind() == kind::BOUND_VARIABLE) { NodeManagerScope nullScope(NULL); to_e = to->mkBoundVar(name, type);// FIXME thread safety } else if(n.getKind() == kind::VARIABLE) { bool isGlobal; Node::fromExpr(from_e).getAttribute(GlobalVarAttr(), isGlobal); NodeManagerScope nullScope(NULL); to_e = to->mkVar(name, type, isGlobal ? ExprManager::VAR_FLAG_GLOBAL : flags);// FIXME thread safety } else if(n.getKind() == kind::SKOLEM) { // skolems are only available at the Node level (not the Expr level) TypeNode typeNode = TypeNode::fromType(type); NodeManager* to_nm = NodeManager::fromExprManager(to); Node n = to_nm->mkSkolem(name, typeNode, "is a skolem variable imported from another ExprManager");// FIXME thread safety to_e = n.toExpr(); } else { Unhandled(); } Debug("export") << "+ exported var `" << from_e << "'[" << from_e.getId() << "] with name `" << name << "' and type `" << from_e.getType() << "' to `" << to_e << "'[" << to_e.getId() << "] with type `" << type << "'" << std::endl; } else { // temporarily set the node manager to NULL; this gets around // a check that mkVar isn't called internally NodeManagerScope nullScope(NULL); to_e = to->mkVar(type);// FIXME thread safety Debug("export") << "+ exported unnamed var `" << from_e << "' with type `" << from_e.getType() << "' to `" << to_e << "' with type `" << type << "'" << std::endl; } uint64_t to_int = (uint64_t)(to_e.getNode().d_nv); uint64_t from_int = (uint64_t)(from_e.getNode().d_nv); vmap.d_from[to_int] = from_int; vmap.d_to[from_int] = to_int; vmap.d_typeMap[to_e] = from_e;// insert other direction too return Node::fromExpr(to_e); } } else { if(exportCache.find(n) != exportCache.end()) { return exportCache[n]; } std::vector children; Debug("export") << "n: " << n << std::endl; if(n.getMetaKind() == kind::metakind::PARAMETERIZED) { Debug("export") << "+ parameterized, op is " << n.getOperator() << std::endl; children.reserve(n.getNumChildren() + 1); children.push_back(exportInternal(n.getOperator())); } else { children.reserve(n.getNumChildren()); } for(TNode::iterator i = n.begin(), i_end = n.end(); i != i_end; ++i) { Debug("export") << "+ child: " << *i << std::endl; children.push_back(exportInternal(*i)); } if(Debug.isOn("export")) { ExprManagerScope ems(*to); Debug("export") << "children for export from " << n << std::endl; for(std::vector::iterator i = children.begin(), i_end = children.end(); i != i_end; ++i) { Debug("export") << " child: " << *i << std::endl; } } // FIXME thread safety Node ret = NodeManager::fromExprManager(to)->mkNode(n.getKind(), children); exportCache[n] = ret; return ret; } }/* exportInternal() */ }; }/* CVC4::expr namespace */ Expr Expr::exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap, uint32_t flags /* = 0 */) const { Assert(d_exprManager != exprManager, "No sense in cloning an Expr in the same ExprManager"); ExprManagerScope ems(*this); return Expr(exprManager, new Node(expr::ExportPrivate(d_exprManager, exprManager, variableMap, flags).exportInternal(*d_node))); } Expr& Expr::operator=(const Expr& e) { Assert(d_node != NULL, "Unexpected NULL expression pointer!"); Assert(e.d_node != NULL, "Unexpected NULL expression pointer!"); if(this != &e) { if(d_exprManager == e.d_exprManager) { ExprManagerScope ems(*this); *d_node = *e.d_node; } else { // This happens more than you think---every time you set to or // from the null Expr. It's tricky because each node manager // must be in play at the right time. ExprManagerScope ems1(*this); *d_node = Node::null(); ExprManagerScope ems2(e); *d_node = *e.d_node; d_exprManager = e.d_exprManager; } } return *this; } bool Expr::operator==(const Expr& e) const { if(d_exprManager != e.d_exprManager) { return false; } ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); Assert(e.d_node != NULL, "Unexpected NULL expression pointer!"); return *d_node == *e.d_node; } bool Expr::operator!=(const Expr& e) const { return !(*this == e); } bool Expr::operator<(const Expr& e) const { Assert(d_node != NULL, "Unexpected NULL expression pointer!"); Assert(e.d_node != NULL, "Unexpected NULL expression pointer!"); if(isNull() && !e.isNull()) { return true; } ExprManagerScope ems(*this); return *d_node < *e.d_node; } bool Expr::operator>(const Expr& e) const { Assert(d_node != NULL, "Unexpected NULL expression pointer!"); Assert(e.d_node != NULL, "Unexpected NULL expression pointer!"); if(isNull() && !e.isNull()) { return true; } ExprManagerScope ems(*this); return *d_node > *e.d_node; } unsigned long Expr::getId() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->getId(); } Kind Expr::getKind() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->getKind(); } size_t Expr::getNumChildren() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->getNumChildren(); } Expr Expr::operator[](unsigned i) const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); Assert(i >= 0 && i < d_node->getNumChildren(), "Child index out of bounds"); return Expr(d_exprManager, new Node((*d_node)[i])); } bool Expr::hasOperator() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->hasOperator(); } Expr Expr::getOperator() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); PrettyCheckArgument(d_node->hasOperator(), *this, "Expr::getOperator() called on an Expr with no operator"); return Expr(d_exprManager, new Node(d_node->getOperator())); } Type Expr::getType(bool check) const throw (TypeCheckingException) { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); PrettyCheckArgument(!d_node->isNull(), this, "Can't get type of null expression!"); return d_exprManager->getType(*this, check); } Expr Expr::substitute(Expr e, Expr replacement) const { ExprManagerScope ems(*this); return Expr(d_exprManager, new Node(d_node->substitute(TNode(*e.d_node), TNode(*replacement.d_node)))); } template class NodeIteratorAdaptor : public std::iterator { Iterator d_iterator; public: NodeIteratorAdaptor(Iterator i) : d_iterator(i) { } NodeIteratorAdaptor& operator++() { ++d_iterator; return *this; } NodeIteratorAdaptor operator++(int) { NodeIteratorAdaptor i(d_iterator); ++d_iterator; return i; } bool operator==(NodeIteratorAdaptor i) { return d_iterator == i.d_iterator; } bool operator!=(NodeIteratorAdaptor i) { return !(*this == i); } Node operator*() { return Node::fromExpr(*d_iterator); } };/* class NodeIteratorAdaptor */ template static inline NodeIteratorAdaptor mkNodeIteratorAdaptor(Iterator i) { return NodeIteratorAdaptor(i); } Expr Expr::substitute(const std::vector exes, const std::vector& replacements) const { ExprManagerScope ems(*this); return Expr(d_exprManager, new Node(d_node->substitute(mkNodeIteratorAdaptor(exes.begin()), mkNodeIteratorAdaptor(exes.end()), mkNodeIteratorAdaptor(replacements.begin()), mkNodeIteratorAdaptor(replacements.end())))); } template class NodePairIteratorAdaptor : public std::iterator > { Iterator d_iterator; public: NodePairIteratorAdaptor(Iterator i) : d_iterator(i) { } NodePairIteratorAdaptor& operator++() { ++d_iterator; return *this; } NodePairIteratorAdaptor operator++(int) { NodePairIteratorAdaptor i(d_iterator); ++d_iterator; return i; } bool operator==(NodePairIteratorAdaptor i) { return d_iterator == i.d_iterator; } bool operator!=(NodePairIteratorAdaptor i) { return !(*this == i); } pair operator*() { return make_pair(Node::fromExpr((*d_iterator).first), Node::fromExpr((*d_iterator).second)); } };/* class NodePairIteratorAdaptor */ template static inline NodePairIteratorAdaptor mkNodePairIteratorAdaptor(Iterator i) { return NodePairIteratorAdaptor(i); } Expr Expr::substitute(const std::hash_map map) const { ExprManagerScope ems(*this); return Expr(d_exprManager, new Node(d_node->substitute(mkNodePairIteratorAdaptor(map.begin()), mkNodePairIteratorAdaptor(map.end())))); } Expr::const_iterator::const_iterator() : d_iterator(NULL) { } Expr::const_iterator::const_iterator(ExprManager* em, void* v) : d_exprManager(em), d_iterator(v) { } Expr::const_iterator::const_iterator(const const_iterator& it) { if(it.d_iterator == NULL) { d_iterator = NULL; } else { d_exprManager = it.d_exprManager; ExprManagerScope ems(*d_exprManager); d_iterator = new Node::iterator(*reinterpret_cast(it.d_iterator)); } } Expr::const_iterator& Expr::const_iterator::operator=(const const_iterator& it) { if(d_iterator != NULL) { ExprManagerScope ems(*d_exprManager); delete reinterpret_cast(d_iterator); } d_exprManager = it.d_exprManager; ExprManagerScope ems(*d_exprManager); d_iterator = new Node::iterator(*reinterpret_cast(it.d_iterator)); return *this; } Expr::const_iterator::~const_iterator() { if(d_iterator != NULL) { ExprManagerScope ems(*d_exprManager); delete reinterpret_cast(d_iterator); } } bool Expr::const_iterator::operator==(const const_iterator& it) const { if(d_iterator == NULL || it.d_iterator == NULL) { return false; } return *reinterpret_cast(d_iterator) == *reinterpret_cast(it.d_iterator); } Expr::const_iterator& Expr::const_iterator::operator++() { Assert(d_iterator != NULL); ExprManagerScope ems(*d_exprManager); ++*reinterpret_cast(d_iterator); return *this; } Expr::const_iterator Expr::const_iterator::operator++(int) { Assert(d_iterator != NULL); ExprManagerScope ems(*d_exprManager); const_iterator it = *this; ++*reinterpret_cast(d_iterator); return it; } Expr Expr::const_iterator::operator*() const { Assert(d_iterator != NULL); ExprManagerScope ems(*d_exprManager); return (**reinterpret_cast(d_iterator)).toExpr(); } Expr::const_iterator Expr::begin() const { ExprManagerScope ems(*d_exprManager); return Expr::const_iterator(d_exprManager, new Node::iterator(d_node->begin())); } Expr::const_iterator Expr::end() const { ExprManagerScope ems(*d_exprManager); return Expr::const_iterator(d_exprManager, new Node::iterator(d_node->end())); } std::string Expr::toString() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->toString(); } bool Expr::isNull() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->isNull(); } bool Expr::isVariable() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->getMetaKind() == kind::metakind::VARIABLE; } bool Expr::isConst() const { ExprManagerScope ems(*this); Assert(d_node != NULL, "Unexpected NULL expression pointer!"); return d_node->isConst(); } void Expr::toStream(std::ostream& out, int depth, bool types, size_t dag, OutputLanguage language) const { ExprManagerScope ems(*this); d_node->toStream(out, depth, types, dag, language); } Node Expr::getNode() const throw() { return *d_node; } TNode Expr::getTNode() const throw() { return *d_node; } Expr Expr::notExpr() const { Assert(d_exprManager != NULL, "Don't have an expression manager for this expression!"); return d_exprManager->mkExpr(NOT, *this); } Expr Expr::andExpr(const Expr& e) const { Assert(d_exprManager != NULL, "Don't have an expression manager for this expression!"); PrettyCheckArgument(d_exprManager == e.d_exprManager, e, "Different expression managers!"); return d_exprManager->mkExpr(AND, *this, e); } Expr Expr::orExpr(const Expr& e) const { Assert(d_exprManager != NULL, "Don't have an expression manager for this expression!"); PrettyCheckArgument(d_exprManager == e.d_exprManager, e, "Different expression managers!"); return d_exprManager->mkExpr(OR, *this, e); } Expr Expr::xorExpr(const Expr& e) const { Assert(d_exprManager != NULL, "Don't have an expression manager for this expression!"); PrettyCheckArgument(d_exprManager == e.d_exprManager, e, "Different expression managers!"); return d_exprManager->mkExpr(XOR, *this, e); } Expr Expr::iffExpr(const Expr& e) const { Assert(d_exprManager != NULL, "Don't have an expression manager for this expression!"); PrettyCheckArgument(d_exprManager == e.d_exprManager, e, "Different expression managers!"); return d_exprManager->mkExpr(EQUAL, *this, e); } Expr Expr::impExpr(const Expr& e) const { Assert(d_exprManager != NULL, "Don't have an expression manager for this expression!"); PrettyCheckArgument(d_exprManager == e.d_exprManager, e, "Different expression managers!"); return d_exprManager->mkExpr(IMPLIES, *this, e); } Expr Expr::iteExpr(const Expr& then_e, const Expr& else_e) const { Assert(d_exprManager != NULL, "Don't have an expression manager for this expression!"); PrettyCheckArgument(d_exprManager == then_e.d_exprManager, then_e, "Different expression managers!"); PrettyCheckArgument(d_exprManager == else_e.d_exprManager, else_e, "Different expression managers!"); return d_exprManager->mkExpr(ITE, *this, then_e, else_e); } void Expr::printAst(std::ostream & o, int indent) const { ExprManagerScope ems(*this); getNode().printAst(o, indent); } void Expr::debugPrint() { #ifndef CVC4_MUZZLE printAst(Warning()); Warning().flush(); #endif /* ! CVC4_MUZZLE */ } ${getConst_implementations} namespace expr { static Node exportConstant(TNode n, NodeManager* to, ExprManagerMapCollection& vmap) { Assert(n.isConst()); Debug("export") << "constant: " << n << std::endl; if(n.getKind() == kind::STORE_ALL) { // Special export for ArrayStoreAll. // // Ultimately we'll need special cases also for RecordUpdate, // TupleUpdate, AscriptionType, and other constant-metakinded // expressions that embed types. For now datatypes aren't supported // for export so those don't matter. ExprManager* toEm = to->toExprManager(); const ArrayStoreAll& asa = n.getConst(); return to->mkConst(ArrayStoreAll(asa.getType().exportTo(toEm, vmap), asa.getExpr().exportTo(toEm, vmap))); } switch(n.getKind()) { ${exportConstant_cases} default: Unhandled(n.getKind()); } }/* exportConstant() */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/expr_template.h000066400000000000000000000401561313116454100170120ustar00rootroot00000000000000/********************* */ /*! \file expr_template.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Christopher L. Conway ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Public-facing expression interface. ** ** Public-facing expression interface. **/ #include "cvc4_public.h" // putting the constant-payload #includes up here allows circularity // (some of them may require a completely-defined Expr type). This // way, those #includes can forward-declare some stuff to get Expr's // getConst<> template instantiations correct, and then #include // "expr.h" safely, then go on to completely declare their own stuff. ${includes} #ifndef __CVC4__EXPR_H #define __CVC4__EXPR_H #include #include #include #include #include "base/exception.h" #include "options/language.h" #include "util/hash.h" // This is a hack, but an important one: if there's an error, the // compiler directs the user to the template file instead of the // generated one. We don't want the user to modify the generated one, // since it'll get overwritten on a later build. #line 44 "${template}" namespace CVC4 { // The internal expression representation template class NodeTemplate; class NodeManager; class Expr; class ExprManager; class SmtEngine; class Type; class TypeCheckingException; class TypeCheckingExceptionPrivate; namespace expr { namespace pickle { class Pickler; }/* CVC4::expr::pickle namespace */ }/* CVC4::expr namespace */ namespace prop { class TheoryProxy; }/* CVC4::prop namespace */ struct ExprManagerMapCollection; struct ExprHashFunction; namespace smt { class SmtEnginePrivate; }/* CVC4::smt namespace */ namespace expr { class ExportPrivate; }/* CVC4::expr namespace */ /** * Exception thrown in the case of type-checking errors. */ class CVC4_PUBLIC TypeCheckingException : public Exception { friend class SmtEngine; friend class smt::SmtEnginePrivate; private: /** The expression responsible for the error */ Expr* d_expr; protected: TypeCheckingException() throw() : Exception() {} TypeCheckingException(ExprManager* em, const TypeCheckingExceptionPrivate* exc) throw(); public: TypeCheckingException(const Expr& expr, std::string message) throw(); /** Copy constructor */ TypeCheckingException(const TypeCheckingException& t) throw(); /** Destructor */ ~TypeCheckingException() throw(); /** * Get the Expr that caused the type-checking to fail. * * @return the expr */ Expr getExpression() const throw(); /** * Returns the message corresponding to the type-checking failure. * We prefer toStream() to toString() because that keeps the expr-depth * and expr-language settings present in the stream. */ void toStream(std::ostream& out) const throw(); friend class ExprManager; };/* class TypeCheckingException */ /** * Exception thrown in case of failure to export */ class CVC4_PUBLIC ExportUnsupportedException : public Exception { public: ExportUnsupportedException() throw(): Exception("export unsupported") { } ExportUnsupportedException(const char* msg) throw(): Exception(msg) { } };/* class DatatypeExportUnsupportedException */ std::ostream& operator<<(std::ostream& out, const TypeCheckingException& e) CVC4_PUBLIC; /** * Output operator for expressions * @param out the stream to output to * @param e the expression to output * @return the stream */ std::ostream& operator<<(std::ostream& out, const Expr& e) CVC4_PUBLIC; // for hash_maps, hash_sets.. struct ExprHashFunction { size_t operator()(CVC4::Expr e) const; };/* struct ExprHashFunction */ /** * Class encapsulating CVC4 expressions and methods for constructing new * expressions. */ class CVC4_PUBLIC Expr { /** The internal expression representation */ NodeTemplate* d_node; /** The responsible expression manager */ ExprManager* d_exprManager; /** * Constructor for internal purposes. * * @param em the expression manager that handles this expression * @param node the actual expression node pointer */ Expr(ExprManager* em, NodeTemplate* node); public: /** Default constructor, makes a null expression. */ Expr(); /** * Copy constructor, makes a copy of a given expression * * @param e the expression to copy */ Expr(const Expr& e); /** Destructor */ ~Expr(); /** * Assignment operator, makes a copy of the given expression. If the * expression managers of the two expressions differ, the expression of * the given expression will be used. * * @param e the expression to assign * @return the reference to this expression after assignment */ Expr& operator=(const Expr& e); /** * Syntactic comparison operator. Returns true if expressions belong to the * same expression manager and are syntactically identical. * * @param e the expression to compare to * @return true if expressions are syntactically the same, false otherwise */ bool operator==(const Expr& e) const; /** * Syntactic disequality operator. * * @param e the expression to compare to * @return true if expressions differ syntactically, false otherwise */ bool operator!=(const Expr& e) const; /** * Order comparison operator. The only invariant on the order of expressions * is that the expressions that were created sooner will be smaller in the * ordering than all the expressions created later. Null expression is the * smallest element of the ordering. The behavior of the operator is * undefined if the expressions come from two different expression managers. * * @param e the expression to compare to * @return true if this expression is smaller than the given one */ bool operator<(const Expr& e) const; /** * Order comparison operator. The only invariant on the order of expressions * is that the expressions that were created sooner will be smaller in the * ordering than all the expressions created later. Null expression is the * smallest element of the ordering. The behavior of the operator is * undefined if the expressions come from two different expression managers. * * @param e the expression to compare to * @return true if this expression is greater than the given one */ bool operator>(const Expr& e) const; /** * Order comparison operator. The only invariant on the order of expressions * is that the expressions that were created sooner will be smaller in the * ordering than all the expressions created later. Null expression is the * smallest element of the ordering. The behavior of the operator is * undefined if the expressions come from two different expression managers. * * @param e the expression to compare to * @return true if this expression is smaller or equal to the given one */ bool operator<=(const Expr& e) const { return !(*this > e); } /** * Order comparison operator. The only invariant on the order of expressions * is that the expressions that were created sooner will be smaller in the * ordering than all the expressions created later. Null expression is the * smallest element of the ordering. The behavior of the operator is * undefined if the expressions come from two different expression managers. * * @param e the expression to compare to * @return true if this expression is greater or equal to the given one */ bool operator>=(const Expr& e) const { return !(*this < e); } /** * Get the ID of this expression (used for the comparison operators). * * @return an identifier uniquely identifying the value this * expression holds. */ unsigned long getId() const; /** * Returns the kind of the expression (AND, PLUS ...). * * @return the kind of the expression */ Kind getKind() const; /** * Returns the number of children of this expression. * * @return the number of children */ size_t getNumChildren() const; /** * Returns the i'th child of this expression. * * @param i the index of the child to retrieve * @return the child */ Expr operator[](unsigned i) const; /** * Returns the children of this Expr. */ std::vector getChildren() const { return std::vector(begin(), end()); } /** * Returns the Boolean negation of this Expr. */ Expr notExpr() const; /** * Returns the conjunction of this expression and * the given expression. */ Expr andExpr(const Expr& e) const; /** * Returns the disjunction of this expression and * the given expression. */ Expr orExpr(const Expr& e) const; /** * Returns the exclusive disjunction of this expression and * the given expression. */ Expr xorExpr(const Expr& e) const; /** * Returns the Boolean equivalence of this expression and * the given expression. */ Expr iffExpr(const Expr& e) const; /** * Returns the implication of this expression and * the given expression. */ Expr impExpr(const Expr& e) const; /** * Returns the if-then-else expression with this expression * as the Boolean condition and the given expressions as * the "then" and "else" expressions. */ Expr iteExpr(const Expr& then_e, const Expr& else_e) const; /** * Iterator type for the children of an Expr. */ class const_iterator : public std::iterator { ExprManager* d_exprManager; void* d_iterator; explicit const_iterator(ExprManager*, void*); friend class Expr;// to access void* constructor public: const_iterator(); const_iterator(const const_iterator& it); const_iterator& operator=(const const_iterator& it); ~const_iterator(); bool operator==(const const_iterator& it) const; bool operator!=(const const_iterator& it) const { return !(*this == it); } const_iterator& operator++(); const_iterator operator++(int); Expr operator*() const; };/* class Expr::const_iterator */ /** * Returns an iterator to the first child of this Expr. */ const_iterator begin() const; /** * Returns an iterator to one-off-the-last child of this Expr. */ const_iterator end() const; /** * Check if this is an expression that has an operator. * * @return true if this expression has an operator */ bool hasOperator() const; /** * Get the operator of this expression. * * @throws IllegalArgumentException if it has no operator * @return the operator of this expression */ Expr getOperator() const; /** * Get the type for this Expr and optionally do type checking. * * Initial type computation will be near-constant time if * type checking is not requested. Results are memoized, so that * subsequent calls to getType() without type checking will be * constant time. * * Initial type checking is linear in the size of the expression. * Again, the results are memoized, so that subsequent calls to * getType(), with or without type checking, will be constant * time. * * NOTE: A TypeCheckingException can be thrown even when type * checking is not requested. getType() will always return a * valid and correct type and, thus, an exception will be thrown * when no valid or correct type can be computed (e.g., if the * arguments to a bit-vector operation aren't bit-vectors). When * type checking is not requested, getType() will do the minimum * amount of checking required to return a valid result. * * @param check whether we should check the type as we compute it * (default: false) */ Type getType(bool check = false) const throw (TypeCheckingException); /** * Substitute "replacement" in for "e". */ Expr substitute(Expr e, Expr replacement) const; /** * Substitute "replacements" in for "exes". */ Expr substitute(const std::vector exes, const std::vector& replacements) const; /** * Substitute pairs of (ex,replacement) from the given map. */ Expr substitute(const std::hash_map map) const; /** * Returns the string representation of the expression. * @return a string representation of the expression */ std::string toString() const; /** * Outputs the string representation of the expression to the stream. * * @param out the stream to serialize this expression to * @param toDepth the depth to which to print this expression, or -1 * to print it fully * @param types set to true to ascribe types to the output * expressions (might break language compliance, but good for * debugging expressions) * @param dag the dagification threshold to use (0 == off) * @param language the language in which to output */ void toStream(std::ostream& out, int toDepth = -1, bool types = false, size_t dag = 1, OutputLanguage language = language::output::LANG_AUTO) const; /** * Check if this is a null expression. * * @return true if a null expression */ bool isNull() const; /** * Check if this is an expression representing a variable. * * @return true if a variable expression */ bool isVariable() const; /** * Check if this is an expression representing a constant. * * @return true if a constant expression */ bool isConst() const; /* A note on isAtomic() and isAtomicFormula() (in CVC3 parlance).. * * It has been decided for now to hold off on implementations of * these functions, as they may only be needed in CNF conversion, * where it's pointless to do a lazy isAtomic determination by * searching through the DAG, and storing it, since the result will * only be used once. For more details see the 4/27/2010 CVC4 * developer's meeting notes at: * * http://goedel.cims.nyu.edu/wiki/Meeting_Minutes_-_April_27,_2010#isAtomic.28.29_and_isAtomicFormula.28.29 */ // bool containsDecision(); // is "atomic" // bool properlyContainsDecision(); // maybe not atomic but all children are /** Extract a constant of type T */ template const T& getConst() const; /** * Returns the expression reponsible for this expression. */ ExprManager* getExprManager() const; /** * Maps this Expr into one for a different ExprManager, using * variableMap for the translation and extending it with any new * mappings. */ Expr exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap, uint32_t flags = 0) const; /** * Very basic pretty printer for Expr. * This is equivalent to calling e.getNode().printAst(...) * @param out output stream to print to. * @param indent number of spaces to indent the formula by. */ void printAst(std::ostream& out, int indent = 0) const; private: /** * Pretty printer for use within gdb * This is not intended to be used outside of gdb. * This writes to the ostream Warning() and immediately flushes * the ostream. */ void debugPrint(); /** * Returns the actual internal node. * @return the internal node */ NodeTemplate getNode() const throw(); /** * Returns the actual internal node as a TNode. * @return the internal node */ NodeTemplate getTNode() const throw(); // Friend to access the actual internal expr information and private methods friend class SmtEngine; friend class smt::SmtEnginePrivate; friend class ExprManager; friend class NodeManager; friend class TypeCheckingException; friend class expr::pickle::Pickler; friend class prop::TheoryProxy; friend class expr::ExportPrivate; friend std::ostream& CVC4::operator<<(std::ostream& out, const Expr& e); template friend class NodeTemplate; };/* class Expr */ ${getConst_instantiations} #line 557 "${template}" inline size_t ExprHashFunction::operator()(CVC4::Expr e) const { return (size_t) e.getId(); } }/* CVC4 namespace */ #endif /* __CVC4__EXPR_H */ cvc4-1.5/src/expr/kind.i000066400000000000000000000007211313116454100150610ustar00rootroot00000000000000%{ #include "expr/kind.h" %} %ignore CVC4::kind::operator<<(std::ostream&, CVC4::Kind); %ignore CVC4::operator<<(std::ostream&, TypeConstant); %ignore CVC4::theory::operator<<(std::ostream&, TheoryId); %ignore CVC4::theory::operator++(TheoryId&); %rename(apply) CVC4::kind::KindHashFunction::operator()(::CVC4::Kind) const; %rename(apply) CVC4::TypeConstantHashFunction::operator()(TypeConstant) const; %rename(Kind) CVC4::kind::Kind_t; %include "expr/kind.h" cvc4-1.5/src/expr/kind_map.h000066400000000000000000000146061313116454100157240ustar00rootroot00000000000000/********************* */ /*! \file kind_map.h ** \verbatim ** Top contributors (to current version): ** Dejan Jovanovic, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A bitmap of Kinds ** ** This is a class representation for a bitmap of Kinds that is ** iterable, manipulable, and packed. **/ #include "cvc4_private.h" #ifndef __CVC4__KIND_MAP_H #define __CVC4__KIND_MAP_H #include #include #include "base/cvc4_assert.h" #include "expr/kind.h" namespace CVC4 { /** A bitmap of Kinds. */ class KindMap { static const size_t SIZE = (kind::LAST_KIND + 63) / 64; uint64_t d_bitmap[SIZE]; /** * Accessor proxy class used so that things like "map[k] = true" * will work as expected (we have to return a proxy from * KindMap::operator[]() in that case, since we can't construct an * address to the individual *bit* in the packed representation). */ class Accessor { KindMap& d_map; Kind d_kind; Accessor(KindMap& m, Kind k) : d_map(m), d_kind(k) { AssertArgument(k >= Kind(0) && k < kind::LAST_KIND, k, "invalid kind"); } friend class KindMap; public: operator bool() const { return d_map.tst(d_kind); } Accessor operator=(bool b) const { if(b) { d_map.set(d_kind); } else { d_map.clr(d_kind); } return *this; } };/* class KindMap::Accessor */ public: /** An iterator over a KindMap. */ class iterator { const KindMap* d_map; Kind d_kind; public: typedef std::input_iterator_tag iterator_category; typedef Kind value_type; iterator() : d_map(NULL), d_kind(Kind(0)) { } iterator(const KindMap& m, Kind k) : d_map(&m), d_kind(k) { AssertArgument(k >= Kind(0) && k <= kind::LAST_KIND, k, "invalid kind"); while(d_kind < kind::LAST_KIND && ! d_map->tst(d_kind)) { d_kind = Kind(uint64_t(d_kind) + 1); } } iterator& operator++() { if(d_kind < kind::LAST_KIND) { d_kind = Kind(uint64_t(d_kind) + 1); while(d_kind < kind::LAST_KIND && ! d_map->tst(d_kind)) { d_kind = Kind(uint64_t(d_kind) + 1); } } return *this; } iterator operator++(int) const { const_iterator i = *this; ++i; return i; } Kind operator*() const { return d_kind; } bool operator==(iterator i) const { return d_map == i.d_map && d_kind == i.d_kind; } bool operator!=(iterator i) const { return !(*this == i); } };/* class KindMap::iterator */ typedef iterator const_iterator; KindMap() { clear(); } KindMap(const KindMap& m) { for(unsigned i = 0; i < SIZE; ++i) { d_bitmap[i] = m.d_bitmap[i]; } } KindMap(Kind k) { clear(); set(k); } /** Empty the map. */ void clear() { for(unsigned i = 0; i < SIZE; ++i) { d_bitmap[i] = uint64_t(0); } } /** Tests whether the map is empty. */ bool isEmpty() const { for(unsigned i = 0; i < SIZE; ++i) { if(d_bitmap[i] != uint64_t(0)) { return false; } } return true; } /** Test whether k is in the map. */ bool tst(Kind k) const { AssertArgument(k >= Kind(0) && k < kind::LAST_KIND, k, "invalid kind"); return (d_bitmap[k / 64] >> (k % 64)) & uint64_t(1); } /** Set k in the map. */ void set(Kind k) { AssertArgument(k >= Kind(0) && k < kind::LAST_KIND, k, "invalid kind"); d_bitmap[k / 64] |= (uint64_t(1) << (k % 64)); } /** Clear k from the map. */ void clr(Kind k) { AssertArgument(k >= Kind(0) && k < kind::LAST_KIND, k, "invalid kind"); d_bitmap[k / 64] &= ~(uint64_t(1) << (k % 64)); } /** Iterate over the map. */ const_iterator begin() const { return const_iterator(*this, Kind(0)); } const_iterator end() const { return const_iterator(*this, kind::LAST_KIND); } /** Invert the map. */ KindMap operator~() const { KindMap r; for(unsigned i = 0; i < SIZE; ++i) { r.d_bitmap[i] = ~d_bitmap[i]; } return r; } /** Bitwise-AND the map (with assignment). */ KindMap& operator&=(const KindMap& m) { for(unsigned i = 0; i < SIZE; ++i) { d_bitmap[i] &= m.d_bitmap[i]; } return *this; } /** Bitwise-AND the map. */ KindMap operator&(const KindMap& m) const { KindMap r(*this); r &= m; return r; } /** Bitwise-OR the map (with assignment). */ KindMap& operator|=(const KindMap& m) { for(unsigned i = 0; i < SIZE; ++i) { d_bitmap[i] |= m.d_bitmap[i]; } return *this; } /** Bitwise-OR the map. */ KindMap operator|(const KindMap& m) const { KindMap r(*this); r |= m; return r; } /** Bitwise-XOR the map (with assignment). */ KindMap& operator^=(const KindMap& m) { for(unsigned i = 0; i < SIZE; ++i) { d_bitmap[i] ^= m.d_bitmap[i]; } return *this; } /** Bitwise-XOR the map. */ KindMap operator^(const KindMap& m) const { KindMap r(*this); r ^= m; return r; } /** Test whether k is in the map. */ bool operator[](Kind k) const { return tst(k); } /** Test whether k is in the map (allowing assignment). */ Accessor operator[](Kind k) { return Accessor(*this, k); } /** Test equality between two maps. */ bool operator==(KindMap m) { for(unsigned i = 0; i < SIZE; ++i) { if(d_bitmap[i] != m.d_bitmap[i]) { return false; } } return true; } bool operator!=(KindMap m) { return !(*this == m); } };/* class KindMap */ inline KindMap operator~(Kind k) { KindMap m(k); return ~m; } inline KindMap operator&(Kind k1, Kind k2) { KindMap m(k1); return m &= k2; } inline KindMap operator&(Kind k1, KindMap m2) { return m2 & k1; } inline KindMap operator|(Kind k1, Kind k2) { KindMap m(k1); return m |= k2; } inline KindMap operator|(Kind k1, KindMap m2) { return m2 | k1; } inline KindMap operator^(Kind k1, Kind k2) { KindMap m(k1); return m ^= k2; } inline KindMap operator^(Kind k1, KindMap m2) { return m2 ^ k1; } }/* CVC4 namespace */ #endif /* __CVC4__KIND_MAP_H */ cvc4-1.5/src/expr/kind_template.h000066400000000000000000000077621313116454100167670ustar00rootroot00000000000000/********************* */ /*! \file kind_template.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Template for the Node kind header ** ** Template for the Node kind header. **/ #include "cvc4_public.h" #ifndef __CVC4__KIND_H #define __CVC4__KIND_H #include #include #include "base/exception.h" namespace CVC4 { namespace kind { enum CVC4_PUBLIC Kind_t { UNDEFINED_KIND = -1, /**< undefined */ NULL_EXPR, /**< Null kind */ ${kind_decls} LAST_KIND /**< marks the upper-bound of this enumeration */ };/* enum Kind_t */ }/* CVC4::kind namespace */ // import Kind into the "CVC4" namespace but keep the individual kind // constants under kind:: typedef ::CVC4::kind::Kind_t Kind; namespace kind { inline std::ostream& operator<<(std::ostream&, CVC4::Kind) CVC4_PUBLIC; inline std::ostream& operator<<(std::ostream& out, CVC4::Kind k) { using namespace CVC4::kind; switch(k) { /* special cases */ case UNDEFINED_KIND: out << "UNDEFINED_KIND"; break; case NULL_EXPR: out << "NULL"; break; ${kind_printers} case LAST_KIND: out << "LAST_KIND"; break; default: out << "UNKNOWNKIND!" << int(k); break; } return out; } #line 64 "${template}" /** Returns true if the given kind is associative. This is used by ExprManager to * decide whether it's safe to modify big expressions by changing the grouping of * the arguments. */ /* TODO: This could be generated. */ inline bool isAssociative(::CVC4::Kind k) { switch(k) { case kind::AND: case kind::OR: case kind::MULT: case kind::PLUS: return true; default: return false; } } inline std::string kindToString(::CVC4::Kind k) { std::stringstream ss; ss << k; return ss.str(); } struct KindHashFunction { inline size_t operator()(::CVC4::Kind k) const { return k; } };/* struct KindHashFunction */ }/* CVC4::kind namespace */ /** * The enumeration for the built-in atomic types. */ enum TypeConstant { ${type_constant_list} #line 102 "${template}" LAST_TYPE };/* enum TypeConstant */ /** * We hash the constants with their values. */ struct TypeConstantHashFunction { inline size_t operator()(TypeConstant tc) const { return tc; } };/* struct TypeConstantHashFunction */ inline std::ostream& operator<<(std::ostream& out, TypeConstant typeConstant) { switch(typeConstant) { ${type_constant_descriptions} #line 118 "${template}" default: out << "UNKNOWN_TYPE_CONSTANT"; break; } return out; } namespace theory { enum TheoryId { ${theory_enum} #line 130 "${template}" THEORY_LAST };/* enum TheoryId */ const TheoryId THEORY_FIRST = static_cast(0); const TheoryId THEORY_SAT_SOLVER = THEORY_LAST; inline TheoryId& operator ++ (TheoryId& id) { return id = static_cast(((int)id) + 1); } inline std::ostream& operator<<(std::ostream& out, TheoryId theoryId) { switch(theoryId) { ${theory_descriptions} #line 144 "${template}" default: out << "UNKNOWN_THEORY"; break; } return out; } inline TheoryId kindToTheoryId(::CVC4::Kind k) { switch(k) { case kind::UNDEFINED_KIND: case kind::NULL_EXPR: break; ${kind_to_theory_id} #line 158 "${template}" case kind::LAST_KIND: break; } throw IllegalArgumentException("", "k", __PRETTY_FUNCTION__, "bad kind"); } inline TheoryId typeConstantToTheoryId(::CVC4::TypeConstant typeConstant) { switch(typeConstant) { ${type_constant_to_theory_id} #line 168 "${template}" case LAST_TYPE: break; } throw IllegalArgumentException("", "k", __PRETTY_FUNCTION__, "bad type constant"); } }/* CVC4::theory namespace */ }/* CVC4 namespace */ #endif /* __CVC4__KIND_H */ cvc4-1.5/src/expr/matcher.h000066400000000000000000000066361313116454100155710ustar00rootroot00000000000000/********************* */ /*! \file matcher.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Andrew Reynolds, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A class representing a type matcher ** ** A class representing a type matcher. **/ #include "cvc4_private.h" #ifndef __CVC4__MATCHER_H #define __CVC4__MATCHER_H #include #include #include #include #include "base/cvc4_assert.h" #include "expr/node.h" #include "expr/type_node.h" namespace CVC4 { class Matcher { private: std::vector< TypeNode > d_types; std::vector< TypeNode > d_match; public: Matcher(){} Matcher( DatatypeType dt ){ addTypesFromDatatype( dt ); } ~Matcher(){} void addTypesFromDatatype( DatatypeType dt ){ std::vector< Type > argTypes = dt.getParamTypes(); addTypes( argTypes ); Debug("typecheck-idt") << "instantiating matcher for " << dt << std::endl; for(unsigned i = 0; i < argTypes.size(); ++i) { if(dt.isParameterInstantiated(i)) { Debug("typecheck-idt") << "++ instantiate param " << i << " : " << d_types[i] << std::endl; d_match[i] = d_types[i]; } } } void addType( Type t ){ d_types.push_back( TypeNode::fromType( t ) ); d_match.push_back( TypeNode::null() ); } void addTypes( std::vector< Type > types ){ for( int i=0; i<(int)types.size(); i++ ){ addType( types[i] ); } } bool doMatching( TypeNode pattern, TypeNode tn ){ Debug("typecheck-idt") << "doMatching() : " << pattern << " : " << tn << std::endl; std::vector< TypeNode >::iterator i = std::find( d_types.begin(), d_types.end(), pattern ); if( i!=d_types.end() ){ int index = i - d_types.begin(); if( !d_match[index].isNull() ){ Debug("typecheck-idt") << "check subtype " << tn << " " << d_match[index] << std::endl; TypeNode tnn = TypeNode::leastCommonTypeNode( tn, d_match[index] ); //recognize subtype relation if( !tnn.isNull() ){ d_match[index] = tnn; return true; }else{ return false; } }else{ d_match[ i - d_types.begin() ] = tn; return true; } }else if( pattern==tn ){ return true; }else if( pattern.getKind()!=tn.getKind() || pattern.getNumChildren()!=tn.getNumChildren() ){ return false; }else{ for( int i=0; i<(int)pattern.getNumChildren(); i++ ){ if( !doMatching( pattern[i], tn[i] ) ){ return false; } } return true; } } TypeNode getMatch( unsigned int i ){ return d_match[i]; } void getTypes( std::vector& types ) { types.clear(); for( int i=0; i<(int)d_match.size(); i++ ){ types.push_back( d_types[i].toType() ); } } void getMatches( std::vector& types ) { types.clear(); for( int i=0; i<(int)d_match.size(); i++ ){ if(d_match[i].isNull()) { types.push_back( d_types[i].toType() ); } else { types.push_back( d_match[i].toType() ); } } } };/* class Matcher */ }/* CVC4 namespace */ #endif /* __CVC4__MATCHER_H */ cvc4-1.5/src/expr/metakind_template.h000066400000000000000000000240161313116454100176250ustar00rootroot00000000000000/********************* */ /*! \file metakind_template.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Template for the metakind header. ** ** Template for the metakind header. **/ #include "cvc4_private.h" #ifndef __CVC4__KIND__METAKIND_H #define __CVC4__KIND__METAKIND_H #include #include "base/cvc4_assert.h" #include "expr/kind.h" namespace CVC4 { namespace expr { class NodeValue; }/* CVC4::expr namespace */ namespace kind { namespace metakind { /** * Static, compile-time information about types T representing CVC4 * constants: * * typename ConstantMap::OwningTheory * * The theory in charge of constructing T when constructing Nodes * with NodeManager::mkConst(T). * * typename ConstantMap::kind * * The kind to use when constructing Nodes with * NodeManager::mkConst(T). */ template struct ConstantMap; /** * Static, compile-time information about kinds k and what type their * corresponding CVC4 constants are: * * typename ConstantMapReverse::T * * Constant type for kind k. */ template struct ConstantMapReverse; /** * Static, compile-time mapping from CONSTANT kinds to comparison * functors on NodeValue*. The single element of this structure is: * * static bool NodeValueCompare::compare(NodeValue* x, NodeValue* y) * * Compares x and y, given that they are both K-kinded (and the * meta-kind of K is CONSTANT). If pool == true, one of x and y * (but not both) may be a "non-inlined" NodeValue. If pool == * false, neither x nor y may be a "non-inlined" NodeValue. */ template struct NodeValueConstCompare { inline static bool compare(const ::CVC4::expr::NodeValue* x, const ::CVC4::expr::NodeValue* y); inline static size_t constHash(const ::CVC4::expr::NodeValue* nv); };/* NodeValueConstCompare */ struct NodeValueCompare { template inline static bool compare(const ::CVC4::expr::NodeValue* nv1, const ::CVC4::expr::NodeValue* nv2); inline static size_t constHash(const ::CVC4::expr::NodeValue* nv); };/* struct NodeValueCompare */ /** * "metakinds" represent the "kinds" of kinds at the meta-level. * "metakind" is an ugly name but it's not used by client code, just * by the expr package, and the intent here is to keep it from * polluting the kind namespace. For more documentation on what these * mean, see src/theory/builtin/kinds. */ enum MetaKind_t { INVALID = -1, /**< special node non-kinds like NULL_EXPR or LAST_KIND */ VARIABLE, /**< special node kinds: no operator */ OPERATOR, /**< operators that get "inlined" */ PARAMETERIZED, /**< parameterized ops (like APPLYs) that carry extra data */ CONSTANT, /**< constants */ NULLARY_OPERATOR /**< nullary operator */ };/* enum MetaKind_t */ }/* CVC4::kind::metakind namespace */ // import MetaKind into the "CVC4::kind" namespace but keep the // individual MetaKind constants under kind::metakind:: typedef ::CVC4::kind::metakind::MetaKind_t MetaKind; /** * Get the metakind for a particular kind. */ static inline MetaKind metaKindOf(Kind k) { static const MetaKind metaKinds[] = { metakind::INVALID, /* UNDEFINED_KIND */ metakind::INVALID, /* NULL_EXPR */ ${metakind_kinds} metakind::INVALID /* LAST_KIND */ };/* metaKinds[] */ Assert(k >= kind::NULL_EXPR && k < kind::LAST_KIND); // We've asserted that k >= NULL_EXPR (which is 0), but we still // handle the UNDEFINED_KIND (-1) case. If we don't, the compiler // emits warnings for non-assertion builds, since the check isn't done. return metaKinds[k + 1]; }/* metaKindOf(k) */ }/* CVC4::kind namespace */ namespace expr { class NodeValue; }/* CVC4::expr namespace */ namespace kind { namespace metakind { /* these are #defines so their sum can be #if-checked in node_value.h */ #define __CVC4__EXPR__NODE_VALUE__NBITS__REFCOUNT 20 #define __CVC4__EXPR__NODE_VALUE__NBITS__KIND 10 #define __CVC4__EXPR__NODE_VALUE__NBITS__ID 40 #define __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN 26 static const unsigned MAX_CHILDREN = (1u << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1; }/* CVC4::kind::metakind namespace */ }/* CVC4::kind namespace */ namespace expr { // Comparison predicate struct NodeValuePoolEq { inline bool operator()(const NodeValue* nv1, const NodeValue* nv2) const { return ::CVC4::kind::metakind::NodeValueCompare::compare(nv1, nv2); } }; }/* CVC4::expr namespace */ }/* CVC4 namespace */ #include "expr/node_value.h" #endif /* __CVC4__KIND__METAKIND_H */ ${metakind_includes} #ifdef __CVC4__NODE_MANAGER_NEEDS_CONSTANT_MAP namespace CVC4 { namespace kind { namespace metakind { template inline bool NodeValueConstCompare::compare(const ::CVC4::expr::NodeValue* x, const ::CVC4::expr::NodeValue* y) { typedef typename ConstantMapReverse::T T; if(pool) { if(x->d_nchildren == 1) { Assert(y->d_nchildren == 0); return compare(y, x); } else if(y->d_nchildren == 1) { Assert(x->d_nchildren == 0); return x->getConst() == *reinterpret_cast(y->d_children[0]); } } Assert(x->d_nchildren == 0); Assert(y->d_nchildren == 0); return x->getConst() == y->getConst(); } template inline size_t NodeValueConstCompare::constHash(const ::CVC4::expr::NodeValue* nv) { typedef typename ConstantMapReverse::T T; return nv->getConst().hash(); } ${metakind_constantMaps} template inline bool NodeValueCompare::compare(const ::CVC4::expr::NodeValue* nv1, const ::CVC4::expr::NodeValue* nv2) { if(nv1->d_kind != nv2->d_kind) { return false; } if(nv1->getMetaKind() == kind::metakind::CONSTANT) { switch(nv1->d_kind) { ${metakind_compares} default: Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv1->d_kind)); } } if(nv1->d_nchildren != nv2->d_nchildren) { return false; } ::CVC4::expr::NodeValue::const_nv_iterator i = nv1->nv_begin(); ::CVC4::expr::NodeValue::const_nv_iterator j = nv2->nv_begin(); ::CVC4::expr::NodeValue::const_nv_iterator i_end = nv1->nv_end(); while(i != i_end) { if((*i) != (*j)) { return false; } ++i; ++j; } return true; } inline size_t NodeValueCompare::constHash(const ::CVC4::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); switch(nv->d_kind) { ${metakind_constHashes} default: Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv->d_kind)); } } struct NodeValueConstPrinter { inline static void toStream(std::ostream& out, const ::CVC4::expr::NodeValue* nv); inline static void toStream(std::ostream& out, TNode n); }; inline void NodeValueConstPrinter::toStream(std::ostream& out, const ::CVC4::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); switch(nv->d_kind) { ${metakind_constPrinters} default: Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv->d_kind)); } } inline void NodeValueConstPrinter::toStream(std::ostream& out, TNode n) { toStream(out, n.d_nv); } // The reinterpret_cast of d_children to various constant payload types // in deleteNodeValueConstant(), below, can flag a "strict aliasing" // warning; it should actually be okay, because we never access the // embedded constant as a NodeValue* child, and never access an embedded // NodeValue* child as a constant. #pragma GCC diagnostic ignored "-Wstrict-aliasing" /** * Cleanup to be performed when a NodeValue zombie is collected, and * it has CONSTANT metakind. This calls the destructor for the underlying * C++ type representing the constant value. See * NodeManager::reclaimZombies() for more information. * * This doesn't support "non-inlined" NodeValues, which shouldn't need this * kind of cleanup. */ inline void deleteNodeValueConstant(::CVC4::expr::NodeValue* nv) { Assert(nv->getMetaKind() == kind::metakind::CONSTANT); switch(nv->d_kind) { ${metakind_constDeleters} default: Unhandled(::CVC4::expr::NodeValue::dKindToKind(nv->d_kind)); } } // re-enable the strict-aliasing warning # pragma GCC diagnostic warning "-Wstrict-aliasing" inline unsigned getLowerBoundForKind(::CVC4::Kind k) { static const unsigned lbs[] = { 0, /* NULL_EXPR */ ${metakind_lbchildren} 0 /* LAST_KIND */ }; return lbs[k]; } inline unsigned getUpperBoundForKind(::CVC4::Kind k) { static const unsigned ubs[] = { 0, /* NULL_EXPR */ ${metakind_ubchildren} 0, /* LAST_KIND */ }; return ubs[k]; } }/* CVC4::kind::metakind namespace */ /** * Map a kind of the operator to the kind of the enclosing expression. For * example, since the kind of functions is just VARIABLE, it should map * VARIABLE to APPLY_UF. */ static inline Kind operatorToKind(::CVC4::expr::NodeValue* nv) { if(nv->getKind() == kind::BUILTIN) { return nv->getConst(); } else if(nv->getKind() == kind::LAMBDA) { return kind::APPLY_UF; } switch(Kind k CVC4_UNUSED = nv->getKind()) { ${metakind_operatorKinds} default: return kind::UNDEFINED_KIND; /* LAST_KIND */ }; } }/* CVC4::kind namespace */ #line 343 "${template}" namespace theory { static inline bool useTheoryValidate(std::string theory) { ${use_theory_validations} return false; } static const char *const useTheoryHelp = "\ The following options are valid alternate implementations for use with\n\ the --use-theory option:\n\ \n\ ${theory_alternate_doc}"; }/* CVC4::theory namespace */ }/* CVC4 namespace */ #endif /* __CVC4__NODE_MANAGER_NEEDS_CONSTANT_MAP */ cvc4-1.5/src/expr/mkexpr000077500000000000000000000171461313116454100152270ustar00rootroot00000000000000#!/usr/bin/env bash # # mkexpr # Morgan Deters for CVC4 # Copyright (c) 2010-2013 The CVC4 Project # # The purpose of this script is to create {expr,expr_manager}.{h,cpp} # from template files and a list of theory kinds. Basically it just # sets up the public interface for access to constants. # # Invocation: # # mkexpr template-file theory-kind-files... # # Output is to standard out. # copyright=2010-2014 filename=`basename "$1" | sed 's,_template,,'` cat <&2 exit 1 fi # this script doesn't care about the theory class information, but # makes does make sure it's there seen_theory=true if [ "$1" = THEORY_BUILTIN ]; then if $seen_theory_builtin; then echo "$kf:$lineno: error: \"builtin\" theory redefined" >&2 exit 1 fi seen_theory_builtin=true elif [ -z "$1" -o -z "$2" -o -z "$3" ]; then echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::CVC4::theory::foo)" >&2 elif ! expr "$2" : '\(::CVC4::theory::*\)' >/dev/null; then echo "$kf:$lineno: warning: theory class not under ::CVC4::theory namespace" >&2 fi } function alternate { # alternate ID name T header lineno=${BASH_LINENO[0]} if $seen_theory; then echo "$kf:$lineno: error: multiple theories defined in one file !?" >&2 exit 1 fi seen_theory=true seen_endtheory=true } function rewriter { # rewriter class header lineno=${BASH_LINENO[0]} check_theory_seen } function properties { # properties prop* lineno=${BASH_LINENO[0]} check_theory_seen } function endtheory { # endtheory lineno=${BASH_LINENO[0]} check_theory_seen seen_endtheory=true } function enumerator { # enumerator KIND enumerator-class header lineno=${BASH_LINENO[0]} check_theory_seen } function typechecker { # typechecker header lineno=${BASH_LINENO[0]} check_theory_seen typechecker_includes="${typechecker_includes} #include \"$1\"" } function typerule { # typerule OPERATOR typechecking-class lineno=${BASH_LINENO[0]} check_theory_seen typerules="${typerules} #line $lineno \"$kf\" case kind::$1: #line $lineno \"$kf\" typeNode = $2::computeType(nodeManager, n, check); break; " } function construle { # isconst OPERATOR isconst-checking-class lineno=${BASH_LINENO[0]} check_theory_seen construles="${construles} #line $lineno \"$kf\" case kind::$1: #line $lineno \"$kf\" return $2::computeIsConst(nodeManager, n); " neverconstrules="${neverconstrules} #line $lineno \"$kf\" case kind::$1: #line $lineno \"$kf\" return false; " } function sort { # sort TYPE cardinality [well-founded ground-term header | not-well-founded] ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen } function cardinality { # cardinality TYPE cardinality-computer [header] lineno=${BASH_LINENO[0]} check_theory_seen } function well-founded { # well-founded TYPE wellfoundedness-computer [header] lineno=${BASH_LINENO[0]} check_theory_seen } function variable { # variable K ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen } function operator { # operator K #children ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen } function parameterized { # parameterized K #children ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen } function constant { # constant K T Hasher header ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen includes="${includes} #include \"$4\"" mkConst_instantiations="${mkConst_instantiations} #line $lineno \"$kf\" template <> Expr ExprManager::mkConst($2 const& val); " mkConst_implementations="${mkConst_implementations} #line $lineno \"$kf\" template <> Expr ExprManager::mkConst($2 const& val) { #line $lineno \"$kf\" return Expr(this, new Node(d_nodeManager->mkConst< $2 >(val))); } " getConst_instantiations="${getConst_instantiations} #line $lineno \"$kf\" template <> $2 const & Expr::getConst< $2 >() const; " getConst_implementations="${getConst_implementations} #line $lineno \"$kf\" template <> $2 const & Expr::getConst() const { #line $lineno \"$kf\" PrettyCheckArgument(getKind() == ::CVC4::kind::$1, *this, \"Improper kind for getConst<$2>()\"); #line $lineno \"$kf\" return d_node->getConst< $2 >(); } " exportConstant_cases="${exportConstant_cases} case $1: return to->mkConst(n.getConst< $2 >());" } function nullaryoperator { # nullaryoperator K ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen } function check_theory_seen { if $seen_endtheory; then echo "$kf:$lineno: error: command after \"endtheory\" declaration (endtheory has to be last)" >&2 exit 1 fi if ! $seen_theory; then echo "$kf:$lineno: error: no \"theory\" declaration found (it has to be first)" >&2 exit 1 fi } function check_builtin_theory_seen { if ! $seen_theory_builtin; then echo "$me: warning: no declaration for the builtin theory found" >&2 fi } while [ $# -gt 0 ]; do kf=$1 seen_theory=false seen_endtheory=false b=$(basename $(dirname "$kf")) source "$kf" if ! $seen_theory; then echo "$kf: error: no theory content found in file!" >&2 exit 1 fi if ! $seen_endtheory; then echo "$kf:$lineno: error: no \"endtheory\" declaration found (it is required at the end)" >&2 exit 1 fi shift done check_builtin_theory_seen ## output # generate warnings about incorrect #line annotations in templates nl -ba -s' ' "$template" | grep '^ *[0-9][0-9]* # *line' | awk '{OFS="";if($1+1!=$3) print "'"$template"':",$1,": warning: incorrect annotation \"#line ",$3,"\" (it should be \"#line ",($1+1),"\")"}' >&2 text=$(cat "$template") for var in \ includes \ template \ getConst_instantiations \ getConst_implementations \ mkConst_instantiations \ mkConst_implementations \ exportConstant_cases \ typechecker_includes \ typerules \ construles \ neverconstrules \ ; do eval text="\${text//\\\$\\{$var\\}/\${$var}}" done error=`expr "$text" : '.*\${\([^}]*\)}.*'` if [ -n "$error" ]; then echo "$template:0: error: undefined replacement \${$error}" >&2 exit 1 fi echo "$text" cvc4-1.5/src/expr/mkkind000077500000000000000000000243601313116454100151720ustar00rootroot00000000000000#!/usr/bin/env bash # # mkkind # Morgan Deters for CVC4 # Copyright (c) 2010-2013 The CVC4 Project # # The purpose of this script is to create kind.h (and also # type_properties.h) from a template and a list of theory kinds. # # Invocation: # # mkkind template-file theory-kind-files... # # Output is to standard out. # copyright=2010-2014 filename=`basename "$1" | sed 's,_template,,'` cat <&2 exit 1 fi # this script doesn't care about the theory class information, but # makes does make sure it's there seen_theory=true if [ "$1" = THEORY_BUILTIN ]; then if $seen_theory_builtin; then echo "$kf:$lineno: error: \"builtin\" theory redefined" >&2 exit 1 fi seen_theory_builtin=true elif [ -z "$1" -o -z "$2" -o -z "$3" ]; then echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then echo "$kf:$lineno: warning: theory class \`$2' isn't fully-qualified (e.g., ::CVC4::theory::foo)" >&2 elif ! expr "$2" : '\(::CVC4::theory::*\)' >/dev/null; then echo "$kf:$lineno: warning: theory class not under ::CVC4::theory namespace" >&2 fi theory_id="$1" theory_enum="${theory_enum} $1, " theory_descriptions="${theory_descriptions} case ${theory_id}: out << \"${theory_id}\"; break; " } function alternate { # alternate ID name T header lineno=${BASH_LINENO[0]} if $seen_theory; then echo "$kf:$lineno: error: multiple theories defined in one file !?" >&2 exit 1 fi seen_theory=true seen_endtheory=true } function properties { # rewriter class header lineno=${BASH_LINENO[0]} check_theory_seen } function endtheory { # endtheory lineno=${BASH_LINENO[0]} check_theory_seen seen_endtheory=true } function enumerator { # enumerator KIND enumerator-class header lineno=${BASH_LINENO[0]} check_theory_seen } function typechecker { # typechecker header lineno=${BASH_LINENO[0]} check_theory_seen } function typerule { # typerule OPERATOR typechecking-class lineno=${BASH_LINENO[0]} check_theory_seen } function construle { # construle OPERATOR isconst-checking-class lineno=${BASH_LINENO[0]} check_theory_seen } function rewriter { # properties prop* lineno=${BASH_LINENO[0]} check_theory_seen } function sort { # sort TYPE cardinality [well-founded ground-term header | not-well-founded] ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen if [ "$3" = well-founded ]; then wf=true groundterm="$4" header="$5" comment="$6" elif [ "$3" = not-well-founded ]; then wf=false groundterm= header= comment="$4" else echo "$kf:$lineno: expected third argument to be \"well-founded\" or \"not-well-founded\"" >&2 exit 1 fi register_sort "$1" "$2" "$wf" "$groundterm" "$header" "$comment" } function cardinality { # cardinality TYPE cardinality-computer [header] lineno=${BASH_LINENO[0]} check_theory_seen register_cardinality "$1" "$2" "$3" } function well-founded { # well-founded TYPE wellfoundedness-computer groundterm-computer [header] lineno=${BASH_LINENO[0]} check_theory_seen register_wellfoundedness "$1" "$2" "$3" "$4" } function variable { # variable K ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_kind "$1" 0 "$2" } function operator { # operator K #children ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_kind "$1" "$2" "$3" } function parameterized { # parameterized K1 K2 #children ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_kind "$1" "$3" "$4" } function constant { # constant K T Hasher header ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_kind "$1" 0 "$5" } function nullaryoperator { # nullaryoperator K ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_kind "$1" 0 "$2" } function register_sort { id=$1 cardinality=$2 wellfoundedness=$3 groundterm=$4 header=$5 comment=$6 type_constant_list="${type_constant_list} ${id}, /**< ${comment} */ " type_constant_descriptions="${type_constant_descriptions} case $id: out << \"${comment}\"; break; " type_constant_to_theory_id="${type_constant_to_theory_id} case $id: return $theory_id; " type_constant_cardinalities="${type_constant_cardinalities}#line $lineno \"$kf\" case $id: return Cardinality($cardinality); " type_constant_wellfoundednesses="${type_constant_wellfoundednesses}#line $lineno \"$kf\" case $id: return $wellfoundedness; " if [ -n "$groundterm" ]; then type_constant_groundterms="${type_constant_groundterms}#line $lineno \"$kf\" case $id: return $groundterm; " if [ -n "$header" ]; then type_properties_includes="${type_properties_includes}#line $lineno \"$kf\" #include \"$header\" " fi else type_constant_groundterms="${type_constant_groundterms}#line $lineno \"$kf\" case $id: Unhandled(tc); " fi } function register_cardinality { id=$1 cardinality_computer=$(sed 's,%TYPE%,typeNode,g' <<<"$2") header=$3 type_cardinalities="${type_cardinalities}#line $lineno \"$kf\" case $id: return $cardinality_computer; " if [ -n "$header" ]; then type_properties_includes="${type_properties_includes}#line $lineno \"$kf\" #include \"$header\" " fi } function register_wellfoundedness { id=$1 wellfoundedness_computer=$(sed 's,%TYPE%,typeNode,g' <<<"$2") groundterm_computer=$(sed 's,%TYPE%,typeNode,g' <<<"$3") header=$4 # "false" is a special well-foundedness computer that doesn't # require an associated groundterm-computer; anything else does if [ "$wellfoundedness_computer" != false ]; then if [ -z "$groundterm_computer" ]; then echo "$kf:$lineno: ground-term computer missing in command \"well-founded\"" >&2 exit 1 fi else if [ -n "$groundterm_computer" ]; then echo "$kf:$lineno: ground-term computer specified for not-well-founded type" >&2 exit 1 fi fi type_wellfoundednesses="${type_wellfoundednesses}#line $lineno \"$kf\" case $id: return $wellfoundedness_computer; " if [ -n "$groundterm_computer" ]; then type_groundterms="${type_groundterms}#line $lineno \"$kf\" case $id: return $groundterm_computer; " else type_groundterms="${type_groundterms}#line $lineno \"$kf\" case $id: Unhandled(typeNode); " fi if [ -n "$header" ]; then type_properties_includes="${type_properties_includes}#line $lineno \"$kf\" #include \"$header\" " fi } function register_kind { r=$1 nc=$2 comment=$3 register_kind_counter=$[register_kind_counter+1] kind_decls="${kind_decls} $r, /**< $comment ($register_kind_counter) */ " kind_printers="${kind_printers} case $r: out << \"$r\"; break; " kind_to_theory_id="${kind_to_theory_id} case kind::$r: return $theory_id; " } function check_theory_seen { if $seen_endtheory; then echo "$kf:$lineno: error: command after \"endtheory\" declaration (endtheory has to be last)" >&2 exit 1 fi if ! $seen_theory; then echo "$kf:$lineno: error: no \"theory\" declaration found (it has to be first)" >&2 exit 1 fi } function check_builtin_theory_seen { if ! $seen_theory_builtin; then echo "$me: warning: no declaration for the builtin theory found" >&2 fi } while [ $# -gt 0 ]; do kf=$1 seen_theory=false seen_endtheory=false b=$(basename $(dirname "$kf")) kind_decls="${kind_decls} /* from $b */ " kind_printers="${kind_printers} /* from $b */ " source "$kf" if ! $seen_theory; then echo "$kf: error: no theory content found in file!" >&2 exit 1 fi if ! $seen_endtheory; then echo "$kf:$lineno: error: no \"endtheory\" declaration found (it is required at the end)" >&2 exit 1 fi shift done check_builtin_theory_seen ## output # generate warnings about incorrect #line annotations in templates nl -ba -s' ' "$template" | grep '^ *[0-9][0-9]* # *line' | awk '{OFS="";if($1+1!=$3) print "'"$template"':",$1,": warning: incorrect annotation \"#line ",$3,"\" (it should be \"#line ",($1+1),"\")"}' >&2 text=$(cat "$template") for var in \ kind_decls \ kind_printers \ kind_to_theory_id \ theory_enum \ type_constant_list \ type_constant_descriptions \ type_constant_to_theory_id \ type_cardinalities \ type_constant_cardinalities \ type_wellfoundednesses \ type_constant_wellfoundednesses \ type_groundterms \ type_constant_groundterms \ type_properties_includes \ theory_descriptions \ template \ ; do eval text="\${text//\\\$\\{$var\\}/\${$var}}" done error=`expr "$text" : '.*\${\([^}]*\)}.*'` if [ -n "$error" ]; then echo "$template:0: error: undefined replacement \${$error}" >&2 exit 1 fi echo "$text" cvc4-1.5/src/expr/mkmetakind000077500000000000000000000252351313116454100160430ustar00rootroot00000000000000#!/usr/bin/env bash # # mkmetakind # Morgan Deters for CVC4 # Copyright (c) 2010-2013 The CVC4 Project # # The purpose of this script is to create metakind.h from a template # and a list of theory kinds. # # This is kept distinct from kind.h because kind.h is a public header # and metakind.h is intended for the expr package only. # # Invocation: # # mkmetakind template-file theory-kind-files... # # Output is to standard out. # copyright=2010-2014 cat <&2 exit 1 fi # this script doesn't care about the theory class information, but # makes does make sure it's there seen_theory=true if [ "$1" = THEORY_BUILTIN ]; then if $seen_theory_builtin; then echo "$kf:$lineno: error: \"builtin\" theory redefined" >&2 exit 1 fi seen_theory_builtin=true elif [ -z "$1" -o -z "$2" -o -z "$3" ]; then echo "$kf:$lineno: error: \"theory\" directive missing class or header argument" >&2 exit 1 elif ! expr "$2" : '\(::*\)' >/dev/null; then echo "$kf:$lineno: warning: theory class \`$1' isn't fully-qualified (e.g., ::CVC4::theory::foo)" >&2 elif ! expr "$2" : '\(::CVC4::theory::*\)' >/dev/null; then echo "$kf:$lineno: warning: theory class not under ::CVC4::theory namespace" >&2 fi theory_class=$1 metakind_includes="${metakind_includes} // #include \"theory/$b/$2\"" } function alternate { # alternate ID name T header lineno=${BASH_LINENO[0]} if $seen_theory; then echo "$kf:$lineno: error: multiple theories defined in one file !?" >&2 exit 1 fi seen_theory=true seen_endtheory=true theory_id="$1" name="$2" theory_class="$3" theory_header="$4" theory_includes="${theory_includes}#include \"$theory_header\" " use_theory_validations="${use_theory_validations} if(theory == \"$name\") { return true; }" theory_alternate_doc="$theory_alternate_doc$name - alternate implementation for $theory_id\\n\\ " } function properties { # properties prop* lineno=${BASH_LINENO[0]} check_theory_seen } function endtheory { # endtheory lineno=${BASH_LINENO[0]} check_theory_seen seen_endtheory=true } function enumerator { # enumerator KIND enumerator-class header lineno=${BASH_LINENO[0]} check_theory_seen } function typechecker { # typechecker header lineno=${BASH_LINENO[0]} check_theory_seen } function typerule { # typerule OPERATOR typechecking-class lineno=${BASH_LINENO[0]} check_theory_seen } function construle { # construle OPERATOR isconst-checking-class lineno=${BASH_LINENO[0]} check_theory_seen } function rewriter { # rewriter class header lineno=${BASH_LINENO[0]} check_theory_seen } function sort { # sort TYPE cardinality [well-founded ground-term header | not-well-founded] ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen } function cardinality { # cardinality TYPE cardinality-computer [header] lineno=${BASH_LINENO[0]} check_theory_seen } function well-founded { # well-founded TYPE wellfoundedness-computer [header] lineno=${BASH_LINENO[0]} check_theory_seen } function variable { # variable K ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_metakind VARIABLE "$1" 0 } function operator { # operator K #children ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_metakind OPERATOR "$1" "$2" } function parameterized { # parameterized K1 K2 #children ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_metakind PARAMETERIZED "$1" "$3" if ! expr "$2" : '\[.*\]' &>/dev/null; then registerOperatorToKind "$1" "$2" fi } function constant { # constant K T Hasher header ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen if ! expr "$2" : '\(::*\)' >/dev/null; then if ! primitive_type "$2"; then # if there's an embedded space, we're probably doing something # tricky to specify the CONST payload, like "int const*"; in any # case, this warning gives too many false positives, so disable it if ! expr "$2" : '..* ..*' >/dev/null; then echo "$kf:$lineno: warning: constant $1 class \`$2' isn't fully-qualified (e.g., ::CVC4::Rational)" >&2 fi fi fi if ! expr "$3" : '\(::*\)' >/dev/null; then echo "$kf:$lineno: warning: constant $1 hasher \`$3' isn't fully-qualified (e.g., ::CVC4::RationalHashFunction)" >&2 fi if [ -n "$4" ]; then metakind_includes="${metakind_includes} #include \"$4\"" fi register_metakind CONSTANT "$1" 0 metakind_constantMaps="${metakind_constantMaps} }/* CVC4::kind::metakind namespace */ }/* CVC4::kind namespace */ namespace expr { // The reinterpret_cast of d_children to \"$2 const*\" // flags a \"strict aliasing\" warning; it's okay, because we never access // the embedded constant as a NodeValue* child, and never access an embedded // NodeValue* child as a constant. #pragma GCC diagnostic ignored \"-Wstrict-aliasing\" template <> inline $2 const& NodeValue::getConst< $2 >() const { AssertArgument(getKind() == ::CVC4::kind::$1, *this, \"Improper kind for getConst<$2>()\"); // To support non-inlined CONSTANT-kinded NodeValues (those that are // \"constructed\" when initially checking them against the NodeManager // pool), we must check d_nchildren here. return d_nchildren == 0 ? *reinterpret_cast< $2 const* >(d_children) : *reinterpret_cast< $2 const* >(d_children[0]); } // re-enable the warning #pragma GCC diagnostic warning \"-Wstrict-aliasing\" }/* CVC4::expr namespace */ namespace kind { namespace metakind { template <> struct ConstantMap< $2 > { // typedef $theory_class OwningTheory; enum { kind = ::CVC4::kind::$1 }; };/* ConstantMap< $2 > */ template <> struct ConstantMapReverse< ::CVC4::kind::$1 > { typedef $2 T; };/* ConstantMapReverse< ::CVC4::kind::$1 > */ " metakind_compares="${metakind_compares} case kind::$1: return NodeValueConstCompare< kind::$1, pool >::compare(nv1, nv2); " metakind_constHashes="${metakind_constHashes} case kind::$1: #line $lineno \"$kf\" return $3()(nv->getConst< $2 >()); " metakind_constPrinters="${metakind_constPrinters} case kind::$1: #line $lineno \"$kf\" out << nv->getConst< $2 >(); break; " cname=`echo "$2" | awk 'BEGIN {FS="::"} {print$NF}'` metakind_constDeleters="${metakind_constDeleters} case kind::$1: #line $lineno \"$kf\" std::allocator< $2 >().destroy(reinterpret_cast< $2* >(nv->d_children)); break; " } function nullaryoperator { # nullaryoperator K ["comment"] lineno=${BASH_LINENO[0]} check_theory_seen register_metakind NULLARY_OPERATOR "$1" 0 } function registerOperatorToKind { operatorKind=$1 applyKind=$2 metakind_operatorKinds="${metakind_operatorKinds} #line $lineno \"$kf\" case kind::$applyKind: return kind::$operatorKind;"; } function register_metakind { mk=$1 k=$2 nc=$3 metakind_kinds="${metakind_kinds} metakind::$mk, /* $k */ "; # figure out the range given by $nc if expr "$nc" : '[0-9][0-9]*$' >/dev/null; then lb=$nc ub=$nc elif expr "$nc" : '[0-9][0-9]*:$' >/dev/null; then let `echo "$nc" | awk 'BEGIN{FS=":"}{print"lb="$1}'` ub=MAX_CHILDREN elif expr "$nc" : '[0-9][0-9]*:[0-9][0-9]*$' >/dev/null; then let `echo "$nc" | awk 'BEGIN{FS=":"}{print"lb="$1" ub="$2}'` if [ $ub -lt $lb ]; then echo "$kf:$lineno: error in range \`$nc': LB < UB (in definition of $k)" >&2 exit 1 fi else echo "$kf:$lineno: can't parse range \`$nc' in definition of $k" >&2 exit 1 fi metakind_lbchildren="${metakind_lbchildren} $lb, /* $k */" metakind_ubchildren="${metakind_ubchildren} $ub, /* $k */" } # Returns 0 if arg is a primitive C++ type, or a pointer to same; 1 # otherwise. Really all this does is check whether we should issue a # "not fully qualified" warning or not. function primitive_type { strip=`expr "$1" : ' *\(.*\)\* *'` if [ -n "$strip" ]; then primitive_type "$strip" >&2 return $? fi case "$1" in bool|int|size_t|long|void|char|float|double) return 0;; *) return 1;; esac } function check_theory_seen { if $seen_endtheory; then echo "$kf:$lineno: error: command after \"endtheory\" declaration (endtheory has to be last)" >&2 exit 1 fi if ! $seen_theory; then echo "$kf:$lineno: error: no \"theory\" declaration found (it has to be first)" >&2 exit 1 fi } function check_builtin_theory_seen { if ! $seen_theory_builtin; then echo "$me: warning: no declaration for the builtin theory found" >&2 fi } while [ $# -gt 0 ]; do kf=$1 seen_theory=false seen_endtheory=false b=$(basename $(dirname "$kf")) metakind_kinds="${metakind_kinds} /* from $b */ " metakind_operatorKinds="${metakind_operatorKinds} /* from $b */" source "$kf" if ! $seen_theory; then echo "$kf: error: no theory content found in file!" >&2 exit 1 fi if ! $seen_endtheory; then echo "$kf:$lineno: error: no \"endtheory\" declaration found (it is required at the end)" >&2 exit 1 fi shift done check_builtin_theory_seen ## output # generate warnings about incorrect #line annotations in templates nl -ba -s' ' "$template" | grep '^ *[0-9][0-9]* # *line' | awk '{OFS="";if($1+1!=$3) print "'"$template"':",$1,": warning: incorrect annotation \"#line ",$3,"\" (it should be \"#line ",($1+1),"\")"}' >&2 if [ -z "$theory_alternate_doc" ]; then theory_alternate_doc="[none defined]" fi text=$(cat "$template") for var in \ metakind_includes \ metakind_kinds \ metakind_constantMaps \ metakind_compares \ metakind_constHashes \ metakind_constPrinters \ metakind_constDeleters \ metakind_ubchildren \ metakind_lbchildren \ metakind_operatorKinds \ use_theory_validations \ theory_alternate_doc \ template \ ; do eval text="\${text//\\\$\\{$var\\}/\${$var}}" done error=`expr "$text" : '.*\${\([^}]*\)}.*'` if [ -n "$error" ]; then echo "$template:0: error: undefined replacement \${$error}" >&2 exit 1 fi echo "$text" cvc4-1.5/src/expr/node.cpp000066400000000000000000000111231313116454100154110ustar00rootroot00000000000000/********************* */ /*! \file node.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Reference-counted encapsulation of a pointer to node information. ** ** Reference-counted encapsulation of a pointer to node information. **/ #include "expr/node.h" #include #include #include "base/exception.h" #include "base/output.h" #include "expr/attribute.h" using namespace std; namespace CVC4 { TypeCheckingExceptionPrivate::TypeCheckingExceptionPrivate(TNode node, std::string message) throw() : Exception(message), d_node(new Node(node)) { #ifdef CVC4_DEBUG LastExceptionBuffer* current = LastExceptionBuffer::getCurrent(); if(current != NULL){ current->setContents(toString().c_str()); } #endif /* CVC4_DEBUG */ } TypeCheckingExceptionPrivate::~TypeCheckingExceptionPrivate() throw () { delete d_node; } void TypeCheckingExceptionPrivate::toStream(std::ostream& os) const throw() { os << "Error during type checking: " << d_msg << std::endl << *d_node << endl << "The ill-typed expression: " << *d_node; } NodeTemplate TypeCheckingExceptionPrivate::getNode() const throw() { return *d_node; } UnknownTypeException::UnknownTypeException(TNode n) throw() : TypeCheckingExceptionPrivate(n, "this expression contains an element of unknown type (such as an abstract value);" " its type cannot be computed until it is substituted away") { } /** Is this node constant? (and has that been computed yet?) */ struct IsConstTag { }; struct IsConstComputedTag { }; struct HasBoundVarTag { }; struct HasBoundVarComputedTag { }; typedef expr::Attribute IsConstAttr; typedef expr::Attribute IsConstComputedAttr; /** Attribute true for expressions with bound variables in them */ typedef expr::Attribute HasBoundVarAttr; typedef expr::Attribute HasBoundVarComputedAttr; template bool NodeTemplate::isConst() const { assertTNodeNotExpired(); Debug("isConst") << "Node::isConst() for: " << *this << std::endl; if(isNull()) { return false; } switch(getMetaKind()) { case kind::metakind::CONSTANT: Debug("isConst") << "Node::isConst() returning true, it's a CONSTANT" << std::endl; return true; case kind::metakind::VARIABLE: Debug("isConst") << "Node::isConst() returning false, it's a VARIABLE" << std::endl; return false; default: if(expr::TypeChecker::neverIsConst(NodeManager::currentNM(), *this)){ Debug("isConst") << "Node::isConst() returning false, the kind is never const" << std::endl; return false; } if(getAttribute(IsConstComputedAttr())) { bool bval = getAttribute(IsConstAttr()); Debug("isConst") << "Node::isConst() returning cached value " << (bval ? "true" : "false") << " for: " << *this << std::endl; return bval; } else { bool bval = expr::TypeChecker::computeIsConst(NodeManager::currentNM(), *this); Debug("isConst") << "Node::isConst() computed value " << (bval ? "true" : "false") << " for: " << *this << std::endl; const_cast< NodeTemplate* >(this)->setAttribute(IsConstAttr(), bval); const_cast< NodeTemplate* >(this)->setAttribute(IsConstComputedAttr(), true); return bval; } } } template bool NodeTemplate::hasBoundVar() { assertTNodeNotExpired(); if(! getAttribute(HasBoundVarComputedAttr())) { bool hasBv = false; if(getKind() == kind::BOUND_VARIABLE) { hasBv = true; } else { for(iterator i = begin(); i != end() && !hasBv; ++i) { hasBv = (*i).hasBoundVar(); } } setAttribute(HasBoundVarAttr(), hasBv); setAttribute(HasBoundVarComputedAttr(), true); Debug("bva") << *this << " has bva : " << getAttribute(HasBoundVarAttr()) << std::endl; return hasBv; } return getAttribute(HasBoundVarAttr()); } template bool NodeTemplate::isConst() const; template bool NodeTemplate::isConst() const; template bool NodeTemplate::hasBoundVar(); template bool NodeTemplate::hasBoundVar(); }/* CVC4 namespace */ cvc4-1.5/src/expr/node.h000066400000000000000000001416011313116454100150630ustar00rootroot00000000000000/********************* */ /*! \file node.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Reference-counted encapsulation of a pointer to node information ** ** Reference-counted encapsulation of a pointer to node information. **/ #include "cvc4_private.h" // circular dependency #include "expr/node_value.h" #ifndef __CVC4__NODE_H #define __CVC4__NODE_H #include #include #include #include #include #include #include #include "base/configuration.h" #include "base/cvc4_assert.h" #include "base/exception.h" #include "base/output.h" #include "expr/type.h" #include "expr/kind.h" #include "expr/metakind.h" #include "expr/expr.h" #include "expr/expr_iomanip.h" #include "options/language.h" #include "options/set_language.h" #include "util/utility.h" #include "util/hash.h" namespace CVC4 { class TypeNode; class NodeManager; namespace expr { namespace pickle { class PicklerPrivate; }/* CVC4::expr::pickle namespace */ }/* CVC4::expr namespace */ template class NodeTemplate; /** * Exception thrown during the type-checking phase, it can be * thrown by node.getType(). */ class TypeCheckingExceptionPrivate : public Exception { private: /** The node responsible for the failure */ NodeTemplate* d_node; public: /** * Construct the exception with the problematic node and the message * @param node the problematic node * @param message the message explaining the failure */ TypeCheckingExceptionPrivate(NodeTemplate node, std::string message) throw(); /** Destructor */ ~TypeCheckingExceptionPrivate() throw (); /** * Get the Node that caused the type-checking to fail. * @return the node */ NodeTemplate getNode() const throw(); /** * Returns the message corresponding to the type-checking failure. * We prefer toStream() to toString() because that keeps the expr-depth * and expr-language settings present in the stream. */ void toStream(std::ostream& out) const throw(); };/* class TypeCheckingExceptionPrivate */ class UnknownTypeException : public TypeCheckingExceptionPrivate { public: UnknownTypeException(NodeTemplate node) throw(); };/* class UnknownTypeException */ /** * \typedef NodeTemplate Node; * * The Node class encapsulates the NodeValue with reference counting. * * One should use generally use Nodes to manipulate expressions, to be safe. * Every outstanding Node that references a NodeValue is counted in that * NodeValue's reference count. Reference counts are maintained correctly * on assignment of the Node object (to point to another NodeValue), and, * upon destruction of the Node object, the NodeValue's reference count is * decremented and, if zero, it becomes eligible for reclamation by the * system. */ typedef NodeTemplate Node; /** * \typedef NodeTemplate TNode; * * The TNode class encapsulates the NodeValue but doesn't count references. * * TNodes are just like Nodes, but they don't update the reference count. * Therefore, there is less overhead (copying a TNode is just the cost of * the underlying pointer copy). Generally speaking, this is unsafe! * However, there are certain situations where a TNode can be used safely. * * The largest class of uses for TNodes are when you need to use them in a * "temporary," scoped fashion (hence the "T" in "TNode"). In general, * it is safe to use TNode as a function parameter type, since the calling * function (or some other function on the call stack) presumably has a Node * reference to the expression data. It is generally _not_ safe, however, * to return a TNode _from_ a function. (Functions that return Nodes often * create the expression they return; such new expressions may not be * referenced on the call stack, and have a reference count of 1 on * creation. If this is returned as a TNode rather than a Node, the * count drops to zero, marking the expression as eligible for reclamation.) * * More guidelines on when to use TNodes is available in the CVC4 * Developer's Guide: * http://goedel.cims.nyu.edu/wiki/Developer%27s_Guide#Dealing_with_expressions_.28Nodes_and_TNodes.29 */ typedef NodeTemplate TNode; namespace expr { class NodeValue; namespace attr { class AttributeManager; struct SmtAttributes; }/* CVC4::expr::attr namespace */ class ExprSetDepth; }/* CVC4::expr namespace */ namespace kind { namespace metakind { struct NodeValueConstPrinter; }/* CVC4::kind::metakind namespace */ }/* CVC4::kind namespace */ // for hash_maps, hash_sets.. struct NodeHashFunction { inline size_t operator()(Node node) const; };/* struct NodeHashFunction */ struct TNodeHashFunction { inline size_t operator()(TNode node) const; };/* struct TNodeHashFunction */ /** * Encapsulation of an NodeValue pointer. The reference count is * maintained in the NodeValue if ref_count is true. * @param ref_count if true reference are counted in the NodeValue */ template class NodeTemplate { /** * The NodeValue has access to the private constructors, so that the * iterators can can create new nodes. */ friend class expr::NodeValue; friend class expr::pickle::PicklerPrivate; friend class expr::ExportPrivate; /** A convenient null-valued encapsulated pointer */ static NodeTemplate s_null; /** The referenced NodeValue */ expr::NodeValue* d_nv; /** * This constructor is reserved for use by the NodeTemplate package; one * must construct an NodeTemplate using one of the build mechanisms of the * NodeTemplate package. * * FIXME: there's a type-system escape here to cast away the const, * since the refcount needs to be updated. But conceptually Nodes * don't change their arguments, and it's nice to have * const_iterators over them. * * This really does needs to be explicit to avoid hard to track errors with * Nodes implicitly wrapping NodeValues */ explicit NodeTemplate(const expr::NodeValue*); friend class NodeTemplate; friend class NodeTemplate; friend class TypeNode; friend class NodeManager; template friend class NodeBuilder; friend class ::CVC4::expr::attr::AttributeManager; friend struct ::CVC4::expr::attr::SmtAttributes; friend struct ::CVC4::kind::metakind::NodeValueConstPrinter; /** * Assigns the expression value and does reference counting. No assumptions * are made on the expression, and should only be used if we know what we * are doing. * * @param ev the expression value to assign */ void assignNodeValue(expr::NodeValue* ev); inline void assertTNodeNotExpired() const throw(AssertionException) { if(!ref_count) { Assert( d_nv->d_rc > 0, "TNode pointing to an expired NodeValue" ); } } public: /** * Cache-aware, recursive version of substitute() used by the public * member function with a similar signature. */ Node substitute(TNode node, TNode replacement, std::hash_map& cache) const; /** * Cache-aware, recursive version of substitute() used by the public * member function with a similar signature. */ template Node substitute(Iterator1 nodesBegin, Iterator1 nodesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd, std::hash_map& cache) const; /** * Cache-aware, recursive version of substitute() used by the public * member function with a similar signature. */ template Node substitute(Iterator substitutionsBegin, Iterator substitutionsEnd, std::hash_map& cache) const; /** Default constructor, makes a null expression. */ NodeTemplate() : d_nv(&expr::NodeValue::null()) { } /** * Conversion between nodes that are reference-counted and those that are * not. * @param node the node to make copy of */ NodeTemplate(const NodeTemplate& node); /** * Copy constructor. Note that GCC does NOT recognize an instantiation of * the above template as a copy constructor and problems ensue. So we * provide an explicit one here. * @param node the node to make copy of */ NodeTemplate(const NodeTemplate& node); /** * Allow Exprs to become Nodes. This permits flexible translation of * Exprs -> Nodes inside the CVC4 library without exposing a toNode() * function in the public interface, or requiring lots of "friend" * relationships. */ NodeTemplate(const Expr& e); /** * Assignment operator for nodes, copies the relevant information from node * to this node. * @param node the node to copy * @return reference to this node */ NodeTemplate& operator=(const NodeTemplate& node); /** * Assignment operator for nodes, copies the relevant information from node * to this node. * @param node the node to copy * @return reference to this node */ NodeTemplate& operator=(const NodeTemplate& node); /** * Destructor. If ref_count is true it will decrement the reference count * and, if zero, collect the NodeValue. */ ~NodeTemplate(); /** * Return the null node. * @return the null node */ static NodeTemplate null() { return s_null; } /** * Returns true if this expression is a null expression. * @return true if null */ bool isNull() const { assertTNodeNotExpired(); return d_nv == &expr::NodeValue::null(); } /** * Structural comparison operator for expressions. * @param node the node to compare to * @return true if expressions are equal, false otherwise */ template bool operator==(const NodeTemplate& node) const { assertTNodeNotExpired(); node.assertTNodeNotExpired(); return d_nv == node.d_nv; } /** * Structural comparison operator for expressions. * @param node the node to compare to * @return false if expressions are equal, true otherwise */ template bool operator!=(const NodeTemplate& node) const { assertTNodeNotExpired(); node.assertTNodeNotExpired(); return d_nv != node.d_nv; } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * @param node the node to compare to * @return true if this expression is smaller */ template inline bool operator<(const NodeTemplate& node) const { assertTNodeNotExpired(); node.assertTNodeNotExpired(); return d_nv->d_id < node.d_nv->d_id; } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * @param node the node to compare to * @return true if this expression is greater */ template inline bool operator>(const NodeTemplate& node) const { assertTNodeNotExpired(); node.assertTNodeNotExpired(); return d_nv->d_id > node.d_nv->d_id; } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * @param node the node to compare to * @return true if this expression is smaller than or equal to */ template inline bool operator<=(const NodeTemplate& node) const { assertTNodeNotExpired(); node.assertTNodeNotExpired(); return d_nv->d_id <= node.d_nv->d_id; } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * @param node the node to compare to * @return true if this expression is greater than or equal to */ template inline bool operator>=(const NodeTemplate& node) const { assertTNodeNotExpired(); node.assertTNodeNotExpired(); return d_nv->d_id >= node.d_nv->d_id; } /** * Returns the i-th child of this node. * @param i the index of the child * @return the node representing the i-th child */ NodeTemplate operator[](int i) const { assertTNodeNotExpired(); return NodeTemplate(d_nv->getChild(i)); } /* A note on isAtomic() and isAtomicFormula() (in CVC3 parlance).. * * It has been decided for now to hold off on implementations of * these functions, as they may only be needed in CNF conversion, * where it's pointless to do a lazy isAtomic determination by * searching through the DAG, and storing it, since the result will * only be used once. For more details see the 4/27/2010 CVC4 * developer's meeting notes at: * * http://goedel.cims.nyu.edu/wiki/Meeting_Minutes_-_April_27,_2010#isAtomic.28.29_and_isAtomicFormula.28.29 */ // bool containsDecision(); // is "atomic" // bool properlyContainsDecision(); // maybe not atomic but all children are /** * Returns true iff this node contains a bound variable. This bound * variable may or may not be free. * @return true iff this node contains a bound variable. */ bool hasBoundVar(); /** * Convert this Node into an Expr using the currently-in-scope * manager. Essentially this is like an "operator Expr()" but we * don't want it to compete with implicit conversions between e.g. * Node and TNode, and we want internal-to-external interface * (Node -> Expr) points to be explicit. We could write an * explicit Expr(Node) constructor---but that dirties the public * interface. */ inline Expr toExpr() const; /** * Convert an Expr into a Node. */ static inline Node fromExpr(const Expr& e); /** * Returns true if this node represents a constant * @return true if const */ bool isConst() const; /** * Returns true if this node represents a variable */ inline bool isVar() const { assertTNodeNotExpired(); return getMetaKind() == kind::metakind::VARIABLE; } /** * Returns true if this node represents a nullary operator */ inline bool isNullaryOp() const { assertTNodeNotExpired(); return getMetaKind() == kind::metakind::NULLARY_OPERATOR; } inline bool isClosure() const { assertTNodeNotExpired(); return getKind() == kind::LAMBDA || getKind() == kind::FORALL || getKind() == kind::EXISTS || getKind() == kind::REWRITE_RULE; } /** * Returns the unique id of this node * @return the ud */ unsigned long getId() const { assertTNodeNotExpired(); return d_nv->getId(); } /** * Returns a node representing the operator of this expression. * If this is an APPLY, then the operator will be a functional term. * Otherwise, it will be a node with kind BUILTIN. */ NodeTemplate getOperator() const; /** * Returns true if the node has an operator (i.e., it's not a * variable or a constant). */ inline bool hasOperator() const; /** * Get the type for the node and optionally do type checking. * * Initial type computation will be near-constant time if * type checking is not requested. Results are memoized, so that * subsequent calls to getType() without type checking will be * constant time. * * Initial type checking is linear in the size of the expression. * Again, the results are memoized, so that subsequent calls to * getType(), with or without type checking, will be constant * time. * * NOTE: A TypeCheckingException can be thrown even when type * checking is not requested. getType() will always return a * valid and correct type and, thus, an exception will be thrown * when no valid or correct type can be computed (e.g., if the * arguments to a bit-vector operation aren't bit-vectors). When * type checking is not requested, getType() will do the minimum * amount of checking required to return a valid result. * * @param check whether we should check the type as we compute it * (default: false) */ TypeNode getType(bool check = false) const throw (CVC4::TypeCheckingExceptionPrivate, CVC4::AssertionException); /** * Substitution of Nodes. */ Node substitute(TNode node, TNode replacement) const; /** * Simultaneous substitution of Nodes. Elements in the Iterator1 * range will be replaced by their corresponding element in the * Iterator2 range. Both ranges should have the same size. */ template Node substitute(Iterator1 nodesBegin, Iterator1 nodesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd) const; /** * Simultaneous substitution of Nodes. Iterators should be over * pairs (x,y) for the rewrites [x->y]. */ template Node substitute(Iterator substitutionsBegin, Iterator substitutionsEnd) const; /** * Returns the kind of this node. * @return the kind */ inline Kind getKind() const { assertTNodeNotExpired(); return Kind(d_nv->d_kind); } /** * Returns the metakind of this node. * @return the metakind */ inline kind::MetaKind getMetaKind() const { assertTNodeNotExpired(); return kind::metaKindOf(getKind()); } /** * Returns the number of children this node has. * @return the number of children */ inline size_t getNumChildren() const; /** * If this is a CONST_* Node, extract the constant from it. */ template inline const T& getConst() const; /** * Returns the reference count of this node. * @return the refcount */ unsigned getRefCount() const { return d_nv->getRefCount(); } /** * Returns the value of the given attribute that this has been attached. * @param attKind the kind of the attribute * @return the value of the attribute */ template inline typename AttrKind::value_type getAttribute(const AttrKind& attKind) const; // Note that there are two, distinct hasAttribute() declarations for // a reason (rather than using a pointer-valued argument with a // default value): they permit more optimized code in the underlying // hasAttribute() implementations. /** * Returns true if this node has been associated an attribute of given kind. * Additionaly, if a pointer to the value_kind is give, and the attribute * value has been set for this node, it will be returned. * @param attKind the kind of the attribute * @return true if this node has the requested attribute */ template inline bool hasAttribute(const AttrKind& attKind) const; /** * Returns true if this node has been associated an attribute of given kind. * Additionaly, if a pointer to the value_kind is give, and the attribute * value has been set for this node, it will be returned. * @param attKind the kind of the attribute * @param value where to store the value if it exists * @return true if this node has the requested attribute */ template inline bool getAttribute(const AttrKind& attKind, typename AttrKind::value_type& value) const; /** * Sets the given attribute of this node to the given value. * @param attKind the kind of the atribute * @param value the value to set the attribute to */ template inline void setAttribute(const AttrKind& attKind, const typename AttrKind::value_type& value); /** Iterator allowing for scanning through the children. */ typedef typename expr::NodeValue::iterator< NodeTemplate > iterator; /** Constant iterator allowing for scanning through the children. */ typedef typename expr::NodeValue::iterator< NodeTemplate > const_iterator; class kinded_iterator { friend class NodeTemplate; NodeTemplate d_node; ssize_t d_child; kinded_iterator(TNode node, ssize_t child) : d_node(node), d_child(child) { } // These are factories to serve as clients to Node::begin() and // Node::end(). static kinded_iterator begin(TNode n, Kind k) { return kinded_iterator(n, n.getKind() == k ? 0 : -2); } static kinded_iterator end(TNode n, Kind k) { return kinded_iterator(n, n.getKind() == k ? n.getNumChildren() : -1); } public: typedef NodeTemplate value_type; typedef std::ptrdiff_t difference_type; typedef NodeTemplate* pointer; typedef NodeTemplate& reference; kinded_iterator() : d_node(NodeTemplate::null()), d_child(-2) { } kinded_iterator(const kinded_iterator& i) : d_node(i.d_node), d_child(i.d_child) { } NodeTemplate operator*() { return d_child < 0 ? d_node : d_node[d_child]; } bool operator==(const kinded_iterator& i) { return d_node == i.d_node && d_child == i.d_child; } bool operator!=(const kinded_iterator& i) { return !(*this == i); } kinded_iterator& operator++() { if(d_child != -1) { ++d_child; } return *this; } kinded_iterator operator++(int) { kinded_iterator i = *this; ++*this; return i; } };/* class NodeTemplate::kinded_iterator */ typedef kinded_iterator const_kinded_iterator; /** * Returns the iterator pointing to the first child. * @return the iterator */ inline iterator begin() { assertTNodeNotExpired(); return d_nv->begin< NodeTemplate >(); } /** * Returns the iterator pointing to the end of the children (one beyond the * last one). * @return the end of the children iterator. */ inline iterator end() { assertTNodeNotExpired(); return d_nv->end< NodeTemplate >(); } /** * Returns the iterator pointing to the first child, if the node's * kind is the same as the parameter, otherwise returns the iterator * pointing to the node itself. This is useful if you want to * pretend to iterate over a "unary" PLUS, for instance, since unary * PLUSes don't exist---begin(PLUS) will give an iterator over the * children if the node's a PLUS node, otherwise give an iterator * over the node itself, as if it were a unary PLUS. * @param kind the kind to match * @return the kinded_iterator iterating over this Node (if its kind * is not the passed kind) or its children */ inline kinded_iterator begin(Kind kind) { assertTNodeNotExpired(); return kinded_iterator::begin(*this, kind); } /** * Returns the iterator pointing to the end of the children (one * beyond the last one), if the node's kind is the same as the * parameter, otherwise returns the iterator pointing to the * one-of-the-node-itself. This is useful if you want to pretend to * iterate over a "unary" PLUS, for instance, since unary PLUSes * don't exist---begin(PLUS) will give an iterator over the children * if the node's a PLUS node, otherwise give an iterator over the * node itself, as if it were a unary PLUS. * @param kind the kind to match * @return the kinded_iterator pointing off-the-end of this Node (if * its kind is not the passed kind) or off-the-end of its children */ inline kinded_iterator end(Kind kind) { assertTNodeNotExpired(); return kinded_iterator::end(*this, kind); } /** * Returns the const_iterator pointing to the first child. * @return the const_iterator */ inline const_iterator begin() const { assertTNodeNotExpired(); return d_nv->begin< NodeTemplate >(); } /** * Returns the const_iterator pointing to the end of the children (one * beyond the last one. * @return the end of the children const_iterator. */ inline const_iterator end() const { assertTNodeNotExpired(); return d_nv->end< NodeTemplate >(); } /** * Returns the iterator pointing to the first child, if the node's * kind is the same as the parameter, otherwise returns the iterator * pointing to the node itself. This is useful if you want to * pretend to iterate over a "unary" PLUS, for instance, since unary * PLUSes don't exist---begin(PLUS) will give an iterator over the * children if the node's a PLUS node, otherwise give an iterator * over the node itself, as if it were a unary PLUS. * @param kind the kind to match * @return the kinded_iterator iterating over this Node (if its kind * is not the passed kind) or its children */ inline const_kinded_iterator begin(Kind kind) const { assertTNodeNotExpired(); return const_kinded_iterator::begin(*this, kind); } /** * Returns the iterator pointing to the end of the children (one * beyond the last one), if the node's kind is the same as the * parameter, otherwise returns the iterator pointing to the * one-of-the-node-itself. This is useful if you want to pretend to * iterate over a "unary" PLUS, for instance, since unary PLUSes * don't exist---begin(PLUS) will give an iterator over the children * if the node's a PLUS node, otherwise give an iterator over the * node itself, as if it were a unary PLUS. * @param kind the kind to match * @return the kinded_iterator pointing off-the-end of this Node (if * its kind is not the passed kind) or off-the-end of its children */ inline const_kinded_iterator end(Kind kind) const { assertTNodeNotExpired(); return const_kinded_iterator::end(*this, kind); } /** * Converts this node into a string representation. * @return the string representation of this node. */ inline std::string toString() const { assertTNodeNotExpired(); return d_nv->toString(); } /** * Converts this node into a string representation and sends it to the * given stream * * @param out the stream to serialize this node to * @param toDepth the depth to which to print this expression, or -1 to * print it fully * @param types set to true to ascribe types to the output expressions * (might break language compliance, but good for debugging expressions) * @param language the language in which to output */ inline void toStream(std::ostream& out, int toDepth = -1, bool types = false, size_t dag = 1, OutputLanguage language = language::output::LANG_AUTO) const { assertTNodeNotExpired(); d_nv->toStream(out, toDepth, types, dag, language); } /** * IOStream manipulator to set the maximum depth of Nodes when * pretty-printing. -1 means print to any depth. E.g.: * * // let a, b, c, and d be VARIABLEs * Node n = nm->mkNode(OR, a, b, nm->mkNode(AND, c, nm->mkNode(NOT, d))) * out << setdepth(3) << n; * * gives "(OR a b (AND c (NOT d)))", but * * out << setdepth(1) << [same node as above] * * gives "(OR a b (...))" */ typedef expr::ExprSetDepth setdepth; /** * IOStream manipulator to print type ascriptions or not. * * // let a, b, c, and d be variables of sort U * Node n = nm->mkNode(OR, a, b, nm->mkNode(AND, c, nm->mkNode(NOT, d))) * out << n; * * gives "(OR a:U b:U (AND c:U (NOT d:U)))", but */ typedef expr::ExprPrintTypes printtypes; /** * IOStream manipulator to print expressions as DAGs (or not). */ typedef expr::ExprDag dag; /** * IOStream manipulator to set the output language for Exprs. */ typedef language::SetLanguage setlanguage; /** * Very basic pretty printer for Node. * @param out output stream to print to. * @param indent number of spaces to indent the formula by. */ inline void printAst(std::ostream& out, int indent = 0) const; /** * Check if the node has a subterm t. */ inline bool hasSubterm(NodeTemplate t, bool strict = false) const; template NodeTemplate eqNode(const NodeTemplate& right) const; NodeTemplate notNode() const; NodeTemplate negate() const; template NodeTemplate andNode(const NodeTemplate& right) const; template NodeTemplate orNode(const NodeTemplate& right) const; template NodeTemplate iteNode(const NodeTemplate& thenpart, const NodeTemplate& elsepart) const; template NodeTemplate impNode(const NodeTemplate& right) const; template NodeTemplate xorNode(const NodeTemplate& right) const; };/* class NodeTemplate */ /** * Serializes a given node to the given stream. * * @param out the output stream to use * @param n the node to output to the stream * @return the stream */ inline std::ostream& operator<<(std::ostream& out, TNode n) { n.toStream(out, Node::setdepth::getDepth(out), Node::printtypes::getPrintTypes(out), Node::dag::getDag(out), Node::setlanguage::getLanguage(out)); return out; } /** * Serializes a vector of node to the given stream. * * @param out the output stream to use * @param ns the vector of nodes to output to the stream * @return the stream */ template inline std::ostream& operator<<(std::ostream& out, const std::vector< NodeTemplate > & ns) { for(typename std::vector< NodeTemplate >::const_iterator i=ns.begin(), end=ns.end(); i != end; ++i){ out << *i; } return out; } }/* CVC4 namespace */ #include //#include "expr/attribute.h" #include "expr/node_manager.h" #include "expr/type_checker.h" namespace CVC4 { inline size_t NodeHashFunction::operator()(Node node) const { return node.getId(); } inline size_t TNodeHashFunction::operator()(TNode node) const { return node.getId(); } struct TNodePairHashFunction { size_t operator()(const std::pair& pair ) const { TNode n1 = pair.first; TNode n2 = pair.second; return (size_t) (n1.getId() * 0x9e3779b9 + n2.getId()); } };/* struct TNodePairHashFunction */ template inline size_t NodeTemplate::getNumChildren() const { assertTNodeNotExpired(); return d_nv->getNumChildren(); } template template inline const T& NodeTemplate::getConst() const { assertTNodeNotExpired(); return d_nv->getConst(); } template template inline typename AttrKind::value_type NodeTemplate:: getAttribute(const AttrKind&) const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); assertTNodeNotExpired(); return NodeManager::currentNM()->getAttribute(*this, AttrKind()); } template template inline bool NodeTemplate:: hasAttribute(const AttrKind&) const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); assertTNodeNotExpired(); return NodeManager::currentNM()->hasAttribute(*this, AttrKind()); } template template inline bool NodeTemplate::getAttribute(const AttrKind&, typename AttrKind::value_type& ret) const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); assertTNodeNotExpired(); return NodeManager::currentNM()->getAttribute(*this, AttrKind(), ret); } template template inline void NodeTemplate:: setAttribute(const AttrKind&, const typename AttrKind::value_type& value) { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); assertTNodeNotExpired(); NodeManager::currentNM()->setAttribute(*this, AttrKind(), value); } template NodeTemplate NodeTemplate::s_null(&expr::NodeValue::null()); // FIXME: escape from type system convenient but is there a better // way? Nodes conceptually don't change their expr values but of // course they do modify the refcount. But it's nice to be able to // support node_iterators over const NodeValue*. So.... hm. template NodeTemplate::NodeTemplate(const expr::NodeValue* ev) : d_nv(const_cast (ev)) { Assert(d_nv != NULL, "Expecting a non-NULL expression value!"); if(ref_count) { d_nv->inc(); } else { Assert(d_nv->d_rc > 0 || d_nv == &expr::NodeValue::null(), "TNode constructed from NodeValue with rc == 0"); } } // the code for these two following constructors ("conversion/copy // constructors") is identical, but we need both. see comment in the // class. template NodeTemplate::NodeTemplate(const NodeTemplate& e) { Assert(e.d_nv != NULL, "Expecting a non-NULL expression value!"); d_nv = e.d_nv; if(ref_count) { Assert(d_nv->d_rc > 0, "Node constructed from TNode with rc == 0"); d_nv->inc(); } else { // shouldn't ever fail Assert(d_nv->d_rc > 0, "TNode constructed from Node with rc == 0"); } } template NodeTemplate::NodeTemplate(const NodeTemplate& e) { Assert(e.d_nv != NULL, "Expecting a non-NULL expression value!"); d_nv = e.d_nv; if(ref_count) { // shouldn't ever fail Assert(d_nv->d_rc > 0, "Node constructed from Node with rc == 0"); d_nv->inc(); } else { Assert(d_nv->d_rc > 0, "TNode constructed from TNode with rc == 0"); } } template NodeTemplate::NodeTemplate(const Expr& e) { Assert(e.d_node != NULL, "Expecting a non-NULL expression value!"); Assert(e.d_node->d_nv != NULL, "Expecting a non-NULL expression value!"); d_nv = e.d_node->d_nv; // shouldn't ever fail Assert(d_nv->d_rc > 0, "Node constructed from Expr with rc == 0"); if(ref_count) { d_nv->inc(); } } template NodeTemplate::~NodeTemplate() { Assert(d_nv != NULL, "Expecting a non-NULL expression value!"); if(ref_count) { // shouldn't ever fail Assert(d_nv->d_rc > 0, "Node reference count would be negative"); d_nv->dec(); } } template void NodeTemplate::assignNodeValue(expr::NodeValue* ev) { d_nv = ev; if(ref_count) { d_nv->inc(); } else { Assert(d_nv->d_rc > 0, "TNode assigned to NodeValue with rc == 0"); } } template NodeTemplate& NodeTemplate:: operator=(const NodeTemplate& e) { Assert(d_nv != NULL, "Expecting a non-NULL expression value!"); Assert(e.d_nv != NULL, "Expecting a non-NULL expression value on RHS!"); if(__builtin_expect( ( d_nv != e.d_nv ), true )) { if(ref_count) { // shouldn't ever fail Assert(d_nv->d_rc > 0, "Node reference count would be negative"); d_nv->dec(); } d_nv = e.d_nv; if(ref_count) { // shouldn't ever fail Assert(d_nv->d_rc > 0, "Node assigned from Node with rc == 0"); d_nv->inc(); } else { Assert(d_nv->d_rc > 0, "TNode assigned from TNode with rc == 0"); } } return *this; } template NodeTemplate& NodeTemplate:: operator=(const NodeTemplate& e) { Assert(d_nv != NULL, "Expecting a non-NULL expression value!"); Assert(e.d_nv != NULL, "Expecting a non-NULL expression value on RHS!"); if(__builtin_expect( ( d_nv != e.d_nv ), true )) { if(ref_count) { // shouldn't ever fail Assert(d_nv->d_rc > 0, "Node reference count would be negative"); d_nv->dec(); } d_nv = e.d_nv; if(ref_count) { Assert(d_nv->d_rc > 0, "Node assigned from TNode with rc == 0"); d_nv->inc(); } else { // shouldn't ever happen Assert(d_nv->d_rc > 0, "TNode assigned from Node with rc == 0"); } } return *this; } template template NodeTemplate NodeTemplate::eqNode(const NodeTemplate& right) const { assertTNodeNotExpired(); return NodeManager::currentNM()->mkNode(kind::EQUAL, *this, right); } template NodeTemplate NodeTemplate::notNode() const { assertTNodeNotExpired(); return NodeManager::currentNM()->mkNode(kind::NOT, *this); } template NodeTemplate NodeTemplate::negate() const { assertTNodeNotExpired(); return (getKind() == kind::NOT) ? NodeTemplate(d_nv->getChild(0)) : NodeManager::currentNM()->mkNode(kind::NOT, *this); } template template NodeTemplate NodeTemplate::andNode(const NodeTemplate& right) const { assertTNodeNotExpired(); return NodeManager::currentNM()->mkNode(kind::AND, *this, right); } template template NodeTemplate NodeTemplate::orNode(const NodeTemplate& right) const { assertTNodeNotExpired(); return NodeManager::currentNM()->mkNode(kind::OR, *this, right); } template template NodeTemplate NodeTemplate::iteNode(const NodeTemplate& thenpart, const NodeTemplate& elsepart) const { assertTNodeNotExpired(); return NodeManager::currentNM()->mkNode(kind::ITE, *this, thenpart, elsepart); } template template NodeTemplate NodeTemplate::impNode(const NodeTemplate& right) const { assertTNodeNotExpired(); return NodeManager::currentNM()->mkNode(kind::IMPLIES, *this, right); } template template NodeTemplate NodeTemplate::xorNode(const NodeTemplate& right) const { assertTNodeNotExpired(); return NodeManager::currentNM()->mkNode(kind::XOR, *this, right); } template inline void NodeTemplate::printAst(std::ostream& out, int indent) const { assertTNodeNotExpired(); d_nv->printAst(out, indent); } /** * Returns a node representing the operator of this expression. * If this is an APPLY, then the operator will be a functional term. * Otherwise, it will be a node with kind BUILTIN. */ template NodeTemplate NodeTemplate::getOperator() const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); assertTNodeNotExpired(); switch(kind::MetaKind mk = getMetaKind()) { case kind::metakind::INVALID: IllegalArgument(*this, "getOperator() called on Node with INVALID-kinded kind"); case kind::metakind::VARIABLE: IllegalArgument(*this, "getOperator() called on Node with VARIABLE-kinded kind"); case kind::metakind::OPERATOR: { /* Returns a BUILTIN node. */ return NodeManager::currentNM()->operatorOf(getKind()); } case kind::metakind::PARAMETERIZED: /* The operator is the first child. */ return Node(d_nv->d_children[0]); case kind::metakind::CONSTANT: IllegalArgument(*this, "getOperator() called on Node with CONSTANT-kinded kind"); case kind::metakind::NULLARY_OPERATOR: IllegalArgument(*this, "getOperator() called on Node with NULLARY_OPERATOR-kinded kind"); default: Unhandled(mk); } } /** * Returns true if the node has an operator (i.e., it's not a variable * or a constant). */ template inline bool NodeTemplate::hasOperator() const { assertTNodeNotExpired(); return NodeManager::hasOperator(getKind()); } template TypeNode NodeTemplate::getType(bool check) const throw (CVC4::TypeCheckingExceptionPrivate, CVC4::AssertionException) { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); assertTNodeNotExpired(); return NodeManager::currentNM()->getType(*this, check); } template inline Node NodeTemplate::substitute(TNode node, TNode replacement) const { if (node == *this) { return replacement; } std::hash_map cache; return substitute(node, replacement, cache); } template Node NodeTemplate::substitute(TNode node, TNode replacement, std::hash_map& cache) const { Assert(node != *this); if (getNumChildren() == 0) { return *this; } // in cache? typename std::hash_map::const_iterator i = cache.find(*this); if(i != cache.end()) { return (*i).second; } // otherwise compute NodeBuilder<> nb(getKind()); if(getMetaKind() == kind::metakind::PARAMETERIZED) { // push the operator if(getOperator() == node) { nb << replacement; } else { nb << getOperator().substitute(node, replacement, cache); } } for(const_iterator i = begin(), iend = end(); i != iend; ++i) { if(*i == node) { nb << replacement; } else { nb << (*i).substitute(node, replacement, cache); } } // put in cache Node n = nb; Assert(node != n); cache[*this] = n; return n; } template template inline Node NodeTemplate::substitute(Iterator1 nodesBegin, Iterator1 nodesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd) const { std::hash_map cache; return substitute(nodesBegin, nodesEnd, replacementsBegin, replacementsEnd, cache); } template template Node NodeTemplate::substitute(Iterator1 nodesBegin, Iterator1 nodesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd, std::hash_map& cache) const { // in cache? typename std::hash_map::const_iterator i = cache.find(*this); if(i != cache.end()) { return (*i).second; } // otherwise compute Assert( std::distance(nodesBegin, nodesEnd) == std::distance(replacementsBegin, replacementsEnd), "Substitution iterator ranges must be equal size" ); Iterator1 j = find(nodesBegin, nodesEnd, TNode(*this)); if(j != nodesEnd) { Iterator2 b = replacementsBegin; std::advance(b, std::distance(nodesBegin, j)); Node n = *b; cache[*this] = n; return n; } else if(getNumChildren() == 0) { cache[*this] = *this; return *this; } else { NodeBuilder<> nb(getKind()); if(getMetaKind() == kind::metakind::PARAMETERIZED) { // push the operator nb << getOperator().substitute(nodesBegin, nodesEnd, replacementsBegin, replacementsEnd, cache); } for(const_iterator i = begin(), iend = end(); i != iend; ++i) { nb << (*i).substitute(nodesBegin, nodesEnd, replacementsBegin, replacementsEnd, cache); } Node n = nb; cache[*this] = n; return n; } } template template inline Node NodeTemplate::substitute(Iterator substitutionsBegin, Iterator substitutionsEnd) const { std::hash_map cache; return substitute(substitutionsBegin, substitutionsEnd, cache); } template template Node NodeTemplate::substitute(Iterator substitutionsBegin, Iterator substitutionsEnd, std::hash_map& cache) const { // in cache? typename std::hash_map::const_iterator i = cache.find(*this); if(i != cache.end()) { return (*i).second; } // otherwise compute Iterator j = find_if(substitutionsBegin, substitutionsEnd, bind2nd(first_equal_to(), *this)); if(j != substitutionsEnd) { Node n = (*j).second; cache[*this] = n; return n; } else if(getNumChildren() == 0) { cache[*this] = *this; return *this; } else { NodeBuilder<> nb(getKind()); if(getMetaKind() == kind::metakind::PARAMETERIZED) { // push the operator nb << getOperator().substitute(substitutionsBegin, substitutionsEnd, cache); } for(const_iterator i = begin(), iend = end(); i != iend; ++i) { nb << (*i).substitute(substitutionsBegin, substitutionsEnd, cache); } Node n = nb; cache[*this] = n; return n; } } template inline Expr NodeTemplate::toExpr() const { assertTNodeNotExpired(); return NodeManager::currentNM()->toExpr(*this); } // intentionally not defined for TNode template <> inline Node NodeTemplate::fromExpr(const Expr& e) { return NodeManager::fromExpr(e); } template bool NodeTemplate::hasSubterm(NodeTemplate t, bool strict) const { typedef std::hash_set node_set; if (!strict && *this == t) { return true; } node_set visited; std::vector toProcess; toProcess.push_back(*this); for (unsigned i = 0; i < toProcess.size(); ++ i) { TNode current = toProcess[i]; for(unsigned j = 0, j_end = current.getNumChildren(); j < j_end; ++ j) { TNode child = current[j]; if (child == t) { return true; } if (visited.find(child) != visited.end()) { continue; } else { visited.insert(child); toProcess.push_back(child); } } } return false; } #ifdef CVC4_DEBUG /** * Pretty printer for use within gdb. This is not intended to be used * outside of gdb. This writes to the Warning() stream and immediately * flushes the stream. * * Note that this function cannot be a template, since the compiler * won't instantiate it. Even if we explicitly instantiate. (Odd?) * So we implement twice. We mark as __attribute__((used)) so that * GCC emits code for it even though static analysis indicates it's * never called. * * Tim's Note: I moved this into the node.h file because this allows gdb * to find the symbol, and use it, which is the first standard this code needs * to meet. A cleaner solution is welcomed. */ static void __attribute__((used)) debugPrintNode(const NodeTemplate& n) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(true) << Node::setlanguage(language::output::LANG_AST) << n << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintNodeNoDag(const NodeTemplate& n) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(false) << Node::setlanguage(language::output::LANG_AST) << n << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintRawNode(const NodeTemplate& n) { n.printAst(Warning(), 0); Warning().flush(); } static void __attribute__((used)) debugPrintTNode(const NodeTemplate& n) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(true) << Node::setlanguage(language::output::LANG_AST) << n << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintTNodeNoDag(const NodeTemplate& n) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(false) << Node::setlanguage(language::output::LANG_AST) << n << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintRawTNode(const NodeTemplate& n) { n.printAst(Warning(), 0); Warning().flush(); } #endif /* CVC4_DEBUG */ }/* CVC4 namespace */ #endif /* __CVC4__NODE_H */ cvc4-1.5/src/expr/node_builder.h000066400000000000000000001374121313116454100165760ustar00rootroot00000000000000/********************* */ /*! \file node_builder.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Christopher L. Conway ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A builder interface for Nodes. ** ** A builder interface for Nodes. ** ** The idea is to permit a flexible and efficient (in the common ** case) interface for building Nodes. The general pattern of use is ** to create a NodeBuilder, set its kind, append children to it, then ** "extract" the resulting Node. This resulting Node may be one that ** already exists (the NodeManager keeps a table of all Nodes in the ** system), or may be entirely new. ** ** This implementation gets a bit hairy for a handful of reasons. We ** want a user-supplied "in-line" buffer (probably on the stack, see ** below) to hold the children, but then the number of children must ** be known ahead of time. Therefore, if this buffer is overrun, we ** need to heap-allocate a new buffer to hold the children. ** ** Note that as children are added to a NodeBuilder, they are stored ** as raw pointers-to-NodeValue. However, their reference counts are ** carefully maintained. ** ** When the "in-line" buffer "d_inlineNv" is superceded by a ** heap-allocated buffer, we allocate the new buffer (a NodeValue ** large enough to hold more children), copy the elements to it, and ** mark d_inlineNv as having zero children. We do this last bit so ** that we don't have to modify any child reference counts. The new ** heap-allocated buffer "takes over" the reference counts of the old ** "in-line" buffer. (If we didn't mark it as having zero children, ** the destructor may improperly decrement the children's reference ** counts.) ** ** There are then four normal cases at the end of a NodeBuilder's ** life cycle: ** ** 0. We have a VARIABLE-kinded Node. These are special (they have ** no children and are all distinct by definition). They are ** really a subcase of 1(b), below. ** 1. d_nv points to d_inlineNv: it is the backing store supplied ** by the user (or derived class). ** (a) The Node under construction already exists in the ** NodeManager's pool. ** (b) The Node under construction is NOT already in the ** NodeManager's pool. ** 2. d_nv does NOT point to d_inlineNv: it is a new, larger buffer ** that was heap-allocated by this NodeBuilder. ** (a) The Node under construction already exists in the ** NodeManager's pool. ** (b) The Node under construction is NOT already in the ** NodeManager's pool. ** ** When a Node is extracted, we convert the NodeBuilder to a Node and ** make sure the reference counts are properly maintained. That ** means we must ensure there are no reference-counting errors among ** the node's children, that the children aren't re-decremented on ** clear() or NodeBuilder destruction, and that the returned Node ** wraps a NodeValue with a reference count of 1. ** ** 0. If a VARIABLE, treat similarly to 1(b), except that we ** know there are no children (no reference counts to reason ** about) and we don't keep VARIABLE-kinded Nodes in the ** NodeManager pool. ** ** 1(a). Reference-counts for all children in d_inlineNv must be ** decremented, and the NodeBuilder must be marked as "used" ** and the number of children set to zero so that we don't ** decrement them again on destruction. The existing ** NodeManager pool entry is returned. ** ** 1(b). A new heap-allocated NodeValue must be constructed and all ** settings and children from d_inlineNv copied into it. ** This new NodeValue is put into the NodeManager's pool. ** The NodeBuilder is marked as "used" and the number of ** children in d_inlineNv set to zero so that we don't ** decrement child reference counts on destruction (the child ** reference counts have been "taken over" by the new ** NodeValue). We return a Node wrapper for this new ** NodeValue, which increments its reference count. ** ** 2(a). Reference counts for all children in d_nv must be ** decremented. The NodeBuilder is marked as "used" and the ** heap-allocated d_nv deleted. d_nv is repointed to ** d_inlineNv so that destruction of the NodeBuilder doesn't ** cause any problems. The existing NodeManager pool entry ** is returned. ** ** 2(b). The heap-allocated d_nv is "cropped" to the correct size ** (based on the number of children it _actually_ has). d_nv ** is repointed to d_inlineNv so that destruction of the ** NodeBuilder doesn't cause any problems, and the (old) ** value it had is placed into the NodeManager's pool and ** returned in a Node wrapper. ** ** NOTE IN 1(b) AND 2(b) THAT we can NOT create Node wrapper ** temporary for the NodeValue in the NodeBuilder<>::operator Node() ** member function. If we create a temporary (for example by writing ** Debug("builder") << Node(nv) << endl), the NodeValue will have its ** reference count incremented from zero to one, then decremented, ** which makes it eligible for collection before the builder has even ** returned it! So this is a no-no. ** ** There are also two cases when the NodeBuilder is clear()'ed: ** ** 1. d_nv == &d_inlineNv (NodeBuilder using the user-supplied ** backing store): all d_inlineNv children have their reference ** counts decremented, d_inlineNv.d_nchildren is set to zero, ** and its kind is set to UNDEFINED_KIND. ** ** 2. d_nv != &d_inlineNv (d_nv heap-allocated by NodeBuilder): all ** d_nv children have their reference counts decremented, d_nv ** is deallocated, and d_nv is set to &d_inlineNv. d_inlineNv's ** kind is set to UNDEFINED_KIND. ** ** ... destruction is similar: ** ** 1. d_nv == &d_inlineNv (NodeBuilder using the user-supplied ** backing store): all d_inlineNv children have their reference ** counts decremented. ** ** 2. d_nv != &d_inlineNv (d_nv heap-allocated by NodeBuilder): all ** d_nv children have their reference counts decremented, and ** d_nv is deallocated. ** ** Regarding the backing store (typically on the stack): the file ** below provides the template: ** ** template < unsigned nchild_thresh > class NodeBuilder; ** ** The default: ** ** NodeBuilder<> b; ** ** gives you a backing buffer with capacity for 10 children in ** the same place as the NodeBuilder<> itself is allocated. You ** can specify another size as a template parameter, but it must ** be a compile-time constant. **/ #include "cvc4_private.h" /* strong dependency; make sure node is included first */ #include "expr/node.h" #include "expr/type_node.h" #ifndef __CVC4__NODE_BUILDER_H #define __CVC4__NODE_BUILDER_H #include #include #include #include namespace CVC4 { static const unsigned default_nchild_thresh = 10; template class NodeBuilder; class NodeManager; }/* CVC4 namespace */ #include "base/cvc4_assert.h" #include "base/output.h" #include "base/ptr_closer.h" #include "expr/kind.h" #include "expr/metakind.h" #include "expr/node_value.h" namespace CVC4 { /* see expr/convenience_node_builders.h */ class AndNodeBuilder; class OrNodeBuilder; class PlusNodeBuilder; class MultNodeBuilder; // Sometimes it's useful for debugging to output a NodeBuilder that // isn't yet a Node.. template std::ostream& operator<<(std::ostream& out, const NodeBuilder& nb); /** * The main template NodeBuilder. */ template class NodeBuilder { /** * An "in-line" stack-allocated buffer for use by the * NodeBuilder. */ expr::NodeValue d_inlineNv; /** * Space for the children of the node being constructed. This is * never accessed directly, but rather through * d_inlineNv.d_children[i]. */ expr::NodeValue* d_inlineNvChildSpace[nchild_thresh]; /** * A pointer to the "current" NodeValue buffer; either &d_inlineNv * or a heap-allocated one if d_inlineNv wasn't big enough. */ expr::NodeValue* d_nv; /** The NodeManager at play */ NodeManager* d_nm; /** * The number of children allocated in d_nv. */ uint32_t d_nvMaxChildren; template void internalCopy(const NodeBuilder& nb); /** * Returns whether or not this NodeBuilder has been "used"---i.e., * whether a Node has been extracted with operator Node(). * Internally, this state is represented by d_nv pointing to NULL. */ inline bool isUsed() const { return __builtin_expect( ( d_nv == NULL ), false ); } /** * Set this NodeBuilder to the `used' state. */ inline void setUsed() { Assert(!isUsed(), "Internal error: bad `used' state in NodeBuilder!"); Assert(d_inlineNv.d_nchildren == 0 && d_nvMaxChildren == nchild_thresh, "Internal error: bad `inline' state in NodeBuilder!"); d_nv = NULL; } /** * Set this NodeBuilder to the `unused' state. Should only be done * from clear(). */ inline void setUnused() { Assert(isUsed(), "Internal error: bad `used' state in NodeBuilder!"); Assert(d_inlineNv.d_nchildren == 0 && d_nvMaxChildren == nchild_thresh, "Internal error: bad `inline' state in NodeBuilder!"); d_nv = &d_inlineNv; } /** * Returns true if d_nv is *not* the "in-line" one (it was * heap-allocated by this class). */ inline bool nvIsAllocated() const { return __builtin_expect( ( d_nv != &d_inlineNv ), false ) && __builtin_expect(( d_nv != NULL ), true ); } /** * Returns true if adding a child requires (re)allocation of d_nv * first. */ inline bool nvNeedsToBeAllocated() const { return __builtin_expect( ( d_nv->d_nchildren == d_nvMaxChildren ), false ); } /** * (Re)allocate d_nv using a default grow factor. Ensure that child * pointers are copied into the new buffer, and if the "inline" * NodeValue is evacuated, make sure its children won't be * double-decremented later (on destruction/clear). */ inline void realloc() { size_t newSize = 2 * size_t(d_nvMaxChildren); size_t hardLimit = (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1; realloc(__builtin_expect( ( newSize > hardLimit ), false ) ? hardLimit : newSize); } /** * (Re)allocate d_nv to a specific size. Specify "copy" if the * children should be copied; if they are, and if the "inline" * NodeValue is evacuated, make sure its children won't be * double-decremented later (on destruction/clear). */ void realloc(size_t toSize); /** * If d_nv needs to be (re)allocated to add an additional child, do * so using realloc(), which ensures child pointers are copied and * that the reference counts of the "inline" NodeValue won't be * double-decremented on destruction/clear. Otherwise, do nothing. */ inline void allocateNvIfNecessaryForAppend() { if(__builtin_expect( ( nvNeedsToBeAllocated() ), false )) { realloc(); } } /** * Deallocate a d_nv that was heap-allocated by this class during * grow operations. (Marks this NodeValue no longer allocated so * that double-deallocations don't occur.) * * PRECONDITION: only call this when nvIsAllocated() == true. * POSTCONDITION: !nvIsAllocated() */ void dealloc(); /** * "Purge" the "inline" children. Decrement all their reference * counts and set the number of children to zero. * * PRECONDITION: only call this when nvIsAllocated() == false. * POSTCONDITION: d_inlineNv.d_nchildren == 0. */ void decrRefCounts(); /** * Trim d_nv down to the size it needs to be for the number of * children it has. Used when a Node is extracted from a * NodeBuilder and we want the returned memory not to suffer from * internal fragmentation. If d_nv was not heap-allocated by this * class, or is already the right size, this function does nothing. * * @throws bad_alloc if the reallocation fails */ void crop() { if(__builtin_expect( ( nvIsAllocated() ), false ) && __builtin_expect( ( d_nvMaxChildren > d_nv->d_nchildren ), true )) { // Ensure d_nv is not modified on allocation failure expr::NodeValue* newBlock = (expr::NodeValue*) std::realloc(d_nv, sizeof(expr::NodeValue) + ( sizeof(expr::NodeValue*) * d_nv->d_nchildren )); if(newBlock == NULL) { // In this case, d_nv was NOT freed. If we throw, the // deallocation should occur on destruction of the // NodeBuilder. throw std::bad_alloc(); } d_nv = newBlock; d_nvMaxChildren = d_nv->d_nchildren; } } // used by convenience node builders NodeBuilder& collapseTo(Kind k) { AssertArgument(k != kind::UNDEFINED_KIND && k != kind::NULL_EXPR && k < kind::LAST_KIND, k, "illegal collapsing kind"); if(getKind() != k) { Node n = operator Node(); clear(); d_nv->d_kind = expr::NodeValue::kindToDKind(k); d_nv->d_id = 1; // have a kind already return append(n); } return *this; } public: inline NodeBuilder() : d_nv(&d_inlineNv), d_nm(NodeManager::currentNM()), d_nvMaxChildren(nchild_thresh) { d_inlineNv.d_id = 0; d_inlineNv.d_rc = 0; d_inlineNv.d_kind = expr::NodeValue::kindToDKind(kind::UNDEFINED_KIND); d_inlineNv.d_nchildren = 0; } inline NodeBuilder(Kind k) : d_nv(&d_inlineNv), d_nm(NodeManager::currentNM()), d_nvMaxChildren(nchild_thresh) { Assert(k != kind::NULL_EXPR && k != kind::UNDEFINED_KIND, "illegal Node-building kind"); d_inlineNv.d_id = 1; // have a kind already d_inlineNv.d_rc = 0; d_inlineNv.d_kind = expr::NodeValue::kindToDKind(k); d_inlineNv.d_nchildren = 0; } inline NodeBuilder(NodeManager* nm) : d_nv(&d_inlineNv), d_nm(nm), d_nvMaxChildren(nchild_thresh) { d_inlineNv.d_id = 0; d_inlineNv.d_rc = 0; d_inlineNv.d_kind = expr::NodeValue::kindToDKind(kind::UNDEFINED_KIND); d_inlineNv.d_nchildren = 0; } inline NodeBuilder(NodeManager* nm, Kind k) : d_nv(&d_inlineNv), d_nm(nm), d_nvMaxChildren(nchild_thresh) { Assert(k != kind::NULL_EXPR && k != kind::UNDEFINED_KIND, "illegal Node-building kind"); d_inlineNv.d_id = 1; // have a kind already d_inlineNv.d_rc = 0; d_inlineNv.d_kind = expr::NodeValue::kindToDKind(k); d_inlineNv.d_nchildren = 0; } inline ~NodeBuilder() { if(__builtin_expect( ( nvIsAllocated() ), false )) { dealloc(); } else if(__builtin_expect( ( !isUsed() ), false )) { decrRefCounts(); } } // These implementations are identical, but we need to have both of // these because the templatized version isn't recognized as a // generalization of a copy constructor (and a default copy // constructor will be generated [?]) inline NodeBuilder(const NodeBuilder& nb) : d_nv(&d_inlineNv), d_nm(nb.d_nm), d_nvMaxChildren(nchild_thresh) { d_inlineNv.d_id = nb.d_nv->d_id; d_inlineNv.d_rc = 0; d_inlineNv.d_kind = nb.d_nv->d_kind; d_inlineNv.d_nchildren = 0; internalCopy(nb); } // technically this is a conversion, not a copy template inline NodeBuilder(const NodeBuilder& nb) : d_nv(&d_inlineNv), d_nm(nb.d_nm), d_nvMaxChildren(nchild_thresh) { d_inlineNv.d_id = nb.d_nv->d_id; d_inlineNv.d_rc = 0; d_inlineNv.d_kind = nb.d_nv->d_kind; d_inlineNv.d_nchildren = 0; internalCopy(nb); } typedef expr::NodeValue::iterator< NodeTemplate > iterator; typedef expr::NodeValue::iterator< NodeTemplate > const_iterator; /** Get the begin-const-iterator of this Node-under-construction. */ inline const_iterator begin() const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "Iterators over NodeBuilder<> are undefined " "until a Kind is set"); return d_nv->begin< NodeTemplate >(); } /** Get the end-const-iterator of this Node-under-construction. */ inline const_iterator end() const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "Iterators over NodeBuilder<> are undefined " "until a Kind is set"); return d_nv->end< NodeTemplate >(); } /** Get the kind of this Node-under-construction. */ inline Kind getKind() const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); return d_nv->getKind(); } /** Get the kind of this Node-under-construction. */ inline kind::MetaKind getMetaKind() const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "The metakind of a NodeBuilder<> is undefined " "until a Kind is set"); return d_nv->getMetaKind(); } /** Get the current number of children of this Node-under-construction. */ inline unsigned getNumChildren() const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "The number of children of a NodeBuilder<> is undefined " "until a Kind is set"); return d_nv->getNumChildren(); } /** * Access to the operator of this Node-under-construction. Only * allowed if this NodeBuilder is unused, and has a defined kind * that is of PARAMETERIZED metakind. */ inline Node getOperator() const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "NodeBuilder<> operator access is not permitted " "until a Kind is set"); Assert(getMetaKind() == kind::metakind::PARAMETERIZED, "NodeBuilder<> operator access is only permitted " "on parameterized kinds, not `%s'", kind::kindToString(getKind()).c_str()); return Node(d_nv->getOperator()); } /** * Access to children of this Node-under-construction. Only allowed * if this NodeBuilder is unused and has a defined kind. */ inline Node getChild(int i) const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "NodeBuilder<> child access is not permitted " "until a Kind is set"); Assert(i >= 0 && unsigned(i) < d_nv->getNumChildren(), "index out of range for NodeBuilder::getChild()"); return Node(d_nv->getChild(i)); } /** Access to children of this Node-under-construction. */ inline Node operator[](int i) const { return getChild(i); } /** * "Reset" this node builder (optionally setting a new kind for it), * using the same "inline" memory as at construction time. This * deallocates NodeBuilder-allocated heap memory, if it was * allocated, and decrements the reference counts of any currently * children in the NodeBuilder. * * This should leave the NodeBuilder in the state it was after * initial construction, except for Kind, which is set to the * argument, if provided, or UNDEFINED_KIND. In particular, the * associated NodeManager is not affected by clear(). */ void clear(Kind k = kind::UNDEFINED_KIND); // "Stream" expression constructor syntax /** Set the Kind of this Node-under-construction. */ inline NodeBuilder& operator<<(const Kind& k) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() == kind::UNDEFINED_KIND || d_nv->d_id == 0, "can't redefine the Kind of a NodeBuilder"); Assert(d_nv->d_id == 0, "internal inconsistency with NodeBuilder: d_id != 0"); AssertArgument(k != kind::UNDEFINED_KIND && k != kind::NULL_EXPR && k < kind::LAST_KIND, k, "illegal node-building kind"); // This test means: we didn't have a Kind at the beginning (on // NodeBuilder construction or at the last clear()), but we do // now. That means we appended a Kind with operator<<(Kind), // which now (lazily) we'll collapse. if(__builtin_expect( ( d_nv->d_id == 0 && getKind() != kind::UNDEFINED_KIND ), false )) { Node n2 = operator Node(); clear(); append(n2); } else if(d_nv->d_nchildren == 0) { d_nv->d_id = 1; // remember that we had a kind from the start } d_nv->d_kind = expr::NodeValue::kindToDKind(k); return *this; } /** * If this Node-under-construction has a Kind set, collapse it and * append the given Node as a child. Otherwise, simply append. */ NodeBuilder& operator<<(TNode n) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); // This test means: we didn't have a Kind at the beginning (on // NodeBuilder construction or at the last clear()), but we do // now. That means we appended a Kind with operator<<(Kind), // which now (lazily) we'll collapse. if(__builtin_expect( ( d_nv->d_id == 0 && getKind() != kind::UNDEFINED_KIND ), false )) { Node n2 = operator Node(); clear(); append(n2); } return append(n); } /** * If this Node-under-construction has a Kind set, collapse it and * append the given Node as a child. Otherwise, simply append. */ NodeBuilder& operator<<(TypeNode n) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); // This test means: we didn't have a Kind at the beginning (on // NodeBuilder construction or at the last clear()), but we do // now. That means we appended a Kind with operator<<(Kind), // which now (lazily) we'll collapse. if(__builtin_expect( ( d_nv->d_id == 0 && getKind() != kind::UNDEFINED_KIND ), false )) { Node n2 = operator Node(); clear(); append(n2); } return append(n); } /** Append a sequence of children to this TypeNode-under-construction. */ inline NodeBuilder& append(const std::vector& children) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); return append(children.begin(), children.end()); } /** Append a sequence of children to this Node-under-construction. */ template inline NodeBuilder& append(const std::vector >& children) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); return append(children.begin(), children.end()); } /** Append a sequence of children to this Node-under-construction. */ template NodeBuilder& append(const Iterator& begin, const Iterator& end) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); for(Iterator i = begin; i != end; ++i) { append(*i); } return *this; } /** Append a child to this Node-under-construction. */ NodeBuilder& append(TNode n) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(!n.isNull(), "Cannot use NULL Node as a child of a Node"); if(n.getKind() == kind::BUILTIN) { return *this << NodeManager::operatorToKind(n); } allocateNvIfNecessaryForAppend(); expr::NodeValue* nv = n.d_nv; nv->inc(); d_nv->d_children[d_nv->d_nchildren++] = nv; Assert(d_nv->d_nchildren <= d_nvMaxChildren); return *this; } /** Append a child to this Node-under-construction. */ NodeBuilder& append(const TypeNode& typeNode) { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(!typeNode.isNull(), "Cannot use NULL Node as a child of a Node"); allocateNvIfNecessaryForAppend(); expr::NodeValue* nv = typeNode.d_nv; nv->inc(); d_nv->d_children[d_nv->d_nchildren++] = nv; Assert(d_nv->d_nchildren <= d_nvMaxChildren); return *this; } private: /** Construct the node value out of the node builder */ expr::NodeValue* constructNV(); expr::NodeValue* constructNV() const; #ifdef CVC4_DEBUG void maybeCheckType(const TNode n) const throw(TypeCheckingExceptionPrivate, AssertionException); #else /* CVC4_DEBUG */ inline void maybeCheckType(const TNode n) const throw() { } #endif /* CVC4_DEBUG */ public: /** Construct the Node out of the node builder */ Node constructNode(); Node constructNode() const; /** Construct a Node on the heap out of the node builder */ Node* constructNodePtr(); Node* constructNodePtr() const; /** Construction of the TypeNode out of the node builder */ TypeNode constructTypeNode(); TypeNode constructTypeNode() const; // two versions, so we can support extraction from (const) // NodeBuilders which are temporaries appearing as rvalues operator Node(); operator Node() const; // similarly for TypeNode operator TypeNode(); operator TypeNode() const; NodeBuilder& operator&=(TNode); NodeBuilder& operator|=(TNode); NodeBuilder& operator+=(TNode); NodeBuilder& operator-=(TNode); NodeBuilder& operator*=(TNode); friend class AndNodeBuilder; friend class OrNodeBuilder; friend class PlusNodeBuilder; friend class MultNodeBuilder; // This is needed for copy constructors of different sizes to access // private fields template friend class NodeBuilder; template friend std::ostream& operator<<(std::ostream& out, const NodeBuilder& nb); };/* class NodeBuilder<> */ }/* CVC4 namespace */ // TODO: add templatized NodeTemplate to all above and // below inlines for 'const [T]Node&' arguments? Technically a lot of // time is spent in the TNode conversion and copy constructor, but // this should be optimized into a simple pointer copy (?) // TODO: double-check this. #include "expr/node.h" #include "expr/node_manager.h" #include "options/expr_options.h" namespace CVC4 { template void NodeBuilder::clear(Kind k) { Assert(k != kind::NULL_EXPR, "illegal Node-building clear kind"); if(__builtin_expect( ( nvIsAllocated() ), false )) { dealloc(); } else if(__builtin_expect( ( !isUsed() ), false )) { decrRefCounts(); } else { setUnused(); } d_inlineNv.d_kind = expr::NodeValue::kindToDKind(k); for(expr::NodeValue::nv_iterator i = d_inlineNv.nv_begin(); i != d_inlineNv.nv_end(); ++i) { (*i)->dec(); } d_inlineNv.d_nchildren = 0; // keep track of whether or not we hvae a kind already d_inlineNv.d_id = (k == kind::UNDEFINED_KIND) ? 0 : 1; } template void NodeBuilder::realloc(size_t toSize) { Assert( toSize > d_nvMaxChildren, "attempt to realloc() a NodeBuilder to a smaller/equal size!" ); Assert( toSize < (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN), "attempt to realloc() a NodeBuilder to size %u (beyond hard limit of %u)", toSize, (1lu << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1 ); if(__builtin_expect( ( nvIsAllocated() ), false )) { // Ensure d_nv is not modified on allocation failure expr::NodeValue* newBlock = (expr::NodeValue*) std::realloc(d_nv, sizeof(expr::NodeValue) + ( sizeof(expr::NodeValue*) * toSize )); if(newBlock == NULL) { // In this case, d_nv was NOT freed. If we throw, the // deallocation should occur on destruction of the NodeBuilder. throw std::bad_alloc(); } d_nvMaxChildren = toSize; Assert(d_nvMaxChildren == toSize);//overflow check // Here, the copy (between two heap-allocated buffers) has already // been done for us by the std::realloc(). d_nv = newBlock; } else { // Ensure d_nv is not modified on allocation failure expr::NodeValue* newBlock = (expr::NodeValue*) std::malloc(sizeof(expr::NodeValue) + ( sizeof(expr::NodeValue*) * toSize )); if(newBlock == NULL) { throw std::bad_alloc(); } d_nvMaxChildren = toSize; Assert(d_nvMaxChildren == toSize);//overflow check d_nv = newBlock; d_nv->d_id = d_inlineNv.d_id; d_nv->d_rc = 0; d_nv->d_kind = d_inlineNv.d_kind; d_nv->d_nchildren = d_inlineNv.d_nchildren; std::copy(d_inlineNv.d_children, d_inlineNv.d_children + d_inlineNv.d_nchildren, d_nv->d_children); // ensure "inline" children don't get decremented in dtor d_inlineNv.d_nchildren = 0; } } template void NodeBuilder::dealloc() { Assert( nvIsAllocated(), "Internal error: NodeBuilder: dealloc() called without a " "private NodeBuilder-allocated buffer" ); for(expr::NodeValue::nv_iterator i = d_nv->nv_begin(); i != d_nv->nv_end(); ++i) { (*i)->dec(); } free(d_nv); d_nv = &d_inlineNv; d_nvMaxChildren = nchild_thresh; } template void NodeBuilder::decrRefCounts() { Assert( !nvIsAllocated(), "Internal error: NodeBuilder: decrRefCounts() called with a " "private NodeBuilder-allocated buffer" ); for(expr::NodeValue::nv_iterator i = d_inlineNv.nv_begin(); i != d_inlineNv.nv_end(); ++i) { (*i)->dec(); } d_inlineNv.d_nchildren = 0; } template TypeNode NodeBuilder::constructTypeNode() { return TypeNode(constructNV()); } template TypeNode NodeBuilder::constructTypeNode() const { return TypeNode(constructNV()); } template Node NodeBuilder::constructNode() { Node n = Node(constructNV()); maybeCheckType(n); return n; } template Node NodeBuilder::constructNode() const { Node n = Node(constructNV()); maybeCheckType(n); return n; } template Node* NodeBuilder::constructNodePtr() { // maybeCheckType() can throw an exception. Make sure to call the destructor // on the exception branch. PtrCloser np(new Node(constructNV())); maybeCheckType(*np.get()); return np.release(); } template Node* NodeBuilder::constructNodePtr() const { PtrCloser np(new Node(constructNV())); maybeCheckType(*np.get()); return np.release(); } template NodeBuilder::operator Node() { return constructNode(); } template NodeBuilder::operator Node() const { return constructNode(); } template NodeBuilder::operator TypeNode() { return constructTypeNode(); } template NodeBuilder::operator TypeNode() const { return constructTypeNode(); } template expr::NodeValue* NodeBuilder::constructNV() { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "Can't make an expression of an undefined kind!"); // NOTE: The comments in this function refer to the cases in the // file comments at the top of this file. // Case 0: If a VARIABLE if(getMetaKind() == kind::metakind::VARIABLE || getMetaKind() == kind::metakind::NULLARY_OPERATOR) { /* 0. If a VARIABLE, treat similarly to 1(b), except that we know * there are no children (no reference counts to reason about), * and we don't keep VARIABLE-kinded Nodes in the NodeManager * pool. */ Assert( ! nvIsAllocated(), "internal NodeBuilder error: " "VARIABLE-kinded NodeBuilder is heap-allocated !?" ); Assert( d_inlineNv.d_nchildren == 0, "improperly-formed VARIABLE-kinded NodeBuilder: " "no children permitted" ); // we have to copy the inline NodeValue out expr::NodeValue* nv = (expr::NodeValue*) std::malloc(sizeof(expr::NodeValue)); if(nv == NULL) { throw std::bad_alloc(); } // there are no children, so we don't have to worry about // reference counts in this case. nv->d_nchildren = 0; nv->d_kind = d_nv->d_kind; nv->d_id = d_nm->next_id++;// FIXME multithreading nv->d_rc = 0; setUsed(); if(Debug.isOn("gc")) { Debug("gc") << "creating node value " << nv << " [" << nv->d_id << "]: "; nv->printAst(Debug("gc")); Debug("gc") << std::endl; } return nv; } // check that there are the right # of children for this kind Assert(getMetaKind() != kind::metakind::CONSTANT, "Cannot make Nodes with NodeBuilder that have CONSTANT-kinded kinds"); Assert(getNumChildren() >= kind::metakind::getLowerBoundForKind(getKind()), "Nodes with kind %s must have at least %u children (the one under " "construction has %u)", kind::kindToString(getKind()).c_str(), kind::metakind::getLowerBoundForKind(getKind()), getNumChildren()); Assert(getNumChildren() <= kind::metakind::getUpperBoundForKind(getKind()), "Nodes with kind %s must have at most %u children (the one under " "construction has %u)", kind::kindToString(getKind()).c_str(), kind::metakind::getUpperBoundForKind(getKind()), getNumChildren()); #if 0 // if the kind is PARAMETERIZED, check that the operator is correctly-kinded Assert(kind::metaKindOf(getKind()) != kind::metakind::PARAMETERIZED || NodeManager::operatorToKind(getOperator()) == getKind(), "Attempted to construct a parameterized kind `%s' with " "incorrectly-kinded operator `%s'", kind::kindToString(getKind()).c_str(), kind::kindToString(getOperator().getKind()).c_str()); #endif /* 0 */ // Implementation differs depending on whether the NodeValue was // malloc'ed or not and whether or not it's in the already-been-seen // NodeManager pool of Nodes. See implementation notes at the top // of this file. if(__builtin_expect( ( ! nvIsAllocated() ), true )) { /** Case 1. d_nv points to d_inlineNv: it is the backing store ** allocated "inline" in this NodeBuilder. **/ // Lookup the expression value in the pool we already have expr::NodeValue* poolNv = d_nm->poolLookup(&d_inlineNv); // If something else is there, we reuse it if(poolNv != NULL) { /* Subcase (a): The Node under construction already exists in * the NodeManager's pool. */ /* 1(a). Reference-counts for all children in d_inlineNv must be * decremented, and the NodeBuilder must be marked as "used" and * the number of children set to zero so that we don't decrement * them again on destruction. The existing NodeManager pool * entry is returned. */ decrRefCounts(); d_inlineNv.d_nchildren = 0; setUsed(); return poolNv; } else { /* Subcase (b): The Node under construction is NOT already in * the NodeManager's pool. */ /* 1(b). A new heap-allocated NodeValue must be constructed and * all settings and children from d_inlineNv copied into it. * This new NodeValue is put into the NodeManager's pool. The * NodeBuilder is marked as "used" and the number of children in * d_inlineNv set to zero so that we don't decrement child * reference counts on destruction (the child reference counts * have been "taken over" by the new NodeValue). We return a * Node wrapper for this new NodeValue, which increments its * reference count. */ // create the canonical expression value for this node expr::NodeValue* nv = (expr::NodeValue*) std::malloc(sizeof(expr::NodeValue) + ( sizeof(expr::NodeValue*) * d_inlineNv.d_nchildren )); if(nv == NULL) { throw std::bad_alloc(); } nv->d_nchildren = d_inlineNv.d_nchildren; nv->d_kind = d_inlineNv.d_kind; nv->d_id = d_nm->next_id++;// FIXME multithreading nv->d_rc = 0; std::copy(d_inlineNv.d_children, d_inlineNv.d_children + d_inlineNv.d_nchildren, nv->d_children); d_inlineNv.d_nchildren = 0; setUsed(); //poolNv = nv; d_nm->poolInsert(nv); if(Debug.isOn("gc")) { Debug("gc") << "creating node value " << nv << " [" << nv->d_id << "]: "; nv->printAst(Debug("gc")); Debug("gc") << std::endl; } return nv; } } else { /** Case 2. d_nv does NOT point to d_inlineNv: it is a new, larger ** buffer that was heap-allocated by this NodeBuilder. **/ // Lookup the expression value in the pool we already have (with insert) expr::NodeValue* poolNv = d_nm->poolLookup(d_nv); // If something else is there, we reuse it if(poolNv != NULL) { /* Subcase (a): The Node under construction already exists in * the NodeManager's pool. */ /* 2(a). Reference-counts for all children in d_nv must be * decremented. The NodeBuilder is marked as "used" and the * heap-allocated d_nv deleted. d_nv is repointed to d_inlineNv * so that destruction of the NodeBuilder doesn't cause any * problems. The existing NodeManager pool entry is * returned. */ dealloc(); setUsed(); return poolNv; } else { /* Subcase (b) The Node under construction is NOT already in the * NodeManager's pool. */ /* 2(b). The heap-allocated d_nv is "cropped" to the correct * size (based on the number of children it _actually_ has). * d_nv is repointed to d_inlineNv so that destruction of the * NodeBuilder doesn't cause any problems, and the (old) value * it had is placed into the NodeManager's pool and returned in * a Node wrapper. */ crop(); expr::NodeValue* nv = d_nv; nv->d_id = d_nm->next_id++;// FIXME multithreading d_nv = &d_inlineNv; d_nvMaxChildren = nchild_thresh; setUsed(); //poolNv = nv; d_nm->poolInsert(nv); Debug("gc") << "creating node value " << nv << " [" << nv->d_id << "]: " << *nv << "\n"; return nv; } } } // CONST VERSION OF NODE EXTRACTOR template expr::NodeValue* NodeBuilder::constructNV() const { Assert(!isUsed(), "NodeBuilder is one-shot only; " "attempt to access it after conversion"); Assert(getKind() != kind::UNDEFINED_KIND, "Can't make an expression of an undefined kind!"); // NOTE: The comments in this function refer to the cases in the // file comments at the top of this file. // Case 0: If a VARIABLE if(getMetaKind() == kind::metakind::VARIABLE || getMetaKind() == kind::metakind::NULLARY_OPERATOR) { /* 0. If a VARIABLE, treat similarly to 1(b), except that we know * there are no children (no reference counts to reason about), * and we don't keep VARIABLE-kinded Nodes in the NodeManager * pool. */ Assert( ! nvIsAllocated(), "internal NodeBuilder error: " "VARIABLE-kinded NodeBuilder is heap-allocated !?" ); Assert( d_inlineNv.d_nchildren == 0, "improperly-formed VARIABLE-kinded NodeBuilder: " "no children permitted" ); // we have to copy the inline NodeValue out expr::NodeValue* nv = (expr::NodeValue*) std::malloc(sizeof(expr::NodeValue)); if(nv == NULL) { throw std::bad_alloc(); } // there are no children, so we don't have to worry about // reference counts in this case. nv->d_nchildren = 0; nv->d_kind = d_nv->d_kind; nv->d_id = d_nm->next_id++;// FIXME multithreading nv->d_rc = 0; Debug("gc") << "creating node value " << nv << " [" << nv->d_id << "]: " << *nv << "\n"; return nv; } // check that there are the right # of children for this kind Assert(getMetaKind() != kind::metakind::CONSTANT, "Cannot make Nodes with NodeBuilder that have CONSTANT-kinded kinds"); Assert(getNumChildren() >= kind::metakind::getLowerBoundForKind(getKind()), "Nodes with kind %s must have at least %u children (the one under " "construction has %u)", kind::kindToString(getKind()).c_str(), kind::metakind::getLowerBoundForKind(getKind()), getNumChildren()); Assert(getNumChildren() <= kind::metakind::getUpperBoundForKind(getKind()), "Nodes with kind %s must have at most %u children (the one under " "construction has %u)", kind::kindToString(getKind()).c_str(), kind::metakind::getUpperBoundForKind(getKind()), getNumChildren()); #if 0 // if the kind is PARAMETERIZED, check that the operator is correctly-kinded Assert(kind::metaKindOf(getKind()) != kind::metakind::PARAMETERIZED || NodeManager::operatorToKind(getOperator()) == getKind(), "Attempted to construct a parameterized kind `%s' with " "incorrectly-kinded operator `%s'", kind::kindToString(getKind()).c_str(), kind::kindToString(getOperator().getKind()).c_str()); #endif /* 0 */ // Implementation differs depending on whether the NodeValue was // malloc'ed or not and whether or not it's in the already-been-seen // NodeManager pool of Nodes. See implementation notes at the top // of this file. if(__builtin_expect( ( ! nvIsAllocated() ), true )) { /** Case 1. d_nv points to d_inlineNv: it is the backing store ** allocated "inline" in this NodeBuilder. **/ // Lookup the expression value in the pool we already have expr::NodeValue* poolNv = d_nm->poolLookup(const_cast(&d_inlineNv)); // If something else is there, we reuse it if(poolNv != NULL) { /* Subcase (a): The Node under construction already exists in * the NodeManager's pool. */ /* 1(a). The existing NodeManager pool entry is returned; we * leave child reference counts alone and get them at * NodeBuilder destruction time. */ return poolNv; } else { /* Subcase (b): The Node under construction is NOT already in * the NodeManager's pool. */ /* 1(b). A new heap-allocated NodeValue must be constructed and * all settings and children from d_inlineNv copied into it. * This new NodeValue is put into the NodeManager's pool. The * NodeBuilder cannot be marked as "used", so we increment all * child reference counts (which will be decremented to match on * destruction of the NodeBuilder). We return a Node wrapper * for this new NodeValue, which increments its reference * count. */ // create the canonical expression value for this node expr::NodeValue* nv = (expr::NodeValue*) std::malloc(sizeof(expr::NodeValue) + ( sizeof(expr::NodeValue*) * d_inlineNv.d_nchildren )); if(nv == NULL) { throw std::bad_alloc(); } nv->d_nchildren = d_inlineNv.d_nchildren; nv->d_kind = d_inlineNv.d_kind; nv->d_id = d_nm->next_id++;// FIXME multithreading nv->d_rc = 0; std::copy(d_inlineNv.d_children, d_inlineNv.d_children + d_inlineNv.d_nchildren, nv->d_children); for(expr::NodeValue::nv_iterator i = nv->nv_begin(); i != nv->nv_end(); ++i) { (*i)->inc(); } //poolNv = nv; d_nm->poolInsert(nv); Debug("gc") << "creating node value " << nv << " [" << nv->d_id << "]: " << *nv << "\n"; return nv; } } else { /** Case 2. d_nv does NOT point to d_inlineNv: it is a new, larger ** buffer that was heap-allocated by this NodeBuilder. **/ // Lookup the expression value in the pool we already have (with insert) expr::NodeValue* poolNv = d_nm->poolLookup(d_nv); // If something else is there, we reuse it if(poolNv != NULL) { /* Subcase (a): The Node under construction already exists in * the NodeManager's pool. */ /* 2(a). The existing NodeManager pool entry is returned; we * leave child reference counts alone and get them at * NodeBuilder destruction time. */ return poolNv; } else { /* Subcase (b) The Node under construction is NOT already in the * NodeManager's pool. */ /* 2(b). The heap-allocated d_nv cannot be "cropped" to the * correct size; we create a copy, increment child reference * counts, place this copy into the NodeManager pool, and return * a Node wrapper around it. The child reference counts will be * decremented to match at NodeBuilder destruction time. */ // create the canonical expression value for this node expr::NodeValue* nv = (expr::NodeValue*) std::malloc(sizeof(expr::NodeValue) + ( sizeof(expr::NodeValue*) * d_nv->d_nchildren )); if(nv == NULL) { throw std::bad_alloc(); } nv->d_nchildren = d_nv->d_nchildren; nv->d_kind = d_nv->d_kind; nv->d_id = d_nm->next_id++;// FIXME multithreading nv->d_rc = 0; std::copy(d_nv->d_children, d_nv->d_children + d_nv->d_nchildren, nv->d_children); for(expr::NodeValue::nv_iterator i = nv->nv_begin(); i != nv->nv_end(); ++i) { (*i)->inc(); } //poolNv = nv; d_nm->poolInsert(nv); Debug("gc") << "creating node value " << nv << " [" << nv->d_id << "]: " << *nv << "\n"; return nv; } } } template template void NodeBuilder::internalCopy(const NodeBuilder& nb) { if(nb.isUsed()) { setUsed(); return; } bool realloced CVC4_UNUSED = false; if(nb.d_nvMaxChildren > d_nvMaxChildren) { realloced = true; realloc(nb.d_nvMaxChildren); } Assert(nb.d_nvMaxChildren <= d_nvMaxChildren); Assert(nb.d_nv->nv_end() - nb.d_nv->nv_begin() <= d_nvMaxChildren, "realloced:%s, d_nvMax:%u, size:%u, nc:%u", realloced ? "true" : "false", d_nvMaxChildren, nb.d_nv->nv_end() - nb.d_nv->nv_begin(), nb.d_nv->getNumChildren()); std::copy(nb.d_nv->nv_begin(), nb.d_nv->nv_end(), d_nv->nv_begin()); d_nv->d_nchildren = nb.d_nv->d_nchildren; for(expr::NodeValue::nv_iterator i = d_nv->nv_begin(); i != d_nv->nv_end(); ++i) { (*i)->inc(); } } #ifdef CVC4_DEBUG template inline void NodeBuilder::maybeCheckType(const TNode n) const throw(TypeCheckingExceptionPrivate, AssertionException) { /* force an immediate type check, if early type checking is enabled and the current node isn't a variable or constant */ if( d_nm->getOptions()[options::earlyTypeChecking] ) { kind::MetaKind mk = n.getMetaKind(); if( mk != kind::metakind::VARIABLE && mk != kind::metakind::NULLARY_OPERATOR && mk != kind::metakind::CONSTANT ) { d_nm->getType(n, true); } } } #endif /* CVC4_DEBUG */ template std::ostream& operator<<(std::ostream& out, const NodeBuilder& nb) { return out << *nb.d_nv; } }/* CVC4 namespace */ #endif /* __CVC4__NODE_BUILDER_H */ cvc4-1.5/src/expr/node_manager.cpp000066400000000000000000000672141313116454100171170ustar00rootroot00000000000000/********************* */ /*! \file node_manager.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Andrew Reynolds ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Expression manager implementation. ** ** Expression manager implementation. ** ** Reviewed by Chris Conway, Apr 5 2010 (bug #65). **/ #include "expr/node_manager.h" #include #include #include #include #include "base/cvc4_assert.h" #include "base/listener.h" #include "base/tls.h" #include "expr/attribute.h" #include "expr/node_manager_attributes.h" #include "expr/node_manager_listeners.h" #include "expr/type_checker.h" #include "options/options.h" #include "options/smt_options.h" #include "util/statistics_registry.h" #include "util/resource_manager.h" using namespace std; using namespace CVC4::expr; using __gnu_cxx::hash_set; namespace CVC4 { CVC4_THREADLOCAL(NodeManager*) NodeManager::s_current = NULL; namespace { /** * This class sets it reference argument to true and ensures that it gets set * to false on destruction. This can be used to make sure a flag gets toggled * in a function even on exceptional exit (e.g., see reclaimZombies()). */ struct ScopedBool { bool& d_value; ScopedBool(bool& value) : d_value(value) { Debug("gc") << ">> setting ScopedBool\n"; d_value = true; } ~ScopedBool() { Debug("gc") << "<< clearing ScopedBool\n"; d_value = false; } }; /** * Similarly, ensure d_nodeUnderDeletion gets set to NULL even on * exceptional exit from NodeManager::reclaimZombies(). */ struct NVReclaim { NodeValue*& d_deletionField; NVReclaim(NodeValue*& deletionField) : d_deletionField(deletionField) { Debug("gc") << ">> setting NVRECLAIM field\n"; } ~NVReclaim() { Debug("gc") << "<< clearing NVRECLAIM field\n"; d_deletionField = NULL; } }; } // namespace NodeManager::NodeManager(ExprManager* exprManager) : d_options(new Options()), d_statisticsRegistry(new StatisticsRegistry()), d_resourceManager(new ResourceManager()), d_registrations(new ListenerRegistrationList()), next_id(0), d_attrManager(new expr::attr::AttributeManager()), d_exprManager(exprManager), d_nodeUnderDeletion(NULL), d_inReclaimZombies(false), d_abstractValueCount(0), d_skolemCounter(0) { init(); } NodeManager::NodeManager(ExprManager* exprManager, const Options& options) : d_options(new Options()), d_statisticsRegistry(new StatisticsRegistry()), d_resourceManager(new ResourceManager()), d_registrations(new ListenerRegistrationList()), next_id(0), d_attrManager(new expr::attr::AttributeManager()), d_exprManager(exprManager), d_nodeUnderDeletion(NULL), d_inReclaimZombies(false), d_abstractValueCount(0), d_skolemCounter(0) { d_options->copyValues(options); init(); } void NodeManager::init() { poolInsert( &expr::NodeValue::null() ); for(unsigned i = 0; i < unsigned(kind::LAST_KIND); ++i) { Kind k = Kind(i); if(hasOperator(k)) { d_operators[i] = mkConst(Kind(k)); } } d_resourceManager->setHardLimit((*d_options)[options::hardLimit]); if((*d_options)[options::perCallResourceLimit] != 0) { d_resourceManager->setResourceLimit((*d_options)[options::perCallResourceLimit], false); } if((*d_options)[options::cumulativeResourceLimit] != 0) { d_resourceManager->setResourceLimit((*d_options)[options::cumulativeResourceLimit], true); } if((*d_options)[options::perCallMillisecondLimit] != 0) { d_resourceManager->setTimeLimit((*d_options)[options::perCallMillisecondLimit], false); } if((*d_options)[options::cumulativeMillisecondLimit] != 0) { d_resourceManager->setTimeLimit((*d_options)[options::cumulativeMillisecondLimit], true); } if((*d_options)[options::cpuTime]) { d_resourceManager->useCPUTime(true); } // Do not notify() upon registration as these were handled manually above. d_registrations->add(d_options->registerTlimitListener( new TlimitListener(d_resourceManager), false)); d_registrations->add(d_options->registerTlimitPerListener( new TlimitPerListener(d_resourceManager), false)); d_registrations->add(d_options->registerRlimitListener( new RlimitListener(d_resourceManager), false)); d_registrations->add(d_options->registerRlimitPerListener( new RlimitPerListener(d_resourceManager), false)); } NodeManager::~NodeManager() { // have to ensure "this" is the current NodeManager during // destruction of operators, because they get GCed. NodeManagerScope nms(this); { ScopedBool dontGC(d_inReclaimZombies); // hopefully by this point all SmtEngines have been deleted // already, along with all their attributes d_attrManager->deleteAllAttributes(); } for(unsigned i = 0; i < unsigned(kind::LAST_KIND); ++i) { d_operators[i] = Node::null(); } d_unique_vars.clear(); TypeNode dummy; d_tt_cache.d_children.clear(); d_tt_cache.d_data = dummy; d_rt_cache.d_children.clear(); d_rt_cache.d_data = dummy; for (std::vector::iterator datatype_iter = d_ownedDatatypes.begin(), datatype_end = d_ownedDatatypes.end(); datatype_iter != datatype_end; ++datatype_iter) { Datatype* datatype = *datatype_iter; delete datatype; } d_ownedDatatypes.clear(); Assert(!d_attrManager->inGarbageCollection() ); std::vector order = TopologicalSort(d_maxedOut); d_maxedOut.clear(); while (!d_zombies.empty() || !order.empty()) { if (d_zombies.empty()) { // Delete the maxed out nodes in toplogical order once we know // there are no additional zombies, or other nodes to worry about. Assert(!order.empty()); // We process these in reverse to reverse the topological order. NodeValue* greatest_maxed_out = order.back(); order.pop_back(); Assert(greatest_maxed_out->HasMaximizedReferenceCount()); Debug("gc") << "Force zombify " << greatest_maxed_out << std::endl; greatest_maxed_out->d_rc = 0; markForDeletion(greatest_maxed_out); } else { reclaimZombies(); } } poolRemove( &expr::NodeValue::null() ); if(Debug.isOn("gc:leaks")) { Debug("gc:leaks") << "still in pool:" << endl; for(NodeValuePool::const_iterator i = d_nodeValuePool.begin(), iend = d_nodeValuePool.end(); i != iend; ++i) { Debug("gc:leaks") << " " << *i << " id=" << (*i)->d_id << " rc=" << (*i)->d_rc << " " << **i << endl; } Debug("gc:leaks") << ":end:" << endl; } // defensive coding, in case destruction-order issues pop up (they often do) delete d_statisticsRegistry; d_statisticsRegistry = NULL; delete d_registrations; d_registrations = NULL; delete d_resourceManager; d_resourceManager = NULL; delete d_attrManager; d_attrManager = NULL; delete d_options; d_options = NULL; } unsigned NodeManager::registerDatatype(Datatype* dt) { unsigned sz = d_ownedDatatypes.size(); d_ownedDatatypes.push_back( dt ); return sz; } const Datatype & NodeManager::getDatatypeForIndex( unsigned index ) const{ Assert( indexinGarbageCollection()); Debug("gc") << "reclaiming " << d_zombies.size() << " zombie(s)!\n"; // during reclamation, reclaimZombies() is never supposed to be called Assert(! d_inReclaimZombies, "NodeManager::reclaimZombies() not re-entrant!"); // whether exit is normal or exceptional, the Reclaim dtor is called // and ensures that d_inReclaimZombies is set back to false. ScopedBool r(d_inReclaimZombies); // We copy the set away and clear the NodeManager's set of zombies. // This is because reclaimZombie() decrements the RC of the // NodeValue's children, which may (recursively) reclaim them. // // Let's say we're reclaiming zombie NodeValue "A" and its child "B" // then becomes a zombie (NodeManager::markForDeletion(B) is called). // // One way to handle B's zombification would be simply to put it // into d_zombies. This is what we do. However, if we were to // concurrently process d_zombies in the loop below, such addition // may be invisible to us (B is leaked) or even invalidate our // iterator, causing a crash. So we need to copy the set away. vector zombies; zombies.reserve(d_zombies.size()); remove_copy_if(d_zombies.begin(), d_zombies.end(), back_inserter(zombies), NodeValueReferenceCountNonZero()); d_zombies.clear(); #ifdef _LIBCPP_VERSION NodeValue* last = NULL; #endif for(vector::iterator i = zombies.begin(); i != zombies.end(); ++i) { NodeValue* nv = *i; #ifdef _LIBCPP_VERSION // Work around an apparent bug in libc++'s hash_set<> which can // (very occasionally) have an element repeated. if(nv == last) { continue; } last = nv; #endif // collect ONLY IF still zero if(nv->d_rc == 0) { if(Debug.isOn("gc")) { Debug("gc") << "deleting node value " << nv << " [" << nv->d_id << "]: "; nv->printAst(Debug("gc")); Debug("gc") << endl; } // remove from the pool kind::MetaKind mk = nv->getMetaKind(); if(mk != kind::metakind::VARIABLE && mk != kind::metakind::NULLARY_OPERATOR) { poolRemove(nv); } // whether exit is normal or exceptional, the NVReclaim dtor is // called and ensures that d_nodeUnderDeletion is set back to // NULL. NVReclaim rc(d_nodeUnderDeletion); d_nodeUnderDeletion = nv; // remove attributes { // notify listeners of deleted node TNode n; n.d_nv = nv; nv->d_rc = 1; // so that TNode doesn't assert-fail for(vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyDeleteNode(n); } // this would mean that one of the listeners stowed away // a reference to this node! Assert(nv->d_rc == 1); } nv->d_rc = 0; d_attrManager->deleteAllAttributes(nv); // decr ref counts of children nv->decrRefCounts(); if(mk == kind::metakind::CONSTANT) { // Destroy (call the destructor for) the C++ type representing // the constant in this NodeValue. This is needed for // e.g. CVC4::Rational, since it has a gmp internal // representation that mallocs memory and should be cleaned // up. (This won't delete a pointer value if used as a // constant, but then, you should probably use a smart-pointer // type for a constant payload.) kind::metakind::deleteNodeValueConstant(nv); } free(nv); } } }/* NodeManager::reclaimZombies() */ std::vector NodeManager::TopologicalSort( const std::vector& roots) { std::vector order; std::vector > stack; NodeValueIDSet visited; const NodeValueIDSet root_set(roots.begin(), roots.end()); for (size_t index = 0; index < roots.size(); index++) { NodeValue* root = roots[index]; if (visited.find(root) == visited.end()) { stack.push_back(std::make_pair(false, root)); } while (!stack.empty()) { NodeValue* current = stack.back().second; const bool visited_children = stack.back().first; Debug("gc") << "Topological sort " << current << " " << visited_children << std::endl; if (visited_children) { if (root_set.find(current) != root_set.end()) { order.push_back(current); } stack.pop_back(); } else { stack.back().first = true; Assert(visited.count(current) == 0); visited.insert(current); for (unsigned i = 0; i < current->getNumChildren(); ++i) { expr::NodeValue* child = current->getChild(i); if (visited.find(child) == visited.end()) { stack.push_back(std::make_pair(false, child)); } } } } } Assert(order.size() == roots.size()); return order; } /* NodeManager::TopologicalSort() */ TypeNode NodeManager::getType(TNode n, bool check) throw(TypeCheckingExceptionPrivate, AssertionException) { // Many theories' type checkers call Node::getType() directly. This // is incorrect, since "this" might not be the caller's curent node // manager. Rather than force the individual typecheckers not to do // this (by policy, which would be imperfect and lead to // hard-to-find bugs, which it has in the past), we just set this // node manager to be current for the duration of this check. // NodeManagerScope nms(this); TypeNode typeNode; bool hasType = getAttribute(n, TypeAttr(), typeNode); bool needsCheck = check && !getAttribute(n, TypeCheckedAttr()); Debug("getType") << this << " getting type for " << &n << " " << n << ", check=" << check << ", needsCheck = " << needsCheck << ", hasType = " << hasType << endl; if(needsCheck && !(*d_options)[options::earlyTypeChecking]) { /* Iterate and compute the children bottom up. This avoids stack overflows in computeType() when the Node graph is really deep, which should only affect us when we're type checking lazily. */ stack worklist; worklist.push(n); while( !worklist.empty() ) { TNode m = worklist.top(); bool readyToCompute = true; for( TNode::iterator it = m.begin(), end = m.end(); it != end; ++it ) { if( !hasAttribute(*it, TypeAttr()) || (check && !getAttribute(*it, TypeCheckedAttr())) ) { readyToCompute = false; worklist.push(*it); } } if( readyToCompute ) { Assert( check || m.getMetaKind()!=kind::metakind::NULLARY_OPERATOR ); /* All the children have types, time to compute */ typeNode = TypeChecker::computeType(this, m, check); worklist.pop(); } } // end while /* Last type computed in loop should be the type of n */ Assert( typeNode == getAttribute(n, TypeAttr()) ); } else if( !hasType || needsCheck ) { /* We can compute the type top-down, without worrying about deep recursion. */ Assert( check || n.getMetaKind()!=kind::metakind::NULLARY_OPERATOR ); typeNode = TypeChecker::computeType(this, n, check); } /* The type should be have been computed and stored. */ Assert( hasAttribute(n, TypeAttr()) ); /* The check should have happened, if we asked for it. */ Assert( !check || getAttribute(n, TypeCheckedAttr()) ); Debug("getType") << "type of " << &n << " " << n << " is " << typeNode << endl; return typeNode; } Node NodeManager::mkSkolem(const std::string& prefix, const TypeNode& type, const std::string& comment, int flags) { Node n = NodeBuilder<0>(this, kind::SKOLEM); setAttribute(n, TypeAttr(), type); setAttribute(n, TypeCheckedAttr(), true); if((flags & SKOLEM_EXACT_NAME) == 0) { stringstream name; name << prefix << '_' << ++d_skolemCounter; setAttribute(n, expr::VarNameAttr(), name.str()); } else { setAttribute(n, expr::VarNameAttr(), prefix); } if((flags & SKOLEM_NO_NOTIFY) == 0) { for(vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewSkolem(n, comment, (flags & SKOLEM_IS_GLOBAL) == SKOLEM_IS_GLOBAL); } } return n; } TypeNode NodeManager::mkConstructorType(const DatatypeConstructor& constructor, TypeNode range) { vector sorts; Debug("datatypes") << "ctor name: " << constructor.getName() << endl; for(DatatypeConstructor::const_iterator i = constructor.begin(); i != constructor.end(); ++i) { TypeNode selectorType = *(*i).getSelector().getType().d_typeNode; Debug("datatypes") << selectorType << endl; TypeNode sort = selectorType[1]; // should be guaranteed here already, but just in case Assert(!sort.isFunctionLike()); Debug("datatypes") << "ctor sort: " << sort << endl; sorts.push_back(sort); } Debug("datatypes") << "ctor range: " << range << endl; PrettyCheckArgument(!range.isFunctionLike(), range, "cannot create higher-order function types"); sorts.push_back(range); return mkTypeNode(kind::CONSTRUCTOR_TYPE, sorts); } TypeNode NodeManager::mkPredicateSubtype(Expr lambda) throw(TypeCheckingExceptionPrivate) { Node lambdan = Node::fromExpr(lambda); if(lambda.isNull()) { throw TypeCheckingExceptionPrivate(lambdan, "cannot make a predicate subtype based on null expression"); } TypeNode tn = lambdan.getType(); if(! tn.isPredicateLike() || tn.getArgTypes().size() != 1) { stringstream ss; ss << "expected a predicate of one argument to define predicate subtype, but got type `" << tn << "'"; throw TypeCheckingExceptionPrivate(lambdan, ss.str()); } return TypeNode(mkTypeConst(Predicate(lambda))); } TypeNode NodeManager::mkPredicateSubtype(Expr lambda, Expr witness) throw(TypeCheckingExceptionPrivate) { Node lambdan = Node::fromExpr(lambda); if(lambda.isNull()) { throw TypeCheckingExceptionPrivate(lambdan, "cannot make a predicate subtype based on null expression"); } TypeNode tn = lambdan.getType(); if(! tn.isPredicateLike() || tn.getArgTypes().size() != 1) { stringstream ss; ss << "expected a predicate of one argument to define predicate subtype, but got type `" << tn << "'"; throw TypeCheckingExceptionPrivate(lambdan, ss.str()); } return TypeNode(mkTypeConst(Predicate(lambda, witness))); } TypeNode NodeManager::mkSubrangeType(const SubrangeBounds& bounds) throw(TypeCheckingExceptionPrivate) { return TypeNode(mkTypeConst(bounds)); } TypeNode NodeManager::TupleTypeCache::getTupleType( NodeManager * nm, std::vector< TypeNode >& types, unsigned index ) { if( index==types.size() ){ if( d_data.isNull() ){ std::stringstream sst; sst << "__cvc4_tuple"; for (unsigned i = 0; i < types.size(); ++ i) { sst << "_" << types[i]; } Datatype dt(sst.str()); dt.setTuple(); std::stringstream ssc; ssc << sst.str() << "_ctor"; DatatypeConstructor c(ssc.str()); for (unsigned i = 0; i < types.size(); ++ i) { std::stringstream ss; ss << sst.str() << "_stor_" << i; c.addArg(ss.str().c_str(), types[i].toType()); } dt.addConstructor(c); d_data = TypeNode::fromType(nm->toExprManager()->mkDatatypeType(dt)); Debug("tuprec-debug") << "Return type : " << d_data << std::endl; } return d_data; }else{ return d_children[types[index]].getTupleType( nm, types, index+1 ); } } TypeNode NodeManager::RecTypeCache::getRecordType( NodeManager * nm, const Record& rec, unsigned index ) { if( index==rec.getNumFields() ){ if( d_data.isNull() ){ const Record::FieldVector& fields = rec.getFields(); std::stringstream sst; sst << "__cvc4_record"; for(Record::FieldVector::const_iterator i = fields.begin(); i != fields.end(); ++i) { sst << "_" << (*i).first << "_" << (*i).second; } Datatype dt(sst.str()); dt.setRecord(); std::stringstream ssc; ssc << sst.str() << "_ctor"; DatatypeConstructor c(ssc.str()); for(Record::FieldVector::const_iterator i = fields.begin(); i != fields.end(); ++i) { c.addArg((*i).first, (*i).second); } dt.addConstructor(c); d_data = TypeNode::fromType(nm->toExprManager()->mkDatatypeType(dt)); Debug("tuprec-debug") << "Return type : " << d_data << std::endl; } return d_data; }else{ return d_children[TypeNode::fromType( rec[index].second )][rec[index].first].getRecordType( nm, rec, index+1 ); } } TypeNode NodeManager::mkTupleType(const std::vector& types) { std::vector< TypeNode > ts; Debug("tuprec-debug") << "Make tuple type : "; for (unsigned i = 0; i < types.size(); ++ i) { CheckArgument(!types[i].isFunctionLike(), types, "cannot put function-like types in tuples"); ts.push_back( types[i] ); Debug("tuprec-debug") << types[i] << " "; } Debug("tuprec-debug") << std::endl; return d_tt_cache.getTupleType( this, ts ); } TypeNode NodeManager::mkRecordType(const Record& rec) { return d_rt_cache.getRecordType( this, rec ); } void NodeManager::reclaimAllZombies(){ reclaimZombiesUntil(0u); } /** Reclaim zombies while there are more than k nodes in the pool (if possible).*/ void NodeManager::reclaimZombiesUntil(uint32_t k){ if(safeToReclaimZombies()){ while(poolSize() >= k && !d_zombies.empty()){ reclaimZombies(); } } } size_t NodeManager::poolSize() const{ return d_nodeValuePool.size(); } TypeNode NodeManager::mkSort(uint32_t flags) { NodeBuilder<1> nb(this, kind::SORT_TYPE); Node sortTag = NodeBuilder<0>(this, kind::SORT_TAG); nb << sortTag; TypeNode tn = nb.constructTypeNode(); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewSort(tn, flags); } return tn; } TypeNode NodeManager::mkSort(const std::string& name, uint32_t flags) { NodeBuilder<1> nb(this, kind::SORT_TYPE); Node sortTag = NodeBuilder<0>(this, kind::SORT_TAG); nb << sortTag; TypeNode tn = nb.constructTypeNode(); setAttribute(tn, expr::VarNameAttr(), name); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewSort(tn, flags); } return tn; } TypeNode NodeManager::mkSort(TypeNode constructor, const std::vector& children, uint32_t flags) { Assert(constructor.getKind() == kind::SORT_TYPE && constructor.getNumChildren() == 0, "expected a sort constructor"); Assert(children.size() > 0, "expected non-zero # of children"); Assert( hasAttribute(constructor.d_nv, expr::SortArityAttr()) && hasAttribute(constructor.d_nv, expr::VarNameAttr()), "expected a sort constructor" ); std::string name = getAttribute(constructor.d_nv, expr::VarNameAttr()); Assert(getAttribute(constructor.d_nv, expr::SortArityAttr()) == children.size(), "arity mismatch in application of sort constructor"); NodeBuilder<> nb(this, kind::SORT_TYPE); Node sortTag = Node(constructor.d_nv->d_children[0]); nb << sortTag; nb.append(children); TypeNode type = nb.constructTypeNode(); setAttribute(type, expr::VarNameAttr(), name); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyInstantiateSortConstructor(constructor, type, flags); } return type; } TypeNode NodeManager::mkSortConstructor(const std::string& name, size_t arity) { Assert(arity > 0); NodeBuilder<> nb(this, kind::SORT_TYPE); Node sortTag = NodeBuilder<0>(this, kind::SORT_TAG); nb << sortTag; TypeNode type = nb.constructTypeNode(); setAttribute(type, expr::VarNameAttr(), name); setAttribute(type, expr::SortArityAttr(), arity); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewSortConstructor(type); } return type; } Node NodeManager::mkVar(const std::string& name, const TypeNode& type, uint32_t flags) { Node n = NodeBuilder<0>(this, kind::VARIABLE); setAttribute(n, TypeAttr(), type); setAttribute(n, TypeCheckedAttr(), true); setAttribute(n, expr::VarNameAttr(), name); setAttribute(n, expr::GlobalVarAttr(), flags & ExprManager::VAR_FLAG_GLOBAL); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewVar(n, flags); } return n; } Node* NodeManager::mkVarPtr(const std::string& name, const TypeNode& type, uint32_t flags) { Node* n = NodeBuilder<0>(this, kind::VARIABLE).constructNodePtr(); setAttribute(*n, TypeAttr(), type); setAttribute(*n, TypeCheckedAttr(), true); setAttribute(*n, expr::VarNameAttr(), name); setAttribute(*n, expr::GlobalVarAttr(), flags & ExprManager::VAR_FLAG_GLOBAL); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewVar(*n, flags); } return n; } Node NodeManager::mkBoundVar(const std::string& name, const TypeNode& type) { Node n = mkBoundVar(type); setAttribute(n, expr::VarNameAttr(), name); return n; } Node* NodeManager::mkBoundVarPtr(const std::string& name, const TypeNode& type) { Node* n = mkBoundVarPtr(type); setAttribute(*n, expr::VarNameAttr(), name); return n; } Node NodeManager::mkVar(const TypeNode& type, uint32_t flags) { Node n = NodeBuilder<0>(this, kind::VARIABLE); setAttribute(n, TypeAttr(), type); setAttribute(n, TypeCheckedAttr(), true); setAttribute(n, expr::GlobalVarAttr(), flags & ExprManager::VAR_FLAG_GLOBAL); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewVar(n, flags); } return n; } Node* NodeManager::mkVarPtr(const TypeNode& type, uint32_t flags) { Node* n = NodeBuilder<0>(this, kind::VARIABLE).constructNodePtr(); setAttribute(*n, TypeAttr(), type); setAttribute(*n, TypeCheckedAttr(), true); setAttribute(*n, expr::GlobalVarAttr(), flags & ExprManager::VAR_FLAG_GLOBAL); for(std::vector::iterator i = d_listeners.begin(); i != d_listeners.end(); ++i) { (*i)->nmNotifyNewVar(*n, flags); } return n; } Node NodeManager::mkBoundVar(const TypeNode& type) { Node n = NodeBuilder<0>(this, kind::BOUND_VARIABLE); setAttribute(n, TypeAttr(), type); setAttribute(n, TypeCheckedAttr(), true); return n; } Node* NodeManager::mkBoundVarPtr(const TypeNode& type) { Node* n = NodeBuilder<0>(this, kind::BOUND_VARIABLE).constructNodePtr(); setAttribute(*n, TypeAttr(), type); setAttribute(*n, TypeCheckedAttr(), true); return n; } Node NodeManager::mkInstConstant(const TypeNode& type) { Node n = NodeBuilder<0>(this, kind::INST_CONSTANT); n.setAttribute(TypeAttr(), type); n.setAttribute(TypeCheckedAttr(), true); return n; } Node NodeManager::mkBooleanTermVariable() { Node n = NodeBuilder<0>(this, kind::BOOLEAN_TERM_VARIABLE); n.setAttribute(TypeAttr(), booleanType()); n.setAttribute(TypeCheckedAttr(), true); return n; } Node NodeManager::mkNullaryOperator(const TypeNode& type, Kind k) { std::map< TypeNode, Node >::iterator it = d_unique_vars[k].find( type ); if( it==d_unique_vars[k].end() ){ Node n = NodeBuilder<0>(this, k).constructNode(); setAttribute(n, TypeAttr(), type); //setAttribute(n, TypeCheckedAttr(), true); d_unique_vars[k][type] = n; Assert( n.getMetaKind() == kind::metakind::NULLARY_OPERATOR ); return n; }else{ return it->second; } } Node NodeManager::mkAbstractValue(const TypeNode& type) { Node n = mkConst(AbstractValue(++d_abstractValueCount)); n.setAttribute(TypeAttr(), type); n.setAttribute(TypeCheckedAttr(), true); return n; } bool NodeManager::safeToReclaimZombies() const{ // FIXME multithreading return !d_inReclaimZombies && !d_attrManager->inGarbageCollection(); } void NodeManager::deleteAttributes(const std::vector& ids){ d_attrManager->deleteAttributes(ids); } void NodeManager::debugHook(int debugFlag){ // For debugging purposes only, DO NOT CHECK IN ANY CODE! } }/* CVC4 namespace */ cvc4-1.5/src/expr/node_manager.h000066400000000000000000001512151313116454100165570ustar00rootroot00000000000000/********************* */ /*! \file node_manager.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Christopher L. Conway, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A manager for Nodes ** ** A manager for Nodes. ** ** Reviewed by Chris Conway, Apr 5 2010 (bug #65). **/ #include "cvc4_private.h" /* circular dependency; force node.h first */ //#include "expr/attribute.h" #include "expr/node.h" #include "expr/type_node.h" #include "expr/expr.h" #include "expr/expr_manager.h" #ifndef __CVC4__NODE_MANAGER_H #define __CVC4__NODE_MANAGER_H #include #include #include #include "base/tls.h" #include "expr/kind.h" #include "expr/metakind.h" #include "expr/node_value.h" #include "util/subrange_bound.h" #include "options/options.h" namespace CVC4 { class StatisticsRegistry; class ResourceManager; namespace expr { namespace attr { class AttributeUniqueId; class AttributeManager; }/* CVC4::expr::attr namespace */ class TypeChecker; }/* CVC4::expr namespace */ /** * An interface that an interested party can implement and then subscribe * to NodeManager events via NodeManager::subscribeEvents(this). */ class NodeManagerListener { public: virtual ~NodeManagerListener() {} virtual void nmNotifyNewSort(TypeNode tn, uint32_t flags) {} virtual void nmNotifyNewSortConstructor(TypeNode tn) {} virtual void nmNotifyInstantiateSortConstructor(TypeNode ctor, TypeNode sort, uint32_t flags) {} virtual void nmNotifyNewDatatypes( const std::vector& datatypes) {} virtual void nmNotifyNewVar(TNode n, uint32_t flags) {} virtual void nmNotifyNewSkolem(TNode n, const std::string& comment, uint32_t flags) {} /** * Notify a listener of a Node that's being GCed. If this function stores a * reference * to the Node somewhere, very bad things will happen. */ virtual void nmNotifyDeleteNode(TNode n) {} }; /* class NodeManagerListener */ class NodeManager { template friend class CVC4::NodeBuilder; friend class NodeManagerScope; friend class expr::NodeValue; friend class expr::TypeChecker; // friends so they can access mkVar() here, which is private friend Expr ExprManager::mkVar(const std::string&, Type, uint32_t flags); friend Expr ExprManager::mkVar(Type, uint32_t flags); // friend so it can access NodeManager's d_listeners and notify clients friend std::vector ExprManager::mkMutualDatatypeTypes(std::vector&, std::set&); /** Predicate for use with STL algorithms */ struct NodeValueReferenceCountNonZero { bool operator()(expr::NodeValue* nv) { return nv->d_rc > 0; } }; typedef __gnu_cxx::hash_set NodeValuePool; typedef __gnu_cxx::hash_set NodeValueIDSet; static CVC4_THREADLOCAL(NodeManager*) s_current; Options* d_options; StatisticsRegistry* d_statisticsRegistry; ResourceManager* d_resourceManager; /** * A list of registrations on d_options to that call into d_resourceManager. * These must be garbage collected before d_options and d_resourceManager. */ ListenerRegistrationList* d_registrations; NodeValuePool d_nodeValuePool; size_t next_id; expr::attr::AttributeManager* d_attrManager; /** The associated ExprManager */ ExprManager* d_exprManager; /** * The node value we're currently freeing. This unique node value * is permitted to have outstanding TNodes to it (in "soft" * contexts, like as a key in attribute tables), even though * normally it's an error to have a TNode to a node value with a * reference count of 0. Being "under deletion" also enables * assertions that inc() is not called on it. (A poorly-behaving * attribute cleanup function could otherwise create a "Node" that * points to the node value that is in the process of being deleted, * springing it back to life.) */ expr::NodeValue* d_nodeUnderDeletion; /** * True iff we are in reclaimZombies(). This avoids unnecessary * recursion; a NodeValue being deleted might zombify other * NodeValues, but these shouldn't trigger a (recursive) call to * reclaimZombies(). */ bool d_inReclaimZombies; /** * The set of zombie nodes. We may want to revisit this design, as * we might like to delete nodes in least-recently-used order. But * we also need to avoid processing a zombie twice. */ NodeValueIDSet d_zombies; /** * NodeValues with maxed out reference counts. These live as long as the * NodeManager. They have a custom deallocation procedure at the very end. */ std::vector d_maxedOut; /** * A set of operator singletons (w.r.t. to this NodeManager * instance) for operators. Conceptually, Nodes with kind, say, * PLUS, are APPLYs of a PLUS operator to arguments. This array * holds the set of operators for these things. A PLUS operator is * a Node with kind "BUILTIN", and if you call * plusOperator->getConst(), you get kind::PLUS back. */ Node d_operators[kind::LAST_KIND]; /** unique vars per (Kind,Type) */ std::map< Kind, std::map< TypeNode, Node > > d_unique_vars; /** * A list of subscribers for NodeManager events. */ std::vector d_listeners; /** A list of datatypes owned by this node manager. */ std::vector d_ownedDatatypes; /** * A map of tuple and record types to their corresponding datatype. */ class TupleTypeCache { public: std::map< TypeNode, TupleTypeCache > d_children; TypeNode d_data; TypeNode getTupleType( NodeManager * nm, std::vector< TypeNode >& types, unsigned index = 0 ); }; class RecTypeCache { public: std::map< TypeNode, std::map< std::string, RecTypeCache > > d_children; TypeNode d_data; TypeNode getRecordType( NodeManager * nm, const Record& rec, unsigned index = 0 ); }; TupleTypeCache d_tt_cache; RecTypeCache d_rt_cache; /** * Keep a count of all abstract values produced by this NodeManager. * Abstract values have a type attribute, so if multiple SmtEngines * are attached to this NodeManager, we don't want their abstract * values to overlap. */ unsigned d_abstractValueCount; /** * A counter used to produce unique skolem names. * * Note that it is NOT incremented when skolems are created using * SKOLEM_EXACT_NAME, so it is NOT a count of the skolems produced * by this node manager. */ unsigned d_skolemCounter; /** * Look up a NodeValue in the pool associated to this NodeManager. * The NodeValue argument need not be a "completely-constructed" * NodeValue. In particular, "non-inlined" constants are permitted * (see below). * * For non-CONSTANT metakinds, nv's d_kind and d_nchildren should be * correctly set, and d_children[0..n-1] should be valid (extant) * NodeValues for lookup. * * For CONSTANT metakinds, nv's d_kind should be set correctly. * Normally a CONSTANT would have d_nchildren == 0 and the constant * value inlined in the d_children space. However, here we permit * "non-inlined" NodeValues to avoid unnecessary copying. For * these, d_nchildren == 1, and d_nchildren is a pointer to the * constant value. * * The point of this complex design is to permit efficient lookups * (without fully constructing a NodeValue). In the case that the * argument is not fully constructed, and this function returns * NULL, the caller should fully construct an equivalent one before * calling poolInsert(). NON-FULLY-CONSTRUCTED NODEVALUES are not * permitted in the pool! */ inline expr::NodeValue* poolLookup(expr::NodeValue* nv) const; /** * Insert a NodeValue into the NodeManager's pool. * * It is an error to insert a NodeValue already in the pool. * Enquire first with poolLookup(). */ inline void poolInsert(expr::NodeValue* nv); /** * Remove a NodeValue from the NodeManager's pool. * * It is an error to request the removal of a NodeValue from the * pool that is not in the pool. */ inline void poolRemove(expr::NodeValue* nv); /** * Determine if nv is currently being deleted by the NodeManager. */ inline bool isCurrentlyDeleting(const expr::NodeValue* nv) const { return d_nodeUnderDeletion == nv; } /** * Register a NodeValue as a zombie. */ inline void markForDeletion(expr::NodeValue* nv) { Assert(nv->d_rc == 0); // if d_reclaiming is set, make sure we don't call // reclaimZombies(), because it's already running. if(Debug.isOn("gc")) { Debug("gc") << "zombifying node value " << nv << " [" << nv->d_id << "]: "; nv->printAst(Debug("gc")); Debug("gc") << (d_inReclaimZombies ? " [CURRENTLY-RECLAIMING]" : "") << std::endl; } d_zombies.insert(nv); // FIXME multithreading if(safeToReclaimZombies()) { if(d_zombies.size() > 5000) { reclaimZombies(); } } } /** * Register a NodeValue as having a maxed out reference count. This NodeValue * will live as long as its containing NodeManager. */ inline void markRefCountMaxedOut(expr::NodeValue* nv) { Assert(nv->HasMaximizedReferenceCount()); if(Debug.isOn("gc")) { Debug("gc") << "marking node value " << nv << " [" << nv->d_id << "]: as maxed out" << std::endl; } d_maxedOut.push_back(nv); } /** * Reclaim all zombies. */ void reclaimZombies(); /** * It is safe to collect zombies. */ bool safeToReclaimZombies() const; /** * Returns a reverse topological sort of a list of NodeValues. The NodeValues * must be valid and have ids. The NodeValues are not modified (including ref * counts). */ static std::vector TopologicalSort( const std::vector& roots); /** * This template gives a mechanism to stack-allocate a NodeValue * with enough space for N children (where N is a compile-time * constant). You use it like this: * * NVStorage<4> nvStorage; * NodeValue& nvStack = reinterpret_cast(nvStorage); * * ...and then you can use nvStack as a NodeValue that you know has * room for 4 children. */ template struct NVStorage { expr::NodeValue nv; expr::NodeValue* child[N]; };/* struct NodeManager::NVStorage */ /* A note on isAtomic() and isAtomicFormula() (in CVC3 parlance).. * * It has been decided for now to hold off on implementations of * these functions, as they may only be needed in CNF conversion, * where it's pointless to do a lazy isAtomic determination by * searching through the DAG, and storing it, since the result will * only be used once. For more details see the 4/27/2010 CVC4 * developer's meeting notes at: * * http://goedel.cims.nyu.edu/wiki/Meeting_Minutes_-_April_27,_2010#isAtomic.28.29_and_isAtomicFormula.28.29 */ // bool containsDecision(TNode); // is "atomic" // bool properlyContainsDecision(TNode); // all children are atomic // undefined private copy constructor (disallow copy) NodeManager(const NodeManager&) CVC4_UNDEFINED; NodeManager& operator=(const NodeManager&) CVC4_UNDEFINED; void init(); /** * Create a variable with the given name and type. NOTE that no * lookup is done on the name. If you mkVar("a", type) and then * mkVar("a", type) again, you have two variables. The NodeManager * version of this is private to avoid internal uses of mkVar() from * within CVC4. Such uses should employ mkSkolem() instead. */ Node mkVar(const std::string& name, const TypeNode& type, uint32_t flags = ExprManager::VAR_FLAG_NONE); Node* mkVarPtr(const std::string& name, const TypeNode& type, uint32_t flags = ExprManager::VAR_FLAG_NONE); /** Create a variable with the given type. */ Node mkVar(const TypeNode& type, uint32_t flags = ExprManager::VAR_FLAG_NONE); Node* mkVarPtr(const TypeNode& type, uint32_t flags = ExprManager::VAR_FLAG_NONE); public: explicit NodeManager(ExprManager* exprManager); explicit NodeManager(ExprManager* exprManager, const Options& options); ~NodeManager(); /** The node manager in the current public-facing CVC4 library context */ static NodeManager* currentNM() { return s_current; } /** The resource manager associated with the current node manager */ static ResourceManager* currentResourceManager() { return s_current->d_resourceManager; } /** Get this node manager's options (const version) */ const Options& getOptions() const { return *d_options; } /** Get this node manager's options (non-const version) */ Options& getOptions() { return *d_options; } /** Get this node manager's resource manager */ ResourceManager* getResourceManager() throw() { return d_resourceManager; } /** Get this node manager's statistics registry */ StatisticsRegistry* getStatisticsRegistry() const throw() { return d_statisticsRegistry; } /** Subscribe to NodeManager events */ void subscribeEvents(NodeManagerListener* listener) { Assert(std::find(d_listeners.begin(), d_listeners.end(), listener) == d_listeners.end(), "listener already subscribed"); d_listeners.push_back(listener); } /** Unsubscribe from NodeManager events */ void unsubscribeEvents(NodeManagerListener* listener) { std::vector::iterator elt = std::find(d_listeners.begin(), d_listeners.end(), listener); Assert(elt != d_listeners.end(), "listener not subscribed"); d_listeners.erase(elt); } /** register datatype */ unsigned registerDatatype(Datatype* dt); /** get datatype for index */ const Datatype & getDatatypeForIndex( unsigned index ) const; /** Get a Kind from an operator expression */ static inline Kind operatorToKind(TNode n); // general expression-builders /** Create a node with one child. */ Node mkNode(Kind kind, TNode child1); Node* mkNodePtr(Kind kind, TNode child1); /** Create a node with two children. */ Node mkNode(Kind kind, TNode child1, TNode child2); Node* mkNodePtr(Kind kind, TNode child1, TNode child2); /** Create a node with three children. */ Node mkNode(Kind kind, TNode child1, TNode child2, TNode child3); Node* mkNodePtr(Kind kind, TNode child1, TNode child2, TNode child3); /** Create a node with four children. */ Node mkNode(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4); Node* mkNodePtr(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4); /** Create a node with five children. */ Node mkNode(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5); Node* mkNodePtr(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5); /** Create a node with an arbitrary number of children. */ template Node mkNode(Kind kind, const std::vector >& children); template Node* mkNodePtr(Kind kind, const std::vector >& children); /** Create a node (with no children) by operator. */ Node mkNode(TNode opNode); Node* mkNodePtr(TNode opNode); /** Create a node with one child by operator. */ Node mkNode(TNode opNode, TNode child1); Node* mkNodePtr(TNode opNode, TNode child1); /** Create a node with two children by operator. */ Node mkNode(TNode opNode, TNode child1, TNode child2); Node* mkNodePtr(TNode opNode, TNode child1, TNode child2); /** Create a node with three children by operator. */ Node mkNode(TNode opNode, TNode child1, TNode child2, TNode child3); Node* mkNodePtr(TNode opNode, TNode child1, TNode child2, TNode child3); /** Create a node with four children by operator. */ Node mkNode(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4); Node* mkNodePtr(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4); /** Create a node with five children by operator. */ Node mkNode(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5); Node* mkNodePtr(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5); /** Create a node by applying an operator to the children. */ template Node mkNode(TNode opNode, const std::vector >& children); template Node* mkNodePtr(TNode opNode, const std::vector >& children); Node mkBoundVar(const std::string& name, const TypeNode& type); Node* mkBoundVarPtr(const std::string& name, const TypeNode& type); Node mkBoundVar(const TypeNode& type); Node* mkBoundVarPtr(const TypeNode& type); /** * Optional flags used to control behavior of NodeManager::mkSkolem(). * They should be composed with a bitwise OR (e.g., * "SKOLEM_NO_NOTIFY | SKOLEM_EXACT_NAME"). Of course, SKOLEM_DEFAULT * cannot be composed in such a manner. */ enum SkolemFlags { SKOLEM_DEFAULT = 0, /**< default behavior */ SKOLEM_NO_NOTIFY = 1, /**< do not notify subscribers */ SKOLEM_EXACT_NAME = 2,/**< do not make the name unique by adding the id */ SKOLEM_IS_GLOBAL = 4 /**< global vars appear in models even after a pop */ };/* enum SkolemFlags */ /** * Create a skolem constant with the given name, type, and comment. * * @param prefix the name of the new skolem variable is the prefix * appended with a unique ID. This way a family of skolem variables * can be made with unique identifiers, used in dump, tracing, and * debugging output. Use SKOLEM_EXECT_NAME flag if you don't want * a unique ID appended and use prefix as the name. * * @param type the type of the skolem variable to create * * @param comment a comment for dumping output; if declarations are * being dumped, this is included in a comment before the declaration * and can be quite useful for debugging * * @param flags an optional mask of bits from SkolemFlags to control * mkSkolem() behavior */ Node mkSkolem(const std::string& prefix, const TypeNode& type, const std::string& comment = "", int flags = SKOLEM_DEFAULT); /** Create a instantiation constant with the given type. */ Node mkInstConstant(const TypeNode& type); /** Create a boolean term variable. */ Node mkBooleanTermVariable(); /** Make a new abstract value with the given type. */ Node mkAbstractValue(const TypeNode& type); /** make unique (per Type,Kind) variable. */ Node mkNullaryOperator(const TypeNode& type, Kind k); /** * Create a constant of type T. It will have the appropriate * CONST_* kind defined for T. */ template Node mkConst(const T&); template TypeNode mkTypeConst(const T&); template NodeClass mkConstInternal(const T&); /** Create a node with children. */ TypeNode mkTypeNode(Kind kind, TypeNode child1); TypeNode mkTypeNode(Kind kind, TypeNode child1, TypeNode child2); TypeNode mkTypeNode(Kind kind, TypeNode child1, TypeNode child2, TypeNode child3); TypeNode mkTypeNode(Kind kind, const std::vector& children); /** * Determine whether Nodes of a particular Kind have operators. * @returns true if Nodes of Kind k have operators. */ static inline bool hasOperator(Kind k); /** * Get the (singleton) operator of an OPERATOR-kinded kind. The * returned node n will have kind BUILTIN, and calling * n.getConst() will yield k. */ inline TNode operatorOf(Kind k) { AssertArgument( kind::metaKindOf(k) == kind::metakind::OPERATOR, k, "Kind is not an OPERATOR-kinded kind " "in NodeManager::operatorOf()" ); return d_operators[k]; } /** * Retrieve an attribute for a node. * * @param nv the node value * @param attr an instance of the attribute kind to retrieve. * @returns the attribute, if set, or a default-constructed * AttrKind::value_type if not. */ template inline typename AttrKind::value_type getAttribute(expr::NodeValue* nv, const AttrKind& attr) const; /** * Check whether an attribute is set for a node. * * @param nv the node value * @param attr an instance of the attribute kind to check * @returns true iff attr is set for * nv. */ template inline bool hasAttribute(expr::NodeValue* nv, const AttrKind& attr) const; /** * Check whether an attribute is set for a node, and, if so, * retrieve it. * * @param nv the node value * @param attr an instance of the attribute kind to check * @param value a reference to an object of the attribute's value type. * value will be set to the value of the attribute, if it is * set for nv; otherwise, it will be set to the default * value of the attribute. * @returns true iff attr is set for * nv. */ template inline bool getAttribute(expr::NodeValue* nv, const AttrKind& attr, typename AttrKind::value_type& value) const; /** * Set an attribute for a node. If the node doesn't have the * attribute, this function assigns one. If the node has one, this * overwrites it. * * @param nv the node value * @param attr an instance of the attribute kind to set * @param value the value of attr for nv */ template inline void setAttribute(expr::NodeValue* nv, const AttrKind& attr, const typename AttrKind::value_type& value); /** * Retrieve an attribute for a TNode. * * @param n the node * @param attr an instance of the attribute kind to retrieve. * @returns the attribute, if set, or a default-constructed * AttrKind::value_type if not. */ template inline typename AttrKind::value_type getAttribute(TNode n, const AttrKind& attr) const; /** * Check whether an attribute is set for a TNode. * * @param n the node * @param attr an instance of the attribute kind to check * @returns true iff attr is set for n. */ template inline bool hasAttribute(TNode n, const AttrKind& attr) const; /** * Check whether an attribute is set for a TNode and, if so, retieve * it. * * @param n the node * @param attr an instance of the attribute kind to check * @param value a reference to an object of the attribute's value type. * value will be set to the value of the attribute, if it is * set for nv; otherwise, it will be set to the default value of * the attribute. * @returns true iff attr is set for n. */ template inline bool getAttribute(TNode n, const AttrKind& attr, typename AttrKind::value_type& value) const; /** * Set an attribute for a node. If the node doesn't have the * attribute, this function assigns one. If the node has one, this * overwrites it. * * @param n the node * @param attr an instance of the attribute kind to set * @param value the value of attr for n */ template inline void setAttribute(TNode n, const AttrKind& attr, const typename AttrKind::value_type& value); /** * Retrieve an attribute for a TypeNode. * * @param n the type node * @param attr an instance of the attribute kind to retrieve. * @returns the attribute, if set, or a default-constructed * AttrKind::value_type if not. */ template inline typename AttrKind::value_type getAttribute(TypeNode n, const AttrKind& attr) const; /** * Check whether an attribute is set for a TypeNode. * * @param n the type node * @param attr an instance of the attribute kind to check * @returns true iff attr is set for n. */ template inline bool hasAttribute(TypeNode n, const AttrKind& attr) const; /** * Check whether an attribute is set for a TypeNode and, if so, retieve * it. * * @param n the type node * @param attr an instance of the attribute kind to check * @param value a reference to an object of the attribute's value type. * value will be set to the value of the attribute, if it is * set for nv; otherwise, it will be set to the default value of * the attribute. * @returns true iff attr is set for n. */ template inline bool getAttribute(TypeNode n, const AttrKind& attr, typename AttrKind::value_type& value) const; /** * Set an attribute for a type node. If the node doesn't have the * attribute, this function assigns one. If the type node has one, * this overwrites it. * * @param n the type node * @param attr an instance of the attribute kind to set * @param value the value of attr for n */ template inline void setAttribute(TypeNode n, const AttrKind& attr, const typename AttrKind::value_type& value); /** Get the (singleton) type for Booleans. */ inline TypeNode booleanType(); /** Get the (singleton) type for integers. */ inline TypeNode integerType(); /** Get the (singleton) type for reals. */ inline TypeNode realType(); /** Get the (singleton) type for strings. */ inline TypeNode stringType(); /** Get the (singleton) type for RegExp. */ inline TypeNode regExpType(); /** Get the (singleton) type for rounding modes. */ inline TypeNode roundingModeType(); /** Get the bound var list type. */ inline TypeNode boundVarListType(); /** Get the instantiation pattern type. */ inline TypeNode instPatternType(); /** Get the instantiation pattern type. */ inline TypeNode instPatternListType(); /** * Get the (singleton) type for builtin operators (that is, the type * of the Node returned from Node::getOperator() when the operator * is built-in, like EQUAL). */ inline TypeNode builtinOperatorType(); /** * Make a function type from domain to range. * * @param domain the domain type * @param range the range type * @returns the functional type domain -> range */ inline TypeNode mkFunctionType(const TypeNode& domain, const TypeNode& range); /** * Make a function type with input types from * argTypes. argTypes must have at least one element. * * @param argTypes the domain is a tuple (argTypes[0], ..., argTypes[n]) * @param range the range type * @returns the functional type (argTypes[0], ..., argTypes[n]) -> range */ inline TypeNode mkFunctionType(const std::vector& argTypes, const TypeNode& range); /** * Make a function type with input types from * sorts[0..sorts.size()-2] and result type * sorts[sorts.size()-1]. sorts must have * at least 2 elements. */ inline TypeNode mkFunctionType(const std::vector& sorts); /** * Make a predicate type with input types from * sorts. The result with be a function type with range * BOOLEAN. sorts must have at least one * element. */ inline TypeNode mkPredicateType(const std::vector& sorts); /** * Make a tuple type with types from * types. types must have at least one * element. * * @param types a vector of types * @returns the tuple type (types[0], ..., types[n]) */ TypeNode mkTupleType(const std::vector& types); /** * Make a record type with the description from rec. * * @param rec a description of the record * @returns the record type */ TypeNode mkRecordType(const Record& rec); /** * Make a symbolic expression type with types from * types. types may have any number of * elements. * * @param types a vector of types * @returns the symbolic expression type (types[0], ..., types[n]) */ inline TypeNode mkSExprType(const std::vector& types); /** Make the type of floating-point with exp bit exponent and sig bit significand */ inline TypeNode mkFloatingPointType(unsigned exp, unsigned sig); inline TypeNode mkFloatingPointType(FloatingPointSize fs); /** Make the type of bitvectors of size size */ inline TypeNode mkBitVectorType(unsigned size); /** Make the type of arrays with the given parameterization */ inline TypeNode mkArrayType(TypeNode indexType, TypeNode constituentType); /** Make the type of arrays with the given parameterization */ inline TypeNode mkSetType(TypeNode elementType); /** Make a type representing a constructor with the given parameterization */ TypeNode mkConstructorType(const DatatypeConstructor& constructor, TypeNode range); /** Make a type representing a selector with the given parameterization */ inline TypeNode mkSelectorType(TypeNode domain, TypeNode range); /** Make a type representing a tester with given parameterization */ inline TypeNode mkTesterType(TypeNode domain); /** Make a new (anonymous) sort of arity 0. */ TypeNode mkSort(uint32_t flags = ExprManager::SORT_FLAG_NONE); /** Make a new sort with the given name of arity 0. */ TypeNode mkSort(const std::string& name, uint32_t flags = ExprManager::SORT_FLAG_NONE); /** Make a new sort by parameterizing the given sort constructor. */ TypeNode mkSort(TypeNode constructor, const std::vector& children, uint32_t flags = ExprManager::SORT_FLAG_NONE); /** Make a new sort with the given name and arity. */ TypeNode mkSortConstructor(const std::string& name, size_t arity); /** * Make a predicate subtype type defined by the given LAMBDA * expression. A TypeCheckingExceptionPrivate can be thrown if * lambda is not a LAMBDA, or is ill-typed, or if CVC4 fails at * proving that the resulting predicate subtype is inhabited. */ TypeNode mkPredicateSubtype(Expr lambda) throw(TypeCheckingExceptionPrivate); /** * Make a predicate subtype type defined by the given LAMBDA * expression and whose non-emptiness is witnessed by the given * witness. A TypeCheckingExceptionPrivate can be thrown if lambda * is not a LAMBDA, or is ill-typed, or if the witness is not a * witness or ill-typed. */ TypeNode mkPredicateSubtype(Expr lambda, Expr witness) throw(TypeCheckingExceptionPrivate); /** * Make an integer subrange type as defined by the argument. */ TypeNode mkSubrangeType(const SubrangeBounds& bounds) throw(TypeCheckingExceptionPrivate); /** * Get the type for the given node and optionally do type checking. * * Initial type computation will be near-constant time if * type checking is not requested. Results are memoized, so that * subsequent calls to getType() without type checking will be * constant time. * * Initial type checking is linear in the size of the expression. * Again, the results are memoized, so that subsequent calls to * getType(), with or without type checking, will be constant * time. * * NOTE: A TypeCheckingException can be thrown even when type * checking is not requested. getType() will always return a * valid and correct type and, thus, an exception will be thrown * when no valid or correct type can be computed (e.g., if the * arguments to a bit-vector operation aren't bit-vectors). When * type checking is not requested, getType() will do the minimum * amount of checking required to return a valid result. * * @param n the Node for which we want a type * @param check whether we should check the type as we compute it * (default: false) */ TypeNode getType(TNode n, bool check = false) throw(TypeCheckingExceptionPrivate, AssertionException); /** * Convert a node to an expression. Uses the ExprManager * associated to this NodeManager. */ inline Expr toExpr(TNode n); /** * Convert an expression to a node. */ static inline Node fromExpr(const Expr& e); /** * Convert a node manager to an expression manager. */ inline ExprManager* toExprManager(); /** * Convert an expression manager to a node manager. */ static inline NodeManager* fromExprManager(ExprManager* exprManager); /** * Convert a type node to a type. */ inline Type toType(TypeNode tn); /** * Convert a type to a type node. */ static inline TypeNode fromType(Type t); /** Reclaim zombies while there are more than k nodes in the pool (if possible).*/ void reclaimZombiesUntil(uint32_t k); /** Reclaims all zombies (if possible).*/ void reclaimAllZombies(); /** Size of the node pool. */ size_t poolSize() const; /** Deletes a list of attributes from the NM's AttributeManager.*/ void deleteAttributes(const std::vector< const expr::attr::AttributeUniqueId* >& ids); /** * This function gives developers a hook into the NodeManager. * This can be changed in node_manager.cpp without recompiling most of cvc4. * * debugHook is a debugging only function, and should not be present in * any published code! */ void debugHook(int debugFlag); };/* class NodeManager */ /** * This class changes the "current" thread-global * NodeManager when it is created and reinstates the * previous thread-global NodeManager when it is * destroyed, effectively maintaining a set of nested * NodeManager scopes. This is especially useful on * public-interface calls into the CVC4 library, where CVC4's notion * of the "current" NodeManager should be set to match * the calling context. See, for example, the implementations of * public calls in the ExprManager and * SmtEngine classes. * * The client must be careful to create and destroy * NodeManagerScope objects in a well-nested manner (such * as on the stack). You may create a NodeManagerScope * with new and destroy it with delete, or * place it as a data member of an object that is, but if the scope of * these new/delete pairs isn't properly * maintained, the incorrect "current" NodeManager * pointer may be restored after a delete. */ class NodeManagerScope { /** The old NodeManager, to be restored on destruction. */ NodeManager* d_oldNodeManager; Options::OptionsScope d_optionsScope; public: NodeManagerScope(NodeManager* nm) : d_oldNodeManager(NodeManager::s_current) , d_optionsScope(nm ? nm->d_options : NULL) { // There are corner cases where nm can be NULL and it's ok. // For example, if you write { Expr e; }, then when the null // Expr is destructed, there's no active node manager. //Assert(nm != NULL); NodeManager::s_current = nm; //Options::s_current = nm ? nm->d_options : NULL; Debug("current") << "node manager scope: " << NodeManager::s_current << "\n"; } ~NodeManagerScope() { NodeManager::s_current = d_oldNodeManager; //Options::s_current = d_oldNodeManager ? d_oldNodeManager->d_options : NULL; Debug("current") << "node manager scope: " << "returning to " << NodeManager::s_current << "\n"; } };/* class NodeManagerScope */ /** Get the (singleton) type for booleans. */ inline TypeNode NodeManager::booleanType() { return TypeNode(mkTypeConst(BOOLEAN_TYPE)); } /** Get the (singleton) type for integers. */ inline TypeNode NodeManager::integerType() { return TypeNode(mkTypeConst(INTEGER_TYPE)); } /** Get the (singleton) type for reals. */ inline TypeNode NodeManager::realType() { return TypeNode(mkTypeConst(REAL_TYPE)); } /** Get the (singleton) type for strings. */ inline TypeNode NodeManager::stringType() { return TypeNode(mkTypeConst(STRING_TYPE)); } /** Get the (singleton) type for regexps. */ inline TypeNode NodeManager::regExpType() { return TypeNode(mkTypeConst(REGEXP_TYPE)); } /** Get the (singleton) type for rounding modes. */ inline TypeNode NodeManager::roundingModeType() { return TypeNode(mkTypeConst(ROUNDINGMODE_TYPE)); } /** Get the bound var list type. */ inline TypeNode NodeManager::boundVarListType() { return TypeNode(mkTypeConst(BOUND_VAR_LIST_TYPE)); } /** Get the instantiation pattern type. */ inline TypeNode NodeManager::instPatternType() { return TypeNode(mkTypeConst(INST_PATTERN_TYPE)); } /** Get the instantiation pattern type. */ inline TypeNode NodeManager::instPatternListType() { return TypeNode(mkTypeConst(INST_PATTERN_LIST_TYPE)); } /** Get the (singleton) type for builtin operators. */ inline TypeNode NodeManager::builtinOperatorType() { return TypeNode(mkTypeConst(BUILTIN_OPERATOR_TYPE)); } /** Make a function type from domain to range. */ inline TypeNode NodeManager::mkFunctionType(const TypeNode& domain, const TypeNode& range) { std::vector sorts; sorts.push_back(domain); sorts.push_back(range); return mkFunctionType(sorts); } inline TypeNode NodeManager::mkFunctionType(const std::vector& argTypes, const TypeNode& range) { Assert(argTypes.size() >= 1); std::vector sorts(argTypes); sorts.push_back(range); return mkFunctionType(sorts); } inline TypeNode NodeManager::mkFunctionType(const std::vector& sorts) { Assert(sorts.size() >= 2); std::vector sortNodes; for (unsigned i = 0; i < sorts.size(); ++ i) { CheckArgument(!sorts[i].isFunctionLike(), sorts, "cannot create higher-order function types"); sortNodes.push_back(sorts[i]); } return mkTypeNode(kind::FUNCTION_TYPE, sortNodes); } inline TypeNode NodeManager::mkPredicateType(const std::vector& sorts) { Assert(sorts.size() >= 1); std::vector sortNodes; for (unsigned i = 0; i < sorts.size(); ++ i) { CheckArgument(!sorts[i].isFunctionLike(), sorts, "cannot create higher-order function types"); sortNodes.push_back(sorts[i]); } sortNodes.push_back(booleanType()); return mkTypeNode(kind::FUNCTION_TYPE, sortNodes); } inline TypeNode NodeManager::mkSExprType(const std::vector& types) { std::vector typeNodes; for (unsigned i = 0; i < types.size(); ++ i) { typeNodes.push_back(types[i]); } return mkTypeNode(kind::SEXPR_TYPE, typeNodes); } inline TypeNode NodeManager::mkBitVectorType(unsigned size) { return TypeNode(mkTypeConst(BitVectorSize(size))); } inline TypeNode NodeManager::mkFloatingPointType(unsigned exp, unsigned sig) { return TypeNode(mkTypeConst(FloatingPointSize(exp,sig))); } inline TypeNode NodeManager::mkFloatingPointType(FloatingPointSize fs) { return TypeNode(mkTypeConst(fs)); } inline TypeNode NodeManager::mkArrayType(TypeNode indexType, TypeNode constituentType) { CheckArgument(!indexType.isNull(), indexType, "unexpected NULL index type"); CheckArgument(!constituentType.isNull(), constituentType, "unexpected NULL constituent type"); CheckArgument(!indexType.isFunctionLike(), indexType, "cannot index arrays by a function-like type"); CheckArgument(!constituentType.isFunctionLike(), constituentType, "cannot store function-like types in arrays"); Debug("arrays") << "making array type " << indexType << " " << constituentType << std::endl; return mkTypeNode(kind::ARRAY_TYPE, indexType, constituentType); } inline TypeNode NodeManager::mkSetType(TypeNode elementType) { CheckArgument(!elementType.isNull(), elementType, "unexpected NULL element type"); // TODO: Confirm meaning of isFunctionLike(). --K CheckArgument(!elementType.isFunctionLike(), elementType, "cannot store function-like types in sets"); Debug("sets") << "making sets type " << elementType << std::endl; return mkTypeNode(kind::SET_TYPE, elementType); } inline TypeNode NodeManager::mkSelectorType(TypeNode domain, TypeNode range) { CheckArgument(!domain.isFunctionLike(), domain, "cannot create higher-order function types"); CheckArgument(!range.isFunctionLike(), range, "cannot create higher-order function types"); return mkTypeNode(kind::SELECTOR_TYPE, domain, range); } inline TypeNode NodeManager::mkTesterType(TypeNode domain) { CheckArgument(!domain.isFunctionLike(), domain, "cannot create higher-order function types"); return mkTypeNode(kind::TESTER_TYPE, domain ); } inline expr::NodeValue* NodeManager::poolLookup(expr::NodeValue* nv) const { NodeValuePool::const_iterator find = d_nodeValuePool.find(nv); if(find == d_nodeValuePool.end()) { return NULL; } else { return *find; } } inline void NodeManager::poolInsert(expr::NodeValue* nv) { Assert(d_nodeValuePool.find(nv) == d_nodeValuePool.end(), "NodeValue already in the pool!"); d_nodeValuePool.insert(nv);// FIXME multithreading } inline void NodeManager::poolRemove(expr::NodeValue* nv) { Assert(d_nodeValuePool.find(nv) != d_nodeValuePool.end(), "NodeValue is not in the pool!"); d_nodeValuePool.erase(nv);// FIXME multithreading } inline Expr NodeManager::toExpr(TNode n) { return Expr(d_exprManager, new Node(n)); } inline Node NodeManager::fromExpr(const Expr& e) { return e.getNode(); } inline ExprManager* NodeManager::toExprManager() { return d_exprManager; } inline NodeManager* NodeManager::fromExprManager(ExprManager* exprManager) { return exprManager->getNodeManager(); } inline Type NodeManager::toType(TypeNode tn) { return Type(this, new TypeNode(tn)); } inline TypeNode NodeManager::fromType(Type t) { return *Type::getTypeNode(t); } }/* CVC4 namespace */ #define __CVC4__NODE_MANAGER_NEEDS_CONSTANT_MAP #include "expr/metakind.h" #undef __CVC4__NODE_MANAGER_NEEDS_CONSTANT_MAP #include "expr/node_builder.h" namespace CVC4 { // general expression-builders inline bool NodeManager::hasOperator(Kind k) { switch(kind::MetaKind mk = kind::metaKindOf(k)) { case kind::metakind::INVALID: case kind::metakind::VARIABLE: case kind::metakind::NULLARY_OPERATOR: return false; case kind::metakind::OPERATOR: case kind::metakind::PARAMETERIZED: return true; case kind::metakind::CONSTANT: return false; default: Unhandled(mk); } } inline Kind NodeManager::operatorToKind(TNode n) { return kind::operatorToKind(n.d_nv); } inline Node NodeManager::mkNode(Kind kind, TNode child1) { NodeBuilder<1> nb(this, kind); nb << child1; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(Kind kind, TNode child1) { NodeBuilder<1> nb(this, kind); nb << child1; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(Kind kind, TNode child1, TNode child2) { NodeBuilder<2> nb(this, kind); nb << child1 << child2; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(Kind kind, TNode child1, TNode child2) { NodeBuilder<2> nb(this, kind); nb << child1 << child2; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(Kind kind, TNode child1, TNode child2, TNode child3) { NodeBuilder<3> nb(this, kind); nb << child1 << child2 << child3; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(Kind kind, TNode child1, TNode child2, TNode child3) { NodeBuilder<3> nb(this, kind); nb << child1 << child2 << child3; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4) { NodeBuilder<4> nb(this, kind); nb << child1 << child2 << child3 << child4; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4) { NodeBuilder<4> nb(this, kind); nb << child1 << child2 << child3 << child4; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5) { NodeBuilder<5> nb(this, kind); nb << child1 << child2 << child3 << child4 << child5; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(Kind kind, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5) { NodeBuilder<5> nb(this, kind); nb << child1 << child2 << child3 << child4 << child5; return nb.constructNodePtr(); } // N-ary version template inline Node NodeManager::mkNode(Kind kind, const std::vector >& children) { NodeBuilder<> nb(this, kind); nb.append(children); return nb.constructNode(); } template inline Node* NodeManager::mkNodePtr(Kind kind, const std::vector >& children) { NodeBuilder<> nb(this, kind); nb.append(children); return nb.constructNodePtr(); } // for operators inline Node NodeManager::mkNode(TNode opNode) { NodeBuilder<1> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(TNode opNode) { NodeBuilder<1> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } return nb.constructNodePtr(); } inline Node NodeManager::mkNode(TNode opNode, TNode child1) { NodeBuilder<2> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(TNode opNode, TNode child1) { NodeBuilder<2> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(TNode opNode, TNode child1, TNode child2) { NodeBuilder<3> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(TNode opNode, TNode child1, TNode child2) { NodeBuilder<3> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(TNode opNode, TNode child1, TNode child2, TNode child3) { NodeBuilder<4> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2 << child3; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(TNode opNode, TNode child1, TNode child2, TNode child3) { NodeBuilder<4> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2 << child3; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4) { NodeBuilder<5> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2 << child3 << child4; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4) { NodeBuilder<5> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2 << child3 << child4; return nb.constructNodePtr(); } inline Node NodeManager::mkNode(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5) { NodeBuilder<6> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2 << child3 << child4 << child5; return nb.constructNode(); } inline Node* NodeManager::mkNodePtr(TNode opNode, TNode child1, TNode child2, TNode child3, TNode child4, TNode child5) { NodeBuilder<6> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb << child1 << child2 << child3 << child4 << child5; return nb.constructNodePtr(); } // N-ary version for operators template inline Node NodeManager::mkNode(TNode opNode, const std::vector >& children) { NodeBuilder<> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb.append(children); return nb.constructNode(); } template inline Node* NodeManager::mkNodePtr(TNode opNode, const std::vector >& children) { NodeBuilder<> nb(this, operatorToKind(opNode)); if(opNode.getKind() != kind::BUILTIN) { nb << opNode; } nb.append(children); return nb.constructNodePtr(); } inline TypeNode NodeManager::mkTypeNode(Kind kind, TypeNode child1) { return (NodeBuilder<1>(this, kind) << child1).constructTypeNode(); } inline TypeNode NodeManager::mkTypeNode(Kind kind, TypeNode child1, TypeNode child2) { return (NodeBuilder<2>(this, kind) << child1 << child2).constructTypeNode(); } inline TypeNode NodeManager::mkTypeNode(Kind kind, TypeNode child1, TypeNode child2, TypeNode child3) { return (NodeBuilder<3>(this, kind) << child1 << child2 << child3).constructTypeNode(); } // N-ary version for types inline TypeNode NodeManager::mkTypeNode(Kind kind, const std::vector& children) { return NodeBuilder<>(this, kind).append(children).constructTypeNode(); } template Node NodeManager::mkConst(const T& val) { return mkConstInternal(val); } template TypeNode NodeManager::mkTypeConst(const T& val) { return mkConstInternal(val); } template NodeClass NodeManager::mkConstInternal(const T& val) { // typedef typename kind::metakind::constantMap::OwningTheory theory_t; NVStorage<1> nvStorage; expr::NodeValue& nvStack = reinterpret_cast(nvStorage); nvStack.d_id = 0; nvStack.d_kind = kind::metakind::ConstantMap::kind; nvStack.d_rc = 0; nvStack.d_nchildren = 1; #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" #endif nvStack.d_children[0] = const_cast(reinterpret_cast(&val)); expr::NodeValue* nv = poolLookup(&nvStack); #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #pragma GCC diagnostic pop #endif if(nv != NULL) { return NodeClass(nv); } nv = (expr::NodeValue*) std::malloc(sizeof(expr::NodeValue) + sizeof(T)); if(nv == NULL) { throw std::bad_alloc(); } nv->d_nchildren = 0; nv->d_kind = kind::metakind::ConstantMap::kind; nv->d_id = next_id++;// FIXME multithreading nv->d_rc = 0; //OwningTheory::mkConst(val); new (&nv->d_children) T(val); poolInsert(nv); if(Debug.isOn("gc")) { Debug("gc") << "creating node value " << nv << " [" << nv->d_id << "]: "; nv->printAst(Debug("gc")); Debug("gc") << std::endl; } return NodeClass(nv); } }/* CVC4 namespace */ #endif /* __CVC4__NODE_MANAGER_H */ cvc4-1.5/src/expr/node_manager_attributes.h000066400000000000000000000025771313116454100210330ustar00rootroot00000000000000/********************* */ /*! \file node_manager_attributes.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #pragma once #include "expr/attribute.h" namespace CVC4 { namespace expr { // Definition of an attribute for the variable name. // TODO: hide this attribute behind a NodeManager interface. namespace attr { struct VarNameTag { }; struct GlobalVarTag { }; struct SortArityTag { }; struct TypeTag { }; struct TypeCheckedTag { }; }/* CVC4::expr::attr namespace */ typedef Attribute VarNameAttr; typedef Attribute GlobalVarAttr; typedef Attribute SortArityAttr; typedef expr::Attribute TypeAttr; typedef expr::Attribute TypeCheckedAttr; }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/node_manager_listeners.cpp000066400000000000000000000024071313116454100212000ustar00rootroot00000000000000/********************* */ /*! \file node_manager_listeners.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Listeners that NodeManager registers to its Options object. ** ** Listeners that NodeManager registers to its Options object. **/ #include "node_manager_listeners.h" #include "base/listener.h" #include "options/smt_options.h" #include "util/resource_manager.h" namespace CVC4 { namespace expr { void TlimitListener::notify() { d_rm->setTimeLimit(options::cumulativeMillisecondLimit(), true); } void TlimitPerListener::notify() { d_rm->setTimeLimit(options::perCallMillisecondLimit(), false); } void RlimitListener::notify() { d_rm->setTimeLimit(options::cumulativeResourceLimit(), true); } void RlimitPerListener::notify() { d_rm->setTimeLimit(options::perCallResourceLimit(), false); } }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/node_manager_listeners.h000066400000000000000000000031751313116454100206500ustar00rootroot00000000000000/********************* */ /*! \file node_manager_listeners.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Listeners that NodeManager registers to its Options object. ** ** Listeners that NodeManager registers to its Options object. **/ #include "cvc4_private.h" #ifndef __CVC4__EXPR__NODE_MANAGER_LISTENERS_H #define __CVC4__EXPR__NODE_MANAGER_LISTENERS_H #include "base/listener.h" #include "util/resource_manager.h" namespace CVC4 { namespace expr { class TlimitListener : public Listener { public: TlimitListener(ResourceManager* rm) : d_rm(rm) {} virtual void notify(); private: ResourceManager* d_rm; }; class TlimitPerListener : public Listener { public: TlimitPerListener(ResourceManager* rm) : d_rm(rm) {} virtual void notify(); private: ResourceManager* d_rm; }; class RlimitListener : public Listener { public: RlimitListener(ResourceManager* rm) : d_rm(rm) {} virtual void notify(); private: ResourceManager* d_rm; }; class RlimitPerListener : public Listener { public: RlimitPerListener(ResourceManager* rm) : d_rm(rm) {} virtual void notify(); private: ResourceManager* d_rm; }; }/* CVC4::expr namespace */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR__NODE_MANAGER_LISTENERS_H */ cvc4-1.5/src/expr/node_self_iterator.h000066400000000000000000000063251313116454100200100ustar00rootroot00000000000000/********************* */ /*! \file node_self_iterator.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Iterator supporting Node "self-iteration" ** ** Iterator supporting Node "self-iteration." **/ #include "cvc4_private.h" #ifndef __CVC4__EXPR__NODE_SELF_ITERATOR_H #define __CVC4__EXPR__NODE_SELF_ITERATOR_H #include #include "base/cvc4_assert.h" #include "expr/node.h" namespace CVC4 { namespace expr { class NodeSelfIterator : std::iterator { Node d_node; Node::const_iterator d_child; public: static NodeSelfIterator self(TNode n); static NodeSelfIterator selfEnd(TNode n); NodeSelfIterator(); NodeSelfIterator(Node n); NodeSelfIterator(TNode n); NodeSelfIterator(const NodeSelfIterator& i); NodeSelfIterator(Node::const_iterator i); NodeSelfIterator(TNode::const_iterator i); Node operator*() const; NodeSelfIterator& operator++(); NodeSelfIterator operator++(int); bool operator==(NodeSelfIterator i) const; bool operator!=(NodeSelfIterator i) const; };/* class NodeSelfIterator */ inline NodeSelfIterator NodeSelfIterator::self(TNode n) { Assert(!n.isNull(), "Self-iteration over null nodes not permitted."); return NodeSelfIterator(n); } inline NodeSelfIterator NodeSelfIterator::selfEnd(TNode n) { Assert(!n.isNull(), "Self-iteration over null nodes not permitted."); return NodeSelfIterator(n.end()); } inline NodeSelfIterator::NodeSelfIterator() : d_node(), d_child() { } inline NodeSelfIterator::NodeSelfIterator(Node node) : d_node(node), d_child() { Assert(!node.isNull(), "Self-iteration over null nodes not permitted."); } inline NodeSelfIterator::NodeSelfIterator(TNode node) : d_node(node), d_child() { Assert(!node.isNull(), "Self-iteration over null nodes not permitted."); } inline NodeSelfIterator::NodeSelfIterator(const NodeSelfIterator& i) : d_node(i.d_node), d_child(i.d_child) { } inline NodeSelfIterator::NodeSelfIterator(Node::const_iterator i) : d_node(), d_child(i) { } inline NodeSelfIterator::NodeSelfIterator(TNode::const_iterator i) : d_node(), d_child(i) { } inline Node NodeSelfIterator::operator*() const { return d_node.isNull() ? *d_child : d_node; } inline NodeSelfIterator& NodeSelfIterator::operator++() { if(d_node.isNull()) { ++d_child; } else { d_child = d_node.end(); d_node = Node::null(); } return *this; } inline NodeSelfIterator NodeSelfIterator::operator++(int) { NodeSelfIterator i = *this; ++*this; return i; } inline bool NodeSelfIterator::operator==(NodeSelfIterator i) const { return d_node == i.d_node && d_child == i.d_child; } inline bool NodeSelfIterator::operator!=(NodeSelfIterator i) const { return !(*this == i); } }/* CVC4::expr namespace */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR__NODE_SELF_ITERATOR_H */ cvc4-1.5/src/expr/node_value.cpp000066400000000000000000000047621313116454100166200ustar00rootroot00000000000000/********************* */ /*! \file node_value.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An expression node. ** ** An expression node. ** ** Instances of this class are generally referenced through ** cvc4::Node rather than by pointer; cvc4::Node maintains the ** reference count on NodeValue instances and **/ #include "expr/node_value.h" #include #include "expr/kind.h" #include "expr/metakind.h" #include "expr/node.h" #include "options/base_options.h" #include "options/language.h" #include "options/options.h" #include "printer/printer.h" using namespace std; namespace CVC4 { namespace expr { string NodeValue::toString() const { stringstream ss; OutputLanguage outlang = (this == &null()) ? language::output::LANG_AUTO : options::outputLanguage(); toStream(ss, -1, false, false, outlang); return ss.str(); } void NodeValue::toStream(std::ostream& out, int toDepth, bool types, size_t dag, OutputLanguage language) const { // Ensure that this node value is live for the length of this call. // It really breaks things badly if we don't have a nonzero ref // count, even just for printing. RefCountGuard guard(this); Printer::getPrinter(language)->toStream(out, TNode(this), toDepth, types, dag); } void NodeValue::printAst(std::ostream& out, int ind) const { RefCountGuard guard(this); indent(out, ind); out << '('; out << getKind(); if (getMetaKind() == kind::metakind::VARIABLE || getMetaKind() == kind::metakind::NULLARY_OPERATOR ) { out << ' ' << getId(); } else if (getMetaKind() == kind::metakind::CONSTANT) { out << ' '; kind::metakind::NodeValueConstPrinter::toStream(out, this); } else { if (nv_begin() != nv_end()) { for (const_nv_iterator child = nv_begin(); child != nv_end(); ++child) { out << std::endl; (*child)->printAst(out, ind + 1); } out << std::endl; indent(out, ind); } } out << ')'; } } /* CVC4::expr namespace */ } /* CVC4 namespace */ cvc4-1.5/src/expr/node_value.h000066400000000000000000000354731313116454100162700ustar00rootroot00000000000000/********************* */ /*! \file node_value.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Dejan Jovanovic ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An expression node. ** ** An expression node. ** ** Instances of this class are generally referenced through ** cvc4::Node rather than by pointer; cvc4::Node maintains the ** reference count on NodeValue instances and **/ #include "cvc4_private.h" // circular dependency #include "expr/metakind.h" #ifndef __CVC4__EXPR__NODE_VALUE_H #define __CVC4__EXPR__NODE_VALUE_H #include #include #include #include "expr/kind.h" #include "options/language.h" namespace CVC4 { template class NodeTemplate; class TypeNode; template class NodeBuilder; class AndNodeBuilder; class OrNodeBuilder; class PlusNodeBuilder; class MultNodeBuilder; class NodeManager; namespace expr { class NodeValue; } namespace kind { namespace metakind { template < ::CVC4::Kind k, bool pool > struct NodeValueConstCompare; struct NodeValueCompare; struct NodeValueConstPrinter; void deleteNodeValueConstant(::CVC4::expr::NodeValue* nv); }/* CVC4::kind::metakind namespace */ }/* CVC4::kind namespace */ namespace expr { #if __CVC4__EXPR__NODE_VALUE__NBITS__REFCOUNT + \ __CVC4__EXPR__NODE_VALUE__NBITS__KIND + \ __CVC4__EXPR__NODE_VALUE__NBITS__ID + \ __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN != 96 # error NodeValue header bit assignment does not sum to 96 ! #endif /* sum != 96 */ /** * This is a NodeValue. */ class NodeValue { static const unsigned NBITS_REFCOUNT = __CVC4__EXPR__NODE_VALUE__NBITS__REFCOUNT; static const unsigned NBITS_KIND = __CVC4__EXPR__NODE_VALUE__NBITS__KIND; static const unsigned NBITS_ID = __CVC4__EXPR__NODE_VALUE__NBITS__ID; static const unsigned NBITS_NCHILDREN = __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN; /** Maximum reference count possible. Used for sticky * reference-counting. Should be (1 << num_bits(d_rc)) - 1 */ static const unsigned MAX_RC = (1u << NBITS_REFCOUNT) - 1; /** A mask for d_kind */ static const unsigned kindMask = (1u << NBITS_KIND) - 1; // This header fits into 96 bits /** The ID (0 is reserved for the null value) */ uint64_t d_id : NBITS_ID; /** The expression's reference count. @see cvc4::Node. */ uint64_t d_rc : NBITS_REFCOUNT; /** Kind of the expression */ uint64_t d_kind : NBITS_KIND; /** Number of children */ uint64_t d_nchildren : NBITS_NCHILDREN; /** Variable number of child nodes */ NodeValue* d_children[0]; // todo add exprMgr ref in debug case template friend class ::CVC4::NodeTemplate; friend class ::CVC4::TypeNode; template friend class ::CVC4::NodeBuilder; friend class ::CVC4::NodeManager; template friend struct ::CVC4::kind::metakind::NodeValueConstCompare; friend struct ::CVC4::kind::metakind::NodeValueCompare; friend struct ::CVC4::kind::metakind::NodeValueConstPrinter; friend void ::CVC4::kind::metakind::deleteNodeValueConstant(NodeValue* nv); void inc(); void dec(); // Returns true if the reference count is maximized. inline bool HasMaximizedReferenceCount() { return d_rc == MAX_RC; } /** * Uninitializing constructor for NodeBuilder's use. */ NodeValue() { /* do not initialize! */ } private: /** Private constructor for the null value. */ NodeValue(int); typedef NodeValue** nv_iterator; typedef NodeValue const* const* const_nv_iterator; nv_iterator nv_begin(); nv_iterator nv_end(); const_nv_iterator nv_begin() const; const_nv_iterator nv_end() const; template class iterator { const_nv_iterator d_i; public: typedef std::random_access_iterator_tag iterator_category; typedef T value_type; typedef std::ptrdiff_t difference_type; typedef T* pointer; typedef T& reference; iterator() : d_i(NULL) {} explicit iterator(const_nv_iterator i) : d_i(i) {} // conversion of a TNode iterator to a Node iterator inline operator NodeValue::iterator >() { return iterator >(d_i); } inline T operator*() const; bool operator==(const iterator& i) const { return d_i == i.d_i; } bool operator!=(const iterator& i) const { return d_i != i.d_i; } iterator& operator++() { ++d_i; return *this; } iterator operator++(int) { return iterator(d_i++); } iterator& operator--() { --d_i; return *this; } iterator operator--(int) { return iterator(d_i--); } iterator& operator+=(difference_type p) { d_i += p; return *this; } iterator& operator-=(difference_type p) { d_i -= p; return *this; } iterator operator+(difference_type p) { return iterator(d_i + p); } iterator operator-(difference_type p) { return iterator(d_i - p); } difference_type operator-(iterator i) { return d_i - i.d_i; } };/* class NodeValue::iterator */ // operator+ (as a function) cannot be a template, so we have to // define two versions friend NodeValue::iterator > operator+(NodeValue::iterator >::difference_type p, NodeValue::iterator > i); friend NodeValue::iterator > operator+(NodeValue::iterator >::difference_type p, NodeValue::iterator > i); /** Decrement ref counts of children */ inline void decrRefCounts(); bool isBeingDeleted() const; public: template inline iterator begin() const; template inline iterator end() const; /** * Hash this NodeValue. For hash_maps, hash_sets, etc.. but this is * for expr package internal use only at present! This is likely to * be POORLY PERFORMING for other uses! For example, this gives * collisions for all VARIABLEs. * @return the hash value of this expression. */ size_t poolHash() const { if(getMetaKind() == kind::metakind::CONSTANT) { return kind::metakind::NodeValueCompare::constHash(this); } size_t hash = d_kind; const_nv_iterator i = nv_begin(); const_nv_iterator i_end = nv_end(); while(i != i_end) { hash ^= (*i)->d_id + 0x9e3779b9 + (hash << 6) + (hash >> 2); ++i; } return hash; } unsigned long getId() const { return d_id; } Kind getKind() const { return dKindToKind(d_kind); } kind::MetaKind getMetaKind() const { return kind::metaKindOf(getKind()); } unsigned getNumChildren() const { return (getMetaKind() == kind::metakind::PARAMETERIZED) ? d_nchildren - 1 : d_nchildren; } unsigned getRefCount() const { return d_rc; } std::string toString() const; void toStream(std::ostream& out, int toDepth = -1, bool types = false, size_t dag = 1, OutputLanguage = language::output::LANG_AUTO) const; static inline unsigned kindToDKind(Kind k) { return ((unsigned) k) & kindMask; } static inline Kind dKindToKind(unsigned d) { return (d == kindMask) ? kind::UNDEFINED_KIND : Kind(d); } static inline NodeValue& null() { static NodeValue* s_null = new NodeValue(0); return *s_null; } /** * If this is a CONST_* Node, extract the constant from it. */ template inline const T& getConst() const; NodeValue* getOperator() const; NodeValue* getChild(int i) const; void printAst(std::ostream& out, int indent = 0) const; private: /** * RAII guard that increases the reference count if the reference count to be * > 0. Otherwise, this does nothing. This does not just increment the * reference count to avoid maxing out the d_rc field. This is only for low * level functions. */ class RefCountGuard { NodeValue* d_nv; bool d_increased; public: RefCountGuard(const NodeValue* nv) : d_nv(const_cast(nv)) { d_increased = (d_nv->d_rc == 0); if(d_increased) { d_nv->d_rc = 1; } } ~RefCountGuard() { // dec() without marking for deletion: we don't want to garbage // collect this NodeValue if ours is the last reference to it. // E.g., this can happen when debugging code calls the print // routines below. As RefCountGuards are scoped on the stack, // this should be fine---but not in multithreaded contexts! if(d_increased) { --d_nv->d_rc; } } };/* NodeValue::RefCountGuard */ friend class RefCountGuard; /** * Indents the given stream a given amount of spaces. * @param out the stream to indent * @param indent the numer of spaces */ static inline void indent(std::ostream& out, int indent) { for(int i = 0; i < indent; i++) { out << ' '; } } };/* class NodeValue */ /** * Provides a symmetric addition operator to that already defined in * the iterator class. */ inline NodeValue::iterator > operator+(NodeValue::iterator >::difference_type p, NodeValue::iterator > i) { return i + p; } /** * Provides a symmetric addition operator to that already defined in * the iterator class. */ inline NodeValue::iterator > operator+(NodeValue::iterator >::difference_type p, NodeValue::iterator > i) { return i + p; } /** * For hash_maps, hash_sets, etc.. but this is for expr package * internal use only at present! This is likely to be POORLY * PERFORMING for other uses! NodeValue::poolHash() will lead to * collisions for all VARIABLEs. */ struct NodeValuePoolHashFunction { inline size_t operator()(const NodeValue* nv) const { return (size_t) nv->poolHash(); } };/* struct NodeValuePoolHashFunction */ /** * For hash_maps, hash_sets, etc. */ struct NodeValueIDHashFunction { inline size_t operator()(const NodeValue* nv) const { return (size_t) nv->getId(); } };/* struct NodeValueIDHashFunction */ /** * An equality predicate that is applicable between pointers to fully * constructed NodeValues. */ struct NodeValueIDEquality { inline bool operator()(const NodeValue* a, const NodeValue* b) const { return a->getId() == b->getId(); } }; inline std::ostream& operator<<(std::ostream& out, const NodeValue& nv); }/* CVC4::expr namespace */ }/* CVC4 namespace */ #include "expr/node_manager.h" #include "expr/type_node.h" namespace CVC4 { namespace expr { inline NodeValue::NodeValue(int) : d_id(0), d_rc(MAX_RC), d_kind(kind::NULL_EXPR), d_nchildren(0) { } inline void NodeValue::decrRefCounts() { for(nv_iterator i = nv_begin(); i != nv_end(); ++i) { (*i)->dec(); } } inline void NodeValue::inc() { Assert(!isBeingDeleted(), "NodeValue is currently being deleted " "and increment is being called on it. Don't Do That!"); // FIXME multithreading if (__builtin_expect((d_rc < MAX_RC - 1), true)) { ++d_rc; } else if (__builtin_expect((d_rc == MAX_RC - 1), false)) { ++d_rc; Assert(NodeManager::currentNM() != NULL, "No current NodeManager on incrementing of NodeValue: " "maybe a public CVC4 interface function is missing a " "NodeManagerScope ?"); NodeManager::currentNM()->markRefCountMaxedOut(this); } } inline void NodeValue::dec() { // FIXME multithreading if(__builtin_expect( ( d_rc < MAX_RC ), true )) { --d_rc; if(__builtin_expect( ( d_rc == 0 ), false )) { Assert(NodeManager::currentNM() != NULL, "No current NodeManager on destruction of NodeValue: " "maybe a public CVC4 interface function is missing a " "NodeManagerScope ?"); NodeManager::currentNM()->markForDeletion(this); } } } inline NodeValue::nv_iterator NodeValue::nv_begin() { return d_children; } inline NodeValue::nv_iterator NodeValue::nv_end() { return d_children + d_nchildren; } inline NodeValue::const_nv_iterator NodeValue::nv_begin() const { return d_children; } inline NodeValue::const_nv_iterator NodeValue::nv_end() const { return d_children + d_nchildren; } template inline NodeValue::iterator NodeValue::begin() const { NodeValue* const* firstChild = d_children; if(getMetaKind() == kind::metakind::PARAMETERIZED) { ++firstChild; } return iterator(firstChild); } template inline NodeValue::iterator NodeValue::end() const { return iterator(d_children + d_nchildren); } inline bool NodeValue::isBeingDeleted() const { return NodeManager::currentNM() != NULL && NodeManager::currentNM()->isCurrentlyDeleting(this); } inline NodeValue* NodeValue::getOperator() const { Assert(getMetaKind() == kind::metakind::PARAMETERIZED); return d_children[0]; } inline NodeValue* NodeValue::getChild(int i) const { if(getMetaKind() == kind::metakind::PARAMETERIZED) { ++i; } Assert(i >= 0 && unsigned(i) < d_nchildren); return d_children[i]; } }/* CVC4::expr namespace */ }/* CVC4 namespace */ #include "expr/node.h" #include "expr/type_node.h" namespace CVC4 { namespace expr { template inline T NodeValue::iterator::operator*() const { return T(*d_i); } inline std::ostream& operator<<(std::ostream& out, const NodeValue& nv) { nv.toStream(out, Node::setdepth::getDepth(out), Node::printtypes::getPrintTypes(out), Node::dag::getDag(out), Node::setlanguage::getLanguage(out)); return out; } }/* CVC4::expr namespace */ #ifdef CVC4_DEBUG /** * Pretty printer for use within gdb. This is not intended to be used * outside of gdb. This writes to the Warning() stream and immediately * flushes the stream. */ static void __attribute__((used)) debugPrintNodeValue(const expr::NodeValue* nv) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(true) << Node::setlanguage(language::output::LANG_AST) << *nv << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintNodeValueNoDag(const expr::NodeValue* nv) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(false) << Node::setlanguage(language::output::LANG_AST) << *nv << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintRawNodeValue(const expr::NodeValue* nv) { nv->printAst(Warning(), 0); Warning().flush(); } #endif /* CVC4_DEBUG */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR__NODE_VALUE_H */ cvc4-1.5/src/expr/pickle_data.cpp000066400000000000000000000034631313116454100167340ustar00rootroot00000000000000/********************* */ /*! \file pickle_data.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a "pickle" for expressions, CVC4-internal view ** ** This is the CVC4-internal view (private data structure) for a ** "pickle" for expressions. The public-facing view is a "Pickle", ** which just points to a PickleData. A pickle is a binary ** serialization of an expression that can be converted back into an ** expression in the same or another ExprManager. **/ #include #include #include #include "base/cvc4_assert.h" #include "expr/pickle_data.h" #include "expr/expr.h" #include "expr/node.h" #include "expr/node_manager.h" #include "expr/node_value.h" #include "expr/expr_manager_scope.h" #include "expr/variable_type_map.h" #include "expr/kind.h" #include "expr/metakind.h" namespace CVC4 { namespace expr { namespace pickle { void PickleData::writeToStringStream(std::ostringstream& oss) const { BlockDeque::const_iterator i = d_blocks.begin(), end = d_blocks.end(); for(; i != end; ++i) { Block b = *i; Assert(sizeof(b) * 8 == NBITS_BLOCK); oss << b.d_body.d_data << " "; } } std::string PickleData::toString() const { std::ostringstream oss; oss.flags(std::ios::oct | std::ios::showbase); writeToStringStream(oss); return oss.str(); } }/* CVC4::expr::pickle namespace */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/pickle_data.h000066400000000000000000000062351313116454100164010ustar00rootroot00000000000000/********************* */ /*! \file pickle_data.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a "pickle" for expressions, CVC4-internal view ** ** This is the CVC4-internal view (private data structure) for a ** "pickle" for expressions. The public-facing view is a "Pickle", ** which just points to a PickleData. A pickle is a binary ** serialization of an expression that can be converted back into an ** expression in the same or another ExprManager. **/ #include "cvc4_private.h" #ifndef __CVC4__PICKLE_DATA_H #define __CVC4__PICKLE_DATA_H #include #include #include #include #include "expr/expr.h" #include "expr/node.h" #include "expr/node_manager.h" #include "expr/expr_manager.h" #include "expr/variable_type_map.h" #include "expr/kind.h" #include "expr/metakind.h" namespace CVC4 { class NodeManager; namespace expr { namespace pickle { const unsigned NBITS_BLOCK = 64; const unsigned NBITS_KIND = __CVC4__EXPR__NODE_VALUE__NBITS__KIND; const unsigned NBITS_NCHILDREN = __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN; const unsigned NBITS_CONSTBLOCKS = 32; struct BlockHeader { uint64_t d_kind : NBITS_KIND; };/* struct BlockHeader */ struct BlockHeaderOperator { uint64_t d_kind : NBITS_KIND; uint64_t d_nchildren : NBITS_NCHILDREN; uint64_t : NBITS_BLOCK - (NBITS_KIND + NBITS_NCHILDREN); };/* struct BlockHeaderOperator */ struct BlockHeaderConstant { uint64_t d_kind : NBITS_KIND; uint64_t d_constblocks : NBITS_BLOCK - NBITS_KIND; };/* struct BlockHeaderConstant */ struct BlockHeaderVariable { uint64_t d_kind : NBITS_KIND; uint64_t : NBITS_BLOCK - NBITS_KIND; };/* struct BlockHeaderVariable */ struct BlockBody { uint64_t d_data : NBITS_BLOCK; };/* struct BlockBody */ union Block { BlockHeader d_header; BlockHeaderConstant d_headerConstant; BlockHeaderOperator d_headerOperator; BlockHeaderVariable d_headerVariable; BlockBody d_body; };/* union Block */ class PickleData { typedef std::deque BlockDeque; BlockDeque d_blocks; public: PickleData& operator<<(Block b) { enqueue(b); return (*this); } std::string toString() const; void enqueue(Block b) { d_blocks.push_back(b); } Block dequeue() { Block b = d_blocks.front(); d_blocks.pop_front(); return b; } bool empty() const { return d_blocks.empty(); } uint32_t size() const { return d_blocks.size(); } void swap(PickleData& other){ d_blocks.swap(other.d_blocks); } void writeToStringStream(std::ostringstream& oss) const; };/* class PickleData */ }/* CVC4::expr::pickle namespace */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ #endif /* __CVC4__PICKLE_DATA_H */ cvc4-1.5/src/expr/pickler.cpp000066400000000000000000000313721313116454100161250ustar00rootroot00000000000000/********************* */ /*! \file pickler.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Kshitij Bansal, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a "pickler" for expressions ** ** This is a "pickler" for expressions. It produces a binary ** serialization of an expression that can be converted back ** into an expression in the same or another ExprManager. **/ #include #include #include #include "base/cvc4_assert.h" #include "base/output.h" #include "expr/pickler.h" #include "expr/pickle_data.h" #include "expr/expr.h" #include "expr/node.h" #include "expr/node_manager.h" #include "expr/node_value.h" #include "expr/expr_manager_scope.h" #include "expr/variable_type_map.h" #include "expr/kind.h" #include "expr/metakind.h" namespace CVC4 { namespace expr { namespace pickle { class PicklerPrivate { public: typedef std::stack NodeStack; NodeStack d_stack; PickleData d_current; Pickler& d_pickler; NodeManager* const d_nm; PicklerPrivate(Pickler& pickler, ExprManager* em) : d_pickler(pickler), d_nm(NodeManager::fromExprManager(em)) { } bool atDefaultState(){ return d_stack.empty() && d_current.empty(); } /* Helper functions for toPickle */ void toCaseNode(TNode n) throw(AssertionException, PicklingException); void toCaseVariable(TNode n) throw(AssertionException, PicklingException); void toCaseConstant(TNode n); void toCaseOperator(TNode n) throw(AssertionException, PicklingException); void toCaseString(Kind k, const std::string& s); /* Helper functions for toPickle */ Node fromCaseOperator(Kind k, uint32_t nchildren); Node fromCaseConstant(Kind k, uint32_t nblocks); std::string fromCaseString(uint32_t nblocks); Node fromCaseVariable(Kind k); };/* class PicklerPrivate */ static Block mkBlockBody4Chars(char a, char b, char c, char d) { Block newBody; newBody.d_body.d_data = (a << 24) | (b << 16) | (c << 8) | d; return newBody; } static char getCharBlockBody(BlockBody body, int i) { Assert(0 <= i && i <= 3); switch(i) { case 0: return (body.d_data & 0xff000000) >> 24; case 1: return (body.d_data & 0x00ff0000) >> 16; case 2: return (body.d_data & 0x0000ff00) >> 8; case 3: return (body.d_data & 0x000000ff); default: Unreachable(); } return '\0'; } static Block mkBlockBody(unsigned data) { Block newBody; newBody.d_body.d_data = data; return newBody; } static Block mkOperatorHeader(Kind k, unsigned numChildren) { Block newHeader; newHeader.d_headerOperator.d_kind = k; newHeader.d_headerOperator.d_nchildren = numChildren; return newHeader; } static Block mkVariableHeader(Kind k) { Block newHeader; newHeader.d_header.d_kind = k; return newHeader; } static Block mkConstantHeader(Kind k, unsigned numBlocks) { Block newHeader; newHeader.d_headerConstant.d_kind = k; newHeader.d_headerConstant.d_constblocks = numBlocks; return newHeader; } Pickler::Pickler(ExprManager* em) : d_private(new PicklerPrivate(*this, em)) { } Pickler::~Pickler() { delete d_private; } void Pickler::toPickle(Expr e, Pickle& p) throw(PicklingException) { Assert(NodeManager::fromExprManager(e.getExprManager()) == d_private->d_nm); Assert(d_private->atDefaultState()); try{ d_private->d_current.swap(*p.d_data); d_private->toCaseNode(e.getTNode()); d_private->d_current.swap(*p.d_data); }catch(PicklingException& pe){ d_private->d_current = PickleData(); Assert(d_private->atDefaultState()); throw pe; } Assert(d_private->atDefaultState()); } void PicklerPrivate::toCaseNode(TNode n) throw(AssertionException, PicklingException) { Debug("pickler") << "toCaseNode: " << n << std::endl; Kind k = n.getKind(); kind::MetaKind m = metaKindOf(k); switch(m) { case kind::metakind::CONSTANT: toCaseConstant(n); break; case kind::metakind::VARIABLE: toCaseVariable(n); break; case kind::metakind::OPERATOR: case kind::metakind::PARAMETERIZED: toCaseOperator(n); break; default: Unhandled(m); } } void PicklerPrivate::toCaseOperator(TNode n) throw(AssertionException, PicklingException) { Kind k = n.getKind(); kind::MetaKind m = metaKindOf(k); Assert(m == kind::metakind::PARAMETERIZED || m == kind::metakind::OPERATOR); if(m == kind::metakind::PARAMETERIZED) { toCaseNode(n.getOperator()); } for(TNode::iterator i = n.begin(), i_end = n.end(); i != i_end; ++i) { toCaseNode(*i); } d_current << mkOperatorHeader(k, n.getNumChildren()); } void PicklerPrivate::toCaseVariable(TNode n) throw(AssertionException, PicklingException) { Kind k = n.getKind(); Assert(metaKindOf(k) == kind::metakind::VARIABLE); const NodeValue* nv = n.d_nv; uint64_t asInt = reinterpret_cast(nv); uint64_t mapped = d_pickler.variableToMap(asInt); uint32_t firstHalf = mapped >> 32; uint32_t secondHalf = mapped & 0xffffffff; d_current << mkVariableHeader(k); d_current << mkBlockBody(firstHalf); d_current << mkBlockBody(secondHalf); } void PicklerPrivate::toCaseConstant(TNode n) { Kind k = n.getKind(); Assert(metaKindOf(k) == kind::metakind::CONSTANT); switch(k) { case kind::CONST_BOOLEAN: d_current << mkConstantHeader(k, 1); d_current << mkBlockBody(n.getConst()); break; case kind::CONST_RATIONAL: { std::string asString; Assert(k == kind::CONST_RATIONAL); const Rational& q = n.getConst(); asString = q.toString(16); toCaseString(k, asString); break; } case kind::BITVECTOR_EXTRACT_OP: { BitVectorExtract bve = n.getConst(); d_current << mkConstantHeader(k, 2); d_current << mkBlockBody(bve.high); d_current << mkBlockBody(bve.low); break; } case kind::CONST_BITVECTOR: { // irritating: we incorporate the size of the string in with the // size of this constant, so it appears as one big constant and // doesn't confuse anybody BitVector bv = n.getConst(); std::string asString = bv.getValue().toString(16); d_current << mkConstantHeader(k, 2 + asString.size()); d_current << mkBlockBody(bv.getSize()); toCaseString(k, asString); break; } case kind::BITVECTOR_SIGN_EXTEND_OP: { BitVectorSignExtend bvse = n.getConst(); d_current << mkConstantHeader(k, 1); d_current << mkBlockBody(bvse.signExtendAmount); break; } default: Unhandled(k); } } void PicklerPrivate::toCaseString(Kind k, const std::string& s) { d_current << mkConstantHeader(k, s.size()); unsigned size = s.size(); unsigned i; for(i = 0; i + 4 <= size; i += 4) { d_current << mkBlockBody4Chars(s[i + 0], s[i + 1],s[i + 2], s[i + 3]); } switch(size % 4) { case 0: break; case 1: d_current << mkBlockBody4Chars(s[i + 0], '\0','\0', '\0'); break; case 2: d_current << mkBlockBody4Chars(s[i + 0], s[i + 1], '\0', '\0'); break; case 3: d_current << mkBlockBody4Chars(s[i + 0], s[i + 1],s[i + 2], '\0'); break; default: Unreachable(); } } void Pickler::debugPickleTest(Expr e) { //ExprManager *em = e.getExprManager(); //Expr e1 = mkVar("x", makeType()); //return ; Pickler pickler(e.getExprManager()); Pickle p; pickler.toPickle(e, p); uint32_t size = p.d_data->size(); std::string str = p.d_data->toString(); Expr from = pickler.fromPickle(p); ExprManagerScope ems(e); Debug("pickle") << "before: " << e << std::endl; Debug("pickle") << "after: " << from.getNode() << std::endl; Debug("pickle") << "pickle: (oct) "<< size << " " << str.length() << " " << str << std::endl; Assert(p.d_data->empty()); Assert(e == from); } Expr Pickler::fromPickle(Pickle& p) { Assert(d_private->atDefaultState()); d_private->d_current.swap(*p.d_data); while(!d_private->d_current.empty()) { Block front = d_private->d_current.dequeue(); Kind k = (Kind)front.d_header.d_kind; kind::MetaKind m = metaKindOf(k); Node result = Node::null(); switch(m) { case kind::metakind::VARIABLE: result = d_private->fromCaseVariable(k); break; case kind::metakind::CONSTANT: result = d_private->fromCaseConstant(k, front.d_headerConstant.d_constblocks); break; case kind::metakind::OPERATOR: case kind::metakind::PARAMETERIZED: result = d_private->fromCaseOperator(k, front.d_headerOperator.d_nchildren); break; default: Unhandled(m); } Assert(result != Node::null()); d_private->d_stack.push(result); } Assert(d_private->d_current.empty()); Assert(d_private->d_stack.size() == 1); Node res = d_private->d_stack.top(); d_private->d_stack.pop(); Assert(d_private->atDefaultState()); return d_private->d_nm->toExpr(res); } Node PicklerPrivate::fromCaseVariable(Kind k) { Assert(metaKindOf(k) == kind::metakind::VARIABLE); Block firstHalf = d_current.dequeue(); Block secondHalf = d_current.dequeue(); uint64_t asInt = firstHalf.d_body.d_data; asInt = asInt << 32; asInt = asInt | (secondHalf.d_body.d_data); uint64_t mapped = d_pickler.variableFromMap(asInt); NodeValue* nv = reinterpret_cast(mapped); Node fromNodeValue(nv); Assert(fromNodeValue.getKind() == k); return fromNodeValue; } Node PicklerPrivate::fromCaseConstant(Kind k, uint32_t constblocks) { switch(k) { case kind::CONST_BOOLEAN: { Assert(constblocks == 1); Block val = d_current.dequeue(); bool b= val.d_body.d_data; return d_nm->mkConst(b); } case kind::CONST_RATIONAL: { std::string s = fromCaseString(constblocks); Rational q(s, 16); return d_nm->mkConst(q); } case kind::BITVECTOR_EXTRACT_OP: { Block high = d_current.dequeue(); Block low = d_current.dequeue(); BitVectorExtract bve(high.d_body.d_data, low.d_body.d_data); return d_nm->mkConst(bve); } case kind::CONST_BITVECTOR: { unsigned size = d_current.dequeue().d_body.d_data; Block header CVC4_UNUSED = d_current.dequeue(); Assert(header.d_headerConstant.d_kind == kind::CONST_BITVECTOR); Assert(header.d_headerConstant.d_constblocks == constblocks - 2); Integer value(fromCaseString(constblocks - 2)); BitVector bv(size, value); return d_nm->mkConst(bv); } case kind::BITVECTOR_SIGN_EXTEND_OP: { Block signExtendAmount = d_current.dequeue(); BitVectorSignExtend bvse(signExtendAmount.d_body.d_data); return d_nm->mkConst(bvse); } default: Unhandled(k); } } std::string PicklerPrivate::fromCaseString(uint32_t size) { std::stringstream ss; unsigned i; for(i = 0; i + 4 <= size; i += 4) { Block front = d_current.dequeue(); BlockBody body = front.d_body; ss << getCharBlockBody(body,0) << getCharBlockBody(body,1) << getCharBlockBody(body,2) << getCharBlockBody(body,3); } Assert(i == size - (size%4) ); if(size % 4 != 0) { Block front = d_current.dequeue(); BlockBody body = front.d_body; switch(size % 4) { case 1: ss << getCharBlockBody(body,0); break; case 2: ss << getCharBlockBody(body,0) << getCharBlockBody(body,1); break; case 3: ss << getCharBlockBody(body,0) << getCharBlockBody(body,1) << getCharBlockBody(body,2); break; default: Unreachable(); } } return ss.str(); } Node PicklerPrivate::fromCaseOperator(Kind k, uint32_t nchildren) { kind::MetaKind m = metaKindOf(k); bool parameterized = (m == kind::metakind::PARAMETERIZED); uint32_t npops = nchildren + (parameterized? 1 : 0); NodeStack aux; while(npops > 0) { Assert(!d_stack.empty()); Node top = d_stack.top(); aux.push(top); d_stack.pop(); --npops; } NodeBuilder<> nb(d_nm, k); while(!aux.empty()) { Node top = aux.top(); nb << top; aux.pop(); } return nb; } Pickle::Pickle() { d_data = new PickleData(); } // Just copying the pointer isn't right, we have to copy the // underlying data. Otherwise user-level Pickles will delete the data // twice! (once in each thread) Pickle::Pickle(const Pickle& p) { d_data = new PickleData(*p.d_data); } Pickle& Pickle::operator = (const Pickle& other) { if (this != &other) { delete d_data; d_data = new PickleData(*other.d_data); } return *this; } Pickle::~Pickle() { delete d_data; } uint64_t MapPickler::variableFromMap(uint64_t x) const { VarMap::const_iterator i = d_fromMap.find(x); Assert(i != d_fromMap.end()); return i->second; } }/* CVC4::expr::pickle namespace */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/pickler.h000066400000000000000000000063021313116454100155650ustar00rootroot00000000000000/********************* */ /*! \file pickler.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Kshitij Bansal ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief This is a "pickler" for expressions ** ** This is a "pickler" for expressions. It produces a binary ** serialization of an expression that can be converted back ** into an expression in the same or another ExprManager. **/ #include "cvc4_public.h" #ifndef __CVC4__PICKLER_H #define __CVC4__PICKLER_H #include "expr/variable_type_map.h" #include "expr/expr.h" #include "base/exception.h" #include #include namespace CVC4 { class ExprManager; namespace expr { namespace pickle { class Pickler; class PicklerPrivate; class PickleData;// CVC4-internal representation class CVC4_PUBLIC Pickle { PickleData* d_data; friend class Pickler; friend class PicklerPrivate; public: Pickle(); Pickle(const Pickle& p); ~Pickle(); Pickle& operator=(const Pickle& other); };/* class Pickle */ class CVC4_PUBLIC PicklingException : public Exception { public: PicklingException() : Exception("Pickling failed") { } };/* class PicklingException */ class CVC4_PUBLIC Pickler { PicklerPrivate* d_private; friend class PicklerPrivate; protected: virtual uint64_t variableToMap(uint64_t x) const throw(PicklingException) { return x; } virtual uint64_t variableFromMap(uint64_t x) const { return x; } public: Pickler(ExprManager* em); virtual ~Pickler(); /** * Constructs a new Pickle of the node n. * n must be a node allocated in the node manager specified at initialization * time. The new pickle has variables mapped using the VariableIDMap provided * at initialization. * TODO: Fix comment * * @return the pickle, which should be dispose()'d when you're done with it */ void toPickle(Expr e, Pickle& p) throw(PicklingException); /** * Constructs a node from a Pickle. * This destroys the contents of the Pickle. * The node is created in the NodeManager getNM(); * TODO: Fix comment */ Expr fromPickle(Pickle& p); static void debugPickleTest(Expr e); };/* class Pickler */ class CVC4_PUBLIC MapPickler : public Pickler { private: const VarMap& d_toMap; const VarMap& d_fromMap; public: MapPickler(ExprManager* em, const VarMap& to, const VarMap& from): Pickler(em), d_toMap(to), d_fromMap(from) { } virtual ~MapPickler() throw() {} protected: virtual uint64_t variableToMap(uint64_t x) const throw(PicklingException) { VarMap::const_iterator i = d_toMap.find(x); if(i != d_toMap.end()) { return i->second; } else { throw PicklingException(); } } virtual uint64_t variableFromMap(uint64_t x) const; };/* class MapPickler */ }/* CVC4::expr::pickle namespace */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ #endif /* __CVC4__PICKLER_H */ cvc4-1.5/src/expr/predicate.cpp000066400000000000000000000055751313116454100164420ustar00rootroot00000000000000/********************* */ /*! \file predicate.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Representation of predicates for predicate subtyping ** ** Simple class to represent predicates for predicate subtyping. ** Instances of this class are carried as the payload of ** the CONSTANT-metakinded SUBTYPE_TYPE types. **/ #include "expr/predicate.h" #include "base/cvc4_assert.h" #include "expr/expr.h" using namespace std; namespace CVC4 { Predicate::Predicate(const Predicate& p) : d_predicate(new Expr(p.getExpression())) , d_witness(new Expr(p.getWitness())) {} Predicate::Predicate(const Expr& e) throw(IllegalArgumentException) : d_predicate(new Expr(e)) , d_witness(new Expr()) { PrettyCheckArgument(! e.isNull(), e, "Predicate cannot be null"); PrettyCheckArgument(e.getType().isPredicate(), e, "Expression given is not predicate"); PrettyCheckArgument(FunctionType(e.getType()).getArgTypes().size() == 1, e, "Expression given is not predicate of a single argument"); } Predicate::Predicate(const Expr& e, const Expr& w) throw(IllegalArgumentException) : d_predicate(new Expr(e)) , d_witness(new Expr(w)) { PrettyCheckArgument(! e.isNull(), e, "Predicate cannot be null"); PrettyCheckArgument(e.getType().isPredicate(), e, "Expression given is not predicate"); PrettyCheckArgument(FunctionType(e.getType()).getArgTypes().size() == 1, e, "Expression given is not predicate of a single argument"); } Predicate::~Predicate() { delete d_predicate; delete d_witness; } Predicate& Predicate::operator=(const Predicate& p){ (*d_predicate) = p.getExpression(); (*d_witness) = p.getWitness(); return *this; } // Predicate::operator Expr() const { // return d_predicate; // } const Expr& Predicate::getExpression() const { return *d_predicate; } const Expr& Predicate::getWitness() const { return *d_witness; } bool Predicate::operator==(const Predicate& p) const { return getExpression() == p.getExpression() && getWitness() == p.getWitness(); } std::ostream& operator<<(std::ostream& out, const Predicate& p) { out << p.getExpression(); const Expr& witness = p.getWitness(); if(! witness.isNull()) { out << " : " << witness; } return out; } size_t PredicateHashFunction::operator()(const Predicate& p) const { ExprHashFunction h; return h(p.getWitness()) * 5039 + h(p.getExpression()); } }/* CVC4 namespace */ cvc4-1.5/src/expr/predicate.h000066400000000000000000000036071313116454100161010ustar00rootroot00000000000000/********************* */ /*! \file predicate.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Representation of predicates for predicate subtyping ** ** Simple class to represent predicates for predicate subtyping. ** Instances of this class are carried as the payload of ** the CONSTANT-metakinded SUBTYPE_TYPE types. **/ #include "cvc4_public.h" #ifndef __CVC4__PREDICATE_H #define __CVC4__PREDICATE_H #include "base/exception.h" namespace CVC4 { class Predicate; std::ostream& operator<<(std::ostream& out, const Predicate& p) CVC4_PUBLIC; struct CVC4_PUBLIC PredicateHashFunction { size_t operator()(const Predicate& p) const; };/* class PredicateHashFunction */ }/* CVC4 namespace */ namespace CVC4 { class CVC4_PUBLIC Expr; }/* CVC4 namespace */ namespace CVC4 { class CVC4_PUBLIC Predicate { public: Predicate(const Expr& e) throw(IllegalArgumentException); Predicate(const Expr& e, const Expr& w) throw(IllegalArgumentException); Predicate(const Predicate& p); ~Predicate(); Predicate& operator=(const Predicate& p); //operator Expr() const; const Expr& getExpression() const; const Expr& getWitness() const; bool operator==(const Predicate& p) const; friend std::ostream& CVC4::operator<<(std::ostream& out, const Predicate& p); friend size_t PredicateHashFunction::operator()(const Predicate& p) const; private: Expr* d_predicate; Expr* d_witness; };/* class Predicate */ }/* CVC4 namespace */ #endif /* __CVC4__PREDICATE_H */ cvc4-1.5/src/expr/predicate.i000066400000000000000000000005121313116454100160720ustar00rootroot00000000000000%{ #include "expr/predicate.h" %} %rename(equals) CVC4::Predicate::operator==(const Predicate&) const; %rename(toExpr) CVC4::Predicate::operator Expr() const; %rename(apply) CVC4::PredicateHashFunction::operator()(const Predicate&) const; %ignore CVC4::operator<<(std::ostream&, const Predicate&); %include "expr/predicate.h" cvc4-1.5/src/expr/record.cpp000066400000000000000000000067401313116454100157530ustar00rootroot00000000000000/********************* */ /*! \file record.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A class representing a record definition ** ** A class representing a record definition. **/ #include "expr/record.h" #include "base/cvc4_assert.h" #include "base/output.h" #include "expr/expr.h" #include "expr/type.h" namespace CVC4 { static Record::FieldVector::const_iterator find(const Record::FieldVector& fields, std::string name){ for(Record::FieldVector::const_iterator i = fields.begin(), i_end = fields.end(); i != i_end; ++i){ if((*i).first == name) { return i; } } return fields.end(); } Record::Record(const FieldVector& fields) : d_fields(new FieldVector(fields)) { Debug("record") << "making " << this << " " << d_fields << std::endl; } Record::Record(const Record& other) : d_fields(new FieldVector(other.getFields())) { Debug("record") << "copy constructor " << this << " " << d_fields << std::endl; } Record::~Record() { Debug("record") << "deleting " << this << " " << d_fields << std::endl; delete d_fields; } Record& Record::operator=(const Record& r) { Debug("record") << "setting " << this << " " << d_fields << std::endl; Record::FieldVector& local = *d_fields; local = r.getFields(); return *this; } const Record::FieldVector& Record::getFields() const { return *d_fields; } bool Record::contains(const std::string& name) const { return find(*d_fields, name) != d_fields->end(); } size_t Record::getIndex(std::string name) const { FieldVector::const_iterator i = find(*d_fields, name); PrettyCheckArgument(i != d_fields->end(), name, "requested field `%s' does not exist in record", name.c_str()); return i - d_fields->begin(); } size_t Record::getNumFields() const { return d_fields->size(); } std::ostream& operator<<(std::ostream& os, const Record& r) { os << "[# "; bool first = true; const Record::FieldVector& fields = r.getFields(); for(Record::FieldVector::const_iterator i = fields.begin(), i_end = fields.end(); i != i_end; ++i) { if(!first) { os << ", "; } os << (*i).first << ":" << (*i).second; first = false; } os << " #]"; return os; } size_t RecordHashFunction::operator()(const Record& r) const { size_t n = 0; const Record::FieldVector& fields = r.getFields(); for(Record::FieldVector::const_iterator i = fields.begin(), i_end = fields.end(); i != i_end; ++i) { n = (n << 3) ^ TypeHashFunction()((*i).second); } return n; } std::ostream& operator<<(std::ostream& out, const RecordSelect& t) { return out << "[" << t.getField() << "]"; } std::ostream& operator<<(std::ostream& out, const RecordUpdate& t) { return out << "[" << t.getField() << "]"; } const std::pair& Record::operator[](size_t index) const { PrettyCheckArgument(index < d_fields->size(), index, "index out of bounds for record type"); return (*d_fields)[index]; } bool Record::operator==(const Record& r) const { return (*d_fields) == *(r.d_fields); } }/* CVC4 namespace */ cvc4-1.5/src/expr/record.h000066400000000000000000000065741313116454100154250ustar00rootroot00000000000000/********************* */ /*! \file record.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A class representing a Record definition ** ** A class representing a Record definition. **/ #include "cvc4_public.h" #ifndef __CVC4__RECORD_H #define __CVC4__RECORD_H #include #include #include #include #include "util/hash.h" // Forward Declarations namespace CVC4 { // This forward delcartion is required to resolve a cicular dependency with // Record which is a referenced in a Kind file. class Type; } /* namespace CVC4 */ namespace CVC4 { // operators for record select and update class CVC4_PUBLIC RecordSelect { std::string d_field; public: RecordSelect(const std::string& field) throw() : d_field(field) { } std::string getField() const throw() { return d_field; } bool operator==(const RecordSelect& t) const throw() { return d_field == t.d_field; } bool operator!=(const RecordSelect& t) const throw() { return d_field != t.d_field; } };/* class RecordSelect */ class CVC4_PUBLIC RecordUpdate { std::string d_field; public: RecordUpdate(const std::string& field) throw() : d_field(field) { } std::string getField() const throw() { return d_field; } bool operator==(const RecordUpdate& t) const throw() { return d_field == t.d_field; } bool operator!=(const RecordUpdate& t) const throw() { return d_field != t.d_field; } };/* class RecordUpdate */ struct CVC4_PUBLIC RecordSelectHashFunction { inline size_t operator()(const RecordSelect& t) const { return StringHashFunction()(t.getField()); } };/* struct RecordSelectHashFunction */ struct CVC4_PUBLIC RecordUpdateHashFunction { inline size_t operator()(const RecordUpdate& t) const { return StringHashFunction()(t.getField()); } };/* struct RecordUpdateHashFunction */ std::ostream& operator<<(std::ostream& out, const RecordSelect& t) CVC4_PUBLIC; std::ostream& operator<<(std::ostream& out, const RecordUpdate& t) CVC4_PUBLIC; // now an actual record definition class CVC4_PUBLIC Record { public: // Type must stay as incomplete types throughout this header! // Everything containing a Type must be a pointer or a reference. typedef std::vector< std::pair > FieldVector; Record(const FieldVector& fields); Record(const Record& other); ~Record(); Record& operator=(const Record& r); bool contains(const std::string &name) const; size_t getIndex(std::string name) const; size_t getNumFields() const; const FieldVector& getFields() const; const std::pair& operator[](size_t index) const; bool operator==(const Record& r) const; bool operator!=(const Record& r) const { return !(*this == r); } private: FieldVector* d_fields; };/* class Record */ struct CVC4_PUBLIC RecordHashFunction { size_t operator()(const Record& r) const; };/* struct RecordHashFunction */ std::ostream& operator<<(std::ostream& os, const Record& r) CVC4_PUBLIC; }/* CVC4 namespace */ #endif /* __CVC4__RECORD_H */ cvc4-1.5/src/expr/record.i000066400000000000000000000042221313116454100154120ustar00rootroot00000000000000%{ #include "expr/record.h" #ifdef SWIGJAVA #include "bindings/java_iterator_adapter.h" #include "bindings/java_stream_adapters.h" #endif /* SWIGJAVA */ %} %rename(equals) CVC4::RecordSelect::operator==(const RecordSelect&) const; %ignore CVC4::RecordSelect::operator!=(const RecordSelect&) const; %rename(equals) CVC4::RecordUpdate::operator==(const RecordUpdate&) const; %ignore CVC4::RecordUpdate::operator!=(const RecordUpdate&) const; %rename(equals) CVC4::Record::operator==(const Record&) const; %ignore CVC4::Record::operator!=(const Record&) const; %rename(getField) CVC4::Record::operator[](size_t) const; %rename(apply) CVC4::RecordHashFunction::operator()(const Record&) const; %rename(apply) CVC4::RecordSelectHashFunction::operator()(const RecordSelect&) const; %rename(apply) CVC4::RecordUpdateHashFunction::operator()(const RecordUpdate&) const; %ignore CVC4::operator<<(std::ostream&, const Record&); %ignore CVC4::operator<<(std::ostream&, const RecordSelect&); %ignore CVC4::operator<<(std::ostream&, const RecordUpdate&); #ifdef SWIGJAVA // These Object arrays are always of two elements, the first is a String and the second a // Type. (On the C++ side, it is a std::pair.) %typemap(jni) std::pair "jobjectArray"; %typemap(jtype) std::pair "java.lang.Object[]"; %typemap(jstype) std::pair "java.lang.Object[]"; %typemap(javaout) std::pair { return $jnicall; } %typemap(out) std::pair { $result = jenv->NewObjectArray(2, jenv->FindClass("java/lang/Object"), $null); jenv->SetObjectArrayElement($result, 0, jenv->NewStringUTF($1.first.c_str())); jclass clazz = jenv->FindClass("edu/nyu/acsys/CVC4/Type"); jmethodID methodid = jenv->GetMethodID(clazz, "", "(JZ)V"); jenv->SetObjectArrayElement($result, 1, jenv->NewObject(clazz, methodid, reinterpret_cast(new CVC4::Type($1.second)), true)); }; #endif /* SWIGJAVA */ %include "expr/record.h" #ifdef SWIGJAVA %include "bindings/java_iterator_adapter.h" %include "bindings/java_stream_adapters.h" #endif /* SWIGJAVA */ cvc4-1.5/src/expr/symbol_table.cpp000066400000000000000000000160731313116454100171510ustar00rootroot00000000000000/********************* */ /*! \file symbol_table.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Christopher L. Conway, Francois Bobot ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Convenience class for scoping variable and type ** declarations (implementation) ** ** Convenience class for scoping variable and type declarations ** (implementation). **/ #include "expr/symbol_table.h" #include #include #include "context/cdhashmap.h" #include "context/cdhashset.h" #include "context/context.h" #include "expr/expr.h" #include "expr/expr_manager_scope.h" #include "expr/type.h" using namespace CVC4::context; using namespace std; namespace CVC4 { SymbolTable::SymbolTable() : d_context(new Context()), d_exprMap(new(true) CDHashMap(d_context)), d_typeMap(new(true) CDHashMap, Type>, StringHashFunction>(d_context)), d_functions(new(true) CDHashSet(d_context)) { } SymbolTable::~SymbolTable() { d_exprMap->deleteSelf(); d_typeMap->deleteSelf(); d_functions->deleteSelf(); delete d_context; } void SymbolTable::bind(const std::string& name, Expr obj, bool levelZero) throw() { PrettyCheckArgument(!obj.isNull(), obj, "cannot bind to a null Expr"); ExprManagerScope ems(obj); if(levelZero) d_exprMap->insertAtContextLevelZero(name, obj); else d_exprMap->insert(name, obj); } void SymbolTable::bindDefinedFunction(const std::string& name, Expr obj, bool levelZero) throw() { PrettyCheckArgument(!obj.isNull(), obj, "cannot bind to a null Expr"); ExprManagerScope ems(obj); if(levelZero){ d_exprMap->insertAtContextLevelZero(name, obj); d_functions->insertAtContextLevelZero(obj); } else { d_exprMap->insert(name, obj); d_functions->insert(obj); } } bool SymbolTable::isBound(const std::string& name) const throw() { return d_exprMap->find(name) != d_exprMap->end(); } bool SymbolTable::isBoundDefinedFunction(const std::string& name) const throw() { CDHashMap::iterator found = d_exprMap->find(name); return found != d_exprMap->end() && d_functions->contains((*found).second); } bool SymbolTable::isBoundDefinedFunction(Expr func) const throw() { return d_functions->contains(func); } Expr SymbolTable::lookup(const std::string& name) const throw() { return (*d_exprMap->find(name)).second; } void SymbolTable::bindType(const std::string& name, Type t, bool levelZero) throw() { if(levelZero) { d_typeMap->insertAtContextLevelZero(name, make_pair(vector(), t)); } else { d_typeMap->insert(name, make_pair(vector(), t)); } } void SymbolTable::bindType(const std::string& name, const std::vector& params, Type t, bool levelZero) throw() { if(Debug.isOn("sort")) { Debug("sort") << "bindType(" << name << ", ["; if(params.size() > 0) { copy( params.begin(), params.end() - 1, ostream_iterator(Debug("sort"), ", ") ); Debug("sort") << params.back(); } Debug("sort") << "], " << t << ")" << endl; } if(levelZero) { d_typeMap->insertAtContextLevelZero(name, make_pair(params, t)); } else { d_typeMap->insert(name, make_pair(params, t)); } } bool SymbolTable::isBoundType(const std::string& name) const throw() { return d_typeMap->find(name) != d_typeMap->end(); } Type SymbolTable::lookupType(const std::string& name) const throw() { pair, Type> p = (*d_typeMap->find(name)).second; PrettyCheckArgument(p.first.size() == 0, name, "type constructor arity is wrong: " "`%s' requires %u parameters but was provided 0", name.c_str(), p.first.size()); return p.second; } Type SymbolTable::lookupType(const std::string& name, const std::vector& params) const throw() { pair, Type> p = (*d_typeMap->find(name)).second; PrettyCheckArgument(p.first.size() == params.size(), params, "type constructor arity is wrong: " "`%s' requires %u parameters but was provided %u", name.c_str(), p.first.size(), params.size()); if(p.first.size() == 0) { PrettyCheckArgument(p.second.isSort(), name.c_str()); return p.second; } if(p.second.isSortConstructor()) { if(Debug.isOn("sort")) { Debug("sort") << "instantiating using a sort constructor" << endl; Debug("sort") << "have formals ["; copy( p.first.begin(), p.first.end() - 1, ostream_iterator(Debug("sort"), ", ") ); Debug("sort") << p.first.back() << "]" << endl << "parameters ["; copy( params.begin(), params.end() - 1, ostream_iterator(Debug("sort"), ", ") ); Debug("sort") << params.back() << "]" << endl << "type ctor " << name << endl << "type is " << p.second << endl; } Type instantiation = SortConstructorType(p.second).instantiate(params); Debug("sort") << "instance is " << instantiation << endl; return instantiation; } else if(p.second.isDatatype()) { PrettyCheckArgument(DatatypeType(p.second).isParametric(), name, "expected parametric datatype"); return DatatypeType(p.second).instantiate(params); } else { if(Debug.isOn("sort")) { Debug("sort") << "instantiating using a sort substitution" << endl; Debug("sort") << "have formals ["; copy( p.first.begin(), p.first.end() - 1, ostream_iterator(Debug("sort"), ", ") ); Debug("sort") << p.first.back() << "]" << endl << "parameters ["; copy( params.begin(), params.end() - 1, ostream_iterator(Debug("sort"), ", ") ); Debug("sort") << params.back() << "]" << endl << "type ctor " << name << endl << "type is " << p.second << endl; } Type instantiation = p.second.substitute(p.first, params); Debug("sort") << "instance is " << instantiation << endl; return instantiation; } } size_t SymbolTable::lookupArity(const std::string& name) { pair, Type> p = (*d_typeMap->find(name)).second; return p.first.size(); } void SymbolTable::popScope() throw(ScopeException) { if( d_context->getLevel() == 0 ) { throw ScopeException(); } d_context->pop(); } void SymbolTable::pushScope() throw() { d_context->push(); } size_t SymbolTable::getLevel() const throw() { return d_context->getLevel(); } void SymbolTable::reset() { this->SymbolTable::~SymbolTable(); new(this) SymbolTable(); } }/* CVC4 namespace */ cvc4-1.5/src/expr/symbol_table.h000066400000000000000000000155651313116454100166230ustar00rootroot00000000000000/********************* */ /*! \file symbol_table.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Christopher L. Conway, Francois Bobot ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Convenience class for scoping variable and type declarations. ** ** Convenience class for scoping variable and type declarations. **/ #include "cvc4_public.h" #ifndef __CVC4__SYMBOL_TABLE_H #define __CVC4__SYMBOL_TABLE_H #include #include #include #include "expr/expr.h" #include "util/hash.h" #include "context/cdhashset_forward.h" #include "context/cdhashmap_forward.h" namespace CVC4 { class Type; namespace context { class Context; }/* CVC4::context namespace */ class CVC4_PUBLIC ScopeException : public Exception { };/* class ScopeException */ /** * A convenience class for handling scoped declarations. Implements the usual * nested scoping rules for declarations, with separate bindings for expressions * and types. */ class CVC4_PUBLIC SymbolTable { /** The context manager for the scope maps. */ context::Context* d_context; /** A map for expressions. */ context::CDHashMap *d_exprMap; /** A map for types. */ context::CDHashMap, Type>, StringHashFunction> *d_typeMap; /** A set of defined functions. */ context::CDHashSet *d_functions; public: /** Create a symbol table. */ SymbolTable(); /** Destroy a symbol table. */ ~SymbolTable(); /** * Bind an expression to a name in the current scope level. If * name is already bound to an expression in the current * level, then the binding is replaced. If name is bound * in a previous level, then the binding is "covered" by this one * until the current scope is popped. If levelZero is true the name * shouldn't be already bound. * * @param name an identifier * @param obj the expression to bind to name * @param levelZero set if the binding must be done at level 0 */ void bind(const std::string& name, Expr obj, bool levelZero = false) throw(); /** * Bind a function body to a name in the current scope. If * name is already bound to an expression in the current * level, then the binding is replaced. If name is bound * in a previous level, then the binding is "covered" by this one * until the current scope is popped. Same as bind() but registers * this as a function (so that isBoundDefinedFunction() returns true). * * @param name an identifier * @param obj the expression to bind to name * @param levelZero set if the binding must be done at level 0 */ void bindDefinedFunction(const std::string& name, Expr obj, bool levelZero = false) throw(); /** * Bind a type to a name in the current scope. If name * is already bound to a type in the current level, then the binding * is replaced. If name is bound in a previous level, * then the binding is "covered" by this one until the current scope * is popped. * * @param name an identifier * @param t the type to bind to name * @param levelZero set if the binding must be done at level 0 */ void bindType(const std::string& name, Type t, bool levelZero = false) throw(); /** * Bind a type to a name in the current scope. If name * is already bound to a type or type constructor in the current * level, then the binding is replaced. If name is * bound in a previous level, then the binding is "covered" by this * one until the current scope is popped. * * @param name an identifier * @param params the parameters to the type * @param t the type to bind to name * @param levelZero true to bind it globally (default is to bind it * locally within the current scope) */ void bindType(const std::string& name, const std::vector& params, Type t, bool levelZero = false) throw(); /** * Check whether a name is bound to an expression with either bind() * or bindDefinedFunction(). * * @param name the identifier to check. * @returns true iff name is bound in the current scope. */ bool isBound(const std::string& name) const throw(); /** * Check whether a name was bound to a function with bindDefinedFunction(). */ bool isBoundDefinedFunction(const std::string& name) const throw(); /** * Check whether an Expr was bound to a function (i.e., was the * second arg to bindDefinedFunction()). */ bool isBoundDefinedFunction(Expr func) const throw(); /** * Check whether a name is bound to a type (or type constructor). * * @param name the identifier to check. * @returns true iff name is bound to a type in the current scope. */ bool isBoundType(const std::string& name) const throw(); /** * Lookup a bound expression. * * @param name the identifier to lookup * @returns the expression bound to name in the current scope. */ Expr lookup(const std::string& name) const throw(); /** * Lookup a bound type. * * @param name the type identifier to lookup * @returns the type bound to name in the current scope. */ Type lookupType(const std::string& name) const throw(); /** * Lookup a bound parameterized type. * * @param name the type-constructor identifier to lookup * @param params the types to use to parameterize the type * @returns the type bound to name(params) in * the current scope. */ Type lookupType(const std::string& name, const std::vector& params) const throw(); /** * Lookup the arity of a bound parameterized type. */ size_t lookupArity(const std::string& name); /** * Pop a scope level. Deletes all bindings since the last call to * pushScope. Calls to pushScope and * popScope must be "properly nested." I.e., a call to * popScope is only legal if the number of prior calls to * pushScope on this SymbolTable is strictly * greater than then number of prior calls to popScope. */ void popScope() throw(ScopeException); /** Push a scope level. */ void pushScope() throw(); /** Get the current level of this symbol table. */ size_t getLevel() const throw(); /** Reset everything. */ void reset(); };/* class SymbolTable */ }/* CVC4 namespace */ #endif /* __CVC4__SYMBOL_TABLE_H */ cvc4-1.5/src/expr/symbol_table.i000066400000000000000000000001051313116454100166040ustar00rootroot00000000000000%{ #include "expr/symbol_table.h" %} %include "expr/symbol_table.h" cvc4-1.5/src/expr/type.cpp000066400000000000000000000437521313116454100154620ustar00rootroot00000000000000/********************* */ /*! \file type.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Andrew Reynolds ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Implementation of expression types ** ** Implementation of expression types. **/ #include "expr/type.h" #include #include #include #include "base/exception.h" #include "expr/node_manager.h" #include "expr/node_manager_attributes.h" #include "expr/type_node.h" using namespace std; namespace CVC4 { ostream& operator<<(ostream& out, const Type& t) { NodeManagerScope nms(t.d_nodeManager); return out << *Type::getTypeNode(t); } Type Type::makeType(const TypeNode& typeNode) const { return Type(d_nodeManager, new TypeNode(typeNode)); } Type::Type(NodeManager* nm, TypeNode* node) : d_typeNode(node), d_nodeManager(nm) { // This does not require a NodeManagerScope as this is restricted to be an // internal only pointer initialization call. } Type::Type() : d_typeNode(new TypeNode), d_nodeManager(NULL) { // This does not require a NodeManagerScope as `new TypeNode` is backed by a // static expr::NodeValue::null(). } Type::Type(const Type& t) : d_typeNode(NULL), d_nodeManager(t.d_nodeManager) { NodeManagerScope nms(d_nodeManager); d_typeNode = new TypeNode(*t.d_typeNode); } Type::~Type() { NodeManagerScope nms(d_nodeManager); delete d_typeNode; } bool Type::isNull() const { return d_typeNode->isNull(); } Cardinality Type::getCardinality() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getCardinality(); } bool Type::isWellFounded() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isWellFounded(); } Expr Type::mkGroundTerm() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->mkGroundTerm().toExpr(); } bool Type::isSubtypeOf(Type t) const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isSubtypeOf(*t.d_typeNode); } bool Type::isComparableTo(Type t) const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isComparableTo(*t.d_typeNode); } Type Type::getBaseType() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getBaseType().toType(); } Type& Type::operator=(const Type& t) { PrettyCheckArgument(d_typeNode != NULL, this, "Unexpected NULL typenode pointer!"); PrettyCheckArgument(t.d_typeNode != NULL, t, "Unexpected NULL typenode pointer!"); if(this != &t) { if(d_nodeManager == t.d_nodeManager) { NodeManagerScope nms(d_nodeManager); *d_typeNode = *t.d_typeNode; } else { // This happens more than you think---every time you set to or // from the null Type. It's tricky because each node manager // must be in play at the right time. NodeManagerScope nms1(d_nodeManager); *d_typeNode = TypeNode::null(); NodeManagerScope nms2(t.d_nodeManager); *d_typeNode = *t.d_typeNode; d_nodeManager = t.d_nodeManager; } } return *this; } bool Type::operator==(const Type& t) const { NodeManagerScope nms(d_nodeManager); return *d_typeNode == *t.d_typeNode; } bool Type::operator!=(const Type& t) const { NodeManagerScope nms(d_nodeManager); return *d_typeNode != *t.d_typeNode; } bool Type::operator<(const Type& t) const { NodeManagerScope nms(d_nodeManager); return *d_typeNode < *t.d_typeNode; } bool Type::operator<=(const Type& t) const { NodeManagerScope nms(d_nodeManager); return *d_typeNode <= *t.d_typeNode; } bool Type::operator>(const Type& t) const { NodeManagerScope nms(d_nodeManager); return *d_typeNode > *t.d_typeNode; } bool Type::operator>=(const Type& t) const { NodeManagerScope nms(d_nodeManager); return *d_typeNode >= *t.d_typeNode; } Type Type::substitute(const Type& type, const Type& replacement) const { NodeManagerScope nms(d_nodeManager); return makeType(d_typeNode->substitute(*type.d_typeNode, *replacement.d_typeNode)); } Type Type::substitute(const std::vector& types, const std::vector& replacements) const { NodeManagerScope nms(d_nodeManager); vector typesNodes, replacementsNodes; for(vector::const_iterator i = types.begin(), iend = types.end(); i != iend; ++i) { typesNodes.push_back(*(*i).d_typeNode); } for(vector::const_iterator i = replacements.begin(), iend = replacements.end(); i != iend; ++i) { replacementsNodes.push_back(*(*i).d_typeNode); } return makeType(d_typeNode->substitute(typesNodes.begin(), typesNodes.end(), replacementsNodes.begin(), replacementsNodes.end())); } ExprManager* Type::getExprManager() const { return d_nodeManager->toExprManager(); } Type Type::exportTo(ExprManager* exprManager, ExprManagerMapCollection& vmap) const { return ExprManager::exportType(*this, exprManager, vmap); } void Type::toStream(std::ostream& out) const { NodeManagerScope nms(d_nodeManager); out << *d_typeNode; return; } string Type::toString() const { NodeManagerScope nms(d_nodeManager); stringstream ss; ss << *d_typeNode; return ss.str(); } /** Is this the Boolean type? */ bool Type::isBoolean() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isBoolean(); } /** Is this the integer type? */ bool Type::isInteger() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isInteger(); } /** Is this the real type? */ bool Type::isReal() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isReal(); } /** Is this the string type? */ bool Type::isString() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isString(); } /** Is this the regexp type? */ bool Type::isRegExp() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isRegExp(); } /** Is this the rounding mode type? */ bool Type::isRoundingMode() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isRoundingMode(); } /** Is this the bit-vector type? */ bool Type::isBitVector() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isBitVector(); } /** Is this the floating-point type? */ bool Type::isFloatingPoint() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isFloatingPoint(); } /** Is this a datatype type? */ bool Type::isDatatype() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isDatatype(); } /** Is this the Constructor type? */ bool Type::isConstructor() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isConstructor(); } /** Is this the Selector type? */ bool Type::isSelector() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isSelector(); } /** Is this the Tester type? */ bool Type::isTester() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isTester(); } /** Is this a function type? */ bool Type::isFunction() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isFunction(); } /** * Is this a predicate type? NOTE: all predicate types are also * function types. */ bool Type::isPredicate() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isPredicate(); } /** Is this a tuple type? */ bool Type::isTuple() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isTuple(); } /** Is this a record type? */ bool Type::isRecord() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isRecord(); } /** Is this a symbolic expression type? */ bool Type::isSExpr() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isSExpr(); } /** Is this an array type? */ bool Type::isArray() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isArray(); } /** Is this a Set type? */ bool Type::isSet() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isSet(); } /** Is this a sort kind */ bool Type::isSort() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isSort(); } /** Cast to a sort type */ bool Type::isSortConstructor() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isSortConstructor(); } /** Is this a predicate subtype */ /* - not in release 1.0 bool Type::isPredicateSubtype() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isPredicateSubtype(); } */ /** Is this an integer subrange */ bool Type::isSubrange() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->isSubrange(); } size_t FunctionType::getArity() const { return d_typeNode->getNumChildren() - 1; } vector FunctionType::getArgTypes() const { NodeManagerScope nms(d_nodeManager); vector args; vector argNodes = d_typeNode->getArgTypes(); vector::iterator it = argNodes.begin(); vector::iterator it_end = argNodes.end(); for(; it != it_end; ++ it) { args.push_back(makeType(*it)); } return args; } Type FunctionType::getRangeType() const { NodeManagerScope nms(d_nodeManager); PrettyCheckArgument(isNull() || isFunction(), this); return makeType(d_typeNode->getRangeType()); } vector SExprType::getTypes() const { NodeManagerScope nms(d_nodeManager); vector types; vector typeNodes = d_typeNode->getSExprTypes(); vector::iterator it = typeNodes.begin(); vector::iterator it_end = typeNodes.end(); for(; it != it_end; ++ it) { types.push_back(makeType(*it)); } return types; } string SortType::getName() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getAttribute(expr::VarNameAttr()); } bool SortType::isParameterized() const { return false; } /** Get the parameter types */ std::vector SortType::getParamTypes() const { vector params; return params; } string SortConstructorType::getName() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getAttribute(expr::VarNameAttr()); } size_t SortConstructorType::getArity() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getAttribute(expr::SortArityAttr()); } SortType SortConstructorType::instantiate(const std::vector& params) const { NodeManagerScope nms(d_nodeManager); vector paramsNodes; for(vector::const_iterator i = params.begin(), iend = params.end(); i != iend; ++i) { paramsNodes.push_back(*getTypeNode(*i)); } return SortType(makeType(d_nodeManager->mkSort(*d_typeNode, paramsNodes))); } BooleanType::BooleanType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isBoolean(), this); } IntegerType::IntegerType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isInteger(), this); } RealType::RealType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isReal(), this); } StringType::StringType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isString(), this); } RegExpType::RegExpType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isRegExp(), this); } RoundingModeType::RoundingModeType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isRoundingMode(), this); } BitVectorType::BitVectorType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isBitVector(), this); } FloatingPointType::FloatingPointType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isFloatingPoint(), this); } DatatypeType::DatatypeType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isDatatype(), this); } ConstructorType::ConstructorType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isConstructor(), this); } SelectorType::SelectorType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isSelector(), this); } TesterType::TesterType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isTester(), this); } FunctionType::FunctionType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isFunction(), this); } SExprType::SExprType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isSExpr(), this); } ArrayType::ArrayType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isArray(), this); } SetType::SetType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isSet(), this); } SortType::SortType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isSort(), this); } SortConstructorType::SortConstructorType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isSortConstructor(), this); } /* - not in release 1.0 PredicateSubtype::PredicateSubtype(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isPredicateSubtype(), this); } */ SubrangeType::SubrangeType(const Type& t) throw(IllegalArgumentException) : Type(t) { PrettyCheckArgument(isNull() || isSubrange(), this); } unsigned BitVectorType::getSize() const { return d_typeNode->getBitVectorSize(); } unsigned FloatingPointType::getExponentSize() const { return d_typeNode->getFloatingPointExponentSize(); } unsigned FloatingPointType::getSignificandSize() const { return d_typeNode->getFloatingPointSignificandSize(); } Type ArrayType::getIndexType() const { return makeType(d_typeNode->getArrayIndexType()); } Type ArrayType::getConstituentType() const { return makeType(d_typeNode->getArrayConstituentType()); } Type SetType::getElementType() const { return makeType(d_typeNode->getSetElementType()); } DatatypeType ConstructorType::getRangeType() const { return DatatypeType(makeType(d_typeNode->getConstructorRangeType())); } size_t ConstructorType::getArity() const { return d_typeNode->getNumChildren() - 1; } std::vector ConstructorType::getArgTypes() const { NodeManagerScope nms(d_nodeManager); vector args; vector argNodes = d_typeNode->getArgTypes(); vector::iterator it = argNodes.begin(); vector::iterator it_end = argNodes.end(); for(; it != it_end; ++ it) { args.push_back(makeType(*it)); } return args; } const Datatype& DatatypeType::getDatatype() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getDatatype(); } bool DatatypeType::isParametric() const { return d_typeNode->isParametricDatatype(); } Expr DatatypeType::getConstructor(std::string name) const { return getDatatype().getConstructor(name); } bool DatatypeType::isInstantiated() const { return d_typeNode->isInstantiatedDatatype(); } bool DatatypeType::isParameterInstantiated(unsigned n) const { return d_typeNode->isParameterInstantiatedDatatype(n); } size_t DatatypeType::getArity() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getNumChildren() - 1; } std::vector DatatypeType::getParamTypes() const { NodeManagerScope nms(d_nodeManager); vector params; vector paramNodes = d_typeNode->getParamTypes(); vector::iterator it = paramNodes.begin(); vector::iterator it_end = paramNodes.end(); for(; it != it_end; ++it) { params.push_back(makeType(*it)); } return params; } DatatypeType DatatypeType::instantiate(const std::vector& params) const { NodeManagerScope nms(d_nodeManager); TypeNode cons = d_nodeManager->mkTypeConst( (*d_typeNode)[0].getConst() ); vector paramsNodes; paramsNodes.push_back( cons ); for(vector::const_iterator i = params.begin(), iend = params.end(); i != iend; ++i) { paramsNodes.push_back(*getTypeNode(*i)); } return DatatypeType(makeType(d_nodeManager->mkTypeNode(kind::PARAMETRIC_DATATYPE, paramsNodes))); } /** Get the length of a tuple type */ size_t DatatypeType::getTupleLength() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getTupleLength(); } /** Get the constituent types of a tuple type */ std::vector DatatypeType::getTupleTypes() const { NodeManagerScope nms(d_nodeManager); std::vector< TypeNode > vec = d_typeNode->getTupleTypes(); std::vector< Type > vect; for( unsigned i=0; igetRecord(); } DatatypeType SelectorType::getDomain() const { return DatatypeType(makeType((*d_typeNode)[0])); } Type SelectorType::getRangeType() const { return makeType((*d_typeNode)[1]); } DatatypeType TesterType::getDomain() const { return DatatypeType(makeType((*d_typeNode)[0])); } BooleanType TesterType::getRangeType() const { return BooleanType(makeType(d_nodeManager->booleanType())); } /* - not in release 1.0 Expr PredicateSubtype::getPredicate() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getSubtypePredicate().toExpr(); } Type PredicateSubtype::getParentType() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getSubtypeParentType().toType(); } */ SubrangeBounds SubrangeType::getSubrangeBounds() const { NodeManagerScope nms(d_nodeManager); return d_typeNode->getSubrangeBounds(); } size_t TypeHashFunction::operator()(const Type& t) const { return TypeNodeHashFunction()(NodeManager::fromType(t)); } }/* CVC4 namespace */ cvc4-1.5/src/expr/type.h000066400000000000000000000423261313116454100151230ustar00rootroot00000000000000/********************* */ /*! \file type.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Martin Brain ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Interface for expression types. ** ** Interface for expression types **/ #include "cvc4_public.h" #ifndef __CVC4__TYPE_H #define __CVC4__TYPE_H #include #include #include #include #include "util/cardinality.h" #include "util/subrange_bound.h" namespace CVC4 { class NodeManager; class CVC4_PUBLIC ExprManager; class CVC4_PUBLIC Expr; class TypeNode; struct CVC4_PUBLIC ExprManagerMapCollection; class CVC4_PUBLIC SmtEngine; class CVC4_PUBLIC Datatype; class Record; template class NodeTemplate; class BooleanType; class IntegerType; class RealType; class StringType; class RegExpType; class RoundingModeType; class BitVectorType; class ArrayType; class SetType; class DatatypeType; class ConstructorType; class SelectorType; class TesterType; class FunctionType; class SExprType; class SortType; class SortConstructorType; // not in release 1.0 //class PredicateSubtype; class SubrangeType; class Type; /** Hash function for Types */ struct CVC4_PUBLIC TypeHashFunction { /** Return a hash code for type t */ size_t operator()(const CVC4::Type& t) const; };/* struct TypeHashFunction */ /** * Output operator for types * @param out the stream to output to * @param t the type to output * @return the stream */ std::ostream& operator<<(std::ostream& out, const Type& t) CVC4_PUBLIC; namespace expr { TypeNode exportTypeInternal(TypeNode n, NodeManager* from, NodeManager* nm, ExprManagerMapCollection& vmap); }/* CVC4::expr namespace */ /** * Class encapsulating CVC4 expression types. */ class CVC4_PUBLIC Type { friend class SmtEngine; friend class ExprManager; friend class NodeManager; friend class TypeNode; friend std::ostream& CVC4::operator<<(std::ostream& out, const Type& t); friend TypeNode expr::exportTypeInternal(TypeNode n, NodeManager* from, NodeManager* nm, ExprManagerMapCollection& vmap); protected: /** The internal expression representation */ TypeNode* d_typeNode; /** The responsible expression manager */ NodeManager* d_nodeManager; /** * Construct a new type given the typeNode, for internal use only. * @param typeNode the TypeNode to use * @return the Type corresponding to the TypeNode */ Type makeType(const TypeNode& typeNode) const; /** * Constructor for internal purposes. * @param em the expression manager that handles this expression * @param typeNode the actual TypeNode pointer for this type */ Type(NodeManager* em, TypeNode* typeNode); /** Accessor for derived classes */ static TypeNode* getTypeNode(const Type& t) throw() { return t.d_typeNode; } public: /** Force a virtual destructor for safety. */ virtual ~Type(); /** Default constructor */ Type(); /** * Copy constructor. * @param t the type to make a copy of */ Type(const Type& t); /** * Check whether this is a null type * @return true if type is null */ bool isNull() const; /** * Return the cardinality of this type. */ Cardinality getCardinality() const; /** * Is this a well-founded type? */ bool isWellFounded() const; /** * Construct and return a ground term for this Type. Throws an * exception if this type is not well-founded. */ Expr mkGroundTerm() const; /** * Is this type a subtype of the given type? */ bool isSubtypeOf(Type t) const; /** * Is this type comparable to the given type (i.e., do they share * a common ancestor in the subtype tree)? */ bool isComparableTo(Type t) const; /** * Get the most general base type of this type. */ Type getBaseType() const; /** * Substitution of Types. */ Type substitute(const Type& type, const Type& replacement) const; /** * Simultaneous substitution of Types. */ Type substitute(const std::vector& types, const std::vector& replacements) const; /** * Get this type's ExprManager. */ ExprManager* getExprManager() const; /** * Exports this type into a different ExprManager. */ Type exportTo(ExprManager* exprManager, ExprManagerMapCollection& vmap) const; /** * Assignment operator. * @param t the type to assign to this type * @return this type after assignment. */ Type& operator=(const Type& t); /** * Comparison for structural equality. * @param t the type to compare to * @returns true if the types are equal */ bool operator==(const Type& t) const; /** * Comparison for structural disequality. * @param t the type to compare to * @returns true if the types are not equal */ bool operator!=(const Type& t) const; /** * An ordering on Types so they can be stored in maps, etc. */ bool operator<(const Type& t) const; /** * An ordering on Types so they can be stored in maps, etc. */ bool operator<=(const Type& t) const; /** * An ordering on Types so they can be stored in maps, etc. */ bool operator>(const Type& t) const; /** * An ordering on Types so they can be stored in maps, etc. */ bool operator>=(const Type& t) const; /** * Is this the Boolean type? * @return true if the type is a Boolean type */ bool isBoolean() const; /** * Is this the integer type? * @return true if the type is a integer type */ bool isInteger() const; /** * Is this the real type? * @return true if the type is a real type */ bool isReal() const; /** * Is this the string type? * @return true if the type is the string type */ bool isString() const; /** * Is this the regexp type? * @return true if the type is the regexp type */ bool isRegExp() const; /** * Is this the rounding mode type? * @return true if the type is the rounding mode type */ bool isRoundingMode() const; /** * Is this the bit-vector type? * @return true if the type is a bit-vector type */ bool isBitVector() const; /** * Is this the floating-point type? * @return true if the type is a floating-point type */ bool isFloatingPoint() const; /** * Is this a function type? * @return true if the type is a function type */ bool isFunction() const; /** * Is this a predicate type, i.e. if it's a function type mapping to Boolean. * All predicate types are also function types. * @return true if the type is a predicate type */ bool isPredicate() const; /** * Is this a tuple type? * @return true if the type is a tuple type */ bool isTuple() const; /** * Is this a record type? * @return true if the type is a record type */ bool isRecord() const; /** * Is this a symbolic expression type? * @return true if the type is a symbolic expression type */ bool isSExpr() const; /** * Is this an array type? * @return true if the type is a array type */ bool isArray() const; /** * Is this a Set type? * @return true if the type is a Set type */ bool isSet() const; /** * Is this a datatype type? * @return true if the type is a datatype type */ bool isDatatype() const; /** * Is this a constructor type? * @return true if the type is a constructor type */ bool isConstructor() const; /** * Is this a selector type? * @return true if the type is a selector type */ bool isSelector() const; /** * Is this a tester type? * @return true if the type is a tester type */ bool isTester() const; /** * Is this a sort kind? * @return true if this is a sort kind */ bool isSort() const; /** * Is this a sort constructor kind? * @return true if this is a sort constructor kind */ bool isSortConstructor() const; /** * Is this a predicate subtype? * @return true if this is a predicate subtype */ // not in release 1.0 //bool isPredicateSubtype() const; /** * Is this an integer subrange type? * @return true if this is an integer subrange type */ bool isSubrange() const; /** * Outputs a string representation of this type to the stream. * @param out the stream to output to */ void toStream(std::ostream& out) const; /** * Constructs a string representation of this type. */ std::string toString() const; };/* class Type */ /** * Singleton class encapsulating the Boolean type. */ class CVC4_PUBLIC BooleanType : public Type { public: /** Construct from the base type */ BooleanType(const Type& type = Type()) throw(IllegalArgumentException); };/* class BooleanType */ /** * Singleton class encapsulating the integer type. */ class CVC4_PUBLIC IntegerType : public Type { public: /** Construct from the base type */ IntegerType(const Type& type = Type()) throw(IllegalArgumentException); };/* class IntegerType */ /** * Singleton class encapsulating the real type. */ class CVC4_PUBLIC RealType : public Type { public: /** Construct from the base type */ RealType(const Type& type = Type()) throw(IllegalArgumentException); };/* class RealType */ /** * Singleton class encapsulating the string type. */ class CVC4_PUBLIC StringType : public Type { public: /** Construct from the base type */ StringType(const Type& type) throw(IllegalArgumentException); };/* class StringType */ /** * Singleton class encapsulating the string type. */ class CVC4_PUBLIC RegExpType : public Type { public: /** Construct from the base type */ RegExpType(const Type& type) throw(IllegalArgumentException); };/* class RegExpType */ /** * Singleton class encapsulating the rounding mode type. */ class CVC4_PUBLIC RoundingModeType : public Type { public: /** Construct from the base type */ RoundingModeType(const Type& type = Type()) throw(IllegalArgumentException); };/* class RoundingModeType */ /** * Class encapsulating a function type. */ class CVC4_PUBLIC FunctionType : public Type { public: /** Construct from the base type */ FunctionType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the arity of the function type */ size_t getArity() const; /** Get the argument types */ std::vector getArgTypes() const; /** Get the range type (i.e., the type of the result). */ Type getRangeType() const; };/* class FunctionType */ /** * Class encapsulating a sexpr type. */ class CVC4_PUBLIC SExprType : public Type { public: /** Construct from the base type */ SExprType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the constituent types */ std::vector getTypes() const; };/* class SExprType */ /** * Class encapsulating an array type. */ class CVC4_PUBLIC ArrayType : public Type { public: /** Construct from the base type */ ArrayType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the index type */ Type getIndexType() const; /** Get the constituent type */ Type getConstituentType() const; };/* class ArrayType */ /** * Class encapsulating an set type. */ class CVC4_PUBLIC SetType : public Type { public: /** Construct from the base type */ SetType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the index type */ Type getElementType() const; };/* class SetType */ /** * Class encapsulating a user-defined sort. */ class CVC4_PUBLIC SortType : public Type { public: /** Construct from the base type */ SortType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the name of the sort */ std::string getName() const; /** Is this type parameterized? */ bool isParameterized() const; /** Get the parameter types */ std::vector getParamTypes() const; };/* class SortType */ /** * Class encapsulating a user-defined sort constructor. */ class CVC4_PUBLIC SortConstructorType : public Type { public: /** Construct from the base type */ SortConstructorType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the name of the sort constructor */ std::string getName() const; /** Get the arity of the sort constructor */ size_t getArity() const; /** Instantiate a sort using this sort constructor */ SortType instantiate(const std::vector& params) const; };/* class SortConstructorType */ // not in release 1.0 #if 0 /** * Class encapsulating a predicate subtype. */ class CVC4_PUBLIC PredicateSubtype : public Type { public: /** Construct from the base type */ PredicateSubtype(const Type& type = Type()) throw(IllegalArgumentException); /** Get the LAMBDA defining this predicate subtype */ Expr getPredicate() const; /** * Get the parent type of this predicate subtype; note that this * could be another predicate subtype. */ Type getParentType() const; };/* class PredicateSubtype */ #endif /* 0 */ /** * Class encapsulating an integer subrange type. */ class CVC4_PUBLIC SubrangeType : public Type { public: /** Construct from the base type */ SubrangeType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the bounds defining this integer subrange */ SubrangeBounds getSubrangeBounds() const; };/* class SubrangeType */ /** * Class encapsulating the bit-vector type. */ class CVC4_PUBLIC BitVectorType : public Type { public: /** Construct from the base type */ BitVectorType(const Type& type = Type()) throw(IllegalArgumentException); /** * Returns the size of the bit-vector type. * @return the width of the bit-vector type (> 0) */ unsigned getSize() const; };/* class BitVectorType */ /** * Class encapsulating the floating point type. */ class CVC4_PUBLIC FloatingPointType : public Type { public: /** Construct from the base type */ FloatingPointType(const Type& type = Type()) throw(IllegalArgumentException); /** * Returns the size of the floating-point exponent type. * @return the width of the floating-point exponent type (> 0) */ unsigned getExponentSize() const; /** * Returns the size of the floating-point significand type. * @return the width of the floating-point significand type (> 0) */ unsigned getSignificandSize() const; };/* class FloatingPointType */ /** * Class encapsulating the datatype type */ class CVC4_PUBLIC DatatypeType : public Type { public: /** Construct from the base type */ DatatypeType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the underlying datatype */ const Datatype& getDatatype() const; /** Is this datatype parametric? */ bool isParametric() const; /** * Get the constructor operator associated to the given constructor * name in this datatype. */ Expr getConstructor(std::string name) const; /** * Has this datatype been fully instantiated ? * * @return true if this datatype is not parametric or, if it is, it * has been fully instantiated */ bool isInstantiated() const; /** * Has this datatype been instantiated for parameter N ? */ bool isParameterInstantiated(unsigned n) const; /** Get the parameter types */ std::vector getParamTypes() const; /** Get the arity of the datatype constructor */ size_t getArity() const; /** Instantiate a datatype using this datatype constructor */ DatatypeType instantiate(const std::vector& params) const; /** Get the length of a tuple type */ size_t getTupleLength() const; /** Get the constituent types of a tuple type */ std::vector getTupleTypes() const; /** Get the description of the record type */ const Record& getRecord() const; };/* class DatatypeType */ /** * Class encapsulating the constructor type */ class CVC4_PUBLIC ConstructorType : public Type { public: /** Construct from the base type */ ConstructorType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the range type */ DatatypeType getRangeType() const; /** Get the argument types */ std::vector getArgTypes() const; /** Get the number of constructor arguments */ size_t getArity() const; };/* class ConstructorType */ /** * Class encapsulating the Selector type */ class CVC4_PUBLIC SelectorType : public Type { public: /** Construct from the base type */ SelectorType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the domain type for this selector (the datatype type) */ DatatypeType getDomain() const; /** Get the range type for this selector (the field type) */ Type getRangeType() const; };/* class SelectorType */ /** * Class encapsulating the Tester type */ class CVC4_PUBLIC TesterType : public Type { public: /** Construct from the base type */ TesterType(const Type& type = Type()) throw(IllegalArgumentException); /** Get the type that this tester tests (the datatype type) */ DatatypeType getDomain() const; /** * Get the range type for this tester (included for sake of * interface completeness), but doesn't give useful information). */ BooleanType getRangeType() const; };/* class TesterType */ }/* CVC4 namespace */ #endif /* __CVC4__TYPE_H */ cvc4-1.5/src/expr/type.i000066400000000000000000000041201313116454100151120ustar00rootroot00000000000000%{ #include "expr/type.h" %} #ifdef SWIGPYTHON %rename(doApply) CVC4::TypeHashFunction::operator()(const CVC4::Type&) const; #else /* SWIGPYTHON */ %rename(apply) CVC4::TypeHashFunction::operator()(const CVC4::Type&) const; #endif /* SWIGPYTHON */ #ifdef SWIGJAVA %typemap(javabody) CVC4::Type %{ private long swigCPtr; protected boolean swigCMemOwn; protected $javaclassname(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; this.em = SmtEngine.mkRef(getExprManager()); // keep ref to em in SWIG proxy class } protected static long getCPtr($javaclassname obj) { return (obj == null) ? 0 : obj.swigCPtr; } %} %javamethodmodifiers CVC4::Type::operator=(const Type&) "protected"; %typemap(javacode) CVC4::Type %{ // a ref is kept here to keep Java GC from collecting the ExprManager // before the Type private Object em; public Type assign(Type t) { Type r = assignInternal(t); this.em = SmtEngine.mkRef(getExprManager()); // keep ref to em in SWIG proxy class return r; } %} %typemap(javaconstruct) Type { this($imcall, true); this.em = SmtEngine.mkRef(getExprManager()); // keep ref to em in SWIG proxy class } %typemap(javadestruct, methodname="delete", methodmodifiers="public synchronized") CVC4::Type { SmtEngine.dlRef(em); em = null; if (swigCPtr != 0) { if (swigCMemOwn) { swigCMemOwn = false; CVC4JNI.delete_Type(swigCPtr); } swigCPtr = 0; } } #endif /* SWIGJAVA */ %ignore CVC4::operator<<(std::ostream&, const Type&); %rename(assignInternal) CVC4::Type::operator=(const Type&); %rename(equals) CVC4::Type::operator==(const Type&) const; %ignore CVC4::Type::operator!=(const Type&) const; %rename(less) CVC4::Type::operator<(const Type&) const; %rename(lessEqual) CVC4::Type::operator<=(const Type&) const; %rename(greater) CVC4::Type::operator>(const Type&) const; %rename(greaterEqual) CVC4::Type::operator>=(const Type&) const; namespace CVC4 { namespace expr { %ignore exportTypeInternal; }/* CVC4::expr namespace */ }/* CVC4 namespace */ %include "expr/type.h" cvc4-1.5/src/expr/type_checker.h000066400000000000000000000023431313116454100166020ustar00rootroot00000000000000/********************* */ /*! \file type_checker.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief A type checker ** ** A type checker. **/ #include "cvc4_private.h" // ordering dependence #include "expr/node.h" #ifndef __CVC4__EXPR__TYPE_CHECKER_H #define __CVC4__EXPR__TYPE_CHECKER_H namespace CVC4 { namespace expr { class TypeChecker { public: static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check = false) throw (TypeCheckingExceptionPrivate, AssertionException); static bool computeIsConst(NodeManager* nodeManager, TNode n) throw (AssertionException); static bool neverIsConst(NodeManager* nodeManager, TNode n) throw (AssertionException); };/* class TypeChecker */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ #endif /* __CVC4__EXPR__TYPE_CHECKER_H */ cvc4-1.5/src/expr/type_checker_template.cpp000066400000000000000000000046201313116454100210300ustar00rootroot00000000000000/********************* */ /*! \file type_checker_template.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief TypeChecker implementation ** ** TypeChecker implementation. **/ #line 18 "${template}" #include "expr/type_checker.h" #include "expr/node_manager.h" #include "expr/node_manager_attributes.h" ${typechecker_includes} #line 26 "${template}" namespace CVC4 { namespace expr { TypeNode TypeChecker::computeType(NodeManager* nodeManager, TNode n, bool check) throw (TypeCheckingExceptionPrivate, AssertionException) { TypeNode typeNode; // Infer the type switch(n.getKind()) { case kind::VARIABLE: case kind::SKOLEM: typeNode = nodeManager->getAttribute(n, TypeAttr()); break; case kind::BUILTIN: typeNode = nodeManager->builtinOperatorType(); break; ${typerules} #line 47 "${template}" default: Debug("getType") << "FAILURE" << std::endl; Unhandled(n.getKind()); } nodeManager->setAttribute(n, TypeAttr(), typeNode); nodeManager->setAttribute(n, TypeCheckedAttr(), check || nodeManager->getAttribute(n, TypeCheckedAttr())); return typeNode; }/* TypeChecker::computeType */ bool TypeChecker::computeIsConst(NodeManager* nodeManager, TNode n) throw (AssertionException) { Assert(n.getMetaKind() == kind::metakind::OPERATOR || n.getMetaKind() == kind::metakind::PARAMETERIZED || n.getMetaKind() == kind::metakind::NULLARY_OPERATOR); switch(n.getKind()) { ${construles} #line 70 "${template}" default:; } return false; }/* TypeChecker::computeIsConst */ bool TypeChecker::neverIsConst(NodeManager* nodeManager, TNode n) throw (AssertionException) { Assert(n.getMetaKind() == kind::metakind::OPERATOR || n.getMetaKind() == kind::metakind::PARAMETERIZED || n.getMetaKind() == kind::metakind::NULLARY_OPERATOR); switch(n.getKind()) { ${neverconstrules} #line 87 "${template}" default:; } return true; }/* TypeChecker::neverIsConst */ }/* CVC4::expr namespace */ }/* CVC4 namespace */ cvc4-1.5/src/expr/type_node.cpp000066400000000000000000000453361313116454100164670ustar00rootroot00000000000000/********************* */ /*! \file type_node.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Andrew Reynolds, Kshitij Bansal ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Reference-counted encapsulation of a pointer to node information. ** ** Reference-counted encapsulation of a pointer to node information. **/ #include "expr/type_node.h" #include #include "expr/node_manager_attributes.h" #include "expr/type_properties.h" #include "options/base_options.h" #include "options/expr_options.h" #include "options/quantifiers_options.h" using namespace std; namespace CVC4 { TypeNode TypeNode::s_null( &expr::NodeValue::null() ); TypeNode TypeNode::substitute(const TypeNode& type, const TypeNode& replacement, std::hash_map& cache) const { // in cache? std::hash_map::const_iterator i = cache.find(*this); if(i != cache.end()) { return (*i).second; } // otherwise compute NodeBuilder<> nb(getKind()); if(getMetaKind() == kind::metakind::PARAMETERIZED) { // push the operator nb << TypeNode(d_nv->d_children[0]); } for(TypeNode::const_iterator i = begin(), iend = end(); i != iend; ++i) { if(*i == type) { nb << replacement; } else { (*i).substitute(type, replacement); } } // put in cache TypeNode tn = nb.constructTypeNode(); cache[*this] = tn; return tn; } Cardinality TypeNode::getCardinality() const { return kind::getCardinality(*this); } bool TypeNode::isInterpretedFinite() const { if( getCardinality().isFinite() ){ return true; }else{ if( options::finiteModelFind() ){ if( isSort() ){ return true; }else if( isDatatype() ){ TypeNode tn = *this; const Datatype& dt = getDatatype(); return dt.isInterpretedFinite( tn.toType() ); }else if( isArray() ){ return getArrayIndexType().isInterpretedFinite() && getArrayConstituentType().isInterpretedFinite(); }else if( isSet() ) { return getSetElementType().isInterpretedFinite(); } } return false; } } bool TypeNode::isWellFounded() const { return kind::isWellFounded(*this); } Node TypeNode::mkGroundTerm() const { return kind::mkGroundTerm(*this); } bool TypeNode::isSubtypeOf(TypeNode t) const { if(*this == t) { return true; } if(getKind() == kind::TYPE_CONSTANT) { switch(getConst()) { case INTEGER_TYPE: return t.getKind() == kind::TYPE_CONSTANT && t.getConst() == REAL_TYPE; default: return false; } } if(isSubrange()) { if(t.isSubrange()) { return t.getSubrangeBounds() <= getSubrangeBounds(); } else { return t.getKind() == kind::TYPE_CONSTANT && ( t.getConst() == INTEGER_TYPE || t.getConst() == REAL_TYPE ); } } if(isTuple() && t.isTuple()) { const Datatype& dt1 = getDatatype(); const Datatype& dt2 = t.getDatatype(); if( dt1[0].getNumArgs()!=dt2[0].getNumArgs() ){ return false; } // r1's fields must be subtypes of r2's, in order for( unsigned i=0; irealType())) { return t.isSubtypeOf(NodeManager::currentNM()->realType()); } if(isTuple() && t.isTuple()) { const Datatype& dt1 = getDatatype(); const Datatype& dt2 = t.getDatatype(); if( dt1[0].getNumArgs()!=dt2[0].getNumArgs() ){ return false; } // r1's fields must be subtypes of r2's, in order for( unsigned i=0; i().getExpression()); } TypeNode TypeNode::getSubtypeParentType() const { Assert(isPredicateSubtype()); return getSubtypePredicate().getType().getArgTypes()[0]; } TypeNode TypeNode::getBaseType() const { TypeNode realt = NodeManager::currentNM()->realType(); if (isSubtypeOf(realt)) { return realt; } else if (isPredicateSubtype()) { return getSubtypeParentType().getBaseType(); } else if (isParametricDatatype()) { vector v; for(size_t i = 1; i < getNumChildren(); ++i) { v.push_back((*this)[i].getBaseType().toType()); } TypeNode tn = TypeNode::fromType((*this)[0].getDatatype().getDatatypeType(v)); return tn; } return *this; } std::vector TypeNode::getArgTypes() const { vector args; if(isTester()) { Assert(getNumChildren() == 1); args.push_back((*this)[0]); } else { Assert(isFunction() || isConstructor() || isSelector()); for(unsigned i = 0, i_end = getNumChildren() - 1; i < i_end; ++i) { args.push_back((*this)[i]); } } return args; } std::vector TypeNode::getParamTypes() const { vector params; Assert(isParametricDatatype()); for(unsigned i = 1, i_end = getNumChildren(); i < i_end; ++i) { params.push_back((*this)[i]); } return params; } /** Is this a tuple type? */ bool TypeNode::isTuple() const { return ( getKind() == kind::DATATYPE_TYPE && getDatatype().isTuple() ) || ( isPredicateSubtype() && getSubtypeParentType().isTuple() ); } /** Is this a record type? */ bool TypeNode::isRecord() const { return ( getKind() == kind::DATATYPE_TYPE && getDatatype().isRecord() ) || ( isPredicateSubtype() && getSubtypeParentType().isRecord() ); } size_t TypeNode::getTupleLength() const { Assert(isTuple()); const Datatype& dt = getDatatype(); Assert(dt.getNumConstructors()==1); return dt[0].getNumArgs(); } vector TypeNode::getTupleTypes() const { Assert(isTuple()); const Datatype& dt = getDatatype(); Assert(dt.getNumConstructors()==1); vector types; for(unsigned i = 0; i < dt[0].getNumArgs(); ++i) { types.push_back(TypeNode::fromType(dt[0][i].getRangeType())); } return types; } const Record& TypeNode::getRecord() const { Assert(isRecord()); const Datatype & dt = getDatatype(); return *(dt.getRecord()); //return getAttribute(expr::DatatypeRecordAttr()).getConst(); } vector TypeNode::getSExprTypes() const { Assert(isSExpr()); vector types; for(unsigned i = 0, i_end = getNumChildren(); i < i_end; ++i) { types.push_back((*this)[i]); } return types; } /** Is this an instantiated datatype type */ bool TypeNode::isInstantiatedDatatype() const { if(getKind() == kind::DATATYPE_TYPE) { return true; } if(getKind() != kind::PARAMETRIC_DATATYPE) { return false; } const Datatype& dt = (*this)[0].getDatatype(); unsigned n = dt.getNumParameters(); Assert(n < getNumChildren()); for(unsigned i = 0; i < n; ++i) { if(TypeNode::fromType(dt.getParameter(i)) == (*this)[i + 1]) { return false; } } return true; } /** Is this an instantiated datatype parameter */ bool TypeNode::isParameterInstantiatedDatatype(unsigned n) const { AssertArgument(getKind() == kind::PARAMETRIC_DATATYPE, *this); const Datatype& dt = (*this)[0].getDatatype(); AssertArgument(n < dt.getNumParameters(), *this); return TypeNode::fromType(dt.getParameter(n)) != (*this)[n + 1]; } TypeNode TypeNode::leastCommonTypeNode(TypeNode t0, TypeNode t1){ return commonTypeNode( t0, t1, true ); } TypeNode TypeNode::mostCommonTypeNode(TypeNode t0, TypeNode t1){ return commonTypeNode( t0, t1, false ); } TypeNode TypeNode::commonTypeNode(TypeNode t0, TypeNode t1, bool isLeast) { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); Assert(!t0.isNull()); Assert(!t1.isNull()); if(__builtin_expect( (t0 == t1), true )) { return t0; } // t0 != t1 && if(t0.getKind() == kind::TYPE_CONSTANT) { switch(t0.getConst()) { case INTEGER_TYPE: if(t1.isInteger()) { // t0 == IntegerType && t1.isInteger() return t0; //IntegerType } else if(t1.isReal()) { // t0 == IntegerType && t1.isReal() && !t1.isInteger() return isLeast ? t1 : t0; // RealType } else { return TypeNode(); // null type } case REAL_TYPE: if(t1.isReal()) { return isLeast ? t0 : t1; // RealType } else { return TypeNode(); // null type } default: //if(t1.isPredicateSubtype() && t1.getSubtypeParentType().isSubtypeOf(t0)) { // return t0; // t0 is a constant type //} else { return TypeNode(); // null type //} } } else if(t1.getKind() == kind::TYPE_CONSTANT) { return commonTypeNode(t1, t0, isLeast); // decrease the number of special cases } // t0 != t1 && // t0.getKind() == kind::TYPE_CONSTANT && // t1.getKind() == kind::TYPE_CONSTANT switch(t0.getKind()) { case kind::BITVECTOR_TYPE: case kind::SORT_TYPE: case kind::CONSTRUCTOR_TYPE: case kind::SELECTOR_TYPE: case kind::TESTER_TYPE: //if( t1.isPredicateSubtype() && t1.getSubtypeParentType().isSubtypeOf(t0)) { // return t0; //} else { return TypeNode(); //} case kind::FUNCTION_TYPE: return TypeNode(); // Not sure if this is right case kind::SET_TYPE: { // take the least common subtype of element types TypeNode elementType; if(t1.isSet() && !(elementType = commonTypeNode(t0[0], t1[0], isLeast)).isNull() ) { return NodeManager::currentNM()->mkSetType(elementType); } else { return TypeNode(); } } case kind::ARRAY_TYPE: { TypeNode indexType, elementType; if(t1.isArray() && ! (indexType = commonTypeNode(t0[0], t1[0], !isLeast)).isNull() && ! (elementType = commonTypeNode(t0[1], t1[1], isLeast)).isNull() ) { return NodeManager::currentNM()->mkArrayType(indexType, elementType); } else { return TypeNode(); } } case kind::SEXPR_TYPE: Unimplemented("haven't implemented leastCommonType for symbolic expressions yet"); return TypeNode(); case kind::SUBTYPE_TYPE: //if(t1.isPredicateSubtype()){ // // This is the case where both t0 and t1 are predicate subtypes. // return leastCommonPredicateSubtype(t0, t1); //}else{ // t0 is a predicate subtype and t1 is not // return commonTypeNode(t1, t0, isLeast); //decrease the number of special cases //} return TypeNode(); case kind::SUBRANGE_TYPE: /* if(t1.isSubrange()) { const SubrangeBounds& t0SR = t0.getSubrangeBounds(); const SubrangeBounds& t1SR = t1.getSubrangeBounds(); if(SubrangeBounds::joinIsBounded(t0SR, t1SR)) { SubrangeBounds j = SubrangeBounds::join(t0SR, t1SR); return NodeManager::currentNM()->mkSubrangeType(j); } else { return NodeManager::currentNM()->integerType(); } } else if(t1.isPredicateSubtype()) { // t0 is a subrange // t1 is not a subrange // t1 is a predicate subtype if(t1.isInteger()) { return NodeManager::currentNM()->integerType(); } else if(t1.isReal()) { return NodeManager::currentNM()->realType(); } else { return TypeNode(); } } else { // t0 is a subrange // t1 is not a subrange // t1 is not a type constant && is not a predicate subtype // t1 cannot be real subtype or integer. Assert(t1.isReal()); Assert(t1.isInteger()); return TypeNode(); } */ return TypeNode(); case kind::DATATYPE_TYPE: if( t0.isTuple() && t1.isTuple() ){ const Datatype& dt1 = t0.getDatatype(); const Datatype& dt2 = t1.getDatatype(); if( dt1[0].getNumArgs()==dt2[0].getNumArgs() ){ std::vector< TypeNode > lc_types; for( unsigned i=0; imkTupleType( lc_types ); } } //else if( t0.isRecord() && t1.isRecord() ){ //record types are not related in current implementation //} // otherwise no common ancestor return TypeNode(); case kind::PARAMETRIC_DATATYPE: { if(!t1.isParametricDatatype()) { return TypeNode(); } while(t1.getKind() != kind::PARAMETRIC_DATATYPE) { t1 = t1.getSubtypeParentType(); } if(t0[0] != t1[0] || t0.getNumChildren() != t1.getNumChildren()) { return TypeNode(); } vector v; for(size_t i = 1; i < t0.getNumChildren(); ++i) { v.push_back(commonTypeNode(t0[i], t1[i], isLeast).toType()); } return TypeNode::fromType(t0[0].getDatatype().getDatatypeType(v)); } default: Unimplemented("don't have a commonType for types `%s' and `%s'", t0.toString().c_str(), t1.toString().c_str()); return TypeNode(); } } TypeNode TypeNode::leastCommonPredicateSubtype(TypeNode t0, TypeNode t1){ Assert(t0.isPredicateSubtype()); Assert(t1.isPredicateSubtype()); std::vector t0stack; t0stack.push_back(t0); while(t0stack.back().isPredicateSubtype()){ t0stack.push_back(t0stack.back().getSubtypeParentType()); } std::vector t1stack; t1stack.push_back(t1); while(t1stack.back().isPredicateSubtype()){ t1stack.push_back(t1stack.back().getSubtypeParentType()); } Assert(!t0stack.empty()); Assert(!t1stack.empty()); if(t0stack.back() == t1stack.back()){ TypeNode mostGeneral = t1stack.back(); t0stack.pop_back(); t1stack.pop_back(); while(!t0stack.empty() && t1stack.empty() && t0stack.back() == t1stack.back()){ mostGeneral = t0stack.back(); t0stack.pop_back(); t1stack.pop_back(); } return mostGeneral; }else{ return leastCommonTypeNode(t0stack.back(), t1stack.back()); } } Node TypeNode::getEnsureTypeCondition( Node n, TypeNode tn ) { TypeNode ntn = n.getType(); Assert( ntn.isComparableTo( tn ) ); if( !ntn.isSubtypeOf( tn ) ){ if( tn.isInteger() ){ if( tn.isSubtypeOf( ntn ) ){ return NodeManager::currentNM()->mkNode( kind::IS_INTEGER, n ); } }else if( tn.isDatatype() && ntn.isDatatype() ){ if( tn.isTuple() && ntn.isTuple() ){ const Datatype& dt1 = tn.getDatatype(); const Datatype& dt2 = ntn.getDatatype(); if( dt1[0].getNumArgs()==dt2[0].getNumArgs() ){ std::vector< Node > conds; for( unsigned i=0; imkNode( kind::APPLY_SELECTOR_TOTAL, Node::fromExpr( dt2[0][i].getSelector() ), n ); Node etc = getEnsureTypeCondition( s, TypeNode::fromType( dt1[0][i].getRangeType() ) ); if( etc.isNull() ){ return Node::null(); }else{ conds.push_back( etc ); } } if( conds.empty() ){ return NodeManager::currentNM()->mkConst( true ); }else if( conds.size()==1 ){ return conds[0]; }else{ return NodeManager::currentNM()->mkNode( kind::AND, conds ); } } } } return Node::null(); }else{ return NodeManager::currentNM()->mkConst( true ); } } /** Is this a sort kind */ bool TypeNode::isSort() const { return ( getKind() == kind::SORT_TYPE && !hasAttribute(expr::SortArityAttr()) ) || ( isPredicateSubtype() && getSubtypeParentType().isSort() ); } /** Is this a sort constructor kind */ bool TypeNode::isSortConstructor() const { return getKind() == kind::SORT_TYPE && hasAttribute(expr::SortArityAttr()); } std::string TypeNode::toString() const { std::stringstream ss; OutputLanguage outlang = (this == &s_null) ? language::output::LANG_AUTO : options::outputLanguage(); d_nv->toStream(ss, -1, false, 0, outlang); return ss.str(); } }/* CVC4 namespace */ cvc4-1.5/src/expr/type_node.h000066400000000000000000000766021313116454100161340ustar00rootroot00000000000000/********************* */ /*! \file type_node.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Dejan Jovanovic, Martin Brain ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Reference-counted encapsulation of a pointer to node information. ** ** Reference-counted encapsulation of a pointer to node information. **/ #include "cvc4_private.h" // circular dependency #include "expr/node_value.h" #ifndef __CVC4__TYPE_NODE_H #define __CVC4__TYPE_NODE_H #include #include #include #include #include "base/cvc4_assert.h" #include "expr/kind.h" #include "expr/metakind.h" #include "util/cardinality.h" namespace CVC4 { class NodeManager; namespace expr { class NodeValue; }/* CVC4::expr namespace */ /** * Encapsulation of an NodeValue pointer for Types. The reference count is * maintained in the NodeValue. */ class TypeNode { public: // for hash_maps, hash_sets.. struct HashFunction { size_t operator()(TypeNode node) const { return (size_t) node.getId(); } };/* struct HashFunction */ private: /** * The NodeValue has access to the private constructors, so that the * iterators can can create new types. */ friend class expr::NodeValue; /** A convenient null-valued encapsulated pointer */ static TypeNode s_null; /** The referenced NodeValue */ expr::NodeValue* d_nv; /** * This constructor is reserved for use by the TypeNode package. */ explicit TypeNode(const expr::NodeValue*); friend class NodeManager; template friend class NodeBuilder; /** * Assigns the expression value and does reference counting. No * assumptions are made on the expression, and should only be used * if we know what we are doing. * * @param ev the expression value to assign */ void assignNodeValue(expr::NodeValue* ev); /** * Cache-aware, recursive version of substitute() used by the public * member function with a similar signature. */ TypeNode substitute(const TypeNode& type, const TypeNode& replacement, std::hash_map& cache) const; /** * Cache-aware, recursive version of substitute() used by the public * member function with a similar signature. */ template TypeNode substitute(Iterator1 typesBegin, Iterator1 typesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd, std::hash_map& cache) const; public: /** Default constructor, makes a null expression. */ TypeNode() : d_nv(&expr::NodeValue::null()) { } /** Copy constructor */ TypeNode(const TypeNode& node); /** * Destructor. If ref_count is true it will decrement the reference count * and, if zero, collect the NodeValue. */ ~TypeNode(); /** * Assignment operator for nodes, copies the relevant information from node * to this node. * * @param typeNode the node to copy * @return reference to this node */ TypeNode& operator=(const TypeNode& typeNode); /** * Return the null node. * * @return the null node */ static TypeNode null() { return s_null; } /** * Substitution of TypeNodes. */ inline TypeNode substitute(const TypeNode& type, const TypeNode& replacement) const; /** * Simultaneous substitution of TypeNodes. */ template inline TypeNode substitute(Iterator1 typesBegin, Iterator1 typesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd) const; /** * Structural comparison operator for expressions. * * @param typeNode the type node to compare to * @return true if expressions are equal, false otherwise */ bool operator==(const TypeNode& typeNode) const { return d_nv == typeNode.d_nv; } /** * Structural comparison operator for expressions. * * @param typeNode the type node to compare to * @return true if expressions are equal, false otherwise */ bool operator!=(const TypeNode& typeNode) const { return !(*this == typeNode); } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * * @param typeNode the node to compare to * @return true if this expression is lesser */ inline bool operator<(const TypeNode& typeNode) const { return d_nv->d_id < typeNode.d_nv->d_id; } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * * @param typeNode the node to compare to * @return true if this expression is lesser or equal */ inline bool operator<=(const TypeNode& typeNode) const { return d_nv->d_id <= typeNode.d_nv->d_id; } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * * @param typeNode the node to compare to * @return true if this expression is greater */ inline bool operator>(const TypeNode& typeNode) const { return d_nv->d_id > typeNode.d_nv->d_id; } /** * We compare by expression ids so, keeping things deterministic and having * that subexpressions have to be smaller than the enclosing expressions. * * @param typeNode the node to compare to * @return true if this expression is greater or equal */ inline bool operator>=(const TypeNode& typeNode) const { return d_nv->d_id >= typeNode.d_nv->d_id; } /** * Returns the i-th child of this node. * * @param i the index of the child * @return the node representing the i-th child */ inline TypeNode operator[](int i) const { return TypeNode(d_nv->getChild(i)); } /** * PARAMETERIZED-metakinded types (the SORT_TYPE is one of these) * have an operator. "Little-p parameterized" types (like Array), * are OPERATORs, not PARAMETERIZEDs. */ inline Node getOperator() const { Assert(getMetaKind() == kind::metakind::PARAMETERIZED); return Node(d_nv->getChild(-1)); } /** * Returns the unique id of this node * * @return the id */ inline unsigned long getId() const { return d_nv->getId(); } /** * Returns the kind of this type node. * * @return the kind */ inline Kind getKind() const { return Kind(d_nv->d_kind); } /** * Returns the metakind of this type node. * * @return the metakind */ inline kind::MetaKind getMetaKind() const { return kind::metaKindOf(getKind()); } /** * Returns the number of children this node has. * * @return the number of children */ inline size_t getNumChildren() const; /** * If this is a CONST_* TypeNode, extract the constant from it. */ template inline const T& getConst() const; /** * Returns the value of the given attribute that this has been attached. * * @param attKind the kind of the attribute * @return the value of the attribute */ template inline typename AttrKind::value_type getAttribute(const AttrKind& attKind) const; // Note that there are two, distinct hasAttribute() declarations for // a reason (rather than using a pointer-valued argument with a // default value): they permit more optimized code in the underlying // hasAttribute() implementations. /** * Returns true if this node has been associated an attribute of * given kind. Additionally, if a pointer to the value_kind is * give, and the attribute value has been set for this node, it will * be returned. * * @param attKind the kind of the attribute * @return true if this node has the requested attribute */ template inline bool hasAttribute(const AttrKind& attKind) const; /** * Returns true if this node has been associated an attribute of given kind. * Additionaly, if a pointer to the value_kind is give, and the attribute * value has been set for this node, it will be returned. * * @param attKind the kind of the attribute * @param value where to store the value if it exists * @return true if this node has the requested attribute */ template inline bool getAttribute(const AttrKind& attKind, typename AttrKind::value_type& value) const; /** * Sets the given attribute of this node to the given value. * * @param attKind the kind of the atribute * @param value the value to set the attribute to */ template inline void setAttribute(const AttrKind& attKind, const typename AttrKind::value_type& value); /** Iterator allowing for scanning through the children. */ typedef expr::NodeValue::iterator iterator; /** Constant iterator allowing for scanning through the children. */ typedef expr::NodeValue::iterator const_iterator; /** * Returns the iterator pointing to the first child. * * @return the iterator */ inline iterator begin() { return d_nv->begin(); } /** * Returns the iterator pointing to the end of the children (one * beyond the last one. * * @return the end of the children iterator. */ inline iterator end() { return d_nv->end(); } /** * Returns the const_iterator pointing to the first child. * * @return the const_iterator */ inline const_iterator begin() const { return d_nv->begin(); } /** * Returns the const_iterator pointing to the end of the children * (one beyond the last one. * * @return the end of the children const_iterator. */ inline const_iterator end() const { return d_nv->end(); } /** * Converts this type into a string representation. * * @return the string representation of this type. */ std::string toString() const; /** * Converts this node into a string representation and sends it to the * given stream * * @param out the stream to serialize this node to * @param language the language in which to output */ inline void toStream(std::ostream& out, OutputLanguage language = language::output::LANG_AUTO) const { d_nv->toStream(out, -1, false, 0, language); } /** * Very basic pretty printer for Node. * * @param out output stream to print to. * @param indent number of spaces to indent the formula by. */ void printAst(std::ostream& out, int indent = 0) const; /** * Returns true if this type is a null type. * * @return true if null */ bool isNull() const { return d_nv == &expr::NodeValue::null(); } /** * Convert this TypeNode into a Type using the currently-in-scope * manager. */ inline Type toType(); /** * Convert a Type into a TypeNode. */ inline static TypeNode fromType(const Type& t); /** * Returns the cardinality of this type. * * @return a finite or infinite cardinality */ Cardinality getCardinality() const; /** * Is this type interpreted as being finite. * If finite model finding is enabled, this assumes all uninterpreted sorts * are interpreted as finite. */ bool isInterpretedFinite() const; /** * Returns whether this type is well-founded. * * @return true iff the type is well-founded */ bool isWellFounded() const; /** * Construct and return a ground term of this type. If the type is * not well founded, this function throws an exception. * * @return a ground term of the type */ Node mkGroundTerm() const; /** * Is this type a subtype of the given type? */ bool isSubtypeOf(TypeNode t) const; /** * Is this type comparable to the given type (i.e., do they share * a common ancestor in the subtype tree)? */ bool isComparableTo(TypeNode t) const; /** Is this the Boolean type? */ bool isBoolean() const; /** Is this the Integer type? */ bool isInteger() const; /** Is this the Real type? */ bool isReal() const; /** Is this the String type? */ bool isString() const; /** Is this the Rounding Mode type? */ bool isRoundingMode() const; /** Is this an array type? */ bool isArray() const; /** Is this a Set type? */ bool isSet() const; /** Get the index type (for array types) */ TypeNode getArrayIndexType() const; /** Get the element type (for array types) */ TypeNode getArrayConstituentType() const; /** Get the return type (for constructor types) */ TypeNode getConstructorRangeType() const; /** Get the element type (for set types) */ TypeNode getSetElementType() const; /** * Is this a function type? Function-like things (e.g. datatype * selectors) that aren't actually functions are NOT considered * functions, here. */ bool isFunction() const; /** * Is this a function-LIKE type? Function-like things * (e.g. datatype selectors) that aren't actually functions ARE * considered functions, here. The main point is that this is used * to avoid anything higher-order: anything function-like cannot be * the argument or return value for anything else function-like. * * Arrays are explicitly *not* function-like for the purposes of * this test. However, functions still cannot contain anything * function-like. */ bool isFunctionLike() const; /** * Get the argument types of a function, datatype constructor, * datatype selector, or datatype tester. */ std::vector getArgTypes() const; /** * Get the paramater types of a parameterized datatype. Fails an * assertion if this type is not a parametric datatype. */ std::vector getParamTypes() const; /** * Get the range type (i.e., the type of the result) of a function, * datatype constructor, datatype selector, or datatype tester. */ TypeNode getRangeType() const; /** * Is this a predicate type? NOTE: all predicate types are also * function types (so datatype testers are NOT considered * "predicates" for the purpose of this function). */ bool isPredicate() const; /** * Is this a predicate-LIKE type? Predicate-like things * (e.g. datatype testers) that aren't actually predicates ARE * considered predicates, here. * * Arrays are explicitly *not* predicate-like for the purposes of * this test. */ bool isPredicateLike() const; /** Is this a tuple type? */ bool isTuple() const; /** Get the length of a tuple type */ size_t getTupleLength() const; /** Get the constituent types of a tuple type */ std::vector getTupleTypes() const; /** Is this a record type? */ bool isRecord() const; /** Get the description of the record type */ const Record& getRecord() const; /** Is this a symbolic expression type? */ bool isSExpr() const; /** Get the constituent types of a symbolic expression type */ std::vector getSExprTypes() const; /** Is this a regexp type */ bool isRegExp() const; /** Is this a floating-point type */ bool isFloatingPoint() const; /** Is this a floating-point type of with exp exponent bits and sig significand bits */ bool isFloatingPoint(unsigned exp, unsigned sig) const; /** Is this a bit-vector type */ bool isBitVector() const; /** Is this a bit-vector type of size size */ bool isBitVector(unsigned size) const; /** Is this a datatype type */ bool isDatatype() const; /** Is this a parameterized datatype type */ bool isParametricDatatype() const; /** Is this a codatatype type */ bool isCodatatype() const; /** Is this a fully instantiated datatype type */ bool isInstantiatedDatatype() const; /** Is this an instantiated datatype parameter */ bool isParameterInstantiatedDatatype(unsigned n) const; /** Is this a constructor type */ bool isConstructor() const; /** Is this a selector type */ bool isSelector() const; /** Is this a tester type */ bool isTester() const; /** Get the Datatype specification from a datatype type */ const Datatype& getDatatype() const; /** Get the exponent size of this floating-point type */ unsigned getFloatingPointExponentSize() const; /** Get the significand size of this floating-point type */ unsigned getFloatingPointSignificandSize() const; /** Get the size of this bit-vector type */ unsigned getBitVectorSize() const; /** Is this a sort kind */ bool isSort() const; /** Is this a sort constructor kind */ bool isSortConstructor() const; /** Is this a subtype predicate */ bool isPredicateSubtype() const; /** Get the predicate defining this subtype */ Node getSubtypePredicate() const; /** * Get the parent type of this subtype; note that it could be * another subtype. */ TypeNode getSubtypeParentType() const; /** Get the most general base type of the type */ TypeNode getBaseType() const; /** Is this a subrange */ bool isSubrange() const; /** Get the bounds defining this subrange */ const SubrangeBounds& getSubrangeBounds() const; /** * Returns the leastUpperBound in the extended type lattice of the two types. * If this is \top, i.e. there is no inhabited type that contains both, * a TypeNode such that isNull() is true is returned. * * For more information see: http://cvc4.cs.nyu.edu/wiki/Cvc4_Type_Lattice */ static TypeNode leastCommonTypeNode(TypeNode t0, TypeNode t1); static TypeNode mostCommonTypeNode(TypeNode t0, TypeNode t1); /** get ensure type condition * Return value is a condition that implies that n has type tn. */ static Node getEnsureTypeCondition( Node n, TypeNode tn ); private: static TypeNode commonTypeNode(TypeNode t0, TypeNode t1, bool isLeast); /** * Returns the leastUpperBound in the extended type lattice of two * predicate subtypes. */ static TypeNode leastCommonPredicateSubtype(TypeNode t0, TypeNode t1); /** * Indents the given stream a given amount of spaces. * * @param out the stream to indent * @param indent the number of spaces */ static void indent(std::ostream& out, int indent) { for(int i = 0; i < indent; i++) { out << ' '; } } };/* class TypeNode */ /** * Serializes a given node to the given stream. * * @param out the output stream to use * @param n the node to output to the stream * @return the stream */ inline std::ostream& operator<<(std::ostream& out, const TypeNode& n) { n.toStream(out, Node::setlanguage::getLanguage(out)); return out; } typedef TypeNode::HashFunction TypeNodeHashFunction; }/* CVC4 namespace */ #include #include "expr/node_manager.h" namespace CVC4 { inline Type TypeNode::toType() { return NodeManager::currentNM()->toType(*this); } inline TypeNode TypeNode::fromType(const Type& t) { return NodeManager::fromType(t); } inline TypeNode TypeNode::substitute(const TypeNode& type, const TypeNode& replacement) const { std::hash_map cache; return substitute(type, replacement, cache); } template inline TypeNode TypeNode::substitute(Iterator1 typesBegin, Iterator1 typesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd) const { std::hash_map cache; return substitute(typesBegin, typesEnd, replacementsBegin, replacementsEnd, cache); } template TypeNode TypeNode::substitute(Iterator1 typesBegin, Iterator1 typesEnd, Iterator2 replacementsBegin, Iterator2 replacementsEnd, std::hash_map& cache) const { // in cache? std::hash_map::const_iterator i = cache.find(*this); if(i != cache.end()) { return (*i).second; } // otherwise compute Assert( typesEnd - typesBegin == replacementsEnd - replacementsBegin, "Substitution iterator ranges must be equal size" ); Iterator1 j = find(typesBegin, typesEnd, *this); if(j != typesEnd) { TypeNode tn = *(replacementsBegin + (j - typesBegin)); cache[*this] = tn; return tn; } else if(getNumChildren() == 0) { cache[*this] = *this; return *this; } else { NodeBuilder<> nb(getKind()); if(getMetaKind() == kind::metakind::PARAMETERIZED) { // push the operator nb << TypeNode(d_nv->d_children[0]); } for(TypeNode::const_iterator i = begin(), iend = end(); i != iend; ++i) { nb << (*i).substitute(typesBegin, typesEnd, replacementsBegin, replacementsEnd, cache); } TypeNode tn = nb.constructTypeNode(); cache[*this] = tn; return tn; } } inline size_t TypeNode::getNumChildren() const { return d_nv->getNumChildren(); } template inline const T& TypeNode::getConst() const { return d_nv->getConst(); } inline TypeNode::TypeNode(const expr::NodeValue* ev) : d_nv(const_cast (ev)) { Assert(d_nv != NULL, "Expecting a non-NULL expression value!"); d_nv->inc(); } inline TypeNode::TypeNode(const TypeNode& typeNode) { Assert(typeNode.d_nv != NULL, "Expecting a non-NULL expression value!"); d_nv = typeNode.d_nv; d_nv->inc(); } inline TypeNode::~TypeNode() { Assert(d_nv != NULL, "Expecting a non-NULL expression value!"); d_nv->dec(); } inline void TypeNode::assignNodeValue(expr::NodeValue* ev) { d_nv = ev; d_nv->inc(); } inline TypeNode& TypeNode::operator=(const TypeNode& typeNode) { Assert(d_nv != NULL, "Expecting a non-NULL expression value!"); Assert(typeNode.d_nv != NULL, "Expecting a non-NULL expression value on RHS!"); if(__builtin_expect( ( d_nv != typeNode.d_nv ), true )) { d_nv->dec(); d_nv = typeNode.d_nv; d_nv->inc(); } return *this; } template inline typename AttrKind::value_type TypeNode:: getAttribute(const AttrKind&) const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); return NodeManager::currentNM()->getAttribute(d_nv, AttrKind()); } template inline bool TypeNode:: hasAttribute(const AttrKind&) const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); return NodeManager::currentNM()->hasAttribute(d_nv, AttrKind()); } template inline bool TypeNode::getAttribute(const AttrKind&, typename AttrKind::value_type& ret) const { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); return NodeManager::currentNM()->getAttribute(d_nv, AttrKind(), ret); } template inline void TypeNode:: setAttribute(const AttrKind&, const typename AttrKind::value_type& value) { Assert( NodeManager::currentNM() != NULL, "There is no current CVC4::NodeManager associated to this thread.\n" "Perhaps a public-facing function is missing a NodeManagerScope ?" ); NodeManager::currentNM()->setAttribute(d_nv, AttrKind(), value); } inline void TypeNode::printAst(std::ostream& out, int indent) const { d_nv->printAst(out, indent); } inline bool TypeNode::isBoolean() const { return ( getKind() == kind::TYPE_CONSTANT && getConst() == BOOLEAN_TYPE ) || ( isPredicateSubtype() && getSubtypeParentType().isBoolean() ); } inline bool TypeNode::isInteger() const { return ( getKind() == kind::TYPE_CONSTANT && getConst() == INTEGER_TYPE ) || isSubrange() || ( isPredicateSubtype() && getSubtypeParentType().isInteger() ); } inline bool TypeNode::isReal() const { return ( getKind() == kind::TYPE_CONSTANT && getConst() == REAL_TYPE ) || isInteger() || ( isPredicateSubtype() && getSubtypeParentType().isReal() ); } inline bool TypeNode::isString() const { return getKind() == kind::TYPE_CONSTANT && getConst() == STRING_TYPE; } /** Is this a regexp type */ inline bool TypeNode::isRegExp() const { return getKind() == kind::TYPE_CONSTANT && getConst() == REGEXP_TYPE; } inline bool TypeNode::isRoundingMode() const { return getKind() == kind::TYPE_CONSTANT && getConst() == ROUNDINGMODE_TYPE; } inline bool TypeNode::isArray() const { return getKind() == kind::ARRAY_TYPE; } inline TypeNode TypeNode::getArrayIndexType() const { Assert(isArray()); return (*this)[0]; } inline TypeNode TypeNode::getArrayConstituentType() const { Assert(isArray()); return (*this)[1]; } inline TypeNode TypeNode::getConstructorRangeType() const { Assert(isConstructor()); return (*this)[getNumChildren()-1]; } inline bool TypeNode::isSet() const { return getKind() == kind::SET_TYPE; } inline TypeNode TypeNode::getSetElementType() const { Assert(isSet()); return (*this)[0]; } inline bool TypeNode::isFunction() const { return getKind() == kind::FUNCTION_TYPE; } inline bool TypeNode::isFunctionLike() const { return getKind() == kind::FUNCTION_TYPE || getKind() == kind::CONSTRUCTOR_TYPE || getKind() == kind::SELECTOR_TYPE || getKind() == kind::TESTER_TYPE; } inline bool TypeNode::isPredicate() const { return isFunction() && getRangeType().isBoolean(); } inline bool TypeNode::isPredicateLike() const { return isFunctionLike() && getRangeType().isBoolean(); } inline TypeNode TypeNode::getRangeType() const { if(isTester()) { return NodeManager::currentNM()->booleanType(); } Assert(isFunction() || isConstructor() || isSelector()); return (*this)[getNumChildren() - 1]; } /** Is this a symbolic expression type? */ inline bool TypeNode::isSExpr() const { return getKind() == kind::SEXPR_TYPE || ( isPredicateSubtype() && getSubtypeParentType().isSExpr() ); } /** Is this a predicate subtype */ inline bool TypeNode::isPredicateSubtype() const { return getKind() == kind::SUBTYPE_TYPE; } /** Is this a subrange type */ inline bool TypeNode::isSubrange() const { return getKind() == kind::SUBRANGE_TYPE || ( isPredicateSubtype() && getSubtypeParentType().isSubrange() ); } /** Is this a floating-point type */ inline bool TypeNode::isFloatingPoint() const { return getKind() == kind::FLOATINGPOINT_TYPE || ( isPredicateSubtype() && getSubtypeParentType().isFloatingPoint() ); } /** Is this a bit-vector type */ inline bool TypeNode::isBitVector() const { return getKind() == kind::BITVECTOR_TYPE || ( isPredicateSubtype() && getSubtypeParentType().isBitVector() ); } /** Is this a datatype type */ inline bool TypeNode::isDatatype() const { return getKind() == kind::DATATYPE_TYPE || getKind() == kind::PARAMETRIC_DATATYPE || ( isPredicateSubtype() && getSubtypeParentType().isDatatype() ); } /** Is this a parametric datatype type */ inline bool TypeNode::isParametricDatatype() const { return getKind() == kind::PARAMETRIC_DATATYPE || ( isPredicateSubtype() && getSubtypeParentType().isParametricDatatype() ); } /** Is this a codatatype type */ inline bool TypeNode::isCodatatype() const { if( isDatatype() ){ return getDatatype().isCodatatype(); }else{ return false; } } /** Is this a constructor type */ inline bool TypeNode::isConstructor() const { return getKind() == kind::CONSTRUCTOR_TYPE; } /** Is this a selector type */ inline bool TypeNode::isSelector() const { return getKind() == kind::SELECTOR_TYPE; } /** Is this a tester type */ inline bool TypeNode::isTester() const { return getKind() == kind::TESTER_TYPE; } /** Is this a floating-point type of with exp exponent bits and sig significand bits */ inline bool TypeNode::isFloatingPoint(unsigned exp, unsigned sig) const { return ( getKind() == kind::FLOATINGPOINT_TYPE && getConst().exponent() == exp && getConst().significand() == sig ) || ( isPredicateSubtype() && getSubtypeParentType().isFloatingPoint(exp,sig) ); } /** Is this a bit-vector type of size size */ inline bool TypeNode::isBitVector(unsigned size) const { return ( getKind() == kind::BITVECTOR_TYPE && getConst() == size ) || ( isPredicateSubtype() && getSubtypeParentType().isBitVector(size) ); } /** Get the datatype specification from a datatype type */ inline const Datatype& TypeNode::getDatatype() const { Assert(isDatatype()); if( getKind() == kind::DATATYPE_TYPE ){ DatatypeIndexConstant dic = getConst(); return NodeManager::currentNM()->getDatatypeForIndex( dic.getIndex() ); }else{ Assert( getKind() == kind::PARAMETRIC_DATATYPE ); return (*this)[0].getDatatype(); } } /** Get the exponent size of this floating-point type */ inline unsigned TypeNode::getFloatingPointExponentSize() const { Assert(isFloatingPoint()); return getConst().exponent(); } /** Get the significand size of this floating-point type */ inline unsigned TypeNode::getFloatingPointSignificandSize() const { Assert(isFloatingPoint()); return getConst().significand(); } /** Get the size of this bit-vector type */ inline unsigned TypeNode::getBitVectorSize() const { Assert(isBitVector()); return getConst(); } inline const SubrangeBounds& TypeNode::getSubrangeBounds() const { Assert(isSubrange()); if(getKind() == kind::SUBRANGE_TYPE){ return getConst(); }else{ Assert(isPredicateSubtype()); return getSubtypeParentType().getSubrangeBounds(); } } #ifdef CVC4_DEBUG /** * Pretty printer for use within gdb. This is not intended to be used * outside of gdb. This writes to the Warning() stream and immediately * flushes the stream. * * Note that this function cannot be a template, since the compiler * won't instantiate it. Even if we explicitly instantiate. (Odd?) * So we implement twice. We mark as __attribute__((used)) so that * GCC emits code for it even though static analysis indicates it's * never called. * * Tim's Note: I moved this into the node.h file because this allows gdb * to find the symbol, and use it, which is the first standard this code needs * to meet. A cleaner solution is welcomed. */ static void __attribute__((used)) debugPrintTypeNode(const TypeNode& n) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(true) << Node::setlanguage(language::output::LANG_AST) << n << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintTypeNodeNoDag(const TypeNode& n) { Warning() << Node::setdepth(-1) << Node::printtypes(false) << Node::dag(false) << Node::setlanguage(language::output::LANG_AST) << n << std::endl; Warning().flush(); } static void __attribute__((used)) debugPrintRawTypeNode(const TypeNode& n) { n.printAst(Warning(), 0); Warning().flush(); } #endif /* CVC4_DEBUG */ }/* CVC4 namespace */ #endif /* __CVC4__NODE_H */ cvc4-1.5/src/expr/type_properties_template.h000066400000000000000000000076741313116454100213010ustar00rootroot00000000000000/********************* */ /*! \file type_properties_template.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Template for the Type properties header ** ** Template for the Type properties header. **/ #include "cvc4_private.h" #ifndef __CVC4__TYPE_PROPERTIES_H #define __CVC4__TYPE_PROPERTIES_H #line 23 "${template}" #include #include "base/cvc4_assert.h" #include "options/language.h" #include "expr/type_node.h" #include "expr/kind.h" #include "expr/expr.h" ${type_properties_includes} #line 35 "${template}" namespace CVC4 { namespace kind { /** * Return the cardinality of the type constant represented by the * TypeConstant argument. This function is auto-generated from Theory * "kinds" files, so includes contributions from each theory regarding * that theory's types. */ inline Cardinality getCardinality(TypeConstant tc) { switch(tc) { ${type_constant_cardinalities} #line 49 "${template}" default: { std::stringstream ss; ss << "No cardinality known for type constant " << tc; InternalError(ss.str()); } } }/* getCardinality(TypeConstant) */ /** * Return the cardinality of the type represented by the TypeNode * argument. This function is auto-generated from Theory "kinds" * files, so includes contributions from each theory regarding that * theory's types. */ inline Cardinality getCardinality(TypeNode typeNode) { AssertArgument(!typeNode.isNull(), typeNode); switch(Kind k = typeNode.getKind()) { case TYPE_CONSTANT: return getCardinality(typeNode.getConst()); ${type_cardinalities} #line 70 "${template}" default: { std::stringstream ss; ss << "A theory kinds file did not provide a cardinality " << "or cardinality computer for type:\n" << typeNode << "\nof kind " << k; InternalError(ss.str()); } } }/* getCardinality(TypeNode) */ inline bool isWellFounded(TypeConstant tc) { switch(tc) { ${type_constant_wellfoundednesses} #line 84 "${template}" default: { std::stringstream ss; ss << "No well-foundedness status known for type constant: " << tc; InternalError(ss.str()); } } }/* isWellFounded(TypeConstant) */ inline bool isWellFounded(TypeNode typeNode) { AssertArgument(!typeNode.isNull(), typeNode); switch(Kind k = typeNode.getKind()) { case TYPE_CONSTANT: return isWellFounded(typeNode.getConst()); ${type_wellfoundednesses} #line 99 "${template}" default: { std::stringstream ss; ss << "A theory kinds file did not provide a well-foundedness " << "or well-foundedness computer for type:\n" << typeNode << "\nof kind " << k; InternalError(ss.str()); } } }/* isWellFounded(TypeNode) */ inline Node mkGroundTerm(TypeConstant tc) { switch(tc) { ${type_constant_groundterms} #line 113 "${template}" default: { std::stringstream ss; ss << "No ground term known for type constant: " << tc; InternalError(ss.str()); } } }/* mkGroundTerm(TypeConstant) */ inline Node mkGroundTerm(TypeNode typeNode) { AssertArgument(!typeNode.isNull(), typeNode); switch(Kind k = typeNode.getKind()) { case TYPE_CONSTANT: return mkGroundTerm(typeNode.getConst()); ${type_groundterms} #line 128 "${template}" default: { std::stringstream ss; ss << "A theory kinds file did not provide a ground term " << "or ground term computer for type:\n" << typeNode << "\nof kind " << k; InternalError(ss.str()); } } }/* mkGroundTerm(TypeNode) */ }/* CVC4::kind namespace */ }/* CVC4 namespace */ #endif /* __CVC4__TYPE_PROPERTIES_H */ cvc4-1.5/src/expr/uninterpreted_constant.cpp000066400000000000000000000032701313116454100212710ustar00rootroot00000000000000/********************* */ /*! \file uninterpreted_constant.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Representation of constants of uninterpreted sorts ** ** Representation of constants of uninterpreted sorts. **/ #include "expr/uninterpreted_constant.h" #include #include #include #include "base/cvc4_assert.h" using namespace std; namespace CVC4 { UninterpretedConstant::UninterpretedConstant(Type type, Integer index) throw(IllegalArgumentException) : d_type(type) , d_index(index) { //PrettyCheckArgument(type.isSort(), type, "uninterpreted constants can only be created for uninterpreted sorts, not `%s'", type.toString().c_str()); PrettyCheckArgument(index >= 0, index, "index >= 0 required for uninterpreted constant index, not `%s'", index.toString().c_str()); } std::ostream& operator<<(std::ostream& out, const UninterpretedConstant& uc) { stringstream ss; ss << uc.getType(); string t = ss.str(); size_t i = 0; // replace everything that isn't in [a-zA-Z0-9_] with an _ while((i = t.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_", i)) != string::npos) { t.replace(i, 1, 1, '_'); } return out << "uc_" << t << '_' << uc.getIndex(); } }/* CVC4 namespace */ cvc4-1.5/src/expr/uninterpreted_constant.h000066400000000000000000000044271313116454100207430ustar00rootroot00000000000000/********************* */ /*! \file uninterpreted_constant.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Representation of constants of uninterpreted sorts ** ** Representation of constants of uninterpreted sorts. **/ #include "cvc4_public.h" #pragma once #include #include "expr/type.h" namespace CVC4 { class CVC4_PUBLIC UninterpretedConstant { public: UninterpretedConstant(Type type, Integer index) throw(IllegalArgumentException); ~UninterpretedConstant() throw() { } Type getType() const throw() { return d_type; } const Integer& getIndex() const throw() { return d_index; } bool operator==(const UninterpretedConstant& uc) const throw() { return d_type == uc.d_type && d_index == uc.d_index; } bool operator!=(const UninterpretedConstant& uc) const throw() { return !(*this == uc); } bool operator<(const UninterpretedConstant& uc) const throw() { return d_type < uc.d_type || (d_type == uc.d_type && d_index < uc.d_index); } bool operator<=(const UninterpretedConstant& uc) const throw() { return d_type < uc.d_type || (d_type == uc.d_type && d_index <= uc.d_index); } bool operator>(const UninterpretedConstant& uc) const throw() { return !(*this <= uc); } bool operator>=(const UninterpretedConstant& uc) const throw() { return !(*this < uc); } private: const Type d_type; const Integer d_index; };/* class UninterpretedConstant */ std::ostream& operator<<(std::ostream& out, const UninterpretedConstant& uc) CVC4_PUBLIC; /** * Hash function for the BitVector constants. */ struct CVC4_PUBLIC UninterpretedConstantHashFunction { inline size_t operator()(const UninterpretedConstant& uc) const { return TypeHashFunction()(uc.getType()) * IntegerHashFunction()(uc.getIndex()); } };/* struct UninterpretedConstantHashFunction */ }/* CVC4 namespace */ cvc4-1.5/src/expr/uninterpreted_constant.i000066400000000000000000000014701313116454100207370ustar00rootroot00000000000000%{ #include "expr/uninterpreted_constant.h" %} %rename(less) CVC4::UninterpretedConstant::operator<(const UninterpretedConstant&) const; %rename(lessEqual) CVC4::UninterpretedConstant::operator<=(const UninterpretedConstant&) const; %rename(greater) CVC4::UninterpretedConstant::operator>(const UninterpretedConstant&) const; %rename(greaterEqual) CVC4::UninterpretedConstant::operator>=(const UninterpretedConstant&) const; %rename(equals) CVC4::UninterpretedConstant::operator==(const UninterpretedConstant&) const; %ignore CVC4::UninterpretedConstant::operator!=(const UninterpretedConstant&) const; %rename(apply) CVC4::UninterpretedConstantHashFunction::operator()(const UninterpretedConstant&) const; %ignore CVC4::operator<<(std::ostream&, const UninterpretedConstant&); %include "expr/uninterpreted_constant.h" cvc4-1.5/src/expr/variable_type_map.h000066400000000000000000000032131313116454100176150ustar00rootroot00000000000000/********************* */ /*! \file variable_type_map.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_public.h" #ifndef __CVC4__VARIABLE_TYPE_MAP_H #define __CVC4__VARIABLE_TYPE_MAP_H #include "expr/expr.h" #include "util/hash.h" namespace CVC4 { class Expr; struct ExprHashFunction; class Type; struct TypeHashFunction; class CVC4_PUBLIC VariableTypeMap { /** * A map Expr -> Expr, intended to be used for a mapping of variables * between two ExprManagers. */ std::hash_map d_variables; /** * A map Type -> Type, intended to be used for a mapping of types * between two ExprManagers. */ std::hash_map d_types; public: Expr& operator[](Expr e) { return d_variables[e]; } Type& operator[](Type t) { return d_types[t]; } };/* class VariableTypeMap */ typedef __gnu_cxx::hash_map VarMap; struct CVC4_PUBLIC ExprManagerMapCollection { VariableTypeMap d_typeMap; VarMap d_to; VarMap d_from; };/* struct ExprManagerMapCollection */ }/* CVC4 namespace */ #endif /* __CVC4__VARIABLE_MAP_H */ cvc4-1.5/src/expr/variable_type_map.i000066400000000000000000000005161313116454100176210ustar00rootroot00000000000000%{ #include "expr/variable_type_map.h" %} %rename(get) CVC4::VariableTypeMap::operator[](Expr); %rename(get) CVC4::VariableTypeMap::operator[](Type); %ignore CVC4::ExprManagerMapCollection::d_typeMap; %ignore CVC4::ExprManagerMapCollection::d_to; %ignore CVC4::ExprManagerMapCollection::d_from; %include "expr/variable_type_map.h" cvc4-1.5/src/git_versioninfo.cpp000066400000000000000000000004761313116454100167230ustar00rootroot00000000000000#include "base/configuration.h" const bool ::CVC4::Configuration::IS_GIT_BUILD = true; const char* const ::CVC4::Configuration::GIT_BRANCH_NAME = "master"; const char* const ::CVC4::Configuration::GIT_COMMIT = "a9cfc20aecda286c3cd645d98226678f56baccc1"; const bool ::CVC4::Configuration::GIT_HAS_MODIFICATIONS = true; cvc4-1.5/src/include/000077500000000000000000000000001313116454100144275ustar00rootroot00000000000000cvc4-1.5/src/include/cvc4.h000066400000000000000000000022401313116454100154350ustar00rootroot00000000000000/********************* */ /*! \file cvc4.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Main header file for CVC4 library functionality ** ** Main header file for CVC4 library functionality. Includes the ** most-commonly used CVC4 public-facing class interfaces. **/ #ifndef __CVC4__CVC4_H #define __CVC4__CVC4_H #include #include #include #include #include #include #include #include #include #include #include #include #endif /* __CVC4__CVC4_H */ cvc4-1.5/src/include/cvc4_private.h000066400000000000000000000022131313116454100171670ustar00rootroot00000000000000/********************* */ /*! \file cvc4_private.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief #-inclusion of this file marks a header as private and generates a ** warning when the file is included improperly ** ** #-inclusion of this file marks a header as private and generates a ** warning when the file is included improperly. **/ #ifndef __CVC4_PRIVATE_H #define __CVC4_PRIVATE_H #if ! (defined(__BUILDING_CVC4LIB) || defined(__BUILDING_CVC4LIB_UNIT_TEST)) # error A private CVC4 header was included when not building the library or private unit test code. #endif /* ! (__BUILDING_CVC4LIB || __BUILDING_CVC4LIB_UNIT_TEST) */ #include "cvc4_public.h" #include "cvc4autoconfig.h" #endif /* __CVC4_PRIVATE_H */ cvc4-1.5/src/include/cvc4_private_library.h000066400000000000000000000026631313116454100207240ustar00rootroot00000000000000/********************* */ /*! \file cvc4_private_library.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief #-inclusion of this file marks a header as private and generates a ** warning when the file is included improperly ** ** #-inclusion of this file marks a header as private and generates a ** warning when the file is included improperly. **/ #ifndef __CVC4_PRIVATE_LIBRARY_H #define __CVC4_PRIVATE_LIBRARY_H #if ! (defined(__BUILDING_CVC4LIB) || defined(__BUILDING_CVC4LIB_UNIT_TEST) || defined(__BUILDING_CVC4PARSERLIB) || defined(__BUILDING_CVC4PARSERLIB_UNIT_TEST) || defined(__BUILDING_CVC4COMPATLIB) || defined(__BUILDING_CVC4DRIVER)) # error A "private library" CVC4 header was included when not building the library, driver, or private unit test code. #endif /* ! (__BUILDING_CVC4LIB || __BUILDING_CVC4LIB_UNIT_TEST || __BUILDING_CVC4PARSERLIB || __BUILDING_CVC4PARSERLIB_UNIT_TEST || __BUILDING_CVC4DRIVER) */ #include "cvc4_public.h" #include "cvc4autoconfig.h" #endif /* __CVC4_PRIVATE_LIBRARY_H */ cvc4-1.5/src/include/cvc4_public.h000066400000000000000000000052101313116454100167730ustar00rootroot00000000000000/********************* */ /*! \file cvc4_public.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Macros that should be defined everywhere during the building of ** the libraries and driver binary, and also exported to the user. ** ** Macros that should be defined everywhere during the building of ** the libraries and driver binary, and also exported to the user. **/ #ifndef __CVC4_PUBLIC_H #define __CVC4_PUBLIC_H #include #if defined _WIN32 || defined __CYGWIN__ # define CVC4_PUBLIC #else /* !( defined _WIN32 || defined __CYGWIN__ ) */ # if __GNUC__ >= 4 # define CVC4_PUBLIC __attribute__ ((__visibility__("default"))) # else /* !( __GNUC__ >= 4 ) */ # define CVC4_PUBLIC # endif /* __GNUC__ >= 4 */ #endif /* defined _WIN32 || defined __CYGWIN__ */ // Can use CVC4_UNDEFINED for things like undefined, private // copy constructors. The advantage is that with CVC4_UNDEFINED, // if something _does_ try to call the function, you get an error // at the point of the call (rather than a link error later). // CVC4_UNUSED is to mark something (e.g. local variable, function) // as being _possibly_ unused, so that the compiler generates no // warning about it. This might be the case for e.g. a variable // only used in DEBUG builds. #ifdef __GNUC__ # if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 3 ) /* error function attribute only exists in GCC >= 4.3.0 */ # define CVC4_UNDEFINED __attribute__((__error__("this function intentionally undefined"))) # else /* GCC < 4.3.0 */ # define CVC4_UNDEFINED # endif /* GCC >= 4.3.0 */ #else /* ! __GNUC__ */ # define CVC4_UNDEFINED #endif /* __GNUC__ */ #ifdef __GNUC__ # define CVC4_UNUSED __attribute__((__unused__)) # define CVC4_NORETURN __attribute__ ((__noreturn__)) # define CVC4_CONST_FUNCTION __attribute__ ((__const__)) # define CVC4_PURE_FUNCTION __attribute__ ((__pure__)) # define CVC4_DEPRECATED __attribute__ ((__deprecated__)) # define CVC4_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) #else /* ! __GNUC__ */ # define CVC4_UNUSED # define CVC4_NORETURN # define CVC4_CONST_FUNCTION # define CVC4_PURE_FUNCTION # define CVC4_DEPRECATED # define CVC4_WARN_UNUSED_RESULT #endif /* __GNUC__ */ #endif /* __CVC4_PUBLIC_H */ cvc4-1.5/src/include/cvc4parser_private.h000066400000000000000000000025361313116454100204140ustar00rootroot00000000000000/********************* */ /*! \file cvc4parser_private.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief #-inclusion of this file marks a header as private and generates a ** warning when the file is included improperly. ** ** #-inclusion of this file marks a header as private and generates a ** warning when the file is included improperly. **/ #ifndef __CVC4PARSER_PRIVATE_H #define __CVC4PARSER_PRIVATE_H #if ! (defined(__BUILDING_CVC4PARSERLIB) || defined(__BUILDING_CVC4PARSERLIB_UNIT_TEST)) # error A private CVC4 parser header was included when not building the parser library or private unit test code. #endif /* ! (__BUILDING_CVC4PARSERLIB || __BUILDING_CVC4PARSERLIB_UNIT_TEST) */ #include "cvc4parser_public.h" // It would be nice to #include "cvc4autoconfig.h" here, but there are conflicts // with antlr3's autoheader stuff, which they export :( // // #include "cvc4autoconfig.h" #endif /* __CVC4PARSER_PRIVATE_H */ cvc4-1.5/src/include/cvc4parser_public.h000066400000000000000000000016401313116454100202130ustar00rootroot00000000000000/********************* */ /*! \file cvc4parser_public.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Macros that should be defined everywhere during the building of ** the libraries and driver binary, and also exported to the user. ** ** Macros that should be defined everywhere during the building of ** the libraries and driver binary, and also exported to the user. **/ #ifndef __CVC4PARSER_PUBLIC_H #define __CVC4PARSER_PUBLIC_H #include "cvc4_public.h" #endif /* __CVC4PARSER_PUBLIC_H */ cvc4-1.5/src/lib/000077500000000000000000000000001313116454100135525ustar00rootroot00000000000000cvc4-1.5/src/lib/Makefile.am000066400000000000000000000007111313116454100156050ustar00rootroot00000000000000AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. AM_CFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) AM_CXXFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = libreplacements.la libreplacements_la_SOURCES = libreplacements_la_LIBADD = \ $(LTLIBOBJS) EXTRA_DIST = \ replacements.h \ clock_gettime.c \ clock_gettime.h \ strtok_r.c \ strtok_r.h \ ffs.c \ ffs.h cvc4-1.5/src/lib/Makefile.in000066400000000000000000000510321313116454100156200ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = src/lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libreplacements_la_DEPENDENCIES = $(LTLIBOBJS) am_libreplacements_la_OBJECTS = libreplacements_la_OBJECTS = $(am_libreplacements_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libreplacements_la_SOURCES) DIST_SOURCES = $(libreplacements_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ clock_gettime.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/.. AM_CFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) AM_CXXFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = libreplacements.la libreplacements_la_SOURCES = libreplacements_la_LIBADD = \ $(LTLIBOBJS) EXTRA_DIST = \ replacements.h \ clock_gettime.c \ clock_gettime.h \ strtok_r.c \ strtok_r.h \ ffs.c \ ffs.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libreplacements.la: $(libreplacements_la_OBJECTS) $(libreplacements_la_DEPENDENCIES) $(EXTRA_libreplacements_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libreplacements_la_OBJECTS) $(libreplacements_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/clock_gettime.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)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@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)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@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: 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) 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-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags-am distclean \ distclean-compile distclean-generic distclean-libtool distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # 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: cvc4-1.5/src/lib/clock_gettime.c000066400000000000000000000041771313116454100165400ustar00rootroot00000000000000/********************* */ /*! \file clock_gettime.c ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Replacement for clock_gettime() for systems without it (like ** Mac OS X) ** ** Replacement for clock_gettime() for systems without it (like Mac ** OS X). **/ // #warning "TODO(taking): Make lib/clock_gettime.h cvc4_private.h again." #include "lib/clock_gettime.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifdef __APPLE__ #include #include #include static double s_clockconv = 0.0; long clock_gettime(clockid_t which_clock, struct timespec* tp) { if( s_clockconv == 0.0 ) { mach_timebase_info_data_t tb; kern_return_t err = mach_timebase_info(&tb); if(err == 0) { s_clockconv = ((double) tb.numer) / tb.denom; } else { return -EINVAL; } } switch(which_clock) { case CLOCK_REALTIME: case CLOCK_REALTIME_HR: case CLOCK_MONOTONIC: case CLOCK_MONOTONIC_HR: { uint64_t t = mach_absolute_time() * s_clockconv; tp->tv_sec = t / 1000000000ul; tp->tv_nsec = t % 1000000000ul; } break; default: return -EINVAL; } return 0; } #else /* not defined __APPLE__ */ #ifdef __WIN32__ #include #include long clock_gettime(clockid_t which_clock, struct timespec* tp) { if(tp != NULL) { FILETIME ft; GetSystemTimeAsFileTime(&ft); uint64_t nanos = ((((uint64_t)ft.dwHighDateTime) << 32) | ft.dwLowDateTime) * 100; tp->tv_sec = nanos / 1000000000ul; tp->tv_nsec = nanos % 1000000000ul; } return 0; } #endif /* closing #ifdef __WIN32__ */ #endif /* closing #else for #ifdef __APPLE__ / __WIN32__ */ #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ cvc4-1.5/src/lib/clock_gettime.h000066400000000000000000000033121313116454100165330ustar00rootroot00000000000000/********************* */ /*! \file clock_gettime.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Replacement for clock_gettime() for systems without it (like Mac OS X) ** ** Replacement for clock_gettime() for systems without it (like Mac OS X). **/ #include "cvc4_private_library.h" #ifndef __CVC4__LIB__CLOCK_GETTIME_H #define __CVC4__LIB__CLOCK_GETTIME_H #include "lib/replacements.h" #ifdef HAVE_CLOCK_GETTIME /* it should be available from */ #include #else /* HAVE_CLOCK_GETTIME */ /* otherwise, we have to define it */ #if defined(__WIN32__) && !defined(_W64) #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ struct timespec { uint64_t tv_sec; int32_t tv_nsec; };/* struct timespec */ #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ #else /* !__WIN32__ || _W64 */ /* get timespec from */ #include #endif /* __WIN32__ && !_W64 */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ struct timespec; typedef enum { CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_REALTIME_HR, CLOCK_MONOTONIC_HR } clockid_t; long clock_gettime(clockid_t which_clock, struct timespec* tp); #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ #endif /* HAVE_CLOCK_GETTIME */ #endif /*__CVC4__LIB__CLOCK_GETTIME_H */ cvc4-1.5/src/lib/ffs.c000066400000000000000000000020411313116454100144710ustar00rootroot00000000000000/********************* */ /*! \file ffs.c ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Andres Noetzli ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Replacement for ffs() for systems without it (like Win32) ** ** Replacement for ffs() for systems without it (like Win32). **/ #include "cvc4_private.h" #include "lib/ffs.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef HAVE_FFS int ffs(int i) { long mask = 0x1; int pos = 1; while(pos <= sizeof(int) * 8) { if((mask & i) != 0) { return pos; } ++pos; mask <<= 1; } return 0; } #endif /* ifndef HAVE_FFS */ #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ cvc4-1.5/src/lib/ffs.h000066400000000000000000000021251313116454100145010ustar00rootroot00000000000000/********************* */ /*! \file ffs.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Replacement for ffs() for systems without it (like Win32) ** ** Replacement for ffs() for systems without it (like Win32). **/ #include "cvc4_private.h" #ifndef __CVC4__LIB__FFS_H #define __CVC4__LIB__FFS_H //We include this for HAVE_FFS #include "cvc4autoconfig.h" #ifdef HAVE_FFS // available in strings.h #include #else /* ! HAVE_FFS */ #include "lib/replacements.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ int ffs(int i); #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ #endif /* HAVE_FFS */ #endif /* __CVC4__LIB__FFS_H */ cvc4-1.5/src/lib/replacements.h000066400000000000000000000026751313116454100164170ustar00rootroot00000000000000/********************* */ /*! \file replacements.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Common header for replacement function sources ** ** Common header for replacement function sources. **/ #ifndef __CVC4__LIB__REPLACEMENTS_H #define __CVC4__LIB__REPLACEMENTS_H #if (defined(__BUILDING_CVC4LIB) || defined(__BUILDING_CVC4LIB_UNIT_TEST)) && !defined(__BUILDING_STATISTICS_FOR_EXPORT) # include "cvc4_private.h" #else # if defined(__BUILDING_CVC4PARSERLIB) || defined(__BUILDING_CVC4PARSERLIB_UNIT_TEST) # include "cvc4parser_private.h" # else # if defined(__BUILDING_CVC4DRIVER) || defined(__BUILDING_CVC4_SYSTEM_TEST) || defined(__BUILDING_STATISTICS_FOR_EXPORT) # include "cvc4autoconfig.h" # else # error Must be building libcvc4 or libcvc4parser to use replacement functions. This is because replacement function headers should never be publicly-depended upon, as they should not be installed on user machines with 'make install'. # endif # endif #endif #endif /* __CVC4__LIB__REPLACEMENTS_H */ cvc4-1.5/src/lib/strtok_r.c000066400000000000000000000023421313116454100155660ustar00rootroot00000000000000/********************* */ /*! \file strtok_r.c ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Replacement for strtok_r() for systems without it (like Win32) ** ** Replacement for strtok_r() for systems without it (like Win32). **/ #include "cvc4_private.h" #include "lib/strtok_r.h" #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef HAVE_STRTOK_R char* strtok_r(char *str, const char *delim, char **saveptr) { if(str == NULL) { char* retval = strtok(*saveptr, delim); *saveptr = retval + strlen(retval) + 1; return retval; } else { char* retval = strtok(str, delim); *saveptr = retval + strlen(retval) + 1; return retval; } } #endif /* ifndef HAVE_STRTOK_R */ #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ cvc4-1.5/src/lib/strtok_r.h000066400000000000000000000021621313116454100155730ustar00rootroot00000000000000/********************* */ /*! \file strtok_r.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Replacement for strtok_r() for systems without it (like Win32) ** ** Replacement for strtok_r() for systems without it (like Win32). **/ #include "cvc4_private.h" #ifndef __CVC4__LIB__STRTOK_R_H #define __CVC4__LIB__STRTOK_R_H #ifdef HAVE_STRTOK_R // available in string.h #include #else /* ! HAVE_STRTOK_R */ #include "lib/replacements.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ char* strtok_r(char *str, const char *delim, char **saveptr); #ifdef __cplusplus }/* extern "C" */ #endif /* __cplusplus */ #endif /* HAVE_STRTOK_R */ #endif /* __CVC4__LIB__STRTOK_R_H */ cvc4-1.5/src/main/000077500000000000000000000000001313116454100137305ustar00rootroot00000000000000cvc4-1.5/src/main/Makefile.am000066400000000000000000000042061313116454100157660ustar00rootroot00000000000000AM_CPPFLAGS = \ -D__BUILDING_CVC4DRIVER \ -I@builddir@/.. $(ANTLR_INCLUDES) -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall -Wno-unknown-pragmas bin_PROGRAMS = cvc4 noinst_LIBRARIES = libmain.a libmain_a_SOURCES = \ interactive_shell.h \ interactive_shell.cpp \ main.h \ util.cpp if CVC4_BUILD_PCVC4 bin_PROGRAMS += pcvc4 pcvc4_SOURCES = \ main.cpp \ portfolio.cpp \ portfolio.h \ portfolio_util.cpp \ portfolio_util.h \ command_executor.cpp \ command_executor_portfolio.cpp \ command_executor.h \ command_executor_portfolio.h \ driver_unified.cpp pcvc4_LDADD = \ libmain.a \ @builddir@/../parser/libcvc4parser.la \ @builddir@/../libcvc4.la \ $(READLINE_LIBS) \ @builddir@/../lib/libreplacements.la pcvc4_CPPFLAGS = $(AM_CPPFLAGS) $(BOOST_CPPFLAGS) -DPORTFOLIO_BUILD pcvc4_LDADD += $(BOOST_THREAD_LIBS) pcvc4_LDADD += $(BOOST_THREAD_LDFLAGS) if STATIC_BINARY pcvc4_LINK = $(CXXLINK) -all-static $(pcvc4_LDFLAGS) else pcvc4_LINK = $(CXXLINK) $(pcvc4_LDFLAGS) endif endif cvc4_SOURCES = \ main.cpp \ command_executor.cpp \ driver_unified.cpp cvc4_LDADD = \ libmain.a \ @builddir@/../parser/libcvc4parser.la \ @builddir@/../libcvc4.la \ $(READLINE_LIBS) \ @builddir@/../lib/libreplacements.la BUILT_SOURCES = \ $(TOKENS_FILES) TOKENS_FILES = \ cvc_tokens.h \ smt1_tokens.h \ smt2_tokens.h \ tptp_tokens.h cvc_tokens.h: @srcdir@/../parser/cvc/Cvc.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ smt1_tokens.h: @srcdir@/../parser/smt1/Smt1.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ smt2_tokens.h: @srcdir@/../parser/smt2/Smt2.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ tptp_tokens.h: @srcdir@/../parser/tptp/Tptp.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ clean-local: rm -f $(BUILT_SOURCES) if STATIC_BINARY cvc4_LINK = $(CXXLINK) -all-static $(cvc4_LDFLAGS) else cvc4_LINK = $(CXXLINK) $(cvc4_LDFLAGS) endif cvc4-1.5/src/main/Makefile.in000066400000000000000000001240451313116454100160030ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ bin_PROGRAMS = cvc4$(EXEEXT) $(am__EXEEXT_1) @CVC4_BUILD_PCVC4_TRUE@am__append_1 = pcvc4 subdir = src/main ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libmain_a_AR = $(AR) $(ARFLAGS) libmain_a_LIBADD = am_libmain_a_OBJECTS = interactive_shell.$(OBJEXT) util.$(OBJEXT) libmain_a_OBJECTS = $(am_libmain_a_OBJECTS) @CVC4_BUILD_PCVC4_TRUE@am__EXEEXT_1 = pcvc4$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_cvc4_OBJECTS = main.$(OBJEXT) command_executor.$(OBJEXT) \ driver_unified.$(OBJEXT) cvc4_OBJECTS = $(am_cvc4_OBJECTS) am__DEPENDENCIES_1 = cvc4_DEPENDENCIES = libmain.a @builddir@/../parser/libcvc4parser.la \ @builddir@/../libcvc4.la $(am__DEPENDENCIES_1) \ @builddir@/../lib/libreplacements.la am__pcvc4_SOURCES_DIST = main.cpp portfolio.cpp portfolio.h \ portfolio_util.cpp portfolio_util.h command_executor.cpp \ command_executor_portfolio.cpp command_executor.h \ command_executor_portfolio.h driver_unified.cpp @CVC4_BUILD_PCVC4_TRUE@am_pcvc4_OBJECTS = pcvc4-main.$(OBJEXT) \ @CVC4_BUILD_PCVC4_TRUE@ pcvc4-portfolio.$(OBJEXT) \ @CVC4_BUILD_PCVC4_TRUE@ pcvc4-portfolio_util.$(OBJEXT) \ @CVC4_BUILD_PCVC4_TRUE@ pcvc4-command_executor.$(OBJEXT) \ @CVC4_BUILD_PCVC4_TRUE@ pcvc4-command_executor_portfolio.$(OBJEXT) \ @CVC4_BUILD_PCVC4_TRUE@ pcvc4-driver_unified.$(OBJEXT) pcvc4_OBJECTS = $(am_pcvc4_OBJECTS) @CVC4_BUILD_PCVC4_TRUE@pcvc4_DEPENDENCIES = libmain.a \ @CVC4_BUILD_PCVC4_TRUE@ @builddir@/../parser/libcvc4parser.la \ @CVC4_BUILD_PCVC4_TRUE@ @builddir@/../libcvc4.la \ @CVC4_BUILD_PCVC4_TRUE@ $(am__DEPENDENCIES_1) \ @CVC4_BUILD_PCVC4_TRUE@ @builddir@/../lib/libreplacements.la \ @CVC4_BUILD_PCVC4_TRUE@ $(am__DEPENDENCIES_1) \ @CVC4_BUILD_PCVC4_TRUE@ $(am__DEPENDENCIES_1) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmain_a_SOURCES) $(cvc4_SOURCES) $(pcvc4_SOURCES) DIST_SOURCES = $(libmain_a_SOURCES) $(cvc4_SOURCES) \ $(am__pcvc4_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ AM_CPPFLAGS = \ -D__BUILDING_CVC4DRIVER \ -I@builddir@/.. $(ANTLR_INCLUDES) -I@srcdir@/../include -I@srcdir@/.. AM_CXXFLAGS = -Wall -Wno-unknown-pragmas noinst_LIBRARIES = libmain.a libmain_a_SOURCES = \ interactive_shell.h \ interactive_shell.cpp \ main.h \ util.cpp @CVC4_BUILD_PCVC4_TRUE@pcvc4_SOURCES = \ @CVC4_BUILD_PCVC4_TRUE@ main.cpp \ @CVC4_BUILD_PCVC4_TRUE@ portfolio.cpp \ @CVC4_BUILD_PCVC4_TRUE@ portfolio.h \ @CVC4_BUILD_PCVC4_TRUE@ portfolio_util.cpp \ @CVC4_BUILD_PCVC4_TRUE@ portfolio_util.h \ @CVC4_BUILD_PCVC4_TRUE@ command_executor.cpp \ @CVC4_BUILD_PCVC4_TRUE@ command_executor_portfolio.cpp \ @CVC4_BUILD_PCVC4_TRUE@ command_executor.h \ @CVC4_BUILD_PCVC4_TRUE@ command_executor_portfolio.h \ @CVC4_BUILD_PCVC4_TRUE@ driver_unified.cpp @CVC4_BUILD_PCVC4_TRUE@pcvc4_LDADD = libmain.a \ @CVC4_BUILD_PCVC4_TRUE@ @builddir@/../parser/libcvc4parser.la \ @CVC4_BUILD_PCVC4_TRUE@ @builddir@/../libcvc4.la \ @CVC4_BUILD_PCVC4_TRUE@ $(READLINE_LIBS) \ @CVC4_BUILD_PCVC4_TRUE@ @builddir@/../lib/libreplacements.la \ @CVC4_BUILD_PCVC4_TRUE@ $(BOOST_THREAD_LIBS) \ @CVC4_BUILD_PCVC4_TRUE@ $(BOOST_THREAD_LDFLAGS) @CVC4_BUILD_PCVC4_TRUE@pcvc4_CPPFLAGS = $(AM_CPPFLAGS) $(BOOST_CPPFLAGS) -DPORTFOLIO_BUILD @CVC4_BUILD_PCVC4_TRUE@@STATIC_BINARY_FALSE@pcvc4_LINK = $(CXXLINK) $(pcvc4_LDFLAGS) @CVC4_BUILD_PCVC4_TRUE@@STATIC_BINARY_TRUE@pcvc4_LINK = $(CXXLINK) -all-static $(pcvc4_LDFLAGS) cvc4_SOURCES = \ main.cpp \ command_executor.cpp \ driver_unified.cpp cvc4_LDADD = \ libmain.a \ @builddir@/../parser/libcvc4parser.la \ @builddir@/../libcvc4.la \ $(READLINE_LIBS) \ @builddir@/../lib/libreplacements.la BUILT_SOURCES = \ $(TOKENS_FILES) TOKENS_FILES = \ cvc_tokens.h \ smt1_tokens.h \ smt2_tokens.h \ tptp_tokens.h @STATIC_BINARY_FALSE@cvc4_LINK = $(CXXLINK) $(cvc4_LDFLAGS) @STATIC_BINARY_TRUE@cvc4_LINK = $(CXXLINK) -all-static $(cvc4_LDFLAGS) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/main/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/main/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libmain.a: $(libmain_a_OBJECTS) $(libmain_a_DEPENDENCIES) $(EXTRA_libmain_a_DEPENDENCIES) $(AM_V_at)-rm -f libmain.a $(AM_V_AR)$(libmain_a_AR) libmain.a $(libmain_a_OBJECTS) $(libmain_a_LIBADD) $(AM_V_at)$(RANLIB) libmain.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; 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 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)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || 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)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_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 cvc4$(EXEEXT): $(cvc4_OBJECTS) $(cvc4_DEPENDENCIES) $(EXTRA_cvc4_DEPENDENCIES) @rm -f cvc4$(EXEEXT) $(AM_V_GEN)$(cvc4_LINK) $(cvc4_OBJECTS) $(cvc4_LDADD) $(LIBS) pcvc4$(EXEEXT): $(pcvc4_OBJECTS) $(pcvc4_DEPENDENCIES) $(EXTRA_pcvc4_DEPENDENCIES) @rm -f pcvc4$(EXEEXT) $(AM_V_GEN)$(pcvc4_LINK) $(pcvc4_OBJECTS) $(pcvc4_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_executor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver_unified.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interactive_shell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcvc4-command_executor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcvc4-command_executor_portfolio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcvc4-driver_unified.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcvc4-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcvc4-portfolio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcvc4-portfolio_util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< pcvc4-main.o: main.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-main.o -MD -MP -MF $(DEPDIR)/pcvc4-main.Tpo -c -o pcvc4-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-main.Tpo $(DEPDIR)/pcvc4-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cpp' object='pcvc4-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-main.o `test -f 'main.cpp' || echo '$(srcdir)/'`main.cpp pcvc4-main.obj: main.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-main.obj -MD -MP -MF $(DEPDIR)/pcvc4-main.Tpo -c -o pcvc4-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-main.Tpo $(DEPDIR)/pcvc4-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cpp' object='pcvc4-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-main.obj `if test -f 'main.cpp'; then $(CYGPATH_W) 'main.cpp'; else $(CYGPATH_W) '$(srcdir)/main.cpp'; fi` pcvc4-portfolio.o: portfolio.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-portfolio.o -MD -MP -MF $(DEPDIR)/pcvc4-portfolio.Tpo -c -o pcvc4-portfolio.o `test -f 'portfolio.cpp' || echo '$(srcdir)/'`portfolio.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-portfolio.Tpo $(DEPDIR)/pcvc4-portfolio.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='portfolio.cpp' object='pcvc4-portfolio.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-portfolio.o `test -f 'portfolio.cpp' || echo '$(srcdir)/'`portfolio.cpp pcvc4-portfolio.obj: portfolio.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-portfolio.obj -MD -MP -MF $(DEPDIR)/pcvc4-portfolio.Tpo -c -o pcvc4-portfolio.obj `if test -f 'portfolio.cpp'; then $(CYGPATH_W) 'portfolio.cpp'; else $(CYGPATH_W) '$(srcdir)/portfolio.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-portfolio.Tpo $(DEPDIR)/pcvc4-portfolio.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='portfolio.cpp' object='pcvc4-portfolio.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-portfolio.obj `if test -f 'portfolio.cpp'; then $(CYGPATH_W) 'portfolio.cpp'; else $(CYGPATH_W) '$(srcdir)/portfolio.cpp'; fi` pcvc4-portfolio_util.o: portfolio_util.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-portfolio_util.o -MD -MP -MF $(DEPDIR)/pcvc4-portfolio_util.Tpo -c -o pcvc4-portfolio_util.o `test -f 'portfolio_util.cpp' || echo '$(srcdir)/'`portfolio_util.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-portfolio_util.Tpo $(DEPDIR)/pcvc4-portfolio_util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='portfolio_util.cpp' object='pcvc4-portfolio_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-portfolio_util.o `test -f 'portfolio_util.cpp' || echo '$(srcdir)/'`portfolio_util.cpp pcvc4-portfolio_util.obj: portfolio_util.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-portfolio_util.obj -MD -MP -MF $(DEPDIR)/pcvc4-portfolio_util.Tpo -c -o pcvc4-portfolio_util.obj `if test -f 'portfolio_util.cpp'; then $(CYGPATH_W) 'portfolio_util.cpp'; else $(CYGPATH_W) '$(srcdir)/portfolio_util.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-portfolio_util.Tpo $(DEPDIR)/pcvc4-portfolio_util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='portfolio_util.cpp' object='pcvc4-portfolio_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-portfolio_util.obj `if test -f 'portfolio_util.cpp'; then $(CYGPATH_W) 'portfolio_util.cpp'; else $(CYGPATH_W) '$(srcdir)/portfolio_util.cpp'; fi` pcvc4-command_executor.o: command_executor.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-command_executor.o -MD -MP -MF $(DEPDIR)/pcvc4-command_executor.Tpo -c -o pcvc4-command_executor.o `test -f 'command_executor.cpp' || echo '$(srcdir)/'`command_executor.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-command_executor.Tpo $(DEPDIR)/pcvc4-command_executor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='command_executor.cpp' object='pcvc4-command_executor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-command_executor.o `test -f 'command_executor.cpp' || echo '$(srcdir)/'`command_executor.cpp pcvc4-command_executor.obj: command_executor.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-command_executor.obj -MD -MP -MF $(DEPDIR)/pcvc4-command_executor.Tpo -c -o pcvc4-command_executor.obj `if test -f 'command_executor.cpp'; then $(CYGPATH_W) 'command_executor.cpp'; else $(CYGPATH_W) '$(srcdir)/command_executor.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-command_executor.Tpo $(DEPDIR)/pcvc4-command_executor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='command_executor.cpp' object='pcvc4-command_executor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-command_executor.obj `if test -f 'command_executor.cpp'; then $(CYGPATH_W) 'command_executor.cpp'; else $(CYGPATH_W) '$(srcdir)/command_executor.cpp'; fi` pcvc4-command_executor_portfolio.o: command_executor_portfolio.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-command_executor_portfolio.o -MD -MP -MF $(DEPDIR)/pcvc4-command_executor_portfolio.Tpo -c -o pcvc4-command_executor_portfolio.o `test -f 'command_executor_portfolio.cpp' || echo '$(srcdir)/'`command_executor_portfolio.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-command_executor_portfolio.Tpo $(DEPDIR)/pcvc4-command_executor_portfolio.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='command_executor_portfolio.cpp' object='pcvc4-command_executor_portfolio.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-command_executor_portfolio.o `test -f 'command_executor_portfolio.cpp' || echo '$(srcdir)/'`command_executor_portfolio.cpp pcvc4-command_executor_portfolio.obj: command_executor_portfolio.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-command_executor_portfolio.obj -MD -MP -MF $(DEPDIR)/pcvc4-command_executor_portfolio.Tpo -c -o pcvc4-command_executor_portfolio.obj `if test -f 'command_executor_portfolio.cpp'; then $(CYGPATH_W) 'command_executor_portfolio.cpp'; else $(CYGPATH_W) '$(srcdir)/command_executor_portfolio.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-command_executor_portfolio.Tpo $(DEPDIR)/pcvc4-command_executor_portfolio.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='command_executor_portfolio.cpp' object='pcvc4-command_executor_portfolio.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-command_executor_portfolio.obj `if test -f 'command_executor_portfolio.cpp'; then $(CYGPATH_W) 'command_executor_portfolio.cpp'; else $(CYGPATH_W) '$(srcdir)/command_executor_portfolio.cpp'; fi` pcvc4-driver_unified.o: driver_unified.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-driver_unified.o -MD -MP -MF $(DEPDIR)/pcvc4-driver_unified.Tpo -c -o pcvc4-driver_unified.o `test -f 'driver_unified.cpp' || echo '$(srcdir)/'`driver_unified.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-driver_unified.Tpo $(DEPDIR)/pcvc4-driver_unified.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='driver_unified.cpp' object='pcvc4-driver_unified.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-driver_unified.o `test -f 'driver_unified.cpp' || echo '$(srcdir)/'`driver_unified.cpp pcvc4-driver_unified.obj: driver_unified.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT pcvc4-driver_unified.obj -MD -MP -MF $(DEPDIR)/pcvc4-driver_unified.Tpo -c -o pcvc4-driver_unified.obj `if test -f 'driver_unified.cpp'; then $(CYGPATH_W) 'driver_unified.cpp'; else $(CYGPATH_W) '$(srcdir)/driver_unified.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pcvc4-driver_unified.Tpo $(DEPDIR)/pcvc4-driver_unified.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='driver_unified.cpp' object='pcvc4-driver_unified.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pcvc4_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o pcvc4-driver_unified.obj `if test -f 'driver_unified.cpp'; then $(CYGPATH_W) 'driver_unified.cpp'; else $(CYGPATH_W) '$(srcdir)/driver_unified.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool clean-local \ clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile cvc_tokens.h: @srcdir@/../parser/cvc/Cvc.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ smt1_tokens.h: @srcdir@/../parser/smt1/Smt1.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ smt2_tokens.h: @srcdir@/../parser/smt2/Smt2.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ tptp_tokens.h: @srcdir@/../parser/tptp/Tptp.g $(AM_V_GEN)grep "'[a-zA-Z][a-zA-Z0-9_-][a-zA-Z0-9_-]*'" $^ | sed 's/.*'\''\([a-zA-Z0-9_-]*\)'\''.*/"\1",/' | sort -u >$@ clean-local: rm -f $(BUILT_SOURCES) # 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: cvc4-1.5/src/main/command_executor.cpp000066400000000000000000000201701313116454100177700ustar00rootroot00000000000000/********************* */ /*! \file command_executor.cpp ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An additional layer between commands and invoking them. **/ #include "main/command_executor.h" #ifndef __WIN32__ # include #endif /* ! __WIN32__ */ #include #include #include "main/main.h" #include "smt/command.h" namespace CVC4 { namespace main { // Function to cancel any (externally-imposed) limit on CPU time. // This is used for competitions while a solution (proof or model) // is being dumped (so that we don't give "sat" or "unsat" then get // interrupted partway through outputting a proof!). void setNoLimitCPU() { // Windows doesn't have these things, just ignore #ifndef __WIN32__ struct rlimit rlc; int st = getrlimit(RLIMIT_CPU, &rlc); if(st == 0) { rlc.rlim_cur = rlc.rlim_max; setrlimit(RLIMIT_CPU, &rlc); } #endif /* ! __WIN32__ */ } void printStatsIncremental(std::ostream& out, const std::string& prvsStatsString, const std::string& curStatsString); CommandExecutor::CommandExecutor(ExprManager &exprMgr, Options &options) : d_exprMgr(exprMgr), d_smtEngine(new SmtEngine(&exprMgr)), d_options(options), d_stats("driver"), d_result(), d_replayStream(NULL) {} void CommandExecutor::setReplayStream(ExprStream* replayStream) { assert(d_replayStream == NULL); d_replayStream = replayStream; d_smtEngine->setReplayStream(d_replayStream); } bool CommandExecutor::doCommand(Command* cmd) { if( d_options.getParseOnly() ) { return true; } CommandSequence *seq = dynamic_cast(cmd); if(seq != NULL) { // assume no error bool status = true; for(CommandSequence::iterator subcmd = seq->begin(); (status || d_options.getContinuedExecution()) && subcmd != seq->end(); ++subcmd) { status = doCommand(*subcmd); } return status; } else { if(d_options.getVerbosity() > 2) { *d_options.getOut() << "Invoking: " << *cmd << std::endl; } return doCommandSingleton(cmd); } } void CommandExecutor::reset() { if(d_options.getStatistics()) { flushStatistics(*d_options.getErr()); } delete d_smtEngine; d_smtEngine = new SmtEngine(&d_exprMgr); } bool CommandExecutor::doCommandSingleton(Command* cmd) { bool status = true; if(d_options.getVerbosity() >= -1) { status = smtEngineInvoke(d_smtEngine, cmd, d_options.getOut()); } else { status = smtEngineInvoke(d_smtEngine, cmd, NULL); } Result res; CheckSatCommand* cs = dynamic_cast(cmd); if(cs != NULL) { d_result = res = cs->getResult(); } QueryCommand* q = dynamic_cast(cmd); if(q != NULL) { d_result = res = q->getResult(); } CheckSynthCommand* csy = dynamic_cast(cmd); if(csy != NULL) { d_result = res = csy->getResult(); } if((cs != NULL || q != NULL) && d_options.getStatsEveryQuery()) { std::ostringstream ossCurStats; flushStatistics(ossCurStats); std::ostream& err = *d_options.getErr(); printStatsIncremental(err, d_lastStatistics, ossCurStats.str()); d_lastStatistics = ossCurStats.str(); } // dump the model/proof/unsat core if option is set if (status) { Command* g = NULL; if (d_options.getProduceModels() && d_options.getDumpModels() && (res.asSatisfiabilityResult() == Result::SAT || (res.isUnknown() && res.whyUnknown() == Result::INCOMPLETE))) { g = new GetModelCommand(); } if (d_options.getProof() && d_options.getDumpProofs() && res.asSatisfiabilityResult() == Result::UNSAT) { g = new GetProofCommand(); } if (d_options.getDumpInstantiations() && ((d_options.getInstFormatMode() != INST_FORMAT_MODE_SZS && (res.asSatisfiabilityResult() == Result::SAT || (res.isUnknown() && res.whyUnknown() == Result::INCOMPLETE))) || res.asSatisfiabilityResult() == Result::UNSAT)) { g = new GetInstantiationsCommand(); } if (d_options.getDumpSynth() && res.asSatisfiabilityResult() == Result::UNSAT) { g = new GetSynthSolutionCommand(); } if (d_options.getDumpUnsatCores() && res.asSatisfiabilityResult() == Result::UNSAT) { g = new GetUnsatCoreCommand(); } if (g != NULL) { // set no time limit during dumping if applicable if (d_options.getForceNoLimitCpuWhileDump()) { setNoLimitCPU(); } status = doCommandSingleton(g); delete g; } } return status; } bool smtEngineInvoke(SmtEngine* smt, Command* cmd, std::ostream *out) { if(out == NULL) { cmd->invoke(smt); } else { cmd->invoke(smt, *out); } // ignore the error if the command-verbosity is 0 for this command std::string commandName = std::string("command-verbosity:") + cmd->getCommandName(); if(smt->getOption(commandName).getIntegerValue() == 0) { return true; } return !cmd->fail(); } void printStatsIncremental(std::ostream& out, const std::string& prvsStatsString, const std::string& curStatsString) { if(prvsStatsString == "") { out << curStatsString; return; } // read each line // if a number, subtract and add that to parentheses std::istringstream issPrvs(prvsStatsString); std::istringstream issCur(curStatsString); std::string prvsStatName, prvsStatValue, curStatName, curStatValue; std::getline(issPrvs, prvsStatName, ','); std::getline(issCur, curStatName, ','); /** * Stat are assumed to one-per line: ", " * e.g. "sat::decisions, 100" * Output is of the form: ", ()" * e.g. "sat::decisions, 100 (20)" * If the value is not numeric, no change is made. */ while( !issCur.eof() ) { std::getline(issCur, curStatValue, '\n'); if(curStatName == prvsStatName) { std::getline(issPrvs, prvsStatValue, '\n'); double prvsFloat, curFloat; bool isFloat = (std::istringstream(prvsStatValue) >> prvsFloat) && (std::istringstream(curStatValue) >> curFloat); if(isFloat) { out << curStatName << ", " << curStatValue << " " << "(" << std::setprecision(8) << (curFloat-prvsFloat) << ")" << std::endl; } else { out << curStatName << ", " << curStatValue << std::endl; } std::getline(issPrvs, prvsStatName, ','); } else { out << curStatName << ", " << curStatValue << std::endl; } std::getline(issCur, curStatName, ','); } } void CommandExecutor::printStatsFilterZeros(std::ostream& out, const std::string& statsString) { // read each line, if a number, check zero and skip if so // Stat are assumed to one-per line: ", " std::istringstream iss(statsString); std::string statName, statValue; std::getline(iss, statName, ','); while( !iss.eof() ) { std::getline(iss, statValue, '\n'); double curFloat; std::istringstream iss_stat_value (statValue); iss_stat_value >> curFloat; bool isFloat = iss_stat_value.good(); if( (isFloat && curFloat == 0) || statValue == " \"0\"" || statValue == " \"[]\"") { // skip } else { out << statName << "," << statValue << std::endl; } std::getline(iss, statName, ','); } } void CommandExecutor::flushOutputStreams() { if(d_options.getStatistics()) { if(d_options.getStatsHideZeros() == false) { flushStatistics(*(d_options.getErr())); } else { std::ostringstream ossStats; flushStatistics(ossStats); printStatsFilterZeros(*(d_options.getErr()), ossStats.str()); } } // make sure out and err streams are flushed too d_options.flushOut(); d_options.flushErr(); } }/* CVC4::main namespace */ }/* CVC4 namespace */ cvc4-1.5/src/main/command_executor.h000066400000000000000000000053251313116454100174420ustar00rootroot00000000000000/********************* */ /*! \file command_executor.h ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Morgan Deters, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An additional layer between commands and invoking them. **/ #ifndef __CVC4__MAIN__COMMAND_EXECUTOR_H #define __CVC4__MAIN__COMMAND_EXECUTOR_H #include #include #include "expr/expr_manager.h" #include "options/options.h" #include "smt/command.h" #include "smt/smt_engine.h" #include "util/statistics_registry.h" namespace CVC4 { namespace main { class CommandExecutor { private: std::string d_lastStatistics; protected: ExprManager& d_exprMgr; SmtEngine* d_smtEngine; Options& d_options; StatisticsRegistry d_stats; Result d_result; ExprStream* d_replayStream; public: CommandExecutor(ExprManager &exprMgr, Options &options); virtual ~CommandExecutor() { delete d_smtEngine; if(d_replayStream != NULL){ delete d_replayStream; } } /** * Executes a command. Recursively handles if cmd is a command * sequence. Eventually uses doCommandSingleton (which can be * overridden by a derived class). */ bool doCommand(CVC4::Command* cmd); Result getResult() const { return d_result; } void reset(); StatisticsRegistry& getStatisticsRegistry() { return d_stats; } virtual void flushStatistics(std::ostream& out) const { d_exprMgr.getStatistics().flushInformation(out); d_smtEngine->getStatistics().flushInformation(out); d_stats.flushInformation(out); } /** * Flushes statistics to a file descriptor. Safe to use in a signal handler. */ void safeFlushStatistics(int fd) const { d_exprMgr.safeFlushStatistics(fd); d_smtEngine->safeFlushStatistics(fd); d_stats.safeFlushInformation(fd); } static void printStatsFilterZeros(std::ostream& out, const std::string& statsString); LemmaChannels* channels() { return d_smtEngine->channels(); } void flushOutputStreams(); void setReplayStream(ExprStream* replayStream); protected: /** Executes treating cmd as a singleton */ virtual bool doCommandSingleton(CVC4::Command* cmd); private: CommandExecutor(); };/* class CommandExecutor */ bool smtEngineInvoke(SmtEngine* smt, Command* cmd, std::ostream *out); }/* CVC4::main namespace */ }/* CVC4 namespace */ #endif /* __CVC4__MAIN__COMMAND_EXECUTOR_H */ cvc4-1.5/src/main/command_executor_portfolio.cpp000066400000000000000000000355721313116454100221010ustar00rootroot00000000000000/********************* */ /*! \file command_executor_portfolio.cpp ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An additional layer between commands and invoking them. ** ** The portfolio executor branches check-sat queries to several ** threads. **/ #include "main/command_executor_portfolio.h" #if HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include #include "cvc4autoconfig.h" #include "expr/pickler.h" #include "main/main.h" #include "main/portfolio.h" #include "options/options.h" #include "options/set_language.h" #include "smt/command.h" using namespace std; namespace CVC4 { namespace main { CommandExecutorPortfolio::CommandExecutorPortfolio( ExprManager &exprMgr, Options &options, OptionsList& tOpts) : CommandExecutor(exprMgr, options), d_numThreads(options.getThreads()), d_smts(), d_seq(new CommandSequence()), d_threadOptions(tOpts), d_vmaps(), d_lastWinner(0), d_channelsOut(), d_channelsIn(), d_ostringstreams(), d_statLastWinner("portfolio::lastWinner"), d_statWaitTime("portfolio::waitTime") { assert(d_threadOptions.size() == d_numThreads); d_statLastWinner.setData(d_lastWinner); d_stats.registerStat(&d_statLastWinner); d_stats.registerStat(&d_statWaitTime); /* Duplication, individualization */ d_exprMgrs.push_back(&d_exprMgr); for(unsigned i = 1; i < d_numThreads; ++i) { d_exprMgrs.push_back(new ExprManager(d_threadOptions[i])); } // Create the SmtEngine(s) d_smts.push_back(d_smtEngine); for(unsigned i = 1; i < d_numThreads; ++i) { d_smts.push_back(new SmtEngine(d_exprMgrs[i])); } assert(d_vmaps.size() == 0); for(unsigned i = 0; i < d_numThreads; ++i) { d_vmaps.push_back(new ExprManagerMapCollection()); } } CommandExecutorPortfolio::~CommandExecutorPortfolio() { assert(d_seq != NULL); delete d_seq; assert(d_smts.size() == d_numThreads); for(unsigned i = 1; i < d_numThreads; ++i) { // the 0-th one is responsibility of parent class delete d_smts[i]; delete d_exprMgrs[i]; } d_exprMgrs.clear(); d_smts.clear(); d_stats.unregisterStat(&d_statLastWinner); d_stats.unregisterStat(&d_statWaitTime); } void CommandExecutorPortfolio::lemmaSharingInit() { /* Sharing channels */ assert(d_channelsIn.size() == 0); assert(d_channelsOut.size() == 0); if(d_numThreads == 1) { // Disable sharing d_threadOptions[0].setSharingFilterByLength(0); } else { // Setup sharing channels const unsigned int sharingChannelSize = 1000000; for(unsigned i = 0; i < d_numThreads; ++i){ d_channelsOut.push_back( new SynchronizedSharedChannel(sharingChannelSize)); d_channelsIn.push_back( new SynchronizedSharedChannel(sharingChannelSize)); } /* Lemma I/O channels */ for(unsigned i = 0; i < d_numThreads; ++i) { int thread_id = d_threadOptions[i].getThreadId(); string tag = "thread #" + boost::lexical_cast(thread_id); LemmaOutputChannel* outputChannel = new PortfolioLemmaOutputChannel(tag, d_channelsOut[i], d_exprMgrs[i], d_vmaps[i]->d_from, d_vmaps[i]->d_to); LemmaInputChannel* inputChannel = new PortfolioLemmaInputChannel(tag, d_channelsIn[i], d_exprMgrs[i], d_vmaps[i]->d_from, d_vmaps[i]->d_to); d_smts[i]->channels()->setLemmaInputChannel(inputChannel); d_smts[i]->channels()->setLemmaOutputChannel(outputChannel); } /* Output to string stream */ assert(d_ostringstreams.size() == 0); for(unsigned i = 0; i < d_numThreads; ++i) { d_ostringstreams.push_back(new ostringstream); d_threadOptions[i].setOut(d_ostringstreams[i]); OutputLanguage outputLanguage = d_threadOptions[i].getOutputLanguage(); // important even for muzzled builds (to get result output right) *(d_threadOptions[i].getOut()) << language::SetLanguage(outputLanguage); } } }/* CommandExecutorPortfolio::lemmaSharingInit() */ void CommandExecutorPortfolio::lemmaSharingCleanup() { assert(d_numThreads == d_options.getThreads()); if(d_numThreads == 1) return; // Channel cleanup assert(d_channelsIn.size() == d_numThreads); assert(d_channelsOut.size() == d_numThreads); for(unsigned i = 0; i < d_numThreads; ++i) { delete d_channelsIn[i]; delete d_channelsOut[i]; delete d_smts[i]->channels()->getLemmaInputChannel(); d_smts[i]->channels()->setLemmaInputChannel(NULL); delete d_smts[i]->channels()->getLemmaOutputChannel(); d_smts[i]->channels()->setLemmaOutputChannel(NULL); } d_channelsIn.clear(); d_channelsOut.clear(); // sstreams cleanup (if used) if(d_ostringstreams.size() != 0) { assert(d_ostringstreams.size() == d_numThreads); for(unsigned i = 0; i < d_numThreads; ++i) { d_threadOptions[i].setOut(d_options.getOut()); delete d_ostringstreams[i]; } d_ostringstreams.clear(); } }/* CommandExecutorPortfolio::lemmaSharingCleanup() */ bool CommandExecutorPortfolio::doCommandSingleton(Command* cmd) { /** * save the command and if check sat or query command, run a * porfolio of SMT solvers. */ int mode = 0; // mode = 0 : run command on lastWinner, saving the command // to be run on all others // // mode = 1 : run a race of the command, update lastWinner // // mode = 2 : run _only_ the lastWinner thread, not saving the // command if(dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL) { mode = 1; } else if(dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL || false) { mode = 2; } Debug("portfolio::outputmode") << "Mode is " << mode << "lastWinner is " << d_lastWinner << "d_seq is " << d_seq << std::endl; if(mode == 0) { d_seq->addCommand(cmd->clone()); Command* cmdExported = d_lastWinner == 0 ? cmd : cmd->exportTo(d_exprMgrs[d_lastWinner], *(d_vmaps[d_lastWinner]) ); std::ostream* winnersOut = d_options.getVerbosity() >= -1 ? (d_threadOptions[d_lastWinner]).getOut() : NULL; bool ret = smtEngineInvoke(d_smts[d_lastWinner], cmdExported, winnersOut); if(d_lastWinner != 0) delete cmdExported; return ret; } else if(mode == 1) { // portfolio d_seq->addCommand(cmd->clone()); // We currently don't support changing number of threads for each // command, but things have been architected in a way so that this // can be achieved without a lot of work. Command *seqs[d_numThreads]; if(d_lastWinner == 0) seqs[0] = cmd; else seqs[0] = d_seq; /* variable maps and exporting */ for(unsigned i = 1; i < d_numThreads; ++i) { /** * vmaps[i].d_from [x] = y means * that in thread #0's expr manager id is y * and in thread #i's expr manager id is x * opposite for d_to * * d_from[x] : in a sense gives the id if converting *from* it to * first thread */ try { seqs[i] = int(i) == d_lastWinner ? cmd->exportTo(d_exprMgrs[i], *(d_vmaps[i])) : d_seq->exportTo(d_exprMgrs[i], *(d_vmaps[i]) ); } catch(ExportUnsupportedException& e) { if(d_options.getFallbackSequential()) { Notice() << "Unsupported theory encountered." << "Switching to sequential mode."; return CommandExecutor::doCommandSingleton(cmd); } else throw Exception("Certain theories (e.g., datatypes) are (currently)" " unsupported in portfolio\n mode. Please see option" " --fallback-sequential to make this a soft error."); } } /** * Create identity variable map for the first thread, with only * those variables which have a corresponding variable in * another thread. (TODO: Also assert, all threads have the same * set of variables mapped.) */ if(d_numThreads >= 2) { VarMap& thread_0_from = d_vmaps[0]->d_from; VarMap& thread_1_to = d_vmaps[1]->d_to; for(VarMap::iterator i=thread_1_to.begin(); i != thread_1_to.end(); ++i) { thread_0_from[i->first] = i->first; } d_vmaps[0]->d_to = thread_0_from; } lemmaSharingInit(); /* Portfolio */ boost::function* fns = new boost::function[d_numThreads]; for(unsigned i = 0; i < d_numThreads; ++i) { std::ostream* current_out_or_null = d_options.getVerbosity() >= -1 ? d_threadOptions[i].getOut() : NULL; fns[i] = boost::bind(smtEngineInvoke, d_smts[i], seqs[i], current_out_or_null); } assert(d_channelsIn.size() == d_numThreads || d_numThreads == 1); assert(d_channelsOut.size() == d_numThreads || d_numThreads == 1); assert(d_smts.size() == d_numThreads); assert( !d_statWaitTime.running() ); boost::function smFn = d_numThreads <= 1 ? boost::function() : boost::bind(sharingManager, d_numThreads, &d_channelsOut[0], &d_channelsIn[0], &d_smts[0]); size_t threadStackSize = d_options.getThreadStackSize(); threadStackSize *= 1024 * 1024; pair portfolioReturn = runPortfolio(d_numThreads, smFn, fns, threadStackSize, d_options.getWaitToJoin(), d_statWaitTime); #ifdef CVC4_STATISTICS_ON assert( d_statWaitTime.running() ); d_statWaitTime.stop(); #endif /* CVC4_STATISTICS_ON */ d_lastWinner = portfolioReturn.first; d_result = d_smts[d_lastWinner]->getStatusOfLastCommand(); if(d_ostringstreams.size() != 0) { assert(d_numThreads == d_options.getThreads()); assert(portfolioReturn.first >= 0); assert(unsigned(portfolioReturn.first) < d_numThreads); std::ostream& out = *d_options.getOut(); if(Debug.isOn("treat-unknown-error")) { if(d_ostringstreams[portfolioReturn.first]->str() == "unknown\n") { out << "portfolioReturn = (" << portfolioReturn.first << ", " << portfolioReturn.second << ")\n"; for(unsigned i = 0; i < d_numThreads; ++i) out << "thread " << i << ": " << d_ostringstreams[i]->str() << std::endl; throw Exception("unknown encountered"); } } out << d_ostringstreams[portfolioReturn.first]->str() << std::flush; #ifdef CVC4_COMPETITION_MODE // We use CVC4 in competition with --no-wait-to-join. If // destructors run, they will destroy(!) us. So, just exit now. _exit(0); #endif /* CVC4_COMPETITION_MODE */ } /* cleanup this check sat specific stuff */ lemmaSharingCleanup(); delete d_seq; d_seq = new CommandSequence(); delete[] fns; bool status = portfolioReturn.second; // dump the model/proof/unsat core if option is set if(status) { if( d_options.getProduceModels() && d_options.getDumpModels() && ( d_result.asSatisfiabilityResult() == Result::SAT || (d_result.isUnknown() && d_result.whyUnknown() == Result::INCOMPLETE) ) ) { Command* gm = new GetModelCommand(); status = doCommandSingleton(gm); } else if( d_options.getProof() && d_options.getDumpProofs() && d_result.asSatisfiabilityResult() == Result::UNSAT ) { Command* gp = new GetProofCommand(); status = doCommandSingleton(gp); } else if( d_options.getDumpInstantiations() && ( ( d_options.getInstFormatMode() != INST_FORMAT_MODE_SZS && ( d_result.asSatisfiabilityResult() == Result::SAT || (d_result.isUnknown() && d_result.whyUnknown() == Result::INCOMPLETE) ) ) || d_result.asSatisfiabilityResult() == Result::UNSAT ) ) { Command* gi = new GetInstantiationsCommand(); status = doCommandSingleton(gi); } else if( d_options.getDumpSynth() && d_result.asSatisfiabilityResult() == Result::UNSAT ){ Command* gi = new GetSynthSolutionCommand(); status = doCommandSingleton(gi); } else if( d_options.getDumpUnsatCores() && d_result.asSatisfiabilityResult() == Result::UNSAT ) { Command* guc = new GetUnsatCoreCommand(); status = doCommandSingleton(guc); } } return status; } else if(mode == 2) { Command* cmdExported = d_lastWinner == 0 ? cmd : cmd->exportTo(d_exprMgrs[d_lastWinner], *(d_vmaps[d_lastWinner])); std::ostream* winner_out_if_verbose = d_options.getVerbosity() >= -1 ? d_threadOptions[d_lastWinner].getOut() : NULL; bool ret = smtEngineInvoke(d_smts[d_lastWinner], cmdExported, winner_out_if_verbose); if(d_lastWinner != 0){ delete cmdExported; } return ret; } else { // Unreachable(); assert(false); return false; } }/* CommandExecutorPortfolio::doCommandSingleton() */ void CommandExecutorPortfolio::flushStatistics(std::ostream& out) const { assert(d_numThreads == d_exprMgrs.size() && d_exprMgrs.size() == d_smts.size()); for(size_t i = 0; i < d_numThreads; ++i) { string emTag = "thread#" + boost::lexical_cast(d_threadOptions[i].getThreadId()); Statistics stats = d_exprMgrs[i]->getStatistics(); stats.setPrefix(emTag); stats.flushInformation(out); string smtTag = "thread#" + boost::lexical_cast(d_threadOptions[i].getThreadId()); stats = d_smts[i]->getStatistics(); stats.setPrefix(smtTag); stats.flushInformation(out); } d_stats.flushInformation(out); } }/* CVC4::main namespace */ }/* CVC4 namespace */ cvc4-1.5/src/main/command_executor_portfolio.h000066400000000000000000000044441313116454100215400ustar00rootroot00000000000000/********************* */ /*! \file command_executor_portfolio.h ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief An additional layer between commands and invoking them. ** ** The portfolio executer branches check-sat queries to several ** threads. **/ #ifndef __CVC4__MAIN__COMMAND_EXECUTOR_PORTFOLIO_H #define __CVC4__MAIN__COMMAND_EXECUTOR_PORTFOLIO_H #include "main/command_executor.h" #include "main/portfolio_util.h" #include #include #include #include namespace CVC4 { class CommandSequence; namespace main { class CommandExecutorPortfolio : public CommandExecutor { // These shall be created/deleted during initialization std::vector d_exprMgrs; const unsigned d_numThreads; // Currently const, but designed so it is // not too hard to support this changing std::vector d_smts; CommandSequence* d_seq; OptionsList& d_threadOptions; std::vector d_vmaps; int d_lastWinner; // These shall be reset for each check-sat std::vector< SharedChannel* > d_channelsOut; std::vector< SharedChannel* > d_channelsIn; std::vector d_ostringstreams; // Stats ReferenceStat d_statLastWinner; TimerStat d_statWaitTime; public: CommandExecutorPortfolio(ExprManager &exprMgr, Options &options, OptionsList& tOpts); ~CommandExecutorPortfolio(); std::string getSmtEngineStatus(); void flushStatistics(std::ostream& out) const; protected: bool doCommandSingleton(Command* cmd); private: CommandExecutorPortfolio(); void lemmaSharingInit(); void lemmaSharingCleanup(); };/* class CommandExecutorPortfolio */ }/* CVC4::main namespace */ }/* CVC4 namespace */ #endif /* __CVC4__MAIN__COMMAND_EXECUTOR_PORTFOLIO_H */ cvc4-1.5/src/main/driver_unified.cpp000066400000000000000000000472211313116454100174400ustar00rootroot00000000000000/********************* */ /*! \file driver_unified.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Liana Hadarean ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Driver for CVC4 executable (cvc4) unified for both ** sequential and portfolio versions **/ #include #include #include #include #include #include #include // This must come before PORTFOLIO_BUILD. #include "cvc4autoconfig.h" #include "base/configuration.h" #include "base/output.h" #include "base/ptr_closer.h" #include "expr/expr_iomanip.h" #include "expr/expr_manager.h" #include "main/command_executor.h" #ifdef PORTFOLIO_BUILD # include "main/command_executor_portfolio.h" #endif #include "main/interactive_shell.h" #include "main/main.h" #include "options/options.h" #include "options/set_language.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "parser/parser_exception.h" #include "smt/command.h" #include "util/result.h" #include "util/statistics_registry.h" using namespace std; using namespace CVC4; using namespace CVC4::parser; using namespace CVC4::main; namespace CVC4 { namespace main { /** Global options variable */ CVC4_THREADLOCAL(Options*) pOptions; /** Full argv[0] */ const char *progPath; /** Just the basename component of argv[0] */ const std::string *progName; /** A pointer to the CommandExecutor (the signal handlers need it) */ CVC4::main::CommandExecutor* pExecutor = NULL; /** A pointer to the totalTime driver stat (the signal handlers need it) */ CVC4::TimerStat* pTotalTime = NULL; }/* CVC4::main namespace */ }/* CVC4 namespace */ void printUsage(Options& opts, bool full) { stringstream ss; ss << "usage: " << opts.getBinaryName() << " [options] [input-file]" << endl << endl << "Without an input file, or with `-', CVC4 reads from standard input." << endl << endl << "CVC4 options:" << endl; if(full) { Options::printUsage( ss.str(), *(opts.getOut()) ); } else { Options::printShortUsage( ss.str(), *(opts.getOut()) ); } } int runCvc4(int argc, char* argv[], Options& opts) { // Timer statistic pTotalTime = new TimerStat("totalTime"); pTotalTime->start(); // For the signal handlers' benefit pOptions = &opts; // Initialize the signal handlers cvc4_init(); progPath = argv[0]; // Parse the options vector filenames = Options::parseOptions(&opts, argc, argv); # ifndef PORTFOLIO_BUILD if( opts.wasSetByUserThreads() || opts.wasSetByUserThreadStackSize() || (! opts.getThreadArgv().empty()) ) { throw OptionException("Thread options cannot be used with sequential CVC4. Please build and use the portfolio binary `pcvc4'."); } # endif string progNameStr = opts.getBinaryName(); progName = &progNameStr; if( opts.getHelp() ) { printUsage(opts, true); exit(1); } else if( opts.getLanguageHelp() ) { Options::printLanguageHelp(*(opts.getOut())); exit(1); } else if( opts.getVersion() ) { *(opts.getOut()) << Configuration::about().c_str() << flush; exit(0); } segvSpin = opts.getSegvSpin(); // If in competition mode, set output stream option to flush immediately #ifdef CVC4_COMPETITION_MODE *(opts.getOut()) << unitbuf; #endif /* CVC4_COMPETITION_MODE */ // We only accept one input file if(filenames.size() > 1) { throw Exception("Too many input files specified."); } // If no file supplied we will read from standard input const bool inputFromStdin = filenames.empty() || filenames[0] == "-"; // if we're reading from stdin on a TTY, default to interactive mode if(!opts.wasSetByUserInteractive()) { opts.setInteractive(inputFromStdin && isatty(fileno(stdin))); } // Auto-detect input language by filename extension std::string filenameStr(""); if (!inputFromStdin) { // Use swap to avoid copying the string // TODO: use std::move() when switching to c++11 filenameStr.swap(filenames[0]); } const char* filename = filenameStr.c_str(); if(opts.getInputLanguage() == language::input::LANG_AUTO) { if( inputFromStdin ) { // We can't do any fancy detection on stdin opts.setInputLanguage(language::input::LANG_CVC4); } else { unsigned len = filenameStr.size(); if(len >= 5 && !strcmp(".smt2", filename + len - 5)) { opts.setInputLanguage(language::input::LANG_SMTLIB_V2_5); } else if(len >= 4 && !strcmp(".smt", filename + len - 4)) { opts.setInputLanguage(language::input::LANG_SMTLIB_V1); } else if(len >= 5 && !strcmp(".smt1", filename + len - 5)) { opts.setInputLanguage(language::input::LANG_SMTLIB_V1); } else if((len >= 2 && !strcmp(".p", filename + len - 2)) || (len >= 5 && !strcmp(".tptp", filename + len - 5))) { opts.setInputLanguage(language::input::LANG_TPTP); } else if(( len >= 4 && !strcmp(".cvc", filename + len - 4) ) || ( len >= 5 && !strcmp(".cvc4", filename + len - 5) )) { opts.setInputLanguage(language::input::LANG_CVC4); } else if((len >= 3 && !strcmp(".sy", filename + len - 3)) || (len >= 3 && !strcmp(".sl", filename + len - 3))) { opts.setInputLanguage(language::input::LANG_SYGUS); //since there is no sygus output language, set this to SMT lib 2 //opts.setOutputLanguage(language::output::LANG_SMTLIB_V2_0); } } } if(opts.getOutputLanguage() == language::output::LANG_AUTO) { opts.setOutputLanguage(language::toOutputLanguage(opts.getInputLanguage())); } // if doing sygus, turn on CEGQI by default if(opts.getInputLanguage() == language::input::LANG_SYGUS ){ if( !opts.wasSetByUserCeGuidedInst()) { opts.setCeGuidedInst(true); } if( !opts.wasSetByUserDumpSynth()) { opts.setDumpSynth(true); } } // Determine which messages to show based on smtcomp_mode and verbosity if(Configuration::isMuzzledBuild()) { DebugChannel.setStream(&CVC4::null_os); TraceChannel.setStream(&CVC4::null_os); NoticeChannel.setStream(&CVC4::null_os); ChatChannel.setStream(&CVC4::null_os); MessageChannel.setStream(&CVC4::null_os); WarningChannel.setStream(&CVC4::null_os); } // important even for muzzled builds (to get result output right) (*(opts.getOut())) << language::SetLanguage(opts.getOutputLanguage()); // Create the expression manager using appropriate options ExprManager* exprMgr; # ifndef PORTFOLIO_BUILD exprMgr = new ExprManager(opts); pExecutor = new CommandExecutor(*exprMgr, opts); # else OptionsList threadOpts; parseThreadSpecificOptions(threadOpts, opts); bool useParallelExecutor = true; // incremental? if(opts.wasSetByUserIncrementalSolving() && opts.getIncrementalSolving() && (! opts.getIncrementalParallel()) ) { Notice() << "Notice: In --incremental mode, using the sequential solver" << " unless forced by...\n" << "Notice: ...the experimental --incremental-parallel option.\n"; useParallelExecutor = false; } // proofs? if(opts.getCheckProofs()) { if(opts.getFallbackSequential()) { Warning() << "Warning: Falling back to sequential mode, as cannot run" << " portfolio in check-proofs mode.\n"; useParallelExecutor = false; } else { throw OptionException("Cannot run portfolio in check-proofs mode."); } } // pick appropriate one if(useParallelExecutor) { exprMgr = new ExprManager(threadOpts[0]); pExecutor = new CommandExecutorPortfolio(*exprMgr, opts, threadOpts); } else { exprMgr = new ExprManager(opts); pExecutor = new CommandExecutor(*exprMgr, opts); } # endif PtrCloser replayParser; if( opts.getReplayInputFilename() != "" ) { std::string replayFilename = opts.getReplayInputFilename(); ParserBuilder replayParserBuilder(exprMgr, replayFilename, opts); if( replayFilename == "-") { if( inputFromStdin ) { throw OptionException("Replay file and input file can't both be stdin."); } replayParserBuilder.withStreamInput(cin); } replayParser.reset(replayParserBuilder.build()); pExecutor->setReplayStream(new Parser::ExprStream(replayParser.get())); } int returnValue = 0; { // Timer statistic RegisterStatistic statTotalTime(&pExecutor->getStatisticsRegistry(), pTotalTime); // Filename statistics ReferenceStat s_statFilename("filename", filenameStr); RegisterStatistic statFilenameReg(&pExecutor->getStatisticsRegistry(), &s_statFilename); // Parse and execute commands until we are done Command* cmd; bool status = true; if(opts.getInteractive() && inputFromStdin) { if(opts.getTearDownIncremental() > 0) { throw OptionException( "--tear-down-incremental doesn't work in interactive mode"); } #ifndef PORTFOLIO_BUILD if(!opts.wasSetByUserIncrementalSolving()) { cmd = new SetOptionCommand("incremental", SExpr(true)); cmd->setMuted(true); pExecutor->doCommand(cmd); delete cmd; } #endif /* PORTFOLIO_BUILD */ InteractiveShell shell(*exprMgr, opts); if(opts.getInteractivePrompt()) { Message() << Configuration::getPackageName() << " " << Configuration::getVersionString(); if(Configuration::isGitBuild()) { Message() << " [" << Configuration::getGitId() << "]"; } else if(Configuration::isSubversionBuild()) { Message() << " [" << Configuration::getSubversionId() << "]"; } Message() << (Configuration::isDebugBuild() ? " DEBUG" : "") << " assertions:" << (Configuration::isAssertionBuild() ? "on" : "off") << endl; } if(replayParser) { // have the replay parser use the declarations input interactively replayParser->useDeclarationsFrom(shell.getParser()); } while(true) { try { cmd = shell.readCommand(); } catch(UnsafeInterruptException& e) { (*opts.getOut()) << CommandInterrupted(); break; } if (cmd == NULL) break; status = pExecutor->doCommand(cmd) && status; if (cmd->interrupted()) { delete cmd; break; } delete cmd; } } else if( opts.getTearDownIncremental() > 0) { if(!opts.getIncrementalSolving() && opts.getTearDownIncremental() > 1) { // For tear-down-incremental values greater than 1, need incremental // on too. cmd = new SetOptionCommand("incremental", SExpr(true)); cmd->setMuted(true); pExecutor->doCommand(cmd); delete cmd; // if(opts.wasSetByUserIncrementalSolving()) { // throw OptionException( // "--tear-down-incremental incompatible with --incremental"); // } // cmd = new SetOptionCommand("incremental", SExpr(false)); // cmd->setMuted(true); // pExecutor->doCommand(cmd); // delete cmd; } ParserBuilder parserBuilder(exprMgr, filename, opts); if( inputFromStdin ) { #if defined(CVC4_COMPETITION_MODE) && !defined(CVC4_SMTCOMP_APPLICATION_TRACK) parserBuilder.withStreamInput(cin); #else /* CVC4_COMPETITION_MODE && !CVC4_SMTCOMP_APPLICATION_TRACK */ parserBuilder.withLineBufferedStreamInput(cin); #endif /* CVC4_COMPETITION_MODE && !CVC4_SMTCOMP_APPLICATION_TRACK */ } vector< vector > allCommands; allCommands.push_back(vector()); PtrCloser parser(parserBuilder.build()); if(replayParser) { // have the replay parser use the file's declarations replayParser->useDeclarationsFrom(parser.get()); } int needReset = 0; // true if one of the commands was interrupted bool interrupted = false; while (status || opts.getContinuedExecution()) { if (interrupted) { (*opts.getOut()) << CommandInterrupted(); break; } try { cmd = parser->nextCommand(); if (cmd == NULL) break; } catch (UnsafeInterruptException& e) { interrupted = true; continue; } if(dynamic_cast(cmd) != NULL) { if(needReset >= opts.getTearDownIncremental()) { pExecutor->reset(); for(size_t i = 0; i < allCommands.size() && !interrupted; ++i) { if (interrupted) break; for(size_t j = 0; j < allCommands[i].size() && !interrupted; ++j) { Command* cmd = allCommands[i][j]->clone(); cmd->setMuted(true); pExecutor->doCommand(cmd); if(cmd->interrupted()) { interrupted = true; } delete cmd; } } needReset = 0; } allCommands.push_back(vector()); Command* copy = cmd->clone(); allCommands.back().push_back(copy); status = pExecutor->doCommand(cmd); if(cmd->interrupted()) { interrupted = true; continue; } } else if(dynamic_cast(cmd) != NULL) { allCommands.pop_back(); // fixme leaks cmds here if (needReset >= opts.getTearDownIncremental()) { pExecutor->reset(); for(size_t i = 0; i < allCommands.size() && !interrupted; ++i) { for(size_t j = 0; j < allCommands[i].size() && !interrupted; ++j) { Command* cmd = allCommands[i][j]->clone(); cmd->setMuted(true); pExecutor->doCommand(cmd); if(cmd->interrupted()) { interrupted = true; } delete cmd; } } if (interrupted) continue; (*opts.getOut()) << CommandSuccess(); needReset = 0; } else { status = pExecutor->doCommand(cmd); if(cmd->interrupted()) { interrupted = true; continue; } } } else if(dynamic_cast(cmd) != NULL || dynamic_cast(cmd) != NULL) { if(needReset >= opts.getTearDownIncremental()) { pExecutor->reset(); for(size_t i = 0; i < allCommands.size() && !interrupted; ++i) { for(size_t j = 0; j < allCommands[i].size() && !interrupted; ++j) { Command* cmd = allCommands[i][j]->clone(); cmd->setMuted(true); pExecutor->doCommand(cmd); if(cmd->interrupted()) { interrupted = true; } delete cmd; } } needReset = 0; } else { ++needReset; } if (interrupted) { continue; } status = pExecutor->doCommand(cmd); if(cmd->interrupted()) { interrupted = true; continue; } } else if(dynamic_cast(cmd) != NULL) { pExecutor->doCommand(cmd); allCommands.clear(); allCommands.push_back(vector()); } else { // We shouldn't copy certain commands, because they can cause // an error on replay since there's no associated sat/unsat check // preceding them. if(dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL && dynamic_cast(cmd) == NULL) { Command* copy = cmd->clone(); allCommands.back().push_back(copy); } status = pExecutor->doCommand(cmd); if(cmd->interrupted()) { interrupted = true; continue; } if(dynamic_cast(cmd) != NULL) { delete cmd; break; } } delete cmd; } } else { if(!opts.wasSetByUserIncrementalSolving()) { cmd = new SetOptionCommand("incremental", SExpr(false)); cmd->setMuted(true); pExecutor->doCommand(cmd); delete cmd; } ParserBuilder parserBuilder(exprMgr, filename, opts); if( inputFromStdin ) { #if defined(CVC4_COMPETITION_MODE) && !defined(CVC4_SMTCOMP_APPLICATION_TRACK) parserBuilder.withStreamInput(cin); #else /* CVC4_COMPETITION_MODE && !CVC4_SMTCOMP_APPLICATION_TRACK */ parserBuilder.withLineBufferedStreamInput(cin); #endif /* CVC4_COMPETITION_MODE && !CVC4_SMTCOMP_APPLICATION_TRACK */ } PtrCloser parser(parserBuilder.build()); if(replayParser) { // have the replay parser use the file's declarations replayParser->useDeclarationsFrom(parser.get()); } bool interrupted = false; while(status || opts.getContinuedExecution()) { if (interrupted) { (*opts.getOut()) << CommandInterrupted(); pExecutor->reset(); break; } try { cmd = parser->nextCommand(); if (cmd == NULL) break; } catch (UnsafeInterruptException& e) { interrupted = true; continue; } status = pExecutor->doCommand(cmd); if (cmd->interrupted() && status == 0) { interrupted = true; break; } if(dynamic_cast(cmd) != NULL) { delete cmd; break; } delete cmd; } } Result result; if(status) { result = pExecutor->getResult(); returnValue = 0; } else { // there was some kind of error returnValue = 1; } #ifdef CVC4_COMPETITION_MODE opts.flushOut(); // exit, don't return (don't want destructors to run) // _exit() from unistd.h doesn't run global destructors // or other on_exit/atexit stuff. _exit(returnValue); #endif /* CVC4_COMPETITION_MODE */ ReferenceStat< Result > s_statSatResult("sat/unsat", result); RegisterStatistic statSatResultReg(&pExecutor->getStatisticsRegistry(), &s_statSatResult); pTotalTime->stop(); // Tim: I think that following comment is out of date? // Set the global executor pointer to NULL first. If we get a // signal while dumping statistics, we don't want to try again. pExecutor->flushOutputStreams(); #ifdef CVC4_DEBUG if(opts.getEarlyExit() && opts.wasSetByUserEarlyExit()) { _exit(returnValue); } #else /* CVC4_DEBUG */ if(opts.getEarlyExit()) { _exit(returnValue); } #endif /* CVC4_DEBUG */ } // On exceptional exit, these are leaked, but that's okay... they // need to be around in that case for main() to print statistics. delete pTotalTime; delete pExecutor; delete exprMgr; pTotalTime = NULL; pExecutor = NULL; cvc4_shutdown(); return returnValue; } cvc4-1.5/src/main/interactive_shell.cpp000066400000000000000000000312461313116454100201460ustar00rootroot00000000000000/********************* */ /*! \file interactive_shell.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Christopher L. Conway, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Interactive shell for CVC4 ** ** This file is the implementation for the CVC4 interactive shell. ** The shell supports the readline library. **/ #include "main/interactive_shell.h" #include #include #include #include #include #include #include #include #include //This must go before HAVE_LIBREADLINE. #include "cvc4autoconfig.h" #if HAVE_LIBREADLINE # include # include # if HAVE_EXT_STDIO_FILEBUF_H # include # endif /* HAVE_EXT_STDIO_FILEBUF_H */ #endif /* HAVE_LIBREADLINE */ #include "base/output.h" #include "options/language.h" #include "options/options.h" #include "parser/input.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "smt/command.h" #include "theory/logic_info.h" using namespace std; namespace CVC4 { using namespace parser; using namespace language; const string InteractiveShell::INPUT_FILENAME = ""; #if HAVE_LIBREADLINE #if HAVE_EXT_STDIO_FILEBUF_H using __gnu_cxx::stdio_filebuf; #endif /* HAVE_EXT_STDIO_FILEBUF_H */ char** commandCompletion(const char* text, int start, int end); char* commandGenerator(const char* text, int state); static const std::string cvc_commands[] = { #include "main/cvc_tokens.h" };/* cvc_commands */ static const std::string smt1_commands[] = { #include "main/smt1_tokens.h" };/* smt1_commands */ static const std::string smt2_commands[] = { #include "main/smt2_tokens.h" };/* smt2_commands */ static const std::string tptp_commands[] = { #include "main/tptp_tokens.h" };/* tptp_commands */ static const std::string* commandsBegin; static const std::string* commandsEnd; static set s_declarations; #endif /* HAVE_LIBREADLINE */ InteractiveShell::InteractiveShell(ExprManager& exprManager, const Options& options) : d_in(*options.getIn()), d_out(*options.getOutConst()), d_options(options), d_quit(false) { ParserBuilder parserBuilder(&exprManager, INPUT_FILENAME, options); /* Create parser with bogus input. */ d_parser = parserBuilder.withStringInput("").build(); if(d_options.wasSetByUserForceLogicString()) { LogicInfo tmp(d_options.getForceLogicString()); d_parser->forceLogic(tmp.getLogicString()); } #if HAVE_LIBREADLINE if(&d_in == &cin) { ::rl_readline_name = const_cast("CVC4"); #if READLINE_COMPENTRY_FUNC_RETURNS_CHARP ::rl_completion_entry_function = commandGenerator; #else /* READLINE_COMPENTRY_FUNC_RETURNS_CHARP */ ::rl_completion_entry_function = (int (*)(const char*, int)) commandGenerator; #endif /* READLINE_COMPENTRY_FUNC_RETURNS_CHARP */ ::using_history(); OutputLanguage lang = toOutputLanguage(d_options.getInputLanguage()); switch(lang) { case output::LANG_CVC4: d_historyFilename = string(getenv("HOME")) + "/.cvc4_history"; commandsBegin = cvc_commands; commandsEnd = cvc_commands + sizeof(cvc_commands) / sizeof(*cvc_commands); break; case output::LANG_SMTLIB_V1: d_historyFilename = string(getenv("HOME")) + "/.cvc4_history_smtlib1"; commandsBegin = smt1_commands; commandsEnd = smt1_commands + sizeof(smt1_commands) / sizeof(*smt1_commands); break; case output::LANG_SMTLIB_V2_0: case output::LANG_SMTLIB_V2_5: case output::LANG_SMTLIB_V2_6: d_historyFilename = string(getenv("HOME")) + "/.cvc4_history_smtlib2"; commandsBegin = smt2_commands; commandsEnd = smt2_commands + sizeof(smt2_commands) / sizeof(*smt2_commands); break; case output::LANG_TPTP: d_historyFilename = string(getenv("HOME")) + "/.cvc4_history_tptp"; commandsBegin = tptp_commands; commandsEnd = tptp_commands + sizeof(tptp_commands) / sizeof(*tptp_commands); break; default: std::stringstream ss; ss << "internal error: unhandled language " << lang; throw Exception(ss.str()); } d_usingReadline = true; int err = ::read_history(d_historyFilename.c_str()); ::stifle_history(s_historyLimit); if(Notice.isOn()) { if(err == 0) { Notice() << "Read " << ::history_length << " lines of history from " << d_historyFilename << std::endl; } else { Notice() << "Could not read history from " << d_historyFilename << ": " << strerror(err) << std::endl; } } } else { d_usingReadline = false; } #else /* HAVE_LIBREADLINE */ d_usingReadline = false; #endif /* HAVE_LIBREADLINE */ }/* InteractiveShell::InteractiveShell() */ InteractiveShell::~InteractiveShell() { #if HAVE_LIBREADLINE int err = ::write_history(d_historyFilename.c_str()); if(err == 0) { Notice() << "Wrote " << ::history_length << " lines of history to " << d_historyFilename << std::endl; } else { Notice() << "Could not write history to " << d_historyFilename << ": " << strerror(err) << std::endl; } #endif /* HAVE_LIBREADLINE */ delete d_parser; } Command* InteractiveShell::readCommand() throw (UnsafeInterruptException) { char* lineBuf = NULL; string line = ""; restart: /* Don't do anything if the input is closed or if we've seen a * QuitCommand. */ if(d_in.eof() || d_quit) { d_out << endl; return NULL; } /* If something's wrong with the input, there's nothing we can do. */ if( !d_in.good() ) { throw ParserException("Interactive input broken."); } /* Prompt the user for input. */ if(d_usingReadline) { #if HAVE_LIBREADLINE lineBuf = ::readline(d_options.getInteractivePrompt() ? (line == "" ? "CVC4> " : "... > ") : ""); if(lineBuf != NULL && lineBuf[0] != '\0') { ::add_history(lineBuf); } line += lineBuf == NULL ? "" : lineBuf; free(lineBuf); #endif /* HAVE_LIBREADLINE */ } else { if(d_options.getInteractivePrompt()) { if(line == "") { d_out << "CVC4> " << flush; } else { d_out << "... > " << flush; } } /* Read a line */ stringbuf sb; d_in.get(sb); line += sb.str(); } string input = ""; while(true) { Debug("interactive") << "Input now '" << input << line << "'" << endl << flush; assert( !(d_in.fail() && !d_in.eof()) || line.empty() ); /* Check for failure. */ if(d_in.fail() && !d_in.eof()) { /* This should only happen if the input line was empty. */ assert( line.empty() ); d_in.clear(); } /* Strip trailing whitespace. */ int n = line.length() - 1; while( !line.empty() && isspace(line[n]) ) { line.erase(n,1); n--; } /* If we hit EOF, we're done. */ if( (!d_usingReadline && d_in.eof()) || (d_usingReadline && lineBuf == NULL) ) { input += line; if(input.empty()) { /* Nothing left to parse. */ d_out << endl; return NULL; } /* Some input left to parse, but nothing left to read. Jump out of input loop. */ d_out << endl; input = line = ""; d_in.clear(); goto restart; } if(!d_usingReadline) { /* Extract the newline delimiter from the stream too */ int c CVC4_UNUSED = d_in.get(); assert(c == '\n'); Debug("interactive") << "Next char is '" << (char)c << "'" << endl << flush; } input += line; /* If the last char was a backslash, continue on the next line. */ n = input.length() - 1; if( !line.empty() && input[n] == '\\' ) { input[n] = '\n'; if(d_usingReadline) { #if HAVE_LIBREADLINE lineBuf = ::readline(d_options.getInteractivePrompt() ? "... > " : ""); if(lineBuf != NULL && lineBuf[0] != '\0') { ::add_history(lineBuf); } line = lineBuf == NULL ? "" : lineBuf; free(lineBuf); #endif /* HAVE_LIBREADLINE */ } else { if(d_options.getInteractivePrompt()) { d_out << "... > " << flush; } /* Read a line */ stringbuf sb; d_in.get(sb); line = sb.str(); } } else { /* No continuation, we're done. */ Debug("interactive") << "Leaving input loop." << endl << flush; break; } } d_parser->setInput(Input::newStringInput(d_options.getInputLanguage(), input, INPUT_FILENAME)); /* There may be more than one command in the input. Build up a sequence. */ CommandSequence *cmd_seq = new CommandSequence(); Command *cmd; try { while( (cmd = d_parser->nextCommand()) ) { cmd_seq->addCommand(cmd); if(dynamic_cast(cmd) != NULL) { d_quit = true; break; } else { #if HAVE_LIBREADLINE if(dynamic_cast(cmd) != NULL) { s_declarations.insert(dynamic_cast(cmd)->getSymbol()); } else if(dynamic_cast(cmd) != NULL) { s_declarations.insert(dynamic_cast(cmd)->getSymbol()); } else if(dynamic_cast(cmd) != NULL) { s_declarations.insert(dynamic_cast(cmd)->getSymbol()); } else if(dynamic_cast(cmd) != NULL) { s_declarations.insert(dynamic_cast(cmd)->getSymbol()); } #endif /* HAVE_LIBREADLINE */ } } } catch(ParserEndOfFileException& pe) { line += "\n"; goto restart; } catch(ParserException& pe) { if(d_options.getOutputLanguage() == output::LANG_SMTLIB_V2_0 || d_options.getOutputLanguage() == output::LANG_SMTLIB_V2_5 || d_options.getOutputLanguage() == output::LANG_SMTLIB_V2_6) { d_out << "(error \"" << pe << "\")" << endl; } else { d_out << pe << endl; } // We can't really clear out the sequence and abort the current line, // because the parse error might be for the second command on the // line. The first ones haven't yet been executed by the SmtEngine, // but the parser state has already made the variables and the mappings // in the symbol table. So unfortunately, either we exit CVC4 entirely, // or we commit to the current line up to the command with the parse // error. // // FIXME: does that mean e.g. that a pushed LET scope might not yet have // been popped?! // //delete cmd_seq; //cmd_seq = new CommandSequence(); } return cmd_seq; }/* InteractiveShell::readCommand() */ #if HAVE_LIBREADLINE char** commandCompletion(const char* text, int start, int end) { Debug("rl") << "text: " << text << endl; Debug("rl") << "start: " << start << " end: " << end << endl; return rl_completion_matches(text, commandGenerator); } // Our peculiar versions of "less than" for strings struct StringPrefix1Less { bool operator()(const std::string& s1, const std::string& s2) { size_t l1 = s1.length(), l2 = s2.length(); size_t l = l1 <= l2 ? l1 : l2; return s1.compare(0, l1, s2, 0, l) < 0; } };/* struct StringPrefix1Less */ struct StringPrefix2Less { bool operator()(const std::string& s1, const std::string& s2) { size_t l1 = s1.length(), l2 = s2.length(); size_t l = l1 <= l2 ? l1 : l2; return s1.compare(0, l, s2, 0, l2) < 0; } };/* struct StringPrefix2Less */ char* commandGenerator(const char* text, int state) { static CVC4_THREADLOCAL(const std::string*) rlCommand; static CVC4_THREADLOCAL(set::const_iterator*) rlDeclaration; const std::string* i = lower_bound(commandsBegin, commandsEnd, text, StringPrefix2Less()); const std::string* j = upper_bound(commandsBegin, commandsEnd, text, StringPrefix1Less()); set::const_iterator ii = lower_bound(s_declarations.begin(), s_declarations.end(), text, StringPrefix2Less()); set::const_iterator jj = upper_bound(s_declarations.begin(), s_declarations.end(), text, StringPrefix1Less()); if(rlDeclaration == NULL) { rlDeclaration = new set::const_iterator(); } if(state == 0) { rlCommand = i; *rlDeclaration = ii; } if(rlCommand != j) { return strdup((*rlCommand++).c_str()); } return *rlDeclaration == jj ? NULL : strdup((*(*rlDeclaration)++).c_str()); } #endif /* HAVE_LIBREADLINE */ }/* CVC4 namespace */ cvc4-1.5/src/main/interactive_shell.h000066400000000000000000000034071313116454100176110ustar00rootroot00000000000000/********************* */ /*! \file interactive_shell.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Christopher L. Conway, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Interactive shell for CVC4 **/ #ifndef __CVC4__INTERACTIVE_SHELL_H #define __CVC4__INTERACTIVE_SHELL_H #include #include #include "options/language.h" #include "options/options.h" #include "util/unsafe_interrupt_exception.h" namespace CVC4 { class Command; class ExprManager; class Options; namespace parser { class Parser; }/* CVC4::parser namespace */ class CVC4_PUBLIC InteractiveShell { std::istream& d_in; std::ostream& d_out; parser::Parser* d_parser; const Options& d_options; bool d_quit; bool d_usingReadline; std::string d_historyFilename; static const std::string INPUT_FILENAME; static const unsigned s_historyLimit = 500; public: InteractiveShell(ExprManager& exprManager, const Options& options); /** * Close out the interactive session. */ ~InteractiveShell(); /** * Read a command from the interactive shell. This will read as * many lines as necessary to parse a well-formed command. */ Command* readCommand() throw (UnsafeInterruptException); /** * Return the internal parser being used. */ parser::Parser* getParser() { return d_parser; } };/* class InteractiveShell */ }/* CVC4 namespace */ #endif /* __CVC4__INTERACTIVE_SHELL_H */ cvc4-1.5/src/main/main.cpp000066400000000000000000000047421313116454100153670ustar00rootroot00000000000000/********************* */ /*! \file main.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Christopher L. Conway ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Main driver for CVC4 executable ** ** Main driver for CVC4 executable. **/ #include "main/main.h" #include #include #include #include #include #include #include "base/configuration.h" #include "base/output.h" #include "expr/expr_manager.h" #include "main/command_executor.h" #include "main/interactive_shell.h" #include "options/language.h" #include "options/options.h" #include "parser/parser.h" #include "parser/parser_builder.h" #include "parser/parser_exception.h" #include "smt/command.h" #include "smt/smt_engine.h" #include "util/result.h" #include "util/statistics.h" using namespace std; using namespace CVC4; using namespace CVC4::main; using namespace CVC4::language; /** * CVC4's main() routine is just an exception-safe wrapper around CVC4. * Please don't construct anything here. Even if the constructor is * inside the try { }, an exception during destruction can cause * problems. That's why main() wraps runCvc4() in the first place. * Put everything in runCvc4(). */ int main(int argc, char* argv[]) { Options opts; try { return runCvc4(argc, argv, opts); } catch(OptionException& e) { #ifdef CVC4_COMPETITION_MODE *opts.getOut() << "unknown" << endl; #endif cerr << "CVC4 Error:" << endl << e << endl << endl << "Please use --help to get help on command-line options." << endl; } catch(Exception& e) { #ifdef CVC4_COMPETITION_MODE *opts.getOut() << "unknown" << endl; #endif if(opts.getOutputLanguage() == output::LANG_SMTLIB_V2_0 || opts.getOutputLanguage() == output::LANG_SMTLIB_V2_5 || opts.getOutputLanguage() == output::LANG_SMTLIB_V2_6) { *opts.getOut() << "(error \"" << e << "\")" << endl; } else { *opts.getErr() << "CVC4 Error:" << endl << e << endl; } if(opts.getStatistics() && pExecutor != NULL) { pTotalTime->stop(); pExecutor->flushStatistics(*opts.getErr()); } } exit(1); } cvc4-1.5/src/main/main.h000066400000000000000000000040101313116454100150200ustar00rootroot00000000000000/********************* */ /*! \file main.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Header for main CVC4 driver ** ** Header for main CVC4 driver. **/ #include #include #include "base/exception.h" #include "base/tls.h" #include "cvc4autoconfig.h" #include "expr/expr_manager.h" #include "options/options.h" #include "smt/smt_engine.h" #include "util/statistics.h" #include "util/statistics_registry.h" #ifndef __CVC4__MAIN__MAIN_H #define __CVC4__MAIN__MAIN_H namespace CVC4 { namespace main { class CommandExecutor; /** Full argv[0] */ extern const char* progPath; /** Just the basename component of argv[0] */ extern const std::string* progName; /** A reference for use by the signal handlers to print statistics */ extern CVC4::main::CommandExecutor* pExecutor; /** A reference for use by the signal handlers to print statistics */ extern CVC4::TimerStat* pTotalTime; /** * If true, will not spin on segfault even when CVC4_DEBUG is on. * Useful for nightly regressions, noninteractive performance runs * etc. See util.cpp. */ extern bool segvSpin; /** A pointer to the options in play */ extern CVC4_THREADLOCAL(Options*) pOptions; /** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. */ void cvc4_init() throw(Exception); /** Shutdown the driver. Frees memory for the signal handlers. */ void cvc4_shutdown() throw(); }/* CVC4::main namespace */ }/* CVC4 namespace */ /** Actual Cvc4 driver functions **/ int runCvc4(int argc, char* argv[], CVC4::Options&); void printUsage(CVC4::Options&, bool full = false); #endif /* __CVC4__MAIN__MAIN_H */ cvc4-1.5/src/main/portfolio.cpp000066400000000000000000000104211313116454100164470ustar00rootroot00000000000000/********************* */ /*! \file portfolio.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Kshitij Bansal, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Provides (somewhat) generic functionality to simulate a ** (potentially cooperative) race **/ #include #include #include #include #include #include "base/output.h" #include "options/options.h" #include "smt/smt_engine.h" #include "util/result.h" #include "util/statistics_registry.h" namespace CVC4 { /** Mutex to make sure at most one thread is winner */ boost::mutex mutex_done; /** Mutex / condition variable to notify main when winner data written */ boost::mutex mutex_main_wait; boost::condition_variable condition_var_main_wait; bool global_flag_done; int global_winner; template void runThread(int thread_id, boost::function threadFn, S& returnValue) { /* Uncomment line to delay first thread, useful to unearth errors/debug */ // if(thread_id == 0) { sleep(1); } returnValue = threadFn(); if( mutex_done.try_lock() ) { if(global_flag_done == false) { { boost::lock_guard lock(mutex_main_wait); global_winner = thread_id; global_flag_done = true; } condition_var_main_wait.notify_all(); // we want main thread to quit } mutex_done.unlock(); } } template std::pair runPortfolio(int numThreads, boost::function driverFn, boost::function threadFns[], size_t stackSize, bool optionWaitToJoin, TimerStat& statWaitTime) { boost::thread thread_driver; boost::thread* threads = new boost::thread[numThreads]; S* threads_returnValue = new S[numThreads]; global_flag_done = false; global_winner = -1; for(int t = 0; t < numThreads; ++t) { #if BOOST_HAS_THREAD_ATTR boost::thread::attributes attrs; if(stackSize > 0) { attrs.set_stack_size(stackSize); } threads[t] = boost::thread(attrs, boost::bind(runThread, t, threadFns[t], boost::ref(threads_returnValue[t]) ) ); #else /* BOOST_HAS_THREAD_ATTR */ if(stackSize > 0) { throw OptionException("cannot specify a stack size for worker threads; requires CVC4 to be built with Boost thread library >= 1.50.0"); } threads[t] = boost::thread(boost::bind(runThread, t, threadFns[t], boost::ref(threads_returnValue[t]) ) ); #endif /* BOOST_HAS_THREAD_ATTR */ #if defined(BOOST_THREAD_PLATFORM_PTHREAD) if(Chat.isOn()) { void *stackaddr; size_t stacksize; pthread_attr_t attr; pthread_getattr_np(threads[t].native_handle(), &attr); pthread_attr_getstack(&attr, &stackaddr, &stacksize); Chat() << "Created worker thread " << t << " with stack size " << stacksize << std::endl; } #endif } if(not driverFn.empty()) thread_driver = boost::thread(driverFn); boost::unique_lock lock(mutex_main_wait); while(global_flag_done == false) { condition_var_main_wait.wait(lock); } statWaitTime.start(); if(not driverFn.empty()) { thread_driver.interrupt(); thread_driver.join(); } for(int t = 0; t < numThreads; ++t) { if(optionWaitToJoin) { threads[t].join(); } } std::pair retval(global_winner, threads_returnValue[global_winner]); delete[] threads; delete[] threads_returnValue; return retval; } // instantiation template std::pair runPortfolio(int, boost::function, boost::function*, size_t, bool, TimerStat&); }/* CVC4 namespace */ cvc4-1.5/src/main/portfolio.h000066400000000000000000000026021313116454100161160ustar00rootroot00000000000000/********************* */ /*! \file portfolio.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Kshitij Bansal ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Provides (somewhat) generic functionality to simulate a ** (potentially cooperative) race **/ #ifndef __CVC4__PORTFOLIO_H #define __CVC4__PORTFOLIO_H #include #include #include "options/options.h" #include "smt/command.h" #include "smt/smt_engine.h" #include "util/statistics_registry.h" namespace CVC4 { template std::pair runPortfolio(int numThreads, boost::function driverFn, boost::function threadFns[], size_t stackSize, bool optionWaitToJoin, TimerStat& statWaitTime); // as we have defined things, S=void would give compile errors // do we want to fix this? yes, no, maybe? }/* CVC4 namespace */ #endif /* __CVC4__PORTFOLIO_H */ cvc4-1.5/src/main/portfolio_util.cpp000066400000000000000000000110511313116454100175040ustar00rootroot00000000000000/********************* */ /*! \file portfolio_util.cpp ** \verbatim ** Top contributors (to current version): ** Tim King, Kshitij Bansal ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Code relevant only for portfolio builds **/ #include "main/portfolio_util.h" #include #include #include #include "options/options.h" using namespace std; namespace CVC4 { OptionsList::OptionsList() : d_options() {} OptionsList::~OptionsList(){ for(std::vector::iterator i = d_options.begin(), iend = d_options.end(); i != iend; ++i) { Options* current = *i; delete current; } d_options.clear(); } void OptionsList::push_back_copy(const Options& opts) { Options* copy = new Options; copy->copyValues(opts); d_options.push_back(copy); } Options& OptionsList::operator[](size_t position){ return *(d_options[position]); } const Options& OptionsList::operator[](size_t position) const { return *(d_options[position]); } Options& OptionsList::back() { return *(d_options.back()); } size_t OptionsList::size() const { return d_options.size(); } void parseThreadSpecificOptions(OptionsList& threadOptions, const Options& opts) { unsigned numThreads = opts.getThreads(); for(unsigned i = 0; i < numThreads; ++i) { threadOptions.push_back_copy(opts); Options& tOpts = threadOptions.back(); // Set thread identifier tOpts.setThreadId(i); const std::vector& optThreadArgvs = opts.getThreadArgv(); if(i < optThreadArgvs.size() && (! optThreadArgvs[i].empty())) { // separate out the thread's individual configuration string stringstream optidss; optidss << "--thread" << i; string optid = optidss.str(); int targc = 1; char* tbuf = strdup(optThreadArgvs[i].c_str()); char* p = tbuf; // string length is certainly an upper bound on size needed char** targv = new char*[optThreadArgvs[i].size()]; char** vp = targv; *vp++ = strdup(optid.c_str()); p = strtok(p, " "); while(p != NULL) { *vp++ = p; ++targc; p = strtok(NULL, " "); } *vp++ = NULL; if(targc > 1) { // this is necessary in case you do e.g. --thread0=" " try { Options::parseOptions(&tOpts, targc, targv); } catch(OptionException& e) { stringstream ss; ss << optid << ": " << e.getMessage(); throw OptionException(ss.str()); } if(tOpts.getThreads() != numThreads || tOpts.getThreadArgv() != opts.getThreadArgv()) { stringstream ss; ss << "not allowed to set thread options in " << optid << " !"; throw OptionException(ss.str()); } } free(targv[0]); delete [] targv; free(tbuf); } } assert(numThreads >= 1); //do we need this? } void PortfolioLemmaOutputChannel::notifyNewLemma(Expr lemma) { if(int(lemma.getNumChildren()) > Options::currentGetSharingFilterByLength()) { return; } ++cnt; Trace("sharing") << d_tag << ": " << lemma << std::endl; expr::pickle::Pickle pkl; try { d_pickler.toPickle(lemma, pkl); d_sharedChannel->push(pkl); if(Trace.isOn("showSharing") && Options::currentGetThreadId() == 0) { (*(Options::currentGetOut())) << "thread #0: notifyNewLemma: " << lemma << std::endl; } } catch(expr::pickle::PicklingException& p){ Trace("sharing::blocked") << lemma << std::endl; } } PortfolioLemmaInputChannel::PortfolioLemmaInputChannel(std::string tag, SharedChannel* c, ExprManager* em, VarMap& to, VarMap& from) : d_tag(tag), d_sharedChannel(c), d_pickler(em, to, from) {} bool PortfolioLemmaInputChannel::hasNewLemma(){ Debug("lemmaInputChannel") << d_tag << ": " << "hasNewLemma" << std::endl; return !d_sharedChannel->empty(); } Expr PortfolioLemmaInputChannel::getNewLemma() { Debug("lemmaInputChannel") << d_tag << ": " << "getNewLemma" << std::endl; expr::pickle::Pickle pkl = d_sharedChannel->pop(); Expr e = d_pickler.fromPickle(pkl); if(Trace.isOn("showSharing") && Options::currentGetThreadId() == 0) { (*Options::currentGetOut()) << "thread #0: getNewLemma: " << e << std::endl; } return e; } }/*CVC4 namespace */ cvc4-1.5/src/main/portfolio_util.h000066400000000000000000000123601313116454100171550ustar00rootroot00000000000000/********************* */ /*! \file portfolio_util.h ** \verbatim ** Top contributors (to current version): ** Kshitij Bansal, Tim King, Morgan Deters ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Code relevant only for portfolio builds **/ #ifndef __CVC4__PORTFOLIO_UTIL_H #define __CVC4__PORTFOLIO_UTIL_H #include #include "base/output.h" #include "expr/pickler.h" #include "smt/smt_engine.h" #include "smt_util/lemma_input_channel.h" #include "smt_util/lemma_output_channel.h" #include "util/channel.h" namespace CVC4 { typedef expr::pickle::Pickle ChannelFormat; class PortfolioLemmaOutputChannel : public LemmaOutputChannel { private: std::string d_tag; SharedChannel* d_sharedChannel; expr::pickle::MapPickler d_pickler; public: int cnt; PortfolioLemmaOutputChannel(std::string tag, SharedChannel *c, ExprManager* em, VarMap& to, VarMap& from) : d_tag(tag), d_sharedChannel(c), d_pickler(em, to, from), cnt(0) {} ~PortfolioLemmaOutputChannel() throw() { } void notifyNewLemma(Expr lemma); };/* class PortfolioLemmaOutputChannel */ class PortfolioLemmaInputChannel : public LemmaInputChannel { private: std::string d_tag; SharedChannel* d_sharedChannel; expr::pickle::MapPickler d_pickler; public: PortfolioLemmaInputChannel(std::string tag, SharedChannel* c, ExprManager* em, VarMap& to, VarMap& from); ~PortfolioLemmaInputChannel() throw() { } bool hasNewLemma(); Expr getNewLemma(); };/* class PortfolioLemmaInputChannel */ class OptionsList { public: OptionsList(); ~OptionsList(); void push_back_copy(const Options& options); Options& operator[](size_t position); const Options& operator[](size_t position) const; Options& back(); size_t size() const; private: OptionsList(const OptionsList&) CVC4_UNDEFINED; OptionsList& operator=(const OptionsList&) CVC4_UNDEFINED; std::vector d_options; }; void parseThreadSpecificOptions(OptionsList& list, const Options& opts); template void sharingManager(unsigned numThreads, SharedChannel *channelsOut[], // out and in with respect SharedChannel *channelsIn[], SmtEngine *smts[]) // to smt engines { Trace("sharing") << "sharing: thread started " << std::endl; std::vector cnt(numThreads); // Debug("sharing") std::vector< std::queue > queues; for(unsigned i = 0; i < numThreads; ++i){ queues.push_back(std::queue()); } const unsigned int sharingBroadcastInterval = 1; boost::mutex mutex_activity; /* Disable interruption, so that we can check manually */ boost::this_thread::disable_interruption di; while(not boost::this_thread::interruption_requested()) { boost::this_thread::sleep (boost::posix_time::milliseconds(sharingBroadcastInterval)); for(unsigned t = 0; t < numThreads; ++t) { /* No activity on this channel */ if(channelsOut[t]->empty()) continue; /* Alert if channel full, so that we increase sharingChannelSize or decrease sharingBroadcastInterval */ assert(not channelsOut[t]->full()); T data = channelsOut[t]->pop(); if(Trace.isOn("sharing")) { ++cnt[t]; Trace("sharing") << "sharing: Got data. Thread #" << t << ". Chunk " << cnt[t] << std::endl; } for(unsigned u = 0; u < numThreads; ++u) { if(u != t){ Trace("sharing") << "sharing: adding to queue " << u << std::endl; queues[u].push(data); } }/* end of inner for: broadcast activity */ } /* end of outer for: look for activity */ for(unsigned t = 0; t < numThreads; ++t){ /* Alert if channel full, so that we increase sharingChannelSize or decrease sharingBroadcastInterval */ assert(not channelsIn[t]->full()); while(!queues[t].empty() && !channelsIn[t]->full()){ Trace("sharing") << "sharing: pushing on channel " << t << std::endl; T data = queues[t].front(); channelsIn[t]->push(data); queues[t].pop(); } } } /* end of infinite while */ Trace("interrupt") << "sharing thread interrupted, interrupting all smtEngines" << std::endl; for(unsigned t = 0; t < numThreads; ++t) { Trace("interrupt") << "Interrupting thread #" << t << std::endl; try{ smts[t]->interrupt(); }catch(ModalException &e){ // It's fine, the thread is probably not there. Trace("interrupt") << "Could not interrupt thread #" << t << std::endl; } } Trace("sharing") << "sharing: Interrupted, exiting." << std::endl; }/* sharingManager() */ }/* CVC4 namespace */ #endif /* __CVC4__PORTFOLIO_UTIL_H */ cvc4-1.5/src/main/util.cpp000066400000000000000000000243501313116454100154150ustar00rootroot00000000000000/********************* */ /*! \file util.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Andres Noetzli, Clément Pit-Claudel ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Utilities for the main driver. ** ** Utilities for the main driver. ** ** It is important to only call async-signal-safe functions from signal ** handlers. See: http://man7.org/linux/man-pages/man7/signal-safety.7.html for ** a list of async-signal-safe POSIX.1 functions. **/ #include #include #include #include #include #ifndef __WIN32__ #include #include #include #endif /* __WIN32__ */ #include "base/exception.h" #include "base/tls.h" #include "cvc4autoconfig.h" #include "main/command_executor.h" #include "main/main.h" #include "options/options.h" #include "smt/smt_engine.h" #include "util/safe_print.h" #include "util/statistics.h" using CVC4::Exception; using namespace std; namespace CVC4 { namespace main { /** * If true, will not spin on segfault even when CVC4_DEBUG is on. * Useful for nightly regressions, noninteractive performance runs * etc. */ bool segvSpin = false; void print_statistics() { if (pOptions != NULL && pOptions->getStatistics() && pExecutor != NULL) { if (pTotalTime != NULL && pTotalTime->running()) { pTotalTime->stop(); } pExecutor->safeFlushStatistics(STDERR_FILENO); } } #ifndef __WIN32__ #ifdef HAVE_SIGALTSTACK size_t cvc4StackSize; void* cvc4StackBase; #endif /* HAVE_SIGALTSTACK */ /** Handler for SIGXCPU, i.e., timeout. */ void timeout_handler(int sig, siginfo_t* info, void*) { safe_print(STDERR_FILENO, "CVC4 interrupted by timeout.\n"); print_statistics(); abort(); } /** Handler for SIGINT, i.e., when the user hits control C. */ void sigint_handler(int sig, siginfo_t* info, void*) { safe_print(STDERR_FILENO, "CVC4 interrupted by user.\n"); print_statistics(); abort(); } #ifdef HAVE_SIGALTSTACK /** Handler for SIGSEGV (segfault). */ void segv_handler(int sig, siginfo_t* info, void* c) { uintptr_t extent = reinterpret_cast(cvc4StackBase) - cvc4StackSize; uintptr_t addr = reinterpret_cast(info->si_addr); #ifdef CVC4_DEBUG safe_print(STDERR_FILENO, "CVC4 suffered a segfault in DEBUG mode.\n"); safe_print(STDERR_FILENO, "Offending address is "); safe_print(STDERR_FILENO, info->si_addr); safe_print(STDERR_FILENO, "\n"); //cerr << "base is " << (void*)cvc4StackBase << endl; //cerr << "size is " << cvc4StackSize << endl; //cerr << "extent is " << (void*)extent << endl; if(addr >= extent && addr <= extent + 10*1024) { safe_print(STDERR_FILENO, "Looks like this is likely due to stack overflow.\n"); safe_print(STDERR_FILENO, "You might consider increasing the limit with `ulimit -s' or " "equivalent.\n"); } else if(addr < 10*1024) { safe_print(STDERR_FILENO, "Looks like a NULL pointer was dereferenced.\n"); } if(!segvSpin) { print_statistics(); abort(); } else { safe_print(STDERR_FILENO, "Spinning so that a debugger can be connected.\n"); safe_print(STDERR_FILENO, "Try: gdb "); safe_print(STDERR_FILENO, *progName); safe_print(STDERR_FILENO, " "); safe_print(STDERR_FILENO, getpid()); safe_print(STDERR_FILENO, "\n"); safe_print(STDERR_FILENO, " or: gdb --pid="); safe_print(STDERR_FILENO, getpid()); safe_print(STDERR_FILENO, " "); safe_print(STDERR_FILENO, *progName); safe_print(STDERR_FILENO, "\n"); for(;;) { sleep(60); } } #else /* CVC4_DEBUG */ safe_print(STDERR_FILENO, "CVC4 suffered a segfault.\n"); safe_print(STDERR_FILENO, "Offending address is "); safe_print(STDERR_FILENO, info->si_addr); safe_print(STDERR_FILENO, "\n"); if(addr >= extent && addr <= extent + 10*1024) { safe_print(STDERR_FILENO, "Looks like this is likely due to stack overflow.\n"); safe_print(STDERR_FILENO, "You might consider increasing the limit with `ulimit -s' or " "equivalent.\n"); } else if(addr < 10*1024) { safe_print(STDERR_FILENO, "Looks like a NULL pointer was dereferenced.\n"); } print_statistics(); abort(); #endif /* CVC4_DEBUG */ } #endif /* HAVE_SIGALTSTACK */ /** Handler for SIGILL (illegal instruction). */ void ill_handler(int sig, siginfo_t* info, void*) { #ifdef CVC4_DEBUG safe_print(STDERR_FILENO, "CVC4 executed an illegal instruction in DEBUG mode.\n"); if(!segvSpin) { print_statistics(); abort(); } else { safe_print(STDERR_FILENO, "Spinning so that a debugger can be connected.\n"); safe_print(STDERR_FILENO, "Try: gdb "); safe_print(STDERR_FILENO, *progName); safe_print(STDERR_FILENO, " "); safe_print(STDERR_FILENO, getpid()); safe_print(STDERR_FILENO, "\n"); safe_print(STDERR_FILENO, " or: gdb --pid="); safe_print(STDERR_FILENO, getpid()); safe_print(STDERR_FILENO, " "); safe_print(STDERR_FILENO, *progName); safe_print(STDERR_FILENO, "\n"); for(;;) { sleep(60); } } #else /* CVC4_DEBUG */ safe_print(STDERR_FILENO, "CVC4 executed an illegal instruction.\n"); print_statistics(); abort(); #endif /* CVC4_DEBUG */ } #endif /* __WIN32__ */ static terminate_handler default_terminator; void cvc4unexpected() { #if defined(CVC4_DEBUG) && !defined(__WIN32__) safe_print(STDERR_FILENO, "\n" "CVC4 threw an \"unexpected\" exception (one that wasn't properly " "specified\nin the throws() specifier for the throwing function)." "\n\n"); const char* lastContents = LastExceptionBuffer::currentContents(); if(lastContents == NULL) { safe_print( STDERR_FILENO, "The exception is unknown (maybe it's not a CVC4::Exception).\n\n"); } else { safe_print(STDERR_FILENO, "The exception is:\n"); safe_print(STDERR_FILENO, lastContents); safe_print(STDERR_FILENO, "\n\n"); } if(!segvSpin) { print_statistics(); set_terminate(default_terminator); } else { safe_print(STDERR_FILENO, "Spinning so that a debugger can be connected.\n"); safe_print(STDERR_FILENO, "Try: gdb "); safe_print(STDERR_FILENO, *progName); safe_print(STDERR_FILENO, " "); safe_print(STDERR_FILENO, getpid()); safe_print(STDERR_FILENO, "\n"); safe_print(STDERR_FILENO, " or: gdb --pid="); safe_print(STDERR_FILENO, getpid()); safe_print(STDERR_FILENO, " "); safe_print(STDERR_FILENO, *progName); safe_print(STDERR_FILENO, "\n"); for(;;) { sleep(60); } } #else /* CVC4_DEBUG */ safe_print(STDERR_FILENO, "CVC4 threw an \"unexpected\" exception.\n"); print_statistics(); set_terminate(default_terminator); #endif /* CVC4_DEBUG */ } void cvc4terminate() { set_terminate(default_terminator); #ifdef CVC4_DEBUG LastExceptionBuffer* current = LastExceptionBuffer::getCurrent(); LastExceptionBuffer::setCurrent(NULL); delete current; safe_print(STDERR_FILENO, "\n" "CVC4 was terminated by the C++ runtime.\n" "Perhaps an exception was thrown during stack unwinding. " "(Don't do that.)\n"); print_statistics(); default_terminator(); #else /* CVC4_DEBUG */ safe_print(STDERR_FILENO, "CVC4 was terminated by the C++ runtime.\n" "Perhaps an exception was thrown during stack unwinding.\n"); print_statistics(); default_terminator(); #endif /* CVC4_DEBUG */ } /** Initialize the driver. Sets signal handlers for SIGINT and SIGSEGV. */ void cvc4_init() throw(Exception) { #ifdef CVC4_DEBUG LastExceptionBuffer::setCurrent(new LastExceptionBuffer()); #endif #ifndef __WIN32__ struct rlimit limit; if(getrlimit(RLIMIT_STACK, &limit)) { throw Exception(string("getrlimit() failure: ") + strerror(errno)); } if(limit.rlim_cur != limit.rlim_max) { limit.rlim_cur = limit.rlim_max; if(setrlimit(RLIMIT_STACK, &limit)) { throw Exception(string("setrlimit() failure: ") + strerror(errno)); } if(getrlimit(RLIMIT_STACK, &limit)) { throw Exception(string("getrlimit() failure: ") + strerror(errno)); } } struct sigaction act1; act1.sa_sigaction = sigint_handler; act1.sa_flags = SA_SIGINFO; sigemptyset(&act1.sa_mask); if(sigaction(SIGINT, &act1, NULL)) { throw Exception(string("sigaction(SIGINT) failure: ") + strerror(errno)); } struct sigaction act2; act2.sa_sigaction = timeout_handler; act2.sa_flags = SA_SIGINFO; sigemptyset(&act2.sa_mask); if(sigaction(SIGXCPU, &act2, NULL)) { throw Exception(string("sigaction(SIGXCPU) failure: ") + strerror(errno)); } struct sigaction act3; act3.sa_sigaction = ill_handler; act3.sa_flags = SA_SIGINFO; sigemptyset(&act3.sa_mask); if(sigaction(SIGILL, &act3, NULL)) { throw Exception(string("sigaction(SIGILL) failure: ") + strerror(errno)); } #ifdef HAVE_SIGALTSTACK stack_t ss; ss.ss_sp = (char*) malloc(SIGSTKSZ); if(ss.ss_sp == NULL) { throw Exception("Can't malloc() space for a signal stack"); } ss.ss_size = SIGSTKSZ; ss.ss_flags = 0; if(sigaltstack(&ss, NULL) == -1) { throw Exception(string("sigaltstack() failure: ") + strerror(errno)); } cvc4StackSize = limit.rlim_cur; cvc4StackBase = ss.ss_sp; struct sigaction act4; act4.sa_sigaction = segv_handler; act4.sa_flags = SA_SIGINFO | SA_ONSTACK; sigemptyset(&act4.sa_mask); if(sigaction(SIGSEGV, &act4, NULL)) { throw Exception(string("sigaction(SIGSEGV) failure: ") + strerror(errno)); } #endif /* HAVE_SIGALTSTACK */ #endif /* __WIN32__ */ set_unexpected(cvc4unexpected); default_terminator = set_terminate(cvc4terminate); } void cvc4_shutdown() throw () { #ifndef __WIN32__ #ifdef HAVE_SIGALTSTACK free(cvc4StackBase); cvc4StackBase = NULL; cvc4StackSize = 0; #endif /* HAVE_SIGALTSTACK */ #endif /* __WIN32__ */ } }/* CVC4::main namespace */ }/* CVC4 namespace */ cvc4-1.5/src/mksubdirs000077500000000000000000000010511313116454100147320ustar00rootroot00000000000000#!/bin/bash # # The purpose of this file is to generate a .subdirs file in the build process. # This file contains a file of relative paths to all of the theories relative # to the current directory. Each Makefile.am should thus build its own .subdirs file. # This assumes it is passed the equivalent of the $top_srcdir configure variable. # # Invocation: # # mksubdirs TOP_SRCDIR=$1 grep '^THEORIES = ' $TOP_SRCDIR/src/Makefile.theories | \ cut -d' ' -f3- | tr ' ' "\n" | \ xargs -I__D__ echo "$TOP_SRCDIR/src/theory/__D__/kinds" cvc4-1.5/src/options/000077500000000000000000000000001313116454100144775ustar00rootroot00000000000000cvc4-1.5/src/options/Makefile.am000066400000000000000000000314271313116454100165420ustar00rootroot00000000000000# How options are built: # Step 1: Copy the X_options source file into builddir as X_options.tmp. # X_options.tmp is a .PHONY rule to force this step to always be done. # Step 2: Compare X_options.tmp to X_options.options. # If they are different, overwrite "X_options.options". # This is the file that we use to generate options from. # This is always up to dat with X_options. The change in name is just # to keep Makefile stage more explicit. # Step 3: Generate X_options.sed from X_options.options using mkoptions. # Step 4: Generate X_options.h from X_options.sed # Step 5: Generate X_options.cpp from X_options.sed. # This stage also waits for X_options.h as otherwise it cannot compile. # # if coverage is enabled: # COVERAGE_ON = yes from configure.ac # Using an inline conditional function to choose between absolute and # relative paths for options files # lcov does not support relative paths and src/options and src/expr # in particular were breaking it # Building with coverage will cause portability issues in some cases VPATH = $(if $(COVERAGE_ON), $(realpath @srcdir@), @srcdir@) OPTIONS_SRC_FILES = \ arith_options \ arrays_options \ base_options \ booleans_options \ builtin_options \ bv_options \ datatypes_options \ decision_options \ expr_options \ fp_options \ idl_options \ main_options \ parser_options \ printer_options \ proof_options \ prop_options \ quantifiers_options \ sep_options \ sets_options \ smt_options \ strings_options \ theory_options \ uf_options OPTIONS_TEMPS = \ arith_options.tmp \ arrays_options.tmp \ base_options.tmp \ booleans_options.tmp \ builtin_options.tmp \ bv_options.tmp \ datatypes_options.tmp \ decision_options.tmp \ expr_options.tmp \ fp_options.tmp \ idl_options.tmp \ main_options.tmp \ parser_options.tmp \ printer_options.tmp \ proof_options.tmp \ prop_options.tmp \ quantifiers_options.tmp \ sep_options.tmp \ sets_options.tmp \ smt_options.tmp \ strings_options.tmp \ theory_options.tmp \ uf_options.tmp OPTIONS_OPTIONS_FILES = \ arith_options.options \ arrays_options.options \ base_options.options \ booleans_options.options \ builtin_options.options \ bv_options.options \ datatypes_options.options \ decision_options.options \ expr_options.options \ fp_options.options \ idl_options.options \ main_options.options \ parser_options.options \ printer_options.options \ proof_options.options \ prop_options.options \ quantifiers_options.options \ sep_options.options \ sets_options.options \ smt_options.options \ strings_options.options \ theory_options.options \ uf_options.options OPTIONS_SEDS = \ arith_options.sed \ arrays_options.sed \ base_options.sed \ booleans_options.sed \ builtin_options.sed \ bv_options.sed \ datatypes_options.sed \ decision_options.sed \ expr_options.sed \ fp_options.sed \ idl_options.sed \ main_options.sed \ parser_options.sed \ printer_options.sed \ proof_options.sed \ prop_options.sed \ quantifiers_options.sed \ sep_options.sed \ sets_options.sed \ smt_options.sed \ strings_options.sed \ theory_options.sed \ uf_options.sed OPTIONS_HEADS = \ arith_options.h \ arrays_options.h \ base_options.h \ booleans_options.h \ builtin_options.h \ bv_options.h \ datatypes_options.h \ decision_options.h \ expr_options.h \ fp_options.h \ idl_options.h \ main_options.h \ parser_options.h \ printer_options.h \ proof_options.h \ prop_options.h \ quantifiers_options.h \ sep_options.h \ sets_options.h \ smt_options.h \ strings_options.h \ theory_options.h \ uf_options.h OPTIONS_CPPS = \ arith_options.cpp \ arrays_options.cpp \ base_options.cpp \ booleans_options.cpp \ builtin_options.cpp \ bv_options.cpp \ datatypes_options.cpp \ decision_options.cpp \ expr_options.cpp \ fp_options.cpp \ idl_options.cpp \ main_options.cpp \ parser_options.cpp \ printer_options.cpp \ proof_options.cpp \ prop_options.cpp \ quantifiers_options.cpp \ sep_options.cpp \ sets_options.cpp \ smt_options.cpp \ strings_options.cpp \ theory_options.cpp \ uf_options.cpp CPP_TEMPLATE_FILES = \ base_options_template.h \ base_options_template.cpp \ options_holder_template.h \ options_template.cpp \ options_get_option_template.cpp \ options_set_option_template.cpp CPP_TEMPLATE_SEDS = \ base_options_template.h.sed \ base_options_template.cpp.sed \ options_holder_template.h.sed \ options_template.cpp.sed \ options_get_option_template.cpp.sed \ options_set_option_template.cpp.sed DOCUMENTATION_FILES = \ ../../doc/cvc4.1 \ ../../doc/libcvc4.3 \ ../../doc/SmtEngine.3cvc \ ../../doc/options.3cvc DOCUMENTATION_TEMPLATE_FILES = \ ../../doc/cvc4.1_template \ ../../doc/libcvc4.3_template \ ../../doc/SmtEngine.3cvc_template \ ../../doc/options.3cvc_template DOCUMENTATION_TEMPLATE_SEDS = \ ../../doc/cvc4.1_template.sed \ ../../doc/libcvc4.3_template.sed \ ../../doc/SmtEngine.3cvc_template.sed \ ../../doc/options.3cvc_template.sed AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ $(if $(COVERAGE_ON), -I@abs_builddir@/.. -I@abs_srcdir@/../include -I@abs_srcdir@/.., \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/..) AM_CXXFLAGS = -Wall $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = liboptions.la liboptions_la_SOURCES = \ arith_heuristic_pivot_rule.cpp \ arith_heuristic_pivot_rule.h \ arith_propagation_mode.cpp \ arith_propagation_mode.h \ arith_unate_lemma_mode.cpp \ arith_unate_lemma_mode.h \ argument_extender_implementation.cpp \ argument_extender_implementation.h \ argument_extender.h \ base_handlers.h \ bv_bitblast_mode.cpp \ bv_bitblast_mode.h \ decision_mode.cpp \ decision_mode.h \ decision_weight.h \ didyoumean.cpp \ didyoumean.h \ language.cpp \ language.h \ open_ostream.cpp \ open_ostream.h \ option_exception.h \ options.h \ options_handler.cpp \ options_handler.h \ options_public_functions.cpp \ printer_modes.cpp \ printer_modes.h \ quantifiers_modes.cpp \ quantifiers_modes.h \ set_language.cpp \ set_language.h \ simplification_mode.cpp \ simplification_mode.h \ theoryof_mode.cpp \ theoryof_mode.h \ ufss_mode.h nodist_liboptions_la_SOURCES = \ options.cpp \ options_holder.h \ $(OPTIONS_HEADS) \ $(OPTIONS_CPPS) \ options_get_option.cpp \ options_set_option.cpp BUILT_SOURCES = \ $(CPP_TEMPLATE_SEDS) \ $(DOCUMENTATION_FILES) \ $(DOCUMENTATION_TEMPLATE_SEDS) \ $(OPTIONS_CPPS) \ $(OPTIONS_HEADS) \ $(OPTIONS_OPTIONS_FILES) \ $(OPTIONS_SEDS) \ options.cpp \ options_get_option.cpp \ options_set_option.cpp \ options_holder.h \ summary.sed CLEANFILES = \ $(BUILT_SOURCES) \ $(DOCUMENTATION_FILES) \ $(OPTIONS_TEMPS) EXTRA_DIST = \ $(DOCUMENTATION_FILES) \ $(OPTIONS_CPPS) \ $(OPTIONS_HEADS) \ $(OPTIONS_SRC_FILES) \ base_options_template.cpp \ base_options_template.h \ language.i \ mkoptions \ option_exception.i \ options.i \ options_get_option_template.cpp \ options_holder_template.h \ options_set_option_template.cpp \ options_template.cpp # Make sure the implicit rules never mistake a _template.cpp or _template.h file for source file. options_holder_template.h options_template.cpp options_get_option_template.cpp options_set_option_template.cpp base_options_template.h base_options_template.cpp :; # Make sure the implicit rules never mistake X_options for the -o file for a # CPP file. arith_options arrays_options base_options booleans_options builtin_options bv_options datatypes_options decision_options expr_options fp_options idl_options main_options parser_options printer_options proof_options prop_options quantifiers_options sep_options sets_options smt_options strings_options theory_options uf_options:; # These are phony to force them to be made everytime. .PHONY: arith_options.tmp arrays_options.tmp base_options.tmp booleans_options.tmp builtin_options.tmp bv_options.tmp datatypes_options.tmp decision_options.tmp expr_options.tmp fp_options.tmp idl_options.tmp main_options.tmp parser_options.tmp printer_options.tmp proof_options.tmp prop_options.tmp quantifiers_options.tmp sep_options.tmp sets_options.tmp smt_options.tmp strings_options.tmp theory_options.tmp uf_options.tmp # Make is happier being listed explictly. Not sure why. arith_options.tmp arrays_options.tmp base_options.tmp booleans_options.tmp builtin_options.tmp bv_options.tmp datatypes_options.tmp decision_options.tmp expr_options.tmp fp_options.tmp idl_options.tmp main_options.tmp parser_options.tmp printer_options.tmp proof_options.tmp prop_options.tmp quantifiers_options.tmp sep_options.tmp sets_options.tmp smt_options.tmp strings_options.tmp theory_options.tmp uf_options.tmp: echo "$@" "$(@:.tmp=)" $(AM_V_GEN)(cp $(if $(COVERAGE_ON), "@abs_srcdir@/$(@:.tmp=)", "@srcdir@/$(@:.tmp=)") "$@" || true) #TIM: #The (... || true) here is to make distcheck not fail. %_options.options: %_options.tmp $(AM_V_GEN)\ diff -q "$^" "$@" &>/dev/null || mv "$^" "$@" || true # This bit is kinda tricky. # We use the updating of %_options.options to signal that the options file updated. # However, we use the original file in src to generate the file. %_options.sed: %_options.options mkoptions $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions module-sed $(if $(COVERAGE_ON), "@abs_srcdir@/$(@:.sed=)", "@srcdir@/$(@:.sed=)")) > "$@" $(CPP_TEMPLATE_SEDS): %.sed : % mkoptions # echo "template seds" # echo "$@" # echo $(TEMPLATE_SEDS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions template-sed "$<" ) > "$@" $(DOCUMENTATION_TEMPLATE_SEDS): %.sed : % mkoptions # echo "template seds" # echo "$@" # echo $(TEMPLATE_SEDS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions template-sed "$<" ) > "$@" %_options.h : %_options.sed mkoptions base_options_template.h base_options_template.h.sed # echo heads # echo "$@" # echo $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/base_options_template.h \ base_options_template.h.sed \ "$<" \ ) > "$@" summary.sed : mkoptions $(OPTIONS_OPTIONS_FILES) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions summary-sed \ $(OPTIONS_OPTIONS_FILES) \ ) > summary.sed # mkoptions apply-sed-to-template sed-file template-file options_holder.h : options_holder_template.h options_holder_template.h.sed summary.sed mkoptions $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_holder_template.h \ @builddir@/options_holder_template.h.sed \ summary.sed \ ) > "$@" # Make sure not to match with "options.cpp" too. %_options.cpp: %_options.sed %_options.h mkoptions options_holder.h base_options_template.cpp base_options_template.cpp.sed $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/base_options_template.cpp \ base_options_template.cpp.sed \ "$<" \ ) > "$@" # mkoptions apply-sed-to-template sed-file template-file options.cpp : options_template.cpp options_template.cpp.sed mkoptions summary.sed $(OPTIONS_HEADS) options_holder.h $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_template.cpp \ @builddir@/options_template.cpp.sed \ summary.sed \ ) > "$@" # mkoptions apply-sed-to-template sed-file template-file options_get_option.cpp : options_get_option_template.cpp options_get_option_template.cpp.sed mkoptions summary.sed $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_get_option_template.cpp \ @builddir@/options_get_option_template.cpp.sed \ summary.sed \ ) > "$@" options_set_option.cpp : options_set_option_template.cpp options_set_option_template.cpp.sed mkoptions summary.sed $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_set_option_template.cpp \ @builddir@/options_set_option_template.cpp.sed \ summary.sed \ ) > "$@" $(DOCUMENTATION_FILES) : % : %_template %_template.sed mkoptions summary.sed # echo "$<" # echo "$@" $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ "$<" \ "$<".sed \ @builddir@/summary.sed \ ) > "$@" #options-stamp: options_holder_template.h options_template.cpp smt_options_template.cpp base_options_template.h base_options_template.cpp mkoptions $(OPTIONS_FILE_SRCS) # This rule is ugly. It's needed to ensure that automake's dependence # includes are available during distclean, even though they come from # directories that are cleaned first. Without this rule, "distclean" # fails. %.Plo:; $(MKDIR_P) "$(dir $@)" && : > "$@" cvc4-1.5/src/options/Makefile.in000066400000000000000000001177201313116454100165540ustar00rootroot00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ # How options are built: # Step 1: Copy the X_options source file into builddir as X_options.tmp. # X_options.tmp is a .PHONY rule to force this step to always be done. # Step 2: Compare X_options.tmp to X_options.options. # If they are different, overwrite "X_options.options". # This is the file that we use to generate options from. # This is always up to dat with X_options. The change in name is just # to keep Makefile stage more explicit. # Step 3: Generate X_options.sed from X_options.options using mkoptions. # Step 4: Generate X_options.h from X_options.sed # Step 5: Generate X_options.cpp from X_options.sed. # This stage also waits for X_options.h as otherwise it cannot compile. # # if coverage is enabled: # COVERAGE_ON = yes from configure.ac # Using an inline conditional function to choose between absolute and # relative paths for options files # lcov does not support relative paths and src/options and src/expr # in particular were breaking it # Building with coverage will cause portability issues in some cases am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 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@ target_triplet = @target@ subdir = src/options ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/abc.m4 \ $(top_srcdir)/config/antlr.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_tls.m4 \ $(top_srcdir)/config/bindings.m4 $(top_srcdir)/config/boost.m4 \ $(top_srcdir)/config/cryptominisat.m4 \ $(top_srcdir)/config/cvc4.m4 \ $(top_srcdir)/config/gcc_version.m4 \ $(top_srcdir)/config/glpk.m4 $(top_srcdir)/config/is_sorted.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/readline.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/cvc4autoconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liboptions_la_LIBADD = am_liboptions_la_OBJECTS = arith_heuristic_pivot_rule.lo \ arith_propagation_mode.lo arith_unate_lemma_mode.lo \ argument_extender_implementation.lo bv_bitblast_mode.lo \ decision_mode.lo didyoumean.lo language.lo open_ostream.lo \ options_handler.lo options_public_functions.lo \ printer_modes.lo quantifiers_modes.lo set_language.lo \ simplification_mode.lo theoryof_mode.lo am__objects_1 = am__objects_2 = arith_options.lo arrays_options.lo base_options.lo \ booleans_options.lo builtin_options.lo bv_options.lo \ datatypes_options.lo decision_options.lo expr_options.lo \ fp_options.lo idl_options.lo main_options.lo parser_options.lo \ printer_options.lo proof_options.lo prop_options.lo \ quantifiers_options.lo sep_options.lo sets_options.lo \ smt_options.lo strings_options.lo theory_options.lo \ uf_options.lo nodist_liboptions_la_OBJECTS = options.lo $(am__objects_1) \ $(am__objects_2) options_get_option.lo options_set_option.lo liboptions_la_OBJECTS = $(am_liboptions_la_OBJECTS) \ $(nodist_liboptions_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(liboptions_la_SOURCES) $(nodist_liboptions_la_SOURCES) DIST_SOURCES = $(liboptions_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) VPATH = $(if $(COVERAGE_ON), $(realpath @srcdir@), @srcdir@) ABC_HOME = @ABC_HOME@ ABC_LDFLAGS = @ABC_LDFLAGS@ ABC_LIBS = @ABC_LIBS@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ ANTLR = @ANTLR@ ANTLR_HOME = @ANTLR_HOME@ ANTLR_INCLUDES = @ANTLR_INCLUDES@ ANTLR_LDFLAGS = @ANTLR_LDFLAGS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_LDPATH = @BOOST_LDPATH@ BOOST_ROOT = @BOOST_ROOT@ BOOST_SYSTEM_LDFLAGS = @BOOST_SYSTEM_LDFLAGS@ BOOST_SYSTEM_LDPATH = @BOOST_SYSTEM_LDPATH@ BOOST_SYSTEM_LIBS = @BOOST_SYSTEM_LIBS@ BOOST_THREAD_LDFLAGS = @BOOST_THREAD_LDFLAGS@ BOOST_THREAD_LDPATH = @BOOST_THREAD_LDPATH@ BOOST_THREAD_LIBS = @BOOST_THREAD_LIBS@ BOOST_THREAD_WIN32_LDFLAGS = @BOOST_THREAD_WIN32_LDFLAGS@ BOOST_THREAD_WIN32_LDPATH = @BOOST_THREAD_WIN32_LDPATH@ BOOST_THREAD_WIN32_LIBS = @BOOST_THREAD_WIN32_LIBS@ BUILDING_SHARED = @BUILDING_SHARED@ BUILDING_STATIC = @BUILDING_STATIC@ CAMLP4O = @CAMLP4O@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLN_CFLAGS = @CLN_CFLAGS@ CLN_LIBS = @CLN_LIBS@ COVERAGE_ON = @COVERAGE_ON@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPTOMINISAT_HOME = @CRYPTOMINISAT_HOME@ CRYPTOMINISAT_LDFLAGS = @CRYPTOMINISAT_LDFLAGS@ CRYPTOMINISAT_LIBS = @CRYPTOMINISAT_LIBS@ CSHARP_CPPFLAGS = @CSHARP_CPPFLAGS@ CVC4_BINDINGS_LIBRARY_VERSION = @CVC4_BINDINGS_LIBRARY_VERSION@ CVC4_BUILD_LIBCOMPAT = @CVC4_BUILD_LIBCOMPAT@ CVC4_COMPAT_LIBRARY_VERSION = @CVC4_COMPAT_LIBRARY_VERSION@ CVC4_HAS_THREADS = @CVC4_HAS_THREADS@ CVC4_JAVA_MODULE_EXT = @CVC4_JAVA_MODULE_EXT@ CVC4_LANGUAGE_BINDINGS = @CVC4_LANGUAGE_BINDINGS@ CVC4_LIBRARY_VERSION = @CVC4_LIBRARY_VERSION@ CVC4_NEED_INT64_T_OVERLOADS = @CVC4_NEED_INT64_T_OVERLOADS@ CVC4_PARSER_LIBRARY_VERSION = @CVC4_PARSER_LIBRARY_VERSION@ CVC4_TLS = @CVC4_TLS@ CVC4_TLS_SUPPORTED = @CVC4_TLS_SUPPORTED@ CVC4_USE_CLN_IMP = @CVC4_USE_CLN_IMP@ CVC4_USE_GMP_IMP = @CVC4_USE_GMP_IMP@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXTEST = @CXXTEST@ CXXTESTGEN = @CXXTESTGEN@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@ DLLTOOL = @DLLTOOL@ DOXYGEN_EXTRACT_PRIVATE = @DOXYGEN_EXTRACT_PRIVATE@ DOXYGEN_EXTRACT_STATIC = @DOXYGEN_EXTRACT_STATIC@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FLAG_VISIBILITY_HIDDEN = @FLAG_VISIBILITY_HIDDEN@ FNO_STRICT_ALIASING = @FNO_STRICT_ALIASING@ GLPK_HOME = @GLPK_HOME@ GLPK_LDFLAGS = @GLPK_LDFLAGS@ GLPK_LIBS = @GLPK_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_DATE = @MAN_DATE@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OCAMLC = @OCAMLC@ OCAMLFIND = @OCAMLFIND@ OCAMLMKTOP = @OCAMLMKTOP@ 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@ PERL = @PERL@ PERL_CPPFLAGS = @PERL_CPPFLAGS@ PHP_CPPFLAGS = @PHP_CPPFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_CXXFLAGS = @PYTHON_CXXFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_INCLUDE = @PYTHON_INCLUDE@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RUBY_CPPFLAGS = @RUBY_CPPFLAGS@ RUN_REGRESSION_ARGS = @RUN_REGRESSION_ARGS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_BINARY = @STATIC_BINARY@ STRIP = @STRIP@ SWIG = @SWIG@ TCL_CPPFLAGS = @TCL_CPPFLAGS@ TESTS_ENVIRONMENT = @TESTS_ENVIRONMENT@ TEST_CPPFLAGS = @TEST_CPPFLAGS@ TEST_CXXFLAGS = @TEST_CXXFLAGS@ TEST_LDFLAGS = @TEST_LDFLAGS@ VERSION = @VERSION@ WERROR = @WERROR@ WNO_CONVERSION_NULL = @WNO_CONVERSION_NULL@ WNO_PARENTHESES = @WNO_PARENTHESES@ WNO_TAUTOLOGICAL_COMPARE = @WNO_TAUTOLOGICAL_COMPARE@ WNO_UNINITIALIZED = @WNO_UNINITIALIZED@ WNO_UNUSED_VARIABLE = @WNO_UNUSED_VARIABLE@ 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@ cvc4_LDFLAGS = @cvc4_LDFLAGS@ cvc4_config_cmdline = @cvc4_config_cmdline@ 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@ mk_empty = @mk_empty@ mk_if = @mk_if@ mk_include = @mk_include@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pcvc4_LDFLAGS = @pcvc4_LDFLAGS@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ zz_cvc4_use_personal_make_rules = @zz_cvc4_use_personal_make_rules@ OPTIONS_SRC_FILES = \ arith_options \ arrays_options \ base_options \ booleans_options \ builtin_options \ bv_options \ datatypes_options \ decision_options \ expr_options \ fp_options \ idl_options \ main_options \ parser_options \ printer_options \ proof_options \ prop_options \ quantifiers_options \ sep_options \ sets_options \ smt_options \ strings_options \ theory_options \ uf_options OPTIONS_TEMPS = \ arith_options.tmp \ arrays_options.tmp \ base_options.tmp \ booleans_options.tmp \ builtin_options.tmp \ bv_options.tmp \ datatypes_options.tmp \ decision_options.tmp \ expr_options.tmp \ fp_options.tmp \ idl_options.tmp \ main_options.tmp \ parser_options.tmp \ printer_options.tmp \ proof_options.tmp \ prop_options.tmp \ quantifiers_options.tmp \ sep_options.tmp \ sets_options.tmp \ smt_options.tmp \ strings_options.tmp \ theory_options.tmp \ uf_options.tmp OPTIONS_OPTIONS_FILES = \ arith_options.options \ arrays_options.options \ base_options.options \ booleans_options.options \ builtin_options.options \ bv_options.options \ datatypes_options.options \ decision_options.options \ expr_options.options \ fp_options.options \ idl_options.options \ main_options.options \ parser_options.options \ printer_options.options \ proof_options.options \ prop_options.options \ quantifiers_options.options \ sep_options.options \ sets_options.options \ smt_options.options \ strings_options.options \ theory_options.options \ uf_options.options OPTIONS_SEDS = \ arith_options.sed \ arrays_options.sed \ base_options.sed \ booleans_options.sed \ builtin_options.sed \ bv_options.sed \ datatypes_options.sed \ decision_options.sed \ expr_options.sed \ fp_options.sed \ idl_options.sed \ main_options.sed \ parser_options.sed \ printer_options.sed \ proof_options.sed \ prop_options.sed \ quantifiers_options.sed \ sep_options.sed \ sets_options.sed \ smt_options.sed \ strings_options.sed \ theory_options.sed \ uf_options.sed OPTIONS_HEADS = \ arith_options.h \ arrays_options.h \ base_options.h \ booleans_options.h \ builtin_options.h \ bv_options.h \ datatypes_options.h \ decision_options.h \ expr_options.h \ fp_options.h \ idl_options.h \ main_options.h \ parser_options.h \ printer_options.h \ proof_options.h \ prop_options.h \ quantifiers_options.h \ sep_options.h \ sets_options.h \ smt_options.h \ strings_options.h \ theory_options.h \ uf_options.h OPTIONS_CPPS = \ arith_options.cpp \ arrays_options.cpp \ base_options.cpp \ booleans_options.cpp \ builtin_options.cpp \ bv_options.cpp \ datatypes_options.cpp \ decision_options.cpp \ expr_options.cpp \ fp_options.cpp \ idl_options.cpp \ main_options.cpp \ parser_options.cpp \ printer_options.cpp \ proof_options.cpp \ prop_options.cpp \ quantifiers_options.cpp \ sep_options.cpp \ sets_options.cpp \ smt_options.cpp \ strings_options.cpp \ theory_options.cpp \ uf_options.cpp CPP_TEMPLATE_FILES = \ base_options_template.h \ base_options_template.cpp \ options_holder_template.h \ options_template.cpp \ options_get_option_template.cpp \ options_set_option_template.cpp CPP_TEMPLATE_SEDS = \ base_options_template.h.sed \ base_options_template.cpp.sed \ options_holder_template.h.sed \ options_template.cpp.sed \ options_get_option_template.cpp.sed \ options_set_option_template.cpp.sed DOCUMENTATION_FILES = \ ../../doc/cvc4.1 \ ../../doc/libcvc4.3 \ ../../doc/SmtEngine.3cvc \ ../../doc/options.3cvc DOCUMENTATION_TEMPLATE_FILES = \ ../../doc/cvc4.1_template \ ../../doc/libcvc4.3_template \ ../../doc/SmtEngine.3cvc_template \ ../../doc/options.3cvc_template DOCUMENTATION_TEMPLATE_SEDS = \ ../../doc/cvc4.1_template.sed \ ../../doc/libcvc4.3_template.sed \ ../../doc/SmtEngine.3cvc_template.sed \ ../../doc/options.3cvc_template.sed AM_CPPFLAGS = \ -D__BUILDING_CVC4LIB \ $(if $(COVERAGE_ON), -I@abs_builddir@/.. -I@abs_srcdir@/../include -I@abs_srcdir@/.., \ -I@builddir@/.. -I@srcdir@/../include -I@srcdir@/..) AM_CXXFLAGS = -Wall $(FLAG_VISIBILITY_HIDDEN) noinst_LTLIBRARIES = liboptions.la liboptions_la_SOURCES = \ arith_heuristic_pivot_rule.cpp \ arith_heuristic_pivot_rule.h \ arith_propagation_mode.cpp \ arith_propagation_mode.h \ arith_unate_lemma_mode.cpp \ arith_unate_lemma_mode.h \ argument_extender_implementation.cpp \ argument_extender_implementation.h \ argument_extender.h \ base_handlers.h \ bv_bitblast_mode.cpp \ bv_bitblast_mode.h \ decision_mode.cpp \ decision_mode.h \ decision_weight.h \ didyoumean.cpp \ didyoumean.h \ language.cpp \ language.h \ open_ostream.cpp \ open_ostream.h \ option_exception.h \ options.h \ options_handler.cpp \ options_handler.h \ options_public_functions.cpp \ printer_modes.cpp \ printer_modes.h \ quantifiers_modes.cpp \ quantifiers_modes.h \ set_language.cpp \ set_language.h \ simplification_mode.cpp \ simplification_mode.h \ theoryof_mode.cpp \ theoryof_mode.h \ ufss_mode.h nodist_liboptions_la_SOURCES = \ options.cpp \ options_holder.h \ $(OPTIONS_HEADS) \ $(OPTIONS_CPPS) \ options_get_option.cpp \ options_set_option.cpp BUILT_SOURCES = \ $(CPP_TEMPLATE_SEDS) \ $(DOCUMENTATION_FILES) \ $(DOCUMENTATION_TEMPLATE_SEDS) \ $(OPTIONS_CPPS) \ $(OPTIONS_HEADS) \ $(OPTIONS_OPTIONS_FILES) \ $(OPTIONS_SEDS) \ options.cpp \ options_get_option.cpp \ options_set_option.cpp \ options_holder.h \ summary.sed CLEANFILES = \ $(BUILT_SOURCES) \ $(DOCUMENTATION_FILES) \ $(OPTIONS_TEMPS) EXTRA_DIST = \ $(DOCUMENTATION_FILES) \ $(OPTIONS_CPPS) \ $(OPTIONS_HEADS) \ $(OPTIONS_SRC_FILES) \ base_options_template.cpp \ base_options_template.h \ language.i \ mkoptions \ option_exception.i \ options.i \ options_get_option_template.cpp \ options_holder_template.h \ options_set_option_template.cpp \ options_template.cpp all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/options/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/options/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } liboptions.la: $(liboptions_la_OBJECTS) $(liboptions_la_DEPENDENCIES) $(EXTRA_liboptions_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(liboptions_la_OBJECTS) $(liboptions_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argument_extender_implementation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith_heuristic_pivot_rule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith_propagation_mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arith_unate_lemma_mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arrays_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/booleans_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bv_bitblast_mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bv_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datatypes_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decision_mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decision_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/didyoumean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expr_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fp_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idl_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/language.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open_ostream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_get_option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_handler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_public_functions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options_set_option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer_modes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printer_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proof_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prop_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantifiers_modes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quantifiers_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sep_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_language.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sets_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplification_mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smt_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strings_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theory_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theoryof_mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uf_options.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)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@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ 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" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(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 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Make sure the implicit rules never mistake a _template.cpp or _template.h file for source file. options_holder_template.h options_template.cpp options_get_option_template.cpp options_set_option_template.cpp base_options_template.h base_options_template.cpp :; # Make sure the implicit rules never mistake X_options for the -o file for a # CPP file. arith_options arrays_options base_options booleans_options builtin_options bv_options datatypes_options decision_options expr_options fp_options idl_options main_options parser_options printer_options proof_options prop_options quantifiers_options sep_options sets_options smt_options strings_options theory_options uf_options:; # These are phony to force them to be made everytime. .PHONY: arith_options.tmp arrays_options.tmp base_options.tmp booleans_options.tmp builtin_options.tmp bv_options.tmp datatypes_options.tmp decision_options.tmp expr_options.tmp fp_options.tmp idl_options.tmp main_options.tmp parser_options.tmp printer_options.tmp proof_options.tmp prop_options.tmp quantifiers_options.tmp sep_options.tmp sets_options.tmp smt_options.tmp strings_options.tmp theory_options.tmp uf_options.tmp # Make is happier being listed explictly. Not sure why. arith_options.tmp arrays_options.tmp base_options.tmp booleans_options.tmp builtin_options.tmp bv_options.tmp datatypes_options.tmp decision_options.tmp expr_options.tmp fp_options.tmp idl_options.tmp main_options.tmp parser_options.tmp printer_options.tmp proof_options.tmp prop_options.tmp quantifiers_options.tmp sep_options.tmp sets_options.tmp smt_options.tmp strings_options.tmp theory_options.tmp uf_options.tmp: echo "$@" "$(@:.tmp=)" $(AM_V_GEN)(cp $(if $(COVERAGE_ON), "@abs_srcdir@/$(@:.tmp=)", "@srcdir@/$(@:.tmp=)") "$@" || true) #TIM: #The (... || true) here is to make distcheck not fail. %_options.options: %_options.tmp $(AM_V_GEN)\ diff -q "$^" "$@" &>/dev/null || mv "$^" "$@" || true # This bit is kinda tricky. # We use the updating of %_options.options to signal that the options file updated. # However, we use the original file in src to generate the file. %_options.sed: %_options.options mkoptions $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions module-sed $(if $(COVERAGE_ON), "@abs_srcdir@/$(@:.sed=)", "@srcdir@/$(@:.sed=)")) > "$@" $(CPP_TEMPLATE_SEDS): %.sed : % mkoptions # echo "template seds" # echo "$@" # echo $(TEMPLATE_SEDS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions template-sed "$<" ) > "$@" $(DOCUMENTATION_TEMPLATE_SEDS): %.sed : % mkoptions # echo "template seds" # echo "$@" # echo $(TEMPLATE_SEDS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions template-sed "$<" ) > "$@" %_options.h : %_options.sed mkoptions base_options_template.h base_options_template.h.sed # echo heads # echo "$@" # echo $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/base_options_template.h \ base_options_template.h.sed \ "$<" \ ) > "$@" summary.sed : mkoptions $(OPTIONS_OPTIONS_FILES) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions summary-sed \ $(OPTIONS_OPTIONS_FILES) \ ) > summary.sed # mkoptions apply-sed-to-template sed-file template-file options_holder.h : options_holder_template.h options_holder_template.h.sed summary.sed mkoptions $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_holder_template.h \ @builddir@/options_holder_template.h.sed \ summary.sed \ ) > "$@" # Make sure not to match with "options.cpp" too. %_options.cpp: %_options.sed %_options.h mkoptions options_holder.h base_options_template.cpp base_options_template.cpp.sed $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/base_options_template.cpp \ base_options_template.cpp.sed \ "$<" \ ) > "$@" # mkoptions apply-sed-to-template sed-file template-file options.cpp : options_template.cpp options_template.cpp.sed mkoptions summary.sed $(OPTIONS_HEADS) options_holder.h $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_template.cpp \ @builddir@/options_template.cpp.sed \ summary.sed \ ) > "$@" # mkoptions apply-sed-to-template sed-file template-file options_get_option.cpp : options_get_option_template.cpp options_get_option_template.cpp.sed mkoptions summary.sed $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_get_option_template.cpp \ @builddir@/options_get_option_template.cpp.sed \ summary.sed \ ) > "$@" options_set_option.cpp : options_set_option_template.cpp options_set_option_template.cpp.sed mkoptions summary.sed $(OPTIONS_HEADS) $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ $(if $(COVERAGE_ON), @abs_srcdir@, @srcdir@)/options_set_option_template.cpp \ @builddir@/options_set_option_template.cpp.sed \ summary.sed \ ) > "$@" $(DOCUMENTATION_FILES) : % : %_template %_template.sed mkoptions summary.sed # echo "$<" # echo "$@" $(AM_V_at)chmod +x @srcdir@/mkoptions $(AM_V_GEN)(@srcdir@/mkoptions apply-sed-files-to-template \ "$<" \ "$<".sed \ @builddir@/summary.sed \ ) > "$@" #options-stamp: options_holder_template.h options_template.cpp smt_options_template.cpp base_options_template.h base_options_template.cpp mkoptions $(OPTIONS_FILE_SRCS) # This rule is ugly. It's needed to ensure that automake's dependence # includes are available during distclean, even though they come from # directories that are cleaned first. Without this rule, "distclean" # fails. %.Plo:; $(MKDIR_P) "$(dir $@)" && : > "$@" # 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: cvc4-1.5/src/options/argument_extender.h000066400000000000000000000052151313116454100203730ustar00rootroot00000000000000/********************* */ /*! \file argument_extender.h ** \verbatim ** Top contributors (to current version): ** Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Abstract utility class for extending commandline options. ** ** Abstract utility class for extending commandline options. **/ #include "cvc4_public.h" #ifndef __CVC4__OPTIONS__ARGUMENT_EXTENDER_H #define __CVC4__OPTIONS__ARGUMENT_EXTENDER_H #include namespace CVC4 { namespace options { /** * Abstract utility class for implementing command line options * parsing for the Options class. This allows for adding preemption * arguments. A preemption is effectivly adding a new argument into * the commandline arguments and must be processed immediately. */ class ArgumentExtender { public: ArgumentExtender(){} virtual ~ArgumentExtender(){} /** * This creates a copy of the current arguments list as a new array. * The new array is stored in argv. The user of this function is * expected to own the memory of the string array, but not the * strings themselves. The length of the new array is * numArguments() and is stored in argc. * * Preconditions: * - argc and argv are non-null. */ virtual void getArguments(int* argc, char*** argv) const = 0; /** Returns the number of arguments that are . */ virtual size_t numArguments() const = 0; /** * Inserts a copy of element into the front of the arguments list. * Preconditions: element is non-null and 0 terminated. */ virtual void pushFrontArgument(const char* element) = 0; /** * Inserts a copy of element into the back of the arguments list. * Preconditions: element is non-null and 0 terminated. */ virtual void pushBackArgument(const char* element) = 0; /** Removes the front of the arguments list.*/ virtual void popFrontArgument() = 0; /** Adds a new preemption to the arguments list. */ virtual void pushBackPreemption(const char* element) = 0; /** * Moves all of the preemptions into the front of the arguments * list. */ virtual void movePreemptionsToArguments() = 0; /** Returns true iff there is a pending preemption.*/ virtual bool hasPreemptions() const = 0; };/* class ArgumentExtender */ }/* CVC4::options namespace */ }/* CVC4 namespace */ #endif /* __CVC4__OPTIONS__ARGUMENT_EXTENDER_H */ cvc4-1.5/src/options/argument_extender_implementation.cpp000066400000000000000000000062111313116454100240300ustar00rootroot00000000000000/********************* */ /*! \file argument_extender_implementation.cpp ** \verbatim ** Top contributors (to current version): ** Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Utility class for parsing commandline options. ** ** Utility class for parsing commandline options. **/ #include "options/argument_extender_implementation.h" #include #include #include #include "base/cvc4_assert.h" #include "base/output.h" #include "options/argument_extender.h" namespace CVC4 { namespace options { ArgumentExtenderImplementation::ArgumentExtenderImplementation() : d_allocated() , d_preemptions() , d_arguments() { } ArgumentExtenderImplementation::~ArgumentExtenderImplementation(){ for(CharPointerList::iterator i = d_allocated.begin(), iend = d_allocated.end(); i != iend; ++i) { char* current = *i; Debug("options") << "~ArgumentExtenderImplementation " << current << std::endl; free(current); } d_allocated.clear(); } size_t ArgumentExtenderImplementation::numArguments() const { return d_arguments.size(); } char* ArgumentExtenderImplementation::allocateCopy(const char* element) { Assert(element != NULL); char* duplicate = strdup(element); Assert(duplicate != NULL); d_allocated.push_back(duplicate); return duplicate; } bool ArgumentExtenderImplementation::hasPreemptions() const { return !d_preemptions.empty(); } void ArgumentExtenderImplementation::pushBackPreemption(const char* element) { d_preemptions.push_back(allocateCopy(element)); } void ArgumentExtenderImplementation::movePreemptionsToArguments() { d_arguments.splice(d_arguments.begin(), d_preemptions); } void ArgumentExtenderImplementation::popFrontArgument() { Assert(!d_arguments.empty()); Debug("options") << "ArgumentExtenderImplementation::popFrontArgument " << d_arguments.front() << std::endl; d_arguments.pop_front(); } void ArgumentExtenderImplementation::pushFrontArgument(const char* element) { d_arguments.push_front(allocateCopy(element)); } void ArgumentExtenderImplementation::pushBackArgument(const char* element) { d_arguments.push_back(allocateCopy(element)); } void ArgumentExtenderImplementation::getArguments(int* argc, char*** argv) const { Assert(argc != NULL); Assert(argv != NULL); *argc = numArguments(); *argv = copyArguments(); } char** ArgumentExtenderImplementation::copyArguments() const { int size = numArguments(); Assert(size >= 0); char** array = (char**) malloc( sizeof(char*) * size ); Assert(array != NULL); int position = 0; for(std::list< char* >::const_iterator i = d_arguments.begin(), iend = d_arguments.end(); i != iend; ++i, ++position) { char* at_position = *i; array[position] = at_position; } return array; } }/* CVC4::options namespace */ }/* CVC4 namespace */ cvc4-1.5/src/options/argument_extender_implementation.h000066400000000000000000000066221313116454100235030ustar00rootroot00000000000000/********************* */ /*! \file argument_extender_implementation.h ** \verbatim ** Top contributors (to current version): ** Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Utility class for extending commandline options. ** ** Utility class for extending commandline options. **/ #include "cvc4_private.h" #ifndef __CVC4__OPTIONS__ARGUMENT_EXTENDER_IMPLEMENTATION_H #define __CVC4__OPTIONS__ARGUMENT_EXTENDER_IMPLEMENTATION_H #include #include #include "options/argument_extender.h" namespace CVC4 { namespace options { /** * Utility class for implementing command line options parsing for the * Options class. This allows for adding preemption arguments. * Preemptions are processed immediately after the current argument. */ class ArgumentExtenderImplementation : public ArgumentExtender { public: /** Constructs a new empty ArgumentExtender.*/ ArgumentExtenderImplementation(); /** Destroys an ArgumentExtender and frees its associated memory.*/ ~ArgumentExtenderImplementation(); /** * This creates a copy of the current arguments list as a new array. * The new array is stored in argv. The user of this function is * expected to own the memory of the string array, but not the * strings themselves. The length of the new array is * numArguments() and is stored in argc. * * Preconditions: * - argc and argv are non-null. */ void getArguments(int* argc, char*** argv) const; /** Returns the number of arguments that are . */ size_t numArguments() const; /** * Inserts a copy of element into the front of the arguments list. * Preconditions: element is non-null and 0 terminated. */ void pushFrontArgument(const char* element); /** * Inserts a copy of element into the back of the arguments list. * Preconditions: element is non-null and 0 terminated. */ void pushBackArgument(const char* element); /** Removes the front of the arguments list.*/ void popFrontArgument(); /** Adds a new preemption to the arguments list. */ void pushBackPreemption(const char* element); /** * Moves all of the preemptions into the front of the arguments * list. */ void movePreemptionsToArguments(); /** Returns true iff there is a pending preemption.*/ bool hasPreemptions() const; private: typedef std::list< char* > CharPointerList; /** Creates of copy of the arugments list.*/ char** copyArguments() const; /** Allocates a copy and stores a copy in d_allocated.*/ char* allocateCopy(const char* element); /** Contains a copy of the allocated strings.*/ CharPointerList d_allocated; /** * A list of all of the preempted arguments. All of these pointers * in this list should be contained in d_allocated. */ CharPointerList d_preemptions; /** * A list of all of the arguments. All of these pointers in this * list should be contained in d_allocated. */ CharPointerList d_arguments; };/* class ArgumentExtenderImplementation */ }/* CVC4::options namespace */ }/* CVC4 namespace */ #endif /* __CVC4__OPTIONS__ARGUMENT_EXTENDER_IMPLEMENTATION_H */ cvc4-1.5/src/options/arith_heuristic_pivot_rule.cpp000066400000000000000000000021221313116454100226360ustar00rootroot00000000000000/********************* */ /*! \file arith_heuristic_pivot_rule.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "options/arith_heuristic_pivot_rule.h" namespace CVC4 { std::ostream& operator<<(std::ostream& out, ErrorSelectionRule rule) { switch(rule) { case MINIMUM_AMOUNT: out << "MINIMUM_AMOUNT"; break; case VAR_ORDER: out << "VAR_ORDER"; break; case MAXIMUM_AMOUNT: out << "MAXIMUM_AMOUNT"; break; default: out << "ArithHeuristicPivotRule!UNKNOWN"; } return out; } }/* CVC4 namespace */ cvc4-1.5/src/options/arith_heuristic_pivot_rule.h000066400000000000000000000021361313116454100223100ustar00rootroot00000000000000/********************* */ /*! \file arith_heuristic_pivot_rule.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_public.h" #ifndef __CVC4__THEORY__ARITH__ARITH_HEURISTIC_PIVOT_RULE_H #define __CVC4__THEORY__ARITH__ARITH_HEURISTIC_PIVOT_RULE_H #include namespace CVC4 { enum ErrorSelectionRule { VAR_ORDER, MINIMUM_AMOUNT, MAXIMUM_AMOUNT, SUM_METRIC }; std::ostream& operator<<(std::ostream& out, ErrorSelectionRule rule) CVC4_PUBLIC; }/* CVC4 namespace */ #endif /* __CVC4__THEORY__ARITH__ARITH_HEURISTIC_PIVOT_RULE_H */ cvc4-1.5/src/options/arith_options000066400000000000000000000216401313116454100173070ustar00rootroot00000000000000# # Option specification file for CVC4 # See src/options/base_options for a description of this file format # module ARITH "options/arith_options.h" Arithmetic theory option arithUnateLemmaMode --unate-lemmas=MODE ArithUnateLemmaMode :handler stringToArithUnateLemmaMode :default ALL_PRESOLVE_LEMMAS :include "options/arith_unate_lemma_mode.h" determines which lemmas to add before solving (default is 'all', see --unate-lemmas=help) option arithPropagationMode --arith-prop=MODE ArithPropagationMode :handler stringToArithPropagationMode :default BOTH_PROP :include "options/arith_propagation_mode.h" turns on arithmetic propagation (default is 'old', see --arith-prop=help) # The maximum number of difference pivots to do per invocation of simplex. # If this is negative, the number of pivots done is the number of variables. # If this is not set by the user, different logics are free to chose different # defaults. option arithHeuristicPivots --heuristic-pivots=N int16_t :default 0 :read-write the number of times to apply the heuristic pivot rule; if N < 0, this defaults to the number of variables; if this is unset, this is tuned by the logic selection # The maximum number of variable order pivots to do per invocation of simplex. # If this is negative, the number of pivots done is unlimited. # If this is not set by the user, different logics are free to chose different # defaults. expert-option arithStandardCheckVarOrderPivots --standard-effort-variable-order-pivots=N int16_t :default -1 :read-write limits the number of pivots in a single invocation of check() at a non-full effort level using Bland's pivot rule option arithErrorSelectionRule --error-selection-rule=RULE ErrorSelectionRule :handler stringToErrorSelectionRule :default MINIMUM_AMOUNT :include "options/arith_heuristic_pivot_rule.h" change the pivot rule for the basic variable (default is 'min', see --pivot-rule help) # The number of pivots before simplex rechecks every basic variable for a conflict option arithSimplexCheckPeriod --simplex-check-period=N uint16_t :default 200 the number of pivots to do in simplex before rechecking for a conflict on all variables # This is the pivots per basic variable that can be done using heuristic choices # before variable order must be used. # If this is not set by the user, different logics are free to chose different # defaults. option arithPivotThreshold --pivot-threshold=N uint16_t :default 2 :read-write sets the number of pivots using --pivot-rule per basic variable per simplex instance before using variable order option arithPropagateMaxLength --prop-row-length=N uint16_t :default 16 sets the maximum row length to be used in propagation option arithDioSolver --enable-dio-solver/--disable-dio-solver bool :default true turns on Linear Diophantine Equation solver (Griggio, JSAT 2012) /turns off Linear Diophantine Equation solver (Griggio, JSAT 2012) # Whether to split (= x y) into (and (<= x y) (>= x y)) in # arithmetic preprocessing. option arithRewriteEq --enable-arith-rewrite-equalities/--disable-arith-rewrite-equalities bool :default false :read-write turns on the preprocessing rewrite turning equalities into a conjunction of inequalities /turns off the preprocessing rewrite turning equalities into a conjunction of inequalities option arithMLTrick miplib-trick --enable-miplib-trick/--disable-miplib-trick bool :default false turns on the preprocessing step of attempting to infer bounds on miplib problems /turns off the preprocessing step of attempting to infer bounds on miplib problems option arithMLTrickSubstitutions miplib-trick-subs --miplib-trick-subs=N unsigned :default 1 do substitution for miplib 'tmp' vars if defined in <= N eliminated vars option doCutAllBounded --cut-all-bounded bool :default false :read-write turns on the integer solving step of periodically cutting all integer variables that have both upper and lower bounds /turns off the integer solving step of periodically cutting all integer variables that have both upper and lower bounds option maxCutsInContext --maxCutsInContext unsigned :default 65535 maximum cuts in a given context before signalling a restart option revertArithModels --revert-arith-models-on-unsat bool :default false revert the arithmetic model to a known safe model on unsat if one is cached option havePenalties --fc-penalties bool :default false :read-write turns on degenerate pivot penalties /turns off degenerate pivot penalties option useFC --use-fcsimplex bool :default false :read-write use focusing and converging simplex (FMCAD 2013 submission) option useSOI --use-soi bool :default false :read-write use sum of infeasibility simplex (FMCAD 2013 submission) option restrictedPivots --restrict-pivots bool :default true :read-write have a pivot cap for simplex at effort levels below fullEffort option collectPivots --collect-pivot-stats bool :default false :read-write collect the pivot history option useApprox --use-approx bool :default false :read-write attempt to use an approximate solver option maxApproxDepth --approx-branch-depth int16_t :default 200 :read-write maximum branch depth the approximate solver is allowed to take option exportDioDecompositions --dio-decomps bool :default false :read-write let skolem variables for integer divisibility constraints leak from the dio solver option newProp --new-prop bool :default false :read-write use the new row propagation system option arithPropAsLemmaLength --arith-prop-clauses uint16_t :default 8 :read-write rows shorter than this are propagated as clauses option soiQuickExplain --soi-qe bool :default false :read-write use quick explain to minimize the sum of infeasibility conflicts option rewriteDivk rewrite-divk --rewrite-divk bool :default false :read-write rewrite division and mod when by a constant into linear terms option trySolveIntStandardEffort --se-solve-int bool :default false attempt to use the approximate solve integer method on standard effort option replayFailureLemma --lemmas-on-replay-failure bool :default false attempt to use external lemmas if approximate solve integer failed option dioSolverTurns --dio-turns int :default 10 turns in a row dio solver cutting gets option rrTurns --rr-turns int :default 3 round robin turn option dioRepeat --dio-repeat bool :default false handle dio solver constraints in mass or one at a time option replayEarlyCloseDepths --replay-early-close-depth int :default 1 multiples of the depths to try to close the approx log eagerly option replayFailurePenalty --replay-failure-penalty int :default 100 number of solve integer attempts to skips after a numeric failure option replayNumericFailurePenalty --replay-num-err-penalty int :default 4194304 number of solve integer attempts to skips after a numeric failure option replayRejectCutSize --replay-reject-cut unsigned :default 25500 maximum complexity of any coefficient while replaying cuts option lemmaRejectCutSize --replay-lemma-reject-cut unsigned :default 25500 maximum complexity of any coefficient while outputting replaying cut lemmas option soiApproxMajorFailure --replay-soi-major-threshold double :default .01 threshold for a major tolerance failure by the approximate solver option soiApproxMajorFailurePen --replay-soi-major-threshold-pen int :default 50 threshold for a major tolerance failure by the approximate solver option soiApproxMinorFailure --replay-soi-minor-threshold double :default .0001 threshold for a minor tolerance failure by the approximate solver option soiApproxMinorFailurePen --replay-soi-minor-threshold-pen int :default 10 threshold for a minor tolerance failure by the approximate solver option ppAssertMaxSubSize --pp-assert-max-sub-size unsigned :default 2 threshold for substituting an equality in ppAssert option maxReplayTree --max-replay-tree int :default 512 threshold for attempting to replay a tree option pbRewrites --pb-rewrites bool :default false apply pseudo boolean rewrites option pbRewriteThreshold --pb-rewrite-threshold int :default 256 threshold of number of pseudoboolean variables to have before doing rewrites option sNormInferEq --snorm-infer-eq bool :default false infer equalities based on Shostak normalization option nlExt --nl-ext bool :default true extended approach to non-linear option nlExtResBound --nl-ext-rbound bool :default false use resolution-style inference for inferring new bounds option nlExtTangentPlanes --nl-ext-tplanes bool :default false use non-terminating tangent plane strategy for non-linear option nlExtEntailConflicts --nl-ext-ent-conf bool :default false check for entailed conflicts in non-linear solver option nlExtRewrites --nl-ext-rewrite bool :default true do rewrites in non-linear solver option nlExtSolveSubs --nl-ext-solve-subs bool :default false do solving for determining constant substitutions option nlExtPurify --nl-ext-purify bool :default false purify non-linear terms at preprocess option nlExtSplitZero --nl-ext-split-zero bool :default false intial splits on zero for all variables endmodule cvc4-1.5/src/options/arith_options.cpp000066400000000000000000000742121313116454100200730ustar00rootroot00000000000000/********************* */ /*! \file base_options_template.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Contains code for handling command-line options. ** ** Contains code for handling command-line options **/ #include "options/options_holder.h" namespace CVC4 { #line 8 "../../../src/options/arith_options" template <> const options::arithUnateLemmaMode__option_t::type& Options::operator[](options::arithUnateLemmaMode__option_t) const { return d_holder->arithUnateLemmaMode; } #line 8 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithUnateLemmaMode__option_t) const { return d_holder->arithUnateLemmaMode__setByUser__; } #line 11 "../../../src/options/arith_options" template <> const options::arithPropagationMode__option_t::type& Options::operator[](options::arithPropagationMode__option_t) const { return d_holder->arithPropagationMode; } #line 11 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPropagationMode__option_t) const { return d_holder->arithPropagationMode__setByUser__; } #line 18 "../../../src/options/arith_options" template <> void Options::set(options::arithHeuristicPivots__option_t, const options::arithHeuristicPivots__option_t::type& x) { d_holder->arithHeuristicPivots = x; } #line 18 "../../../src/options/arith_options" template <> const options::arithHeuristicPivots__option_t::type& Options::operator[](options::arithHeuristicPivots__option_t) const { return d_holder->arithHeuristicPivots; } #line 18 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithHeuristicPivots__option_t) const { return d_holder->arithHeuristicPivots__setByUser__; } #line 25 "../../../src/options/arith_options" template <> void Options::set(options::arithStandardCheckVarOrderPivots__option_t, const options::arithStandardCheckVarOrderPivots__option_t::type& x) { d_holder->arithStandardCheckVarOrderPivots = x; } #line 25 "../../../src/options/arith_options" template <> const options::arithStandardCheckVarOrderPivots__option_t::type& Options::operator[](options::arithStandardCheckVarOrderPivots__option_t) const { return d_holder->arithStandardCheckVarOrderPivots; } #line 25 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithStandardCheckVarOrderPivots__option_t) const { return d_holder->arithStandardCheckVarOrderPivots__setByUser__; } #line 28 "../../../src/options/arith_options" template <> const options::arithErrorSelectionRule__option_t::type& Options::operator[](options::arithErrorSelectionRule__option_t) const { return d_holder->arithErrorSelectionRule; } #line 28 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithErrorSelectionRule__option_t) const { return d_holder->arithErrorSelectionRule__setByUser__; } #line 32 "../../../src/options/arith_options" template <> const options::arithSimplexCheckPeriod__option_t::type& Options::operator[](options::arithSimplexCheckPeriod__option_t) const { return d_holder->arithSimplexCheckPeriod; } #line 32 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithSimplexCheckPeriod__option_t) const { return d_holder->arithSimplexCheckPeriod__setByUser__; } #line 39 "../../../src/options/arith_options" template <> void Options::set(options::arithPivotThreshold__option_t, const options::arithPivotThreshold__option_t::type& x) { d_holder->arithPivotThreshold = x; } #line 39 "../../../src/options/arith_options" template <> const options::arithPivotThreshold__option_t::type& Options::operator[](options::arithPivotThreshold__option_t) const { return d_holder->arithPivotThreshold; } #line 39 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPivotThreshold__option_t) const { return d_holder->arithPivotThreshold__setByUser__; } #line 42 "../../../src/options/arith_options" template <> const options::arithPropagateMaxLength__option_t::type& Options::operator[](options::arithPropagateMaxLength__option_t) const { return d_holder->arithPropagateMaxLength; } #line 42 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPropagateMaxLength__option_t) const { return d_holder->arithPropagateMaxLength__setByUser__; } #line 45 "../../../src/options/arith_options" template <> const options::arithDioSolver__option_t::type& Options::operator[](options::arithDioSolver__option_t) const { return d_holder->arithDioSolver; } #line 45 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithDioSolver__option_t) const { return d_holder->arithDioSolver__setByUser__; } #line 51 "../../../src/options/arith_options" template <> void Options::set(options::arithRewriteEq__option_t, const options::arithRewriteEq__option_t::type& x) { d_holder->arithRewriteEq = x; } #line 51 "../../../src/options/arith_options" template <> const options::arithRewriteEq__option_t::type& Options::operator[](options::arithRewriteEq__option_t) const { return d_holder->arithRewriteEq; } #line 51 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithRewriteEq__option_t) const { return d_holder->arithRewriteEq__setByUser__; } #line 56 "../../../src/options/arith_options" template <> const options::arithMLTrick__option_t::type& Options::operator[](options::arithMLTrick__option_t) const { return d_holder->arithMLTrick; } #line 56 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithMLTrick__option_t) const { return d_holder->arithMLTrick__setByUser__; } #line 60 "../../../src/options/arith_options" template <> const options::arithMLTrickSubstitutions__option_t::type& Options::operator[](options::arithMLTrickSubstitutions__option_t) const { return d_holder->arithMLTrickSubstitutions; } #line 60 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithMLTrickSubstitutions__option_t) const { return d_holder->arithMLTrickSubstitutions__setByUser__; } #line 63 "../../../src/options/arith_options" template <> void Options::set(options::doCutAllBounded__option_t, const options::doCutAllBounded__option_t::type& x) { d_holder->doCutAllBounded = x; } #line 63 "../../../src/options/arith_options" template <> const options::doCutAllBounded__option_t::type& Options::operator[](options::doCutAllBounded__option_t) const { return d_holder->doCutAllBounded; } #line 63 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::doCutAllBounded__option_t) const { return d_holder->doCutAllBounded__setByUser__; } #line 67 "../../../src/options/arith_options" template <> const options::maxCutsInContext__option_t::type& Options::operator[](options::maxCutsInContext__option_t) const { return d_holder->maxCutsInContext; } #line 67 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::maxCutsInContext__option_t) const { return d_holder->maxCutsInContext__setByUser__; } #line 70 "../../../src/options/arith_options" template <> const options::revertArithModels__option_t::type& Options::operator[](options::revertArithModels__option_t) const { return d_holder->revertArithModels; } #line 70 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::revertArithModels__option_t) const { return d_holder->revertArithModels__setByUser__; } #line 73 "../../../src/options/arith_options" template <> void Options::set(options::havePenalties__option_t, const options::havePenalties__option_t::type& x) { d_holder->havePenalties = x; } #line 73 "../../../src/options/arith_options" template <> const options::havePenalties__option_t::type& Options::operator[](options::havePenalties__option_t) const { return d_holder->havePenalties; } #line 73 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::havePenalties__option_t) const { return d_holder->havePenalties__setByUser__; } #line 77 "../../../src/options/arith_options" template <> void Options::set(options::useFC__option_t, const options::useFC__option_t::type& x) { d_holder->useFC = x; } #line 77 "../../../src/options/arith_options" template <> const options::useFC__option_t::type& Options::operator[](options::useFC__option_t) const { return d_holder->useFC; } #line 77 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::useFC__option_t) const { return d_holder->useFC__setByUser__; } #line 80 "../../../src/options/arith_options" template <> void Options::set(options::useSOI__option_t, const options::useSOI__option_t::type& x) { d_holder->useSOI = x; } #line 80 "../../../src/options/arith_options" template <> const options::useSOI__option_t::type& Options::operator[](options::useSOI__option_t) const { return d_holder->useSOI; } #line 80 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::useSOI__option_t) const { return d_holder->useSOI__setByUser__; } #line 83 "../../../src/options/arith_options" template <> void Options::set(options::restrictedPivots__option_t, const options::restrictedPivots__option_t::type& x) { d_holder->restrictedPivots = x; } #line 83 "../../../src/options/arith_options" template <> const options::restrictedPivots__option_t::type& Options::operator[](options::restrictedPivots__option_t) const { return d_holder->restrictedPivots; } #line 83 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::restrictedPivots__option_t) const { return d_holder->restrictedPivots__setByUser__; } #line 86 "../../../src/options/arith_options" template <> void Options::set(options::collectPivots__option_t, const options::collectPivots__option_t::type& x) { d_holder->collectPivots = x; } #line 86 "../../../src/options/arith_options" template <> const options::collectPivots__option_t::type& Options::operator[](options::collectPivots__option_t) const { return d_holder->collectPivots; } #line 86 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::collectPivots__option_t) const { return d_holder->collectPivots__setByUser__; } #line 89 "../../../src/options/arith_options" template <> void Options::set(options::useApprox__option_t, const options::useApprox__option_t::type& x) { d_holder->useApprox = x; } #line 89 "../../../src/options/arith_options" template <> const options::useApprox__option_t::type& Options::operator[](options::useApprox__option_t) const { return d_holder->useApprox; } #line 89 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::useApprox__option_t) const { return d_holder->useApprox__setByUser__; } #line 92 "../../../src/options/arith_options" template <> void Options::set(options::maxApproxDepth__option_t, const options::maxApproxDepth__option_t::type& x) { d_holder->maxApproxDepth = x; } #line 92 "../../../src/options/arith_options" template <> const options::maxApproxDepth__option_t::type& Options::operator[](options::maxApproxDepth__option_t) const { return d_holder->maxApproxDepth; } #line 92 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::maxApproxDepth__option_t) const { return d_holder->maxApproxDepth__setByUser__; } #line 95 "../../../src/options/arith_options" template <> void Options::set(options::exportDioDecompositions__option_t, const options::exportDioDecompositions__option_t::type& x) { d_holder->exportDioDecompositions = x; } #line 95 "../../../src/options/arith_options" template <> const options::exportDioDecompositions__option_t::type& Options::operator[](options::exportDioDecompositions__option_t) const { return d_holder->exportDioDecompositions; } #line 95 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::exportDioDecompositions__option_t) const { return d_holder->exportDioDecompositions__setByUser__; } #line 98 "../../../src/options/arith_options" template <> void Options::set(options::newProp__option_t, const options::newProp__option_t::type& x) { d_holder->newProp = x; } #line 98 "../../../src/options/arith_options" template <> const options::newProp__option_t::type& Options::operator[](options::newProp__option_t) const { return d_holder->newProp; } #line 98 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::newProp__option_t) const { return d_holder->newProp__setByUser__; } #line 101 "../../../src/options/arith_options" template <> void Options::set(options::arithPropAsLemmaLength__option_t, const options::arithPropAsLemmaLength__option_t::type& x) { d_holder->arithPropAsLemmaLength = x; } #line 101 "../../../src/options/arith_options" template <> const options::arithPropAsLemmaLength__option_t::type& Options::operator[](options::arithPropAsLemmaLength__option_t) const { return d_holder->arithPropAsLemmaLength; } #line 101 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPropAsLemmaLength__option_t) const { return d_holder->arithPropAsLemmaLength__setByUser__; } #line 104 "../../../src/options/arith_options" template <> void Options::set(options::soiQuickExplain__option_t, const options::soiQuickExplain__option_t::type& x) { d_holder->soiQuickExplain = x; } #line 104 "../../../src/options/arith_options" template <> const options::soiQuickExplain__option_t::type& Options::operator[](options::soiQuickExplain__option_t) const { return d_holder->soiQuickExplain; } #line 104 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiQuickExplain__option_t) const { return d_holder->soiQuickExplain__setByUser__; } #line 107 "../../../src/options/arith_options" template <> void Options::set(options::rewriteDivk__option_t, const options::rewriteDivk__option_t::type& x) { d_holder->rewriteDivk = x; } #line 107 "../../../src/options/arith_options" template <> const options::rewriteDivk__option_t::type& Options::operator[](options::rewriteDivk__option_t) const { return d_holder->rewriteDivk; } #line 107 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::rewriteDivk__option_t) const { return d_holder->rewriteDivk__setByUser__; } #line 110 "../../../src/options/arith_options" template <> const options::trySolveIntStandardEffort__option_t::type& Options::operator[](options::trySolveIntStandardEffort__option_t) const { return d_holder->trySolveIntStandardEffort; } #line 110 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::trySolveIntStandardEffort__option_t) const { return d_holder->trySolveIntStandardEffort__setByUser__; } #line 113 "../../../src/options/arith_options" template <> const options::replayFailureLemma__option_t::type& Options::operator[](options::replayFailureLemma__option_t) const { return d_holder->replayFailureLemma; } #line 113 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayFailureLemma__option_t) const { return d_holder->replayFailureLemma__setByUser__; } #line 116 "../../../src/options/arith_options" template <> const options::dioSolverTurns__option_t::type& Options::operator[](options::dioSolverTurns__option_t) const { return d_holder->dioSolverTurns; } #line 116 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::dioSolverTurns__option_t) const { return d_holder->dioSolverTurns__setByUser__; } #line 119 "../../../src/options/arith_options" template <> const options::rrTurns__option_t::type& Options::operator[](options::rrTurns__option_t) const { return d_holder->rrTurns; } #line 119 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::rrTurns__option_t) const { return d_holder->rrTurns__setByUser__; } #line 122 "../../../src/options/arith_options" template <> const options::dioRepeat__option_t::type& Options::operator[](options::dioRepeat__option_t) const { return d_holder->dioRepeat; } #line 122 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::dioRepeat__option_t) const { return d_holder->dioRepeat__setByUser__; } #line 125 "../../../src/options/arith_options" template <> const options::replayEarlyCloseDepths__option_t::type& Options::operator[](options::replayEarlyCloseDepths__option_t) const { return d_holder->replayEarlyCloseDepths; } #line 125 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayEarlyCloseDepths__option_t) const { return d_holder->replayEarlyCloseDepths__setByUser__; } #line 128 "../../../src/options/arith_options" template <> const options::replayFailurePenalty__option_t::type& Options::operator[](options::replayFailurePenalty__option_t) const { return d_holder->replayFailurePenalty; } #line 128 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayFailurePenalty__option_t) const { return d_holder->replayFailurePenalty__setByUser__; } #line 131 "../../../src/options/arith_options" template <> const options::replayNumericFailurePenalty__option_t::type& Options::operator[](options::replayNumericFailurePenalty__option_t) const { return d_holder->replayNumericFailurePenalty; } #line 131 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayNumericFailurePenalty__option_t) const { return d_holder->replayNumericFailurePenalty__setByUser__; } #line 134 "../../../src/options/arith_options" template <> const options::replayRejectCutSize__option_t::type& Options::operator[](options::replayRejectCutSize__option_t) const { return d_holder->replayRejectCutSize; } #line 134 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayRejectCutSize__option_t) const { return d_holder->replayRejectCutSize__setByUser__; } #line 137 "../../../src/options/arith_options" template <> const options::lemmaRejectCutSize__option_t::type& Options::operator[](options::lemmaRejectCutSize__option_t) const { return d_holder->lemmaRejectCutSize; } #line 137 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::lemmaRejectCutSize__option_t) const { return d_holder->lemmaRejectCutSize__setByUser__; } #line 140 "../../../src/options/arith_options" template <> const options::soiApproxMajorFailure__option_t::type& Options::operator[](options::soiApproxMajorFailure__option_t) const { return d_holder->soiApproxMajorFailure; } #line 140 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMajorFailure__option_t) const { return d_holder->soiApproxMajorFailure__setByUser__; } #line 143 "../../../src/options/arith_options" template <> const options::soiApproxMajorFailurePen__option_t::type& Options::operator[](options::soiApproxMajorFailurePen__option_t) const { return d_holder->soiApproxMajorFailurePen; } #line 143 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMajorFailurePen__option_t) const { return d_holder->soiApproxMajorFailurePen__setByUser__; } #line 146 "../../../src/options/arith_options" template <> const options::soiApproxMinorFailure__option_t::type& Options::operator[](options::soiApproxMinorFailure__option_t) const { return d_holder->soiApproxMinorFailure; } #line 146 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMinorFailure__option_t) const { return d_holder->soiApproxMinorFailure__setByUser__; } #line 149 "../../../src/options/arith_options" template <> const options::soiApproxMinorFailurePen__option_t::type& Options::operator[](options::soiApproxMinorFailurePen__option_t) const { return d_holder->soiApproxMinorFailurePen; } #line 149 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMinorFailurePen__option_t) const { return d_holder->soiApproxMinorFailurePen__setByUser__; } #line 152 "../../../src/options/arith_options" template <> const options::ppAssertMaxSubSize__option_t::type& Options::operator[](options::ppAssertMaxSubSize__option_t) const { return d_holder->ppAssertMaxSubSize; } #line 152 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::ppAssertMaxSubSize__option_t) const { return d_holder->ppAssertMaxSubSize__setByUser__; } #line 155 "../../../src/options/arith_options" template <> const options::maxReplayTree__option_t::type& Options::operator[](options::maxReplayTree__option_t) const { return d_holder->maxReplayTree; } #line 155 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::maxReplayTree__option_t) const { return d_holder->maxReplayTree__setByUser__; } #line 159 "../../../src/options/arith_options" template <> const options::pbRewrites__option_t::type& Options::operator[](options::pbRewrites__option_t) const { return d_holder->pbRewrites; } #line 159 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::pbRewrites__option_t) const { return d_holder->pbRewrites__setByUser__; } #line 162 "../../../src/options/arith_options" template <> const options::pbRewriteThreshold__option_t::type& Options::operator[](options::pbRewriteThreshold__option_t) const { return d_holder->pbRewriteThreshold; } #line 162 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::pbRewriteThreshold__option_t) const { return d_holder->pbRewriteThreshold__setByUser__; } #line 165 "../../../src/options/arith_options" template <> const options::sNormInferEq__option_t::type& Options::operator[](options::sNormInferEq__option_t) const { return d_holder->sNormInferEq; } #line 165 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::sNormInferEq__option_t) const { return d_holder->sNormInferEq__setByUser__; } #line 168 "../../../src/options/arith_options" template <> const options::nlExt__option_t::type& Options::operator[](options::nlExt__option_t) const { return d_holder->nlExt; } #line 168 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExt__option_t) const { return d_holder->nlExt__setByUser__; } #line 171 "../../../src/options/arith_options" template <> const options::nlExtResBound__option_t::type& Options::operator[](options::nlExtResBound__option_t) const { return d_holder->nlExtResBound; } #line 171 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtResBound__option_t) const { return d_holder->nlExtResBound__setByUser__; } #line 174 "../../../src/options/arith_options" template <> const options::nlExtTangentPlanes__option_t::type& Options::operator[](options::nlExtTangentPlanes__option_t) const { return d_holder->nlExtTangentPlanes; } #line 174 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtTangentPlanes__option_t) const { return d_holder->nlExtTangentPlanes__setByUser__; } #line 177 "../../../src/options/arith_options" template <> const options::nlExtEntailConflicts__option_t::type& Options::operator[](options::nlExtEntailConflicts__option_t) const { return d_holder->nlExtEntailConflicts; } #line 177 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtEntailConflicts__option_t) const { return d_holder->nlExtEntailConflicts__setByUser__; } #line 180 "../../../src/options/arith_options" template <> const options::nlExtRewrites__option_t::type& Options::operator[](options::nlExtRewrites__option_t) const { return d_holder->nlExtRewrites; } #line 180 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtRewrites__option_t) const { return d_holder->nlExtRewrites__setByUser__; } #line 183 "../../../src/options/arith_options" template <> const options::nlExtSolveSubs__option_t::type& Options::operator[](options::nlExtSolveSubs__option_t) const { return d_holder->nlExtSolveSubs; } #line 183 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtSolveSubs__option_t) const { return d_holder->nlExtSolveSubs__setByUser__; } #line 186 "../../../src/options/arith_options" template <> const options::nlExtPurify__option_t::type& Options::operator[](options::nlExtPurify__option_t) const { return d_holder->nlExtPurify; } #line 186 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtPurify__option_t) const { return d_holder->nlExtPurify__setByUser__; } #line 189 "../../../src/options/arith_options" template <> const options::nlExtSplitZero__option_t::type& Options::operator[](options::nlExtSplitZero__option_t) const { return d_holder->nlExtSplitZero; } #line 189 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtSplitZero__option_t) const { return d_holder->nlExtSplitZero__setByUser__; } #line 24 "../../../src/options/base_options_template.cpp" namespace options { #line 8 "../../../src/options/arith_options" struct arithUnateLemmaMode__option_t arithUnateLemmaMode; #line 11 "../../../src/options/arith_options" struct arithPropagationMode__option_t arithPropagationMode; #line 18 "../../../src/options/arith_options" struct arithHeuristicPivots__option_t arithHeuristicPivots; #line 25 "../../../src/options/arith_options" struct arithStandardCheckVarOrderPivots__option_t arithStandardCheckVarOrderPivots; #line 28 "../../../src/options/arith_options" struct arithErrorSelectionRule__option_t arithErrorSelectionRule; #line 32 "../../../src/options/arith_options" struct arithSimplexCheckPeriod__option_t arithSimplexCheckPeriod; #line 39 "../../../src/options/arith_options" struct arithPivotThreshold__option_t arithPivotThreshold; #line 42 "../../../src/options/arith_options" struct arithPropagateMaxLength__option_t arithPropagateMaxLength; #line 45 "../../../src/options/arith_options" struct arithDioSolver__option_t arithDioSolver; #line 51 "../../../src/options/arith_options" struct arithRewriteEq__option_t arithRewriteEq; #line 56 "../../../src/options/arith_options" struct arithMLTrick__option_t arithMLTrick; #line 60 "../../../src/options/arith_options" struct arithMLTrickSubstitutions__option_t arithMLTrickSubstitutions; #line 63 "../../../src/options/arith_options" struct doCutAllBounded__option_t doCutAllBounded; #line 67 "../../../src/options/arith_options" struct maxCutsInContext__option_t maxCutsInContext; #line 70 "../../../src/options/arith_options" struct revertArithModels__option_t revertArithModels; #line 73 "../../../src/options/arith_options" struct havePenalties__option_t havePenalties; #line 77 "../../../src/options/arith_options" struct useFC__option_t useFC; #line 80 "../../../src/options/arith_options" struct useSOI__option_t useSOI; #line 83 "../../../src/options/arith_options" struct restrictedPivots__option_t restrictedPivots; #line 86 "../../../src/options/arith_options" struct collectPivots__option_t collectPivots; #line 89 "../../../src/options/arith_options" struct useApprox__option_t useApprox; #line 92 "../../../src/options/arith_options" struct maxApproxDepth__option_t maxApproxDepth; #line 95 "../../../src/options/arith_options" struct exportDioDecompositions__option_t exportDioDecompositions; #line 98 "../../../src/options/arith_options" struct newProp__option_t newProp; #line 101 "../../../src/options/arith_options" struct arithPropAsLemmaLength__option_t arithPropAsLemmaLength; #line 104 "../../../src/options/arith_options" struct soiQuickExplain__option_t soiQuickExplain; #line 107 "../../../src/options/arith_options" struct rewriteDivk__option_t rewriteDivk; #line 110 "../../../src/options/arith_options" struct trySolveIntStandardEffort__option_t trySolveIntStandardEffort; #line 113 "../../../src/options/arith_options" struct replayFailureLemma__option_t replayFailureLemma; #line 116 "../../../src/options/arith_options" struct dioSolverTurns__option_t dioSolverTurns; #line 119 "../../../src/options/arith_options" struct rrTurns__option_t rrTurns; #line 122 "../../../src/options/arith_options" struct dioRepeat__option_t dioRepeat; #line 125 "../../../src/options/arith_options" struct replayEarlyCloseDepths__option_t replayEarlyCloseDepths; #line 128 "../../../src/options/arith_options" struct replayFailurePenalty__option_t replayFailurePenalty; #line 131 "../../../src/options/arith_options" struct replayNumericFailurePenalty__option_t replayNumericFailurePenalty; #line 134 "../../../src/options/arith_options" struct replayRejectCutSize__option_t replayRejectCutSize; #line 137 "../../../src/options/arith_options" struct lemmaRejectCutSize__option_t lemmaRejectCutSize; #line 140 "../../../src/options/arith_options" struct soiApproxMajorFailure__option_t soiApproxMajorFailure; #line 143 "../../../src/options/arith_options" struct soiApproxMajorFailurePen__option_t soiApproxMajorFailurePen; #line 146 "../../../src/options/arith_options" struct soiApproxMinorFailure__option_t soiApproxMinorFailure; #line 149 "../../../src/options/arith_options" struct soiApproxMinorFailurePen__option_t soiApproxMinorFailurePen; #line 152 "../../../src/options/arith_options" struct ppAssertMaxSubSize__option_t ppAssertMaxSubSize; #line 155 "../../../src/options/arith_options" struct maxReplayTree__option_t maxReplayTree; #line 159 "../../../src/options/arith_options" struct pbRewrites__option_t pbRewrites; #line 162 "../../../src/options/arith_options" struct pbRewriteThreshold__option_t pbRewriteThreshold; #line 165 "../../../src/options/arith_options" struct sNormInferEq__option_t sNormInferEq; #line 168 "../../../src/options/arith_options" struct nlExt__option_t nlExt; #line 171 "../../../src/options/arith_options" struct nlExtResBound__option_t nlExtResBound; #line 174 "../../../src/options/arith_options" struct nlExtTangentPlanes__option_t nlExtTangentPlanes; #line 177 "../../../src/options/arith_options" struct nlExtEntailConflicts__option_t nlExtEntailConflicts; #line 180 "../../../src/options/arith_options" struct nlExtRewrites__option_t nlExtRewrites; #line 183 "../../../src/options/arith_options" struct nlExtSolveSubs__option_t nlExtSolveSubs; #line 186 "../../../src/options/arith_options" struct nlExtPurify__option_t nlExtPurify; #line 189 "../../../src/options/arith_options" struct nlExtSplitZero__option_t nlExtSplitZero; #line 30 "../../../src/options/base_options_template.cpp" }/* CVC4::options namespace */ }/* CVC4 namespace */ cvc4-1.5/src/options/arith_options.h000066400000000000000000002027141313116454100175400ustar00rootroot00000000000000/********************* */ /*! \file base_options_template.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Contains code for handling command-line options. ** ** Contains code for handling command-line options **/ #include "cvc4_private.h" #ifndef __CVC4__OPTIONS__ARITH_H #define __CVC4__OPTIONS__ARITH_H #include "options/options.h" #line 8 "../../../src/options/arith_options" #include "options/arith_unate_lemma_mode.h" #line 11 "../../../src/options/arith_options" #include "options/arith_propagation_mode.h" #line 28 "../../../src/options/arith_options" #include "options/arith_heuristic_pivot_rule.h" #line 26 "../../../src/options/base_options_template.h" #define CVC4_OPTIONS__ARITH__FOR_OPTION_HOLDER \ arithUnateLemmaMode__option_t::type arithUnateLemmaMode; \ bool arithUnateLemmaMode__setByUser__; \ arithPropagationMode__option_t::type arithPropagationMode; \ bool arithPropagationMode__setByUser__; \ arithHeuristicPivots__option_t::type arithHeuristicPivots; \ bool arithHeuristicPivots__setByUser__; \ arithStandardCheckVarOrderPivots__option_t::type arithStandardCheckVarOrderPivots; \ bool arithStandardCheckVarOrderPivots__setByUser__; \ arithErrorSelectionRule__option_t::type arithErrorSelectionRule; \ bool arithErrorSelectionRule__setByUser__; \ arithSimplexCheckPeriod__option_t::type arithSimplexCheckPeriod; \ bool arithSimplexCheckPeriod__setByUser__; \ arithPivotThreshold__option_t::type arithPivotThreshold; \ bool arithPivotThreshold__setByUser__; \ arithPropagateMaxLength__option_t::type arithPropagateMaxLength; \ bool arithPropagateMaxLength__setByUser__; \ arithDioSolver__option_t::type arithDioSolver; \ bool arithDioSolver__setByUser__; \ arithRewriteEq__option_t::type arithRewriteEq; \ bool arithRewriteEq__setByUser__; \ arithMLTrick__option_t::type arithMLTrick; \ bool arithMLTrick__setByUser__; \ arithMLTrickSubstitutions__option_t::type arithMLTrickSubstitutions; \ bool arithMLTrickSubstitutions__setByUser__; \ doCutAllBounded__option_t::type doCutAllBounded; \ bool doCutAllBounded__setByUser__; \ maxCutsInContext__option_t::type maxCutsInContext; \ bool maxCutsInContext__setByUser__; \ revertArithModels__option_t::type revertArithModels; \ bool revertArithModels__setByUser__; \ havePenalties__option_t::type havePenalties; \ bool havePenalties__setByUser__; \ useFC__option_t::type useFC; \ bool useFC__setByUser__; \ useSOI__option_t::type useSOI; \ bool useSOI__setByUser__; \ restrictedPivots__option_t::type restrictedPivots; \ bool restrictedPivots__setByUser__; \ collectPivots__option_t::type collectPivots; \ bool collectPivots__setByUser__; \ useApprox__option_t::type useApprox; \ bool useApprox__setByUser__; \ maxApproxDepth__option_t::type maxApproxDepth; \ bool maxApproxDepth__setByUser__; \ exportDioDecompositions__option_t::type exportDioDecompositions; \ bool exportDioDecompositions__setByUser__; \ newProp__option_t::type newProp; \ bool newProp__setByUser__; \ arithPropAsLemmaLength__option_t::type arithPropAsLemmaLength; \ bool arithPropAsLemmaLength__setByUser__; \ soiQuickExplain__option_t::type soiQuickExplain; \ bool soiQuickExplain__setByUser__; \ rewriteDivk__option_t::type rewriteDivk; \ bool rewriteDivk__setByUser__; \ trySolveIntStandardEffort__option_t::type trySolveIntStandardEffort; \ bool trySolveIntStandardEffort__setByUser__; \ replayFailureLemma__option_t::type replayFailureLemma; \ bool replayFailureLemma__setByUser__; \ dioSolverTurns__option_t::type dioSolverTurns; \ bool dioSolverTurns__setByUser__; \ rrTurns__option_t::type rrTurns; \ bool rrTurns__setByUser__; \ dioRepeat__option_t::type dioRepeat; \ bool dioRepeat__setByUser__; \ replayEarlyCloseDepths__option_t::type replayEarlyCloseDepths; \ bool replayEarlyCloseDepths__setByUser__; \ replayFailurePenalty__option_t::type replayFailurePenalty; \ bool replayFailurePenalty__setByUser__; \ replayNumericFailurePenalty__option_t::type replayNumericFailurePenalty; \ bool replayNumericFailurePenalty__setByUser__; \ replayRejectCutSize__option_t::type replayRejectCutSize; \ bool replayRejectCutSize__setByUser__; \ lemmaRejectCutSize__option_t::type lemmaRejectCutSize; \ bool lemmaRejectCutSize__setByUser__; \ soiApproxMajorFailure__option_t::type soiApproxMajorFailure; \ bool soiApproxMajorFailure__setByUser__; \ soiApproxMajorFailurePen__option_t::type soiApproxMajorFailurePen; \ bool soiApproxMajorFailurePen__setByUser__; \ soiApproxMinorFailure__option_t::type soiApproxMinorFailure; \ bool soiApproxMinorFailure__setByUser__; \ soiApproxMinorFailurePen__option_t::type soiApproxMinorFailurePen; \ bool soiApproxMinorFailurePen__setByUser__; \ ppAssertMaxSubSize__option_t::type ppAssertMaxSubSize; \ bool ppAssertMaxSubSize__setByUser__; \ maxReplayTree__option_t::type maxReplayTree; \ bool maxReplayTree__setByUser__; \ pbRewrites__option_t::type pbRewrites; \ bool pbRewrites__setByUser__; \ pbRewriteThreshold__option_t::type pbRewriteThreshold; \ bool pbRewriteThreshold__setByUser__; \ sNormInferEq__option_t::type sNormInferEq; \ bool sNormInferEq__setByUser__; \ nlExt__option_t::type nlExt; \ bool nlExt__setByUser__; \ nlExtResBound__option_t::type nlExtResBound; \ bool nlExtResBound__setByUser__; \ nlExtTangentPlanes__option_t::type nlExtTangentPlanes; \ bool nlExtTangentPlanes__setByUser__; \ nlExtEntailConflicts__option_t::type nlExtEntailConflicts; \ bool nlExtEntailConflicts__setByUser__; \ nlExtRewrites__option_t::type nlExtRewrites; \ bool nlExtRewrites__setByUser__; \ nlExtSolveSubs__option_t::type nlExtSolveSubs; \ bool nlExtSolveSubs__setByUser__; \ nlExtPurify__option_t::type nlExtPurify; \ bool nlExtPurify__setByUser__; \ nlExtSplitZero__option_t::type nlExtSplitZero; \ bool nlExtSplitZero__setByUser__; #line 30 "../../../src/options/base_options_template.h" namespace CVC4 { namespace options { #line 8 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithUnateLemmaMode__option_t { typedef ArithUnateLemmaMode type; type operator()() const; bool wasSetByUser() const; } arithUnateLemmaMode CVC4_PUBLIC; #line 11 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithPropagationMode__option_t { typedef ArithPropagationMode type; type operator()() const; bool wasSetByUser() const; } arithPropagationMode CVC4_PUBLIC; #line 18 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithHeuristicPivots__option_t { typedef int16_t type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arithHeuristicPivots CVC4_PUBLIC; #line 25 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithStandardCheckVarOrderPivots__option_t { typedef int16_t type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arithStandardCheckVarOrderPivots CVC4_PUBLIC; #line 28 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithErrorSelectionRule__option_t { typedef ErrorSelectionRule type; type operator()() const; bool wasSetByUser() const; } arithErrorSelectionRule CVC4_PUBLIC; #line 32 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithSimplexCheckPeriod__option_t { typedef uint16_t type; type operator()() const; bool wasSetByUser() const; } arithSimplexCheckPeriod CVC4_PUBLIC; #line 39 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithPivotThreshold__option_t { typedef uint16_t type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arithPivotThreshold CVC4_PUBLIC; #line 42 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithPropagateMaxLength__option_t { typedef uint16_t type; type operator()() const; bool wasSetByUser() const; } arithPropagateMaxLength CVC4_PUBLIC; #line 45 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithDioSolver__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } arithDioSolver CVC4_PUBLIC; #line 51 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithRewriteEq__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arithRewriteEq CVC4_PUBLIC; #line 56 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithMLTrick__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } arithMLTrick CVC4_PUBLIC; #line 60 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithMLTrickSubstitutions__option_t { typedef unsigned type; type operator()() const; bool wasSetByUser() const; } arithMLTrickSubstitutions CVC4_PUBLIC; #line 63 "../../../src/options/arith_options" extern struct CVC4_PUBLIC doCutAllBounded__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } doCutAllBounded CVC4_PUBLIC; #line 67 "../../../src/options/arith_options" extern struct CVC4_PUBLIC maxCutsInContext__option_t { typedef unsigned type; type operator()() const; bool wasSetByUser() const; } maxCutsInContext CVC4_PUBLIC; #line 70 "../../../src/options/arith_options" extern struct CVC4_PUBLIC revertArithModels__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } revertArithModels CVC4_PUBLIC; #line 73 "../../../src/options/arith_options" extern struct CVC4_PUBLIC havePenalties__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } havePenalties CVC4_PUBLIC; #line 77 "../../../src/options/arith_options" extern struct CVC4_PUBLIC useFC__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } useFC CVC4_PUBLIC; #line 80 "../../../src/options/arith_options" extern struct CVC4_PUBLIC useSOI__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } useSOI CVC4_PUBLIC; #line 83 "../../../src/options/arith_options" extern struct CVC4_PUBLIC restrictedPivots__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } restrictedPivots CVC4_PUBLIC; #line 86 "../../../src/options/arith_options" extern struct CVC4_PUBLIC collectPivots__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } collectPivots CVC4_PUBLIC; #line 89 "../../../src/options/arith_options" extern struct CVC4_PUBLIC useApprox__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } useApprox CVC4_PUBLIC; #line 92 "../../../src/options/arith_options" extern struct CVC4_PUBLIC maxApproxDepth__option_t { typedef int16_t type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } maxApproxDepth CVC4_PUBLIC; #line 95 "../../../src/options/arith_options" extern struct CVC4_PUBLIC exportDioDecompositions__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } exportDioDecompositions CVC4_PUBLIC; #line 98 "../../../src/options/arith_options" extern struct CVC4_PUBLIC newProp__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } newProp CVC4_PUBLIC; #line 101 "../../../src/options/arith_options" extern struct CVC4_PUBLIC arithPropAsLemmaLength__option_t { typedef uint16_t type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arithPropAsLemmaLength CVC4_PUBLIC; #line 104 "../../../src/options/arith_options" extern struct CVC4_PUBLIC soiQuickExplain__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } soiQuickExplain CVC4_PUBLIC; #line 107 "../../../src/options/arith_options" extern struct CVC4_PUBLIC rewriteDivk__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } rewriteDivk CVC4_PUBLIC; #line 110 "../../../src/options/arith_options" extern struct CVC4_PUBLIC trySolveIntStandardEffort__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } trySolveIntStandardEffort CVC4_PUBLIC; #line 113 "../../../src/options/arith_options" extern struct CVC4_PUBLIC replayFailureLemma__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } replayFailureLemma CVC4_PUBLIC; #line 116 "../../../src/options/arith_options" extern struct CVC4_PUBLIC dioSolverTurns__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } dioSolverTurns CVC4_PUBLIC; #line 119 "../../../src/options/arith_options" extern struct CVC4_PUBLIC rrTurns__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } rrTurns CVC4_PUBLIC; #line 122 "../../../src/options/arith_options" extern struct CVC4_PUBLIC dioRepeat__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } dioRepeat CVC4_PUBLIC; #line 125 "../../../src/options/arith_options" extern struct CVC4_PUBLIC replayEarlyCloseDepths__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } replayEarlyCloseDepths CVC4_PUBLIC; #line 128 "../../../src/options/arith_options" extern struct CVC4_PUBLIC replayFailurePenalty__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } replayFailurePenalty CVC4_PUBLIC; #line 131 "../../../src/options/arith_options" extern struct CVC4_PUBLIC replayNumericFailurePenalty__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } replayNumericFailurePenalty CVC4_PUBLIC; #line 134 "../../../src/options/arith_options" extern struct CVC4_PUBLIC replayRejectCutSize__option_t { typedef unsigned type; type operator()() const; bool wasSetByUser() const; } replayRejectCutSize CVC4_PUBLIC; #line 137 "../../../src/options/arith_options" extern struct CVC4_PUBLIC lemmaRejectCutSize__option_t { typedef unsigned type; type operator()() const; bool wasSetByUser() const; } lemmaRejectCutSize CVC4_PUBLIC; #line 140 "../../../src/options/arith_options" extern struct CVC4_PUBLIC soiApproxMajorFailure__option_t { typedef double type; type operator()() const; bool wasSetByUser() const; } soiApproxMajorFailure CVC4_PUBLIC; #line 143 "../../../src/options/arith_options" extern struct CVC4_PUBLIC soiApproxMajorFailurePen__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } soiApproxMajorFailurePen CVC4_PUBLIC; #line 146 "../../../src/options/arith_options" extern struct CVC4_PUBLIC soiApproxMinorFailure__option_t { typedef double type; type operator()() const; bool wasSetByUser() const; } soiApproxMinorFailure CVC4_PUBLIC; #line 149 "../../../src/options/arith_options" extern struct CVC4_PUBLIC soiApproxMinorFailurePen__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } soiApproxMinorFailurePen CVC4_PUBLIC; #line 152 "../../../src/options/arith_options" extern struct CVC4_PUBLIC ppAssertMaxSubSize__option_t { typedef unsigned type; type operator()() const; bool wasSetByUser() const; } ppAssertMaxSubSize CVC4_PUBLIC; #line 155 "../../../src/options/arith_options" extern struct CVC4_PUBLIC maxReplayTree__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } maxReplayTree CVC4_PUBLIC; #line 159 "../../../src/options/arith_options" extern struct CVC4_PUBLIC pbRewrites__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } pbRewrites CVC4_PUBLIC; #line 162 "../../../src/options/arith_options" extern struct CVC4_PUBLIC pbRewriteThreshold__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; } pbRewriteThreshold CVC4_PUBLIC; #line 165 "../../../src/options/arith_options" extern struct CVC4_PUBLIC sNormInferEq__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } sNormInferEq CVC4_PUBLIC; #line 168 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExt__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExt CVC4_PUBLIC; #line 171 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExtResBound__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExtResBound CVC4_PUBLIC; #line 174 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExtTangentPlanes__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExtTangentPlanes CVC4_PUBLIC; #line 177 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExtEntailConflicts__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExtEntailConflicts CVC4_PUBLIC; #line 180 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExtRewrites__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExtRewrites CVC4_PUBLIC; #line 183 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExtSolveSubs__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExtSolveSubs CVC4_PUBLIC; #line 186 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExtPurify__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExtPurify CVC4_PUBLIC; #line 189 "../../../src/options/arith_options" extern struct CVC4_PUBLIC nlExtSplitZero__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; } nlExtSplitZero CVC4_PUBLIC; #line 38 "../../../src/options/base_options_template.h" }/* CVC4::options namespace */ #line 8 "../../../src/options/arith_options" template <> const options::arithUnateLemmaMode__option_t::type& Options::operator[](options::arithUnateLemmaMode__option_t) const; #line 8 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithUnateLemmaMode__option_t) const; #line 8 "../../../src/options/arith_options" template <> void Options::assign(options::arithUnateLemmaMode__option_t, std::string option, std::string value); #line 11 "../../../src/options/arith_options" template <> const options::arithPropagationMode__option_t::type& Options::operator[](options::arithPropagationMode__option_t) const; #line 11 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPropagationMode__option_t) const; #line 11 "../../../src/options/arith_options" template <> void Options::assign(options::arithPropagationMode__option_t, std::string option, std::string value); #line 18 "../../../src/options/arith_options" template <> void Options::set(options::arithHeuristicPivots__option_t, const options::arithHeuristicPivots__option_t::type& x); #line 18 "../../../src/options/arith_options" template <> const options::arithHeuristicPivots__option_t::type& Options::operator[](options::arithHeuristicPivots__option_t) const; #line 18 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithHeuristicPivots__option_t) const; #line 18 "../../../src/options/arith_options" template <> void Options::assign(options::arithHeuristicPivots__option_t, std::string option, std::string value); #line 25 "../../../src/options/arith_options" template <> void Options::set(options::arithStandardCheckVarOrderPivots__option_t, const options::arithStandardCheckVarOrderPivots__option_t::type& x); #line 25 "../../../src/options/arith_options" template <> const options::arithStandardCheckVarOrderPivots__option_t::type& Options::operator[](options::arithStandardCheckVarOrderPivots__option_t) const; #line 25 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithStandardCheckVarOrderPivots__option_t) const; #line 25 "../../../src/options/arith_options" template <> void Options::assign(options::arithStandardCheckVarOrderPivots__option_t, std::string option, std::string value); #line 28 "../../../src/options/arith_options" template <> const options::arithErrorSelectionRule__option_t::type& Options::operator[](options::arithErrorSelectionRule__option_t) const; #line 28 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithErrorSelectionRule__option_t) const; #line 28 "../../../src/options/arith_options" template <> void Options::assign(options::arithErrorSelectionRule__option_t, std::string option, std::string value); #line 32 "../../../src/options/arith_options" template <> const options::arithSimplexCheckPeriod__option_t::type& Options::operator[](options::arithSimplexCheckPeriod__option_t) const; #line 32 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithSimplexCheckPeriod__option_t) const; #line 32 "../../../src/options/arith_options" template <> void Options::assign(options::arithSimplexCheckPeriod__option_t, std::string option, std::string value); #line 39 "../../../src/options/arith_options" template <> void Options::set(options::arithPivotThreshold__option_t, const options::arithPivotThreshold__option_t::type& x); #line 39 "../../../src/options/arith_options" template <> const options::arithPivotThreshold__option_t::type& Options::operator[](options::arithPivotThreshold__option_t) const; #line 39 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPivotThreshold__option_t) const; #line 39 "../../../src/options/arith_options" template <> void Options::assign(options::arithPivotThreshold__option_t, std::string option, std::string value); #line 42 "../../../src/options/arith_options" template <> const options::arithPropagateMaxLength__option_t::type& Options::operator[](options::arithPropagateMaxLength__option_t) const; #line 42 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPropagateMaxLength__option_t) const; #line 42 "../../../src/options/arith_options" template <> void Options::assign(options::arithPropagateMaxLength__option_t, std::string option, std::string value); #line 45 "../../../src/options/arith_options" template <> const options::arithDioSolver__option_t::type& Options::operator[](options::arithDioSolver__option_t) const; #line 45 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithDioSolver__option_t) const; #line 45 "../../../src/options/arith_options" template <> void Options::assignBool(options::arithDioSolver__option_t, std::string option, bool value); #line 51 "../../../src/options/arith_options" template <> void Options::set(options::arithRewriteEq__option_t, const options::arithRewriteEq__option_t::type& x); #line 51 "../../../src/options/arith_options" template <> const options::arithRewriteEq__option_t::type& Options::operator[](options::arithRewriteEq__option_t) const; #line 51 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithRewriteEq__option_t) const; #line 51 "../../../src/options/arith_options" template <> void Options::assignBool(options::arithRewriteEq__option_t, std::string option, bool value); #line 56 "../../../src/options/arith_options" template <> const options::arithMLTrick__option_t::type& Options::operator[](options::arithMLTrick__option_t) const; #line 56 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithMLTrick__option_t) const; #line 56 "../../../src/options/arith_options" template <> void Options::assignBool(options::arithMLTrick__option_t, std::string option, bool value); #line 60 "../../../src/options/arith_options" template <> const options::arithMLTrickSubstitutions__option_t::type& Options::operator[](options::arithMLTrickSubstitutions__option_t) const; #line 60 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithMLTrickSubstitutions__option_t) const; #line 60 "../../../src/options/arith_options" template <> void Options::assign(options::arithMLTrickSubstitutions__option_t, std::string option, std::string value); #line 63 "../../../src/options/arith_options" template <> void Options::set(options::doCutAllBounded__option_t, const options::doCutAllBounded__option_t::type& x); #line 63 "../../../src/options/arith_options" template <> const options::doCutAllBounded__option_t::type& Options::operator[](options::doCutAllBounded__option_t) const; #line 63 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::doCutAllBounded__option_t) const; #line 63 "../../../src/options/arith_options" template <> void Options::assignBool(options::doCutAllBounded__option_t, std::string option, bool value); #line 67 "../../../src/options/arith_options" template <> const options::maxCutsInContext__option_t::type& Options::operator[](options::maxCutsInContext__option_t) const; #line 67 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::maxCutsInContext__option_t) const; #line 67 "../../../src/options/arith_options" template <> void Options::assign(options::maxCutsInContext__option_t, std::string option, std::string value); #line 70 "../../../src/options/arith_options" template <> const options::revertArithModels__option_t::type& Options::operator[](options::revertArithModels__option_t) const; #line 70 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::revertArithModels__option_t) const; #line 70 "../../../src/options/arith_options" template <> void Options::assignBool(options::revertArithModels__option_t, std::string option, bool value); #line 73 "../../../src/options/arith_options" template <> void Options::set(options::havePenalties__option_t, const options::havePenalties__option_t::type& x); #line 73 "../../../src/options/arith_options" template <> const options::havePenalties__option_t::type& Options::operator[](options::havePenalties__option_t) const; #line 73 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::havePenalties__option_t) const; #line 73 "../../../src/options/arith_options" template <> void Options::assignBool(options::havePenalties__option_t, std::string option, bool value); #line 77 "../../../src/options/arith_options" template <> void Options::set(options::useFC__option_t, const options::useFC__option_t::type& x); #line 77 "../../../src/options/arith_options" template <> const options::useFC__option_t::type& Options::operator[](options::useFC__option_t) const; #line 77 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::useFC__option_t) const; #line 77 "../../../src/options/arith_options" template <> void Options::assignBool(options::useFC__option_t, std::string option, bool value); #line 80 "../../../src/options/arith_options" template <> void Options::set(options::useSOI__option_t, const options::useSOI__option_t::type& x); #line 80 "../../../src/options/arith_options" template <> const options::useSOI__option_t::type& Options::operator[](options::useSOI__option_t) const; #line 80 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::useSOI__option_t) const; #line 80 "../../../src/options/arith_options" template <> void Options::assignBool(options::useSOI__option_t, std::string option, bool value); #line 83 "../../../src/options/arith_options" template <> void Options::set(options::restrictedPivots__option_t, const options::restrictedPivots__option_t::type& x); #line 83 "../../../src/options/arith_options" template <> const options::restrictedPivots__option_t::type& Options::operator[](options::restrictedPivots__option_t) const; #line 83 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::restrictedPivots__option_t) const; #line 83 "../../../src/options/arith_options" template <> void Options::assignBool(options::restrictedPivots__option_t, std::string option, bool value); #line 86 "../../../src/options/arith_options" template <> void Options::set(options::collectPivots__option_t, const options::collectPivots__option_t::type& x); #line 86 "../../../src/options/arith_options" template <> const options::collectPivots__option_t::type& Options::operator[](options::collectPivots__option_t) const; #line 86 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::collectPivots__option_t) const; #line 86 "../../../src/options/arith_options" template <> void Options::assignBool(options::collectPivots__option_t, std::string option, bool value); #line 89 "../../../src/options/arith_options" template <> void Options::set(options::useApprox__option_t, const options::useApprox__option_t::type& x); #line 89 "../../../src/options/arith_options" template <> const options::useApprox__option_t::type& Options::operator[](options::useApprox__option_t) const; #line 89 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::useApprox__option_t) const; #line 89 "../../../src/options/arith_options" template <> void Options::assignBool(options::useApprox__option_t, std::string option, bool value); #line 92 "../../../src/options/arith_options" template <> void Options::set(options::maxApproxDepth__option_t, const options::maxApproxDepth__option_t::type& x); #line 92 "../../../src/options/arith_options" template <> const options::maxApproxDepth__option_t::type& Options::operator[](options::maxApproxDepth__option_t) const; #line 92 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::maxApproxDepth__option_t) const; #line 92 "../../../src/options/arith_options" template <> void Options::assign(options::maxApproxDepth__option_t, std::string option, std::string value); #line 95 "../../../src/options/arith_options" template <> void Options::set(options::exportDioDecompositions__option_t, const options::exportDioDecompositions__option_t::type& x); #line 95 "../../../src/options/arith_options" template <> const options::exportDioDecompositions__option_t::type& Options::operator[](options::exportDioDecompositions__option_t) const; #line 95 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::exportDioDecompositions__option_t) const; #line 95 "../../../src/options/arith_options" template <> void Options::assignBool(options::exportDioDecompositions__option_t, std::string option, bool value); #line 98 "../../../src/options/arith_options" template <> void Options::set(options::newProp__option_t, const options::newProp__option_t::type& x); #line 98 "../../../src/options/arith_options" template <> const options::newProp__option_t::type& Options::operator[](options::newProp__option_t) const; #line 98 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::newProp__option_t) const; #line 98 "../../../src/options/arith_options" template <> void Options::assignBool(options::newProp__option_t, std::string option, bool value); #line 101 "../../../src/options/arith_options" template <> void Options::set(options::arithPropAsLemmaLength__option_t, const options::arithPropAsLemmaLength__option_t::type& x); #line 101 "../../../src/options/arith_options" template <> const options::arithPropAsLemmaLength__option_t::type& Options::operator[](options::arithPropAsLemmaLength__option_t) const; #line 101 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::arithPropAsLemmaLength__option_t) const; #line 101 "../../../src/options/arith_options" template <> void Options::assign(options::arithPropAsLemmaLength__option_t, std::string option, std::string value); #line 104 "../../../src/options/arith_options" template <> void Options::set(options::soiQuickExplain__option_t, const options::soiQuickExplain__option_t::type& x); #line 104 "../../../src/options/arith_options" template <> const options::soiQuickExplain__option_t::type& Options::operator[](options::soiQuickExplain__option_t) const; #line 104 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiQuickExplain__option_t) const; #line 104 "../../../src/options/arith_options" template <> void Options::assignBool(options::soiQuickExplain__option_t, std::string option, bool value); #line 107 "../../../src/options/arith_options" template <> void Options::set(options::rewriteDivk__option_t, const options::rewriteDivk__option_t::type& x); #line 107 "../../../src/options/arith_options" template <> const options::rewriteDivk__option_t::type& Options::operator[](options::rewriteDivk__option_t) const; #line 107 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::rewriteDivk__option_t) const; #line 107 "../../../src/options/arith_options" template <> void Options::assignBool(options::rewriteDivk__option_t, std::string option, bool value); #line 110 "../../../src/options/arith_options" template <> const options::trySolveIntStandardEffort__option_t::type& Options::operator[](options::trySolveIntStandardEffort__option_t) const; #line 110 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::trySolveIntStandardEffort__option_t) const; #line 110 "../../../src/options/arith_options" template <> void Options::assignBool(options::trySolveIntStandardEffort__option_t, std::string option, bool value); #line 113 "../../../src/options/arith_options" template <> const options::replayFailureLemma__option_t::type& Options::operator[](options::replayFailureLemma__option_t) const; #line 113 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayFailureLemma__option_t) const; #line 113 "../../../src/options/arith_options" template <> void Options::assignBool(options::replayFailureLemma__option_t, std::string option, bool value); #line 116 "../../../src/options/arith_options" template <> const options::dioSolverTurns__option_t::type& Options::operator[](options::dioSolverTurns__option_t) const; #line 116 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::dioSolverTurns__option_t) const; #line 116 "../../../src/options/arith_options" template <> void Options::assign(options::dioSolverTurns__option_t, std::string option, std::string value); #line 119 "../../../src/options/arith_options" template <> const options::rrTurns__option_t::type& Options::operator[](options::rrTurns__option_t) const; #line 119 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::rrTurns__option_t) const; #line 119 "../../../src/options/arith_options" template <> void Options::assign(options::rrTurns__option_t, std::string option, std::string value); #line 122 "../../../src/options/arith_options" template <> const options::dioRepeat__option_t::type& Options::operator[](options::dioRepeat__option_t) const; #line 122 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::dioRepeat__option_t) const; #line 122 "../../../src/options/arith_options" template <> void Options::assignBool(options::dioRepeat__option_t, std::string option, bool value); #line 125 "../../../src/options/arith_options" template <> const options::replayEarlyCloseDepths__option_t::type& Options::operator[](options::replayEarlyCloseDepths__option_t) const; #line 125 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayEarlyCloseDepths__option_t) const; #line 125 "../../../src/options/arith_options" template <> void Options::assign(options::replayEarlyCloseDepths__option_t, std::string option, std::string value); #line 128 "../../../src/options/arith_options" template <> const options::replayFailurePenalty__option_t::type& Options::operator[](options::replayFailurePenalty__option_t) const; #line 128 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayFailurePenalty__option_t) const; #line 128 "../../../src/options/arith_options" template <> void Options::assign(options::replayFailurePenalty__option_t, std::string option, std::string value); #line 131 "../../../src/options/arith_options" template <> const options::replayNumericFailurePenalty__option_t::type& Options::operator[](options::replayNumericFailurePenalty__option_t) const; #line 131 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayNumericFailurePenalty__option_t) const; #line 131 "../../../src/options/arith_options" template <> void Options::assign(options::replayNumericFailurePenalty__option_t, std::string option, std::string value); #line 134 "../../../src/options/arith_options" template <> const options::replayRejectCutSize__option_t::type& Options::operator[](options::replayRejectCutSize__option_t) const; #line 134 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::replayRejectCutSize__option_t) const; #line 134 "../../../src/options/arith_options" template <> void Options::assign(options::replayRejectCutSize__option_t, std::string option, std::string value); #line 137 "../../../src/options/arith_options" template <> const options::lemmaRejectCutSize__option_t::type& Options::operator[](options::lemmaRejectCutSize__option_t) const; #line 137 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::lemmaRejectCutSize__option_t) const; #line 137 "../../../src/options/arith_options" template <> void Options::assign(options::lemmaRejectCutSize__option_t, std::string option, std::string value); #line 140 "../../../src/options/arith_options" template <> const options::soiApproxMajorFailure__option_t::type& Options::operator[](options::soiApproxMajorFailure__option_t) const; #line 140 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMajorFailure__option_t) const; #line 140 "../../../src/options/arith_options" template <> void Options::assign(options::soiApproxMajorFailure__option_t, std::string option, std::string value); #line 143 "../../../src/options/arith_options" template <> const options::soiApproxMajorFailurePen__option_t::type& Options::operator[](options::soiApproxMajorFailurePen__option_t) const; #line 143 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMajorFailurePen__option_t) const; #line 143 "../../../src/options/arith_options" template <> void Options::assign(options::soiApproxMajorFailurePen__option_t, std::string option, std::string value); #line 146 "../../../src/options/arith_options" template <> const options::soiApproxMinorFailure__option_t::type& Options::operator[](options::soiApproxMinorFailure__option_t) const; #line 146 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMinorFailure__option_t) const; #line 146 "../../../src/options/arith_options" template <> void Options::assign(options::soiApproxMinorFailure__option_t, std::string option, std::string value); #line 149 "../../../src/options/arith_options" template <> const options::soiApproxMinorFailurePen__option_t::type& Options::operator[](options::soiApproxMinorFailurePen__option_t) const; #line 149 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::soiApproxMinorFailurePen__option_t) const; #line 149 "../../../src/options/arith_options" template <> void Options::assign(options::soiApproxMinorFailurePen__option_t, std::string option, std::string value); #line 152 "../../../src/options/arith_options" template <> const options::ppAssertMaxSubSize__option_t::type& Options::operator[](options::ppAssertMaxSubSize__option_t) const; #line 152 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::ppAssertMaxSubSize__option_t) const; #line 152 "../../../src/options/arith_options" template <> void Options::assign(options::ppAssertMaxSubSize__option_t, std::string option, std::string value); #line 155 "../../../src/options/arith_options" template <> const options::maxReplayTree__option_t::type& Options::operator[](options::maxReplayTree__option_t) const; #line 155 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::maxReplayTree__option_t) const; #line 155 "../../../src/options/arith_options" template <> void Options::assign(options::maxReplayTree__option_t, std::string option, std::string value); #line 159 "../../../src/options/arith_options" template <> const options::pbRewrites__option_t::type& Options::operator[](options::pbRewrites__option_t) const; #line 159 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::pbRewrites__option_t) const; #line 159 "../../../src/options/arith_options" template <> void Options::assignBool(options::pbRewrites__option_t, std::string option, bool value); #line 162 "../../../src/options/arith_options" template <> const options::pbRewriteThreshold__option_t::type& Options::operator[](options::pbRewriteThreshold__option_t) const; #line 162 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::pbRewriteThreshold__option_t) const; #line 162 "../../../src/options/arith_options" template <> void Options::assign(options::pbRewriteThreshold__option_t, std::string option, std::string value); #line 165 "../../../src/options/arith_options" template <> const options::sNormInferEq__option_t::type& Options::operator[](options::sNormInferEq__option_t) const; #line 165 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::sNormInferEq__option_t) const; #line 165 "../../../src/options/arith_options" template <> void Options::assignBool(options::sNormInferEq__option_t, std::string option, bool value); #line 168 "../../../src/options/arith_options" template <> const options::nlExt__option_t::type& Options::operator[](options::nlExt__option_t) const; #line 168 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExt__option_t) const; #line 168 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExt__option_t, std::string option, bool value); #line 171 "../../../src/options/arith_options" template <> const options::nlExtResBound__option_t::type& Options::operator[](options::nlExtResBound__option_t) const; #line 171 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtResBound__option_t) const; #line 171 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExtResBound__option_t, std::string option, bool value); #line 174 "../../../src/options/arith_options" template <> const options::nlExtTangentPlanes__option_t::type& Options::operator[](options::nlExtTangentPlanes__option_t) const; #line 174 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtTangentPlanes__option_t) const; #line 174 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExtTangentPlanes__option_t, std::string option, bool value); #line 177 "../../../src/options/arith_options" template <> const options::nlExtEntailConflicts__option_t::type& Options::operator[](options::nlExtEntailConflicts__option_t) const; #line 177 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtEntailConflicts__option_t) const; #line 177 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExtEntailConflicts__option_t, std::string option, bool value); #line 180 "../../../src/options/arith_options" template <> const options::nlExtRewrites__option_t::type& Options::operator[](options::nlExtRewrites__option_t) const; #line 180 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtRewrites__option_t) const; #line 180 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExtRewrites__option_t, std::string option, bool value); #line 183 "../../../src/options/arith_options" template <> const options::nlExtSolveSubs__option_t::type& Options::operator[](options::nlExtSolveSubs__option_t) const; #line 183 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtSolveSubs__option_t) const; #line 183 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExtSolveSubs__option_t, std::string option, bool value); #line 186 "../../../src/options/arith_options" template <> const options::nlExtPurify__option_t::type& Options::operator[](options::nlExtPurify__option_t) const; #line 186 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtPurify__option_t) const; #line 186 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExtPurify__option_t, std::string option, bool value); #line 189 "../../../src/options/arith_options" template <> const options::nlExtSplitZero__option_t::type& Options::operator[](options::nlExtSplitZero__option_t) const; #line 189 "../../../src/options/arith_options" template <> bool Options::wasSetByUser(options::nlExtSplitZero__option_t) const; #line 189 "../../../src/options/arith_options" template <> void Options::assignBool(options::nlExtSplitZero__option_t, std::string option, bool value); #line 44 "../../../src/options/base_options_template.h" namespace options { #line 8 "../../../src/options/arith_options" inline arithUnateLemmaMode__option_t::type arithUnateLemmaMode__option_t::operator()() const { return (*Options::current())[*this]; } #line 8 "../../../src/options/arith_options" inline bool arithUnateLemmaMode__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 11 "../../../src/options/arith_options" inline arithPropagationMode__option_t::type arithPropagationMode__option_t::operator()() const { return (*Options::current())[*this]; } #line 11 "../../../src/options/arith_options" inline bool arithPropagationMode__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 18 "../../../src/options/arith_options" inline arithHeuristicPivots__option_t::type arithHeuristicPivots__option_t::operator()() const { return (*Options::current())[*this]; } #line 18 "../../../src/options/arith_options" inline bool arithHeuristicPivots__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 18 "../../../src/options/arith_options" inline void arithHeuristicPivots__option_t::set(const arithHeuristicPivots__option_t::type& v) { Options::current()->set(*this, v); } #line 25 "../../../src/options/arith_options" inline arithStandardCheckVarOrderPivots__option_t::type arithStandardCheckVarOrderPivots__option_t::operator()() const { return (*Options::current())[*this]; } #line 25 "../../../src/options/arith_options" inline bool arithStandardCheckVarOrderPivots__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 25 "../../../src/options/arith_options" inline void arithStandardCheckVarOrderPivots__option_t::set(const arithStandardCheckVarOrderPivots__option_t::type& v) { Options::current()->set(*this, v); } #line 28 "../../../src/options/arith_options" inline arithErrorSelectionRule__option_t::type arithErrorSelectionRule__option_t::operator()() const { return (*Options::current())[*this]; } #line 28 "../../../src/options/arith_options" inline bool arithErrorSelectionRule__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 32 "../../../src/options/arith_options" inline arithSimplexCheckPeriod__option_t::type arithSimplexCheckPeriod__option_t::operator()() const { return (*Options::current())[*this]; } #line 32 "../../../src/options/arith_options" inline bool arithSimplexCheckPeriod__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 39 "../../../src/options/arith_options" inline arithPivotThreshold__option_t::type arithPivotThreshold__option_t::operator()() const { return (*Options::current())[*this]; } #line 39 "../../../src/options/arith_options" inline bool arithPivotThreshold__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 39 "../../../src/options/arith_options" inline void arithPivotThreshold__option_t::set(const arithPivotThreshold__option_t::type& v) { Options::current()->set(*this, v); } #line 42 "../../../src/options/arith_options" inline arithPropagateMaxLength__option_t::type arithPropagateMaxLength__option_t::operator()() const { return (*Options::current())[*this]; } #line 42 "../../../src/options/arith_options" inline bool arithPropagateMaxLength__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 45 "../../../src/options/arith_options" inline arithDioSolver__option_t::type arithDioSolver__option_t::operator()() const { return (*Options::current())[*this]; } #line 45 "../../../src/options/arith_options" inline bool arithDioSolver__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 51 "../../../src/options/arith_options" inline arithRewriteEq__option_t::type arithRewriteEq__option_t::operator()() const { return (*Options::current())[*this]; } #line 51 "../../../src/options/arith_options" inline bool arithRewriteEq__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 51 "../../../src/options/arith_options" inline void arithRewriteEq__option_t::set(const arithRewriteEq__option_t::type& v) { Options::current()->set(*this, v); } #line 56 "../../../src/options/arith_options" inline arithMLTrick__option_t::type arithMLTrick__option_t::operator()() const { return (*Options::current())[*this]; } #line 56 "../../../src/options/arith_options" inline bool arithMLTrick__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 60 "../../../src/options/arith_options" inline arithMLTrickSubstitutions__option_t::type arithMLTrickSubstitutions__option_t::operator()() const { return (*Options::current())[*this]; } #line 60 "../../../src/options/arith_options" inline bool arithMLTrickSubstitutions__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 63 "../../../src/options/arith_options" inline doCutAllBounded__option_t::type doCutAllBounded__option_t::operator()() const { return (*Options::current())[*this]; } #line 63 "../../../src/options/arith_options" inline bool doCutAllBounded__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 63 "../../../src/options/arith_options" inline void doCutAllBounded__option_t::set(const doCutAllBounded__option_t::type& v) { Options::current()->set(*this, v); } #line 67 "../../../src/options/arith_options" inline maxCutsInContext__option_t::type maxCutsInContext__option_t::operator()() const { return (*Options::current())[*this]; } #line 67 "../../../src/options/arith_options" inline bool maxCutsInContext__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 70 "../../../src/options/arith_options" inline revertArithModels__option_t::type revertArithModels__option_t::operator()() const { return (*Options::current())[*this]; } #line 70 "../../../src/options/arith_options" inline bool revertArithModels__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 73 "../../../src/options/arith_options" inline havePenalties__option_t::type havePenalties__option_t::operator()() const { return (*Options::current())[*this]; } #line 73 "../../../src/options/arith_options" inline bool havePenalties__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 73 "../../../src/options/arith_options" inline void havePenalties__option_t::set(const havePenalties__option_t::type& v) { Options::current()->set(*this, v); } #line 77 "../../../src/options/arith_options" inline useFC__option_t::type useFC__option_t::operator()() const { return (*Options::current())[*this]; } #line 77 "../../../src/options/arith_options" inline bool useFC__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 77 "../../../src/options/arith_options" inline void useFC__option_t::set(const useFC__option_t::type& v) { Options::current()->set(*this, v); } #line 80 "../../../src/options/arith_options" inline useSOI__option_t::type useSOI__option_t::operator()() const { return (*Options::current())[*this]; } #line 80 "../../../src/options/arith_options" inline bool useSOI__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 80 "../../../src/options/arith_options" inline void useSOI__option_t::set(const useSOI__option_t::type& v) { Options::current()->set(*this, v); } #line 83 "../../../src/options/arith_options" inline restrictedPivots__option_t::type restrictedPivots__option_t::operator()() const { return (*Options::current())[*this]; } #line 83 "../../../src/options/arith_options" inline bool restrictedPivots__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 83 "../../../src/options/arith_options" inline void restrictedPivots__option_t::set(const restrictedPivots__option_t::type& v) { Options::current()->set(*this, v); } #line 86 "../../../src/options/arith_options" inline collectPivots__option_t::type collectPivots__option_t::operator()() const { return (*Options::current())[*this]; } #line 86 "../../../src/options/arith_options" inline bool collectPivots__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 86 "../../../src/options/arith_options" inline void collectPivots__option_t::set(const collectPivots__option_t::type& v) { Options::current()->set(*this, v); } #line 89 "../../../src/options/arith_options" inline useApprox__option_t::type useApprox__option_t::operator()() const { return (*Options::current())[*this]; } #line 89 "../../../src/options/arith_options" inline bool useApprox__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 89 "../../../src/options/arith_options" inline void useApprox__option_t::set(const useApprox__option_t::type& v) { Options::current()->set(*this, v); } #line 92 "../../../src/options/arith_options" inline maxApproxDepth__option_t::type maxApproxDepth__option_t::operator()() const { return (*Options::current())[*this]; } #line 92 "../../../src/options/arith_options" inline bool maxApproxDepth__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 92 "../../../src/options/arith_options" inline void maxApproxDepth__option_t::set(const maxApproxDepth__option_t::type& v) { Options::current()->set(*this, v); } #line 95 "../../../src/options/arith_options" inline exportDioDecompositions__option_t::type exportDioDecompositions__option_t::operator()() const { return (*Options::current())[*this]; } #line 95 "../../../src/options/arith_options" inline bool exportDioDecompositions__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 95 "../../../src/options/arith_options" inline void exportDioDecompositions__option_t::set(const exportDioDecompositions__option_t::type& v) { Options::current()->set(*this, v); } #line 98 "../../../src/options/arith_options" inline newProp__option_t::type newProp__option_t::operator()() const { return (*Options::current())[*this]; } #line 98 "../../../src/options/arith_options" inline bool newProp__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 98 "../../../src/options/arith_options" inline void newProp__option_t::set(const newProp__option_t::type& v) { Options::current()->set(*this, v); } #line 101 "../../../src/options/arith_options" inline arithPropAsLemmaLength__option_t::type arithPropAsLemmaLength__option_t::operator()() const { return (*Options::current())[*this]; } #line 101 "../../../src/options/arith_options" inline bool arithPropAsLemmaLength__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 101 "../../../src/options/arith_options" inline void arithPropAsLemmaLength__option_t::set(const arithPropAsLemmaLength__option_t::type& v) { Options::current()->set(*this, v); } #line 104 "../../../src/options/arith_options" inline soiQuickExplain__option_t::type soiQuickExplain__option_t::operator()() const { return (*Options::current())[*this]; } #line 104 "../../../src/options/arith_options" inline bool soiQuickExplain__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 104 "../../../src/options/arith_options" inline void soiQuickExplain__option_t::set(const soiQuickExplain__option_t::type& v) { Options::current()->set(*this, v); } #line 107 "../../../src/options/arith_options" inline rewriteDivk__option_t::type rewriteDivk__option_t::operator()() const { return (*Options::current())[*this]; } #line 107 "../../../src/options/arith_options" inline bool rewriteDivk__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 107 "../../../src/options/arith_options" inline void rewriteDivk__option_t::set(const rewriteDivk__option_t::type& v) { Options::current()->set(*this, v); } #line 110 "../../../src/options/arith_options" inline trySolveIntStandardEffort__option_t::type trySolveIntStandardEffort__option_t::operator()() const { return (*Options::current())[*this]; } #line 110 "../../../src/options/arith_options" inline bool trySolveIntStandardEffort__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 113 "../../../src/options/arith_options" inline replayFailureLemma__option_t::type replayFailureLemma__option_t::operator()() const { return (*Options::current())[*this]; } #line 113 "../../../src/options/arith_options" inline bool replayFailureLemma__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 116 "../../../src/options/arith_options" inline dioSolverTurns__option_t::type dioSolverTurns__option_t::operator()() const { return (*Options::current())[*this]; } #line 116 "../../../src/options/arith_options" inline bool dioSolverTurns__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 119 "../../../src/options/arith_options" inline rrTurns__option_t::type rrTurns__option_t::operator()() const { return (*Options::current())[*this]; } #line 119 "../../../src/options/arith_options" inline bool rrTurns__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 122 "../../../src/options/arith_options" inline dioRepeat__option_t::type dioRepeat__option_t::operator()() const { return (*Options::current())[*this]; } #line 122 "../../../src/options/arith_options" inline bool dioRepeat__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 125 "../../../src/options/arith_options" inline replayEarlyCloseDepths__option_t::type replayEarlyCloseDepths__option_t::operator()() const { return (*Options::current())[*this]; } #line 125 "../../../src/options/arith_options" inline bool replayEarlyCloseDepths__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 128 "../../../src/options/arith_options" inline replayFailurePenalty__option_t::type replayFailurePenalty__option_t::operator()() const { return (*Options::current())[*this]; } #line 128 "../../../src/options/arith_options" inline bool replayFailurePenalty__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 131 "../../../src/options/arith_options" inline replayNumericFailurePenalty__option_t::type replayNumericFailurePenalty__option_t::operator()() const { return (*Options::current())[*this]; } #line 131 "../../../src/options/arith_options" inline bool replayNumericFailurePenalty__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 134 "../../../src/options/arith_options" inline replayRejectCutSize__option_t::type replayRejectCutSize__option_t::operator()() const { return (*Options::current())[*this]; } #line 134 "../../../src/options/arith_options" inline bool replayRejectCutSize__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 137 "../../../src/options/arith_options" inline lemmaRejectCutSize__option_t::type lemmaRejectCutSize__option_t::operator()() const { return (*Options::current())[*this]; } #line 137 "../../../src/options/arith_options" inline bool lemmaRejectCutSize__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 140 "../../../src/options/arith_options" inline soiApproxMajorFailure__option_t::type soiApproxMajorFailure__option_t::operator()() const { return (*Options::current())[*this]; } #line 140 "../../../src/options/arith_options" inline bool soiApproxMajorFailure__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 143 "../../../src/options/arith_options" inline soiApproxMajorFailurePen__option_t::type soiApproxMajorFailurePen__option_t::operator()() const { return (*Options::current())[*this]; } #line 143 "../../../src/options/arith_options" inline bool soiApproxMajorFailurePen__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 146 "../../../src/options/arith_options" inline soiApproxMinorFailure__option_t::type soiApproxMinorFailure__option_t::operator()() const { return (*Options::current())[*this]; } #line 146 "../../../src/options/arith_options" inline bool soiApproxMinorFailure__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 149 "../../../src/options/arith_options" inline soiApproxMinorFailurePen__option_t::type soiApproxMinorFailurePen__option_t::operator()() const { return (*Options::current())[*this]; } #line 149 "../../../src/options/arith_options" inline bool soiApproxMinorFailurePen__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 152 "../../../src/options/arith_options" inline ppAssertMaxSubSize__option_t::type ppAssertMaxSubSize__option_t::operator()() const { return (*Options::current())[*this]; } #line 152 "../../../src/options/arith_options" inline bool ppAssertMaxSubSize__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 155 "../../../src/options/arith_options" inline maxReplayTree__option_t::type maxReplayTree__option_t::operator()() const { return (*Options::current())[*this]; } #line 155 "../../../src/options/arith_options" inline bool maxReplayTree__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 159 "../../../src/options/arith_options" inline pbRewrites__option_t::type pbRewrites__option_t::operator()() const { return (*Options::current())[*this]; } #line 159 "../../../src/options/arith_options" inline bool pbRewrites__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 162 "../../../src/options/arith_options" inline pbRewriteThreshold__option_t::type pbRewriteThreshold__option_t::operator()() const { return (*Options::current())[*this]; } #line 162 "../../../src/options/arith_options" inline bool pbRewriteThreshold__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 165 "../../../src/options/arith_options" inline sNormInferEq__option_t::type sNormInferEq__option_t::operator()() const { return (*Options::current())[*this]; } #line 165 "../../../src/options/arith_options" inline bool sNormInferEq__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 168 "../../../src/options/arith_options" inline nlExt__option_t::type nlExt__option_t::operator()() const { return (*Options::current())[*this]; } #line 168 "../../../src/options/arith_options" inline bool nlExt__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 171 "../../../src/options/arith_options" inline nlExtResBound__option_t::type nlExtResBound__option_t::operator()() const { return (*Options::current())[*this]; } #line 171 "../../../src/options/arith_options" inline bool nlExtResBound__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 174 "../../../src/options/arith_options" inline nlExtTangentPlanes__option_t::type nlExtTangentPlanes__option_t::operator()() const { return (*Options::current())[*this]; } #line 174 "../../../src/options/arith_options" inline bool nlExtTangentPlanes__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 177 "../../../src/options/arith_options" inline nlExtEntailConflicts__option_t::type nlExtEntailConflicts__option_t::operator()() const { return (*Options::current())[*this]; } #line 177 "../../../src/options/arith_options" inline bool nlExtEntailConflicts__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 180 "../../../src/options/arith_options" inline nlExtRewrites__option_t::type nlExtRewrites__option_t::operator()() const { return (*Options::current())[*this]; } #line 180 "../../../src/options/arith_options" inline bool nlExtRewrites__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 183 "../../../src/options/arith_options" inline nlExtSolveSubs__option_t::type nlExtSolveSubs__option_t::operator()() const { return (*Options::current())[*this]; } #line 183 "../../../src/options/arith_options" inline bool nlExtSolveSubs__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 186 "../../../src/options/arith_options" inline nlExtPurify__option_t::type nlExtPurify__option_t::operator()() const { return (*Options::current())[*this]; } #line 186 "../../../src/options/arith_options" inline bool nlExtPurify__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 189 "../../../src/options/arith_options" inline nlExtSplitZero__option_t::type nlExtSplitZero__option_t::operator()() const { return (*Options::current())[*this]; } #line 189 "../../../src/options/arith_options" inline bool nlExtSplitZero__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 50 "../../../src/options/base_options_template.h" }/* CVC4::options namespace */ }/* CVC4 namespace */ #endif /* __CVC4__OPTIONS__ARITH_H */ cvc4-1.5/src/options/arith_propagation_mode.cpp000066400000000000000000000021761313116454100217270ustar00rootroot00000000000000/********************* */ /*! \file arith_propagation_mode.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "options/arith_propagation_mode.h" namespace CVC4 { std::ostream& operator<<(std::ostream& out, ArithPropagationMode mode) { switch(mode) { case NO_PROP: out << "NO_PROP"; break; case UNATE_PROP: out << "UNATE_PROP"; break; case BOUND_INFERENCE_PROP: out << "BOUND_INFERENCE_PROP"; break; case BOTH_PROP: out << "BOTH_PROP"; break; default: out << "ArithPropagationMode!UNKNOWN"; } return out; } }/* CVC4 namespace */ cvc4-1.5/src/options/arith_propagation_mode.h000066400000000000000000000021211313116454100213620ustar00rootroot00000000000000/********************* */ /*! \file arith_propagation_mode.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_public.h" #ifndef __CVC4__THEORY__ARITH__ARITH_PROPAGATION_MODE_H #define __CVC4__THEORY__ARITH__ARITH_PROPAGATION_MODE_H #include namespace CVC4 { enum ArithPropagationMode { NO_PROP, UNATE_PROP, BOUND_INFERENCE_PROP, BOTH_PROP }; std::ostream& operator<<(std::ostream& out, ArithPropagationMode rule) CVC4_PUBLIC; }/* CVC4 namespace */ #endif /* __CVC4__THEORY__ARITH__ARITH_PROPAGATION_MODE_H */ cvc4-1.5/src/options/arith_unate_lemma_mode.cpp000066400000000000000000000023161313116454100216670ustar00rootroot00000000000000/********************* */ /*! \file arith_unate_lemma_mode.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "options/arith_unate_lemma_mode.h" namespace CVC4 { std::ostream& operator<<(std::ostream& out, ArithUnateLemmaMode mode) { switch(mode) { case NO_PRESOLVE_LEMMAS: out << "NO_PRESOLVE_LEMMAS"; break; case INEQUALITY_PRESOLVE_LEMMAS: out << "INEQUALITY_PRESOLVE_LEMMAS"; break; case EQUALITY_PRESOLVE_LEMMAS: out << "EQUALITY_PRESOLVE_LEMMAS"; break; case ALL_PRESOLVE_LEMMAS: out << "ALL_PRESOLVE_LEMMAS"; break; default: out << "ArithUnateLemmaMode!UNKNOWN"; } return out; } }/* CVC4 namespace */ cvc4-1.5/src/options/arith_unate_lemma_mode.h000066400000000000000000000021661313116454100213370ustar00rootroot00000000000000/********************* */ /*! \file arith_unate_lemma_mode.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_public.h" #ifndef __CVC4__THEORY__ARITH__ARITH_UNATE_LEMMA_MODE_H #define __CVC4__THEORY__ARITH__ARITH_UNATE_LEMMA_MODE_H #include namespace CVC4 { typedef enum { NO_PRESOLVE_LEMMAS, INEQUALITY_PRESOLVE_LEMMAS, EQUALITY_PRESOLVE_LEMMAS, ALL_PRESOLVE_LEMMAS } ArithUnateLemmaMode; std::ostream& operator<<(std::ostream& out, ArithUnateLemmaMode rule) CVC4_PUBLIC; }/* CVC4 namespace */ #endif /* __CVC4__THEORY__ARITH__ARITH_UNATE_LEMMA_MODE_H */ cvc4-1.5/src/options/arrays_options000066400000000000000000000026661313116454100175100ustar00rootroot00000000000000# # Option specification file for CVC4 # See src/options/base_options for a description of this file format # module ARRAYS "options/arrays_options.h" Arrays theory option arraysOptimizeLinear --arrays-optimize-linear bool :default true :read-write turn on optimization for linear array terms (see de Moura FMCAD 09 arrays paper) option arraysLazyRIntro1 --arrays-lazy-rintro1 bool :default true :read-write turn on optimization to only perform RIntro1 rule lazily (see Jovanovic/Barrett 2012: Being Careful with Theory Combination) option arraysWeakEquivalence --arrays-weak-equiv bool :default false :read-write use algorithm from Christ/Hoenicke (SMT 2014) option arraysModelBased --arrays-model-based bool :default false :read-write turn on model-based array solver option arraysEagerIndexSplitting --arrays-eager-index bool :default true :read-write turn on eager index splitting for generated array lemmas option arraysEagerLemmas --arrays-eager-lemmas bool :default false :read-write turn on eager lemma generation for arrays option arraysConfig --arrays-config int :default 0 :read-write set different array option configurations - for developers only option arraysReduceSharing --arrays-reduce-sharing bool :default false :read-write use model information to reduce size of care graph for arrays option arraysPropagate --arrays-prop int :default 2 :read-write propagation effort for arrays: 0 is none, 1 is some, 2 is full endmodule cvc4-1.5/src/options/arrays_options.cpp000066400000000000000000000162051313116454100202630ustar00rootroot00000000000000/********************* */ /*! \file base_options_template.cpp ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Contains code for handling command-line options. ** ** Contains code for handling command-line options **/ #include "options/options_holder.h" namespace CVC4 { #line 8 "../../../src/options/arrays_options" template <> void Options::set(options::arraysOptimizeLinear__option_t, const options::arraysOptimizeLinear__option_t::type& x) { d_holder->arraysOptimizeLinear = x; } #line 8 "../../../src/options/arrays_options" template <> const options::arraysOptimizeLinear__option_t::type& Options::operator[](options::arraysOptimizeLinear__option_t) const { return d_holder->arraysOptimizeLinear; } #line 8 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysOptimizeLinear__option_t) const { return d_holder->arraysOptimizeLinear__setByUser__; } #line 11 "../../../src/options/arrays_options" template <> void Options::set(options::arraysLazyRIntro1__option_t, const options::arraysLazyRIntro1__option_t::type& x) { d_holder->arraysLazyRIntro1 = x; } #line 11 "../../../src/options/arrays_options" template <> const options::arraysLazyRIntro1__option_t::type& Options::operator[](options::arraysLazyRIntro1__option_t) const { return d_holder->arraysLazyRIntro1; } #line 11 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysLazyRIntro1__option_t) const { return d_holder->arraysLazyRIntro1__setByUser__; } #line 14 "../../../src/options/arrays_options" template <> void Options::set(options::arraysWeakEquivalence__option_t, const options::arraysWeakEquivalence__option_t::type& x) { d_holder->arraysWeakEquivalence = x; } #line 14 "../../../src/options/arrays_options" template <> const options::arraysWeakEquivalence__option_t::type& Options::operator[](options::arraysWeakEquivalence__option_t) const { return d_holder->arraysWeakEquivalence; } #line 14 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysWeakEquivalence__option_t) const { return d_holder->arraysWeakEquivalence__setByUser__; } #line 17 "../../../src/options/arrays_options" template <> void Options::set(options::arraysModelBased__option_t, const options::arraysModelBased__option_t::type& x) { d_holder->arraysModelBased = x; } #line 17 "../../../src/options/arrays_options" template <> const options::arraysModelBased__option_t::type& Options::operator[](options::arraysModelBased__option_t) const { return d_holder->arraysModelBased; } #line 17 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysModelBased__option_t) const { return d_holder->arraysModelBased__setByUser__; } #line 20 "../../../src/options/arrays_options" template <> void Options::set(options::arraysEagerIndexSplitting__option_t, const options::arraysEagerIndexSplitting__option_t::type& x) { d_holder->arraysEagerIndexSplitting = x; } #line 20 "../../../src/options/arrays_options" template <> const options::arraysEagerIndexSplitting__option_t::type& Options::operator[](options::arraysEagerIndexSplitting__option_t) const { return d_holder->arraysEagerIndexSplitting; } #line 20 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysEagerIndexSplitting__option_t) const { return d_holder->arraysEagerIndexSplitting__setByUser__; } #line 23 "../../../src/options/arrays_options" template <> void Options::set(options::arraysEagerLemmas__option_t, const options::arraysEagerLemmas__option_t::type& x) { d_holder->arraysEagerLemmas = x; } #line 23 "../../../src/options/arrays_options" template <> const options::arraysEagerLemmas__option_t::type& Options::operator[](options::arraysEagerLemmas__option_t) const { return d_holder->arraysEagerLemmas; } #line 23 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysEagerLemmas__option_t) const { return d_holder->arraysEagerLemmas__setByUser__; } #line 26 "../../../src/options/arrays_options" template <> void Options::set(options::arraysConfig__option_t, const options::arraysConfig__option_t::type& x) { d_holder->arraysConfig = x; } #line 26 "../../../src/options/arrays_options" template <> const options::arraysConfig__option_t::type& Options::operator[](options::arraysConfig__option_t) const { return d_holder->arraysConfig; } #line 26 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysConfig__option_t) const { return d_holder->arraysConfig__setByUser__; } #line 29 "../../../src/options/arrays_options" template <> void Options::set(options::arraysReduceSharing__option_t, const options::arraysReduceSharing__option_t::type& x) { d_holder->arraysReduceSharing = x; } #line 29 "../../../src/options/arrays_options" template <> const options::arraysReduceSharing__option_t::type& Options::operator[](options::arraysReduceSharing__option_t) const { return d_holder->arraysReduceSharing; } #line 29 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysReduceSharing__option_t) const { return d_holder->arraysReduceSharing__setByUser__; } #line 32 "../../../src/options/arrays_options" template <> void Options::set(options::arraysPropagate__option_t, const options::arraysPropagate__option_t::type& x) { d_holder->arraysPropagate = x; } #line 32 "../../../src/options/arrays_options" template <> const options::arraysPropagate__option_t::type& Options::operator[](options::arraysPropagate__option_t) const { return d_holder->arraysPropagate; } #line 32 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysPropagate__option_t) const { return d_holder->arraysPropagate__setByUser__; } #line 24 "../../../src/options/base_options_template.cpp" namespace options { #line 8 "../../../src/options/arrays_options" struct arraysOptimizeLinear__option_t arraysOptimizeLinear; #line 11 "../../../src/options/arrays_options" struct arraysLazyRIntro1__option_t arraysLazyRIntro1; #line 14 "../../../src/options/arrays_options" struct arraysWeakEquivalence__option_t arraysWeakEquivalence; #line 17 "../../../src/options/arrays_options" struct arraysModelBased__option_t arraysModelBased; #line 20 "../../../src/options/arrays_options" struct arraysEagerIndexSplitting__option_t arraysEagerIndexSplitting; #line 23 "../../../src/options/arrays_options" struct arraysEagerLemmas__option_t arraysEagerLemmas; #line 26 "../../../src/options/arrays_options" struct arraysConfig__option_t arraysConfig; #line 29 "../../../src/options/arrays_options" struct arraysReduceSharing__option_t arraysReduceSharing; #line 32 "../../../src/options/arrays_options" struct arraysPropagate__option_t arraysPropagate; #line 30 "../../../src/options/base_options_template.cpp" }/* CVC4::options namespace */ }/* CVC4 namespace */ cvc4-1.5/src/options/arrays_options.h000066400000000000000000000345561313116454100177410ustar00rootroot00000000000000/********************* */ /*! \file base_options_template.h ** \verbatim ** Top contributors (to current version): ** Morgan Deters, Paul Meng, Tim King ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief Contains code for handling command-line options. ** ** Contains code for handling command-line options **/ #include "cvc4_private.h" #ifndef __CVC4__OPTIONS__ARRAYS_H #define __CVC4__OPTIONS__ARRAYS_H #include "options/options.h" #line 26 "../../../src/options/base_options_template.h" #define CVC4_OPTIONS__ARRAYS__FOR_OPTION_HOLDER \ arraysOptimizeLinear__option_t::type arraysOptimizeLinear; \ bool arraysOptimizeLinear__setByUser__; \ arraysLazyRIntro1__option_t::type arraysLazyRIntro1; \ bool arraysLazyRIntro1__setByUser__; \ arraysWeakEquivalence__option_t::type arraysWeakEquivalence; \ bool arraysWeakEquivalence__setByUser__; \ arraysModelBased__option_t::type arraysModelBased; \ bool arraysModelBased__setByUser__; \ arraysEagerIndexSplitting__option_t::type arraysEagerIndexSplitting; \ bool arraysEagerIndexSplitting__setByUser__; \ arraysEagerLemmas__option_t::type arraysEagerLemmas; \ bool arraysEagerLemmas__setByUser__; \ arraysConfig__option_t::type arraysConfig; \ bool arraysConfig__setByUser__; \ arraysReduceSharing__option_t::type arraysReduceSharing; \ bool arraysReduceSharing__setByUser__; \ arraysPropagate__option_t::type arraysPropagate; \ bool arraysPropagate__setByUser__; #line 30 "../../../src/options/base_options_template.h" namespace CVC4 { namespace options { #line 8 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysOptimizeLinear__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysOptimizeLinear CVC4_PUBLIC; #line 11 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysLazyRIntro1__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysLazyRIntro1 CVC4_PUBLIC; #line 14 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysWeakEquivalence__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysWeakEquivalence CVC4_PUBLIC; #line 17 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysModelBased__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysModelBased CVC4_PUBLIC; #line 20 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysEagerIndexSplitting__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysEagerIndexSplitting CVC4_PUBLIC; #line 23 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysEagerLemmas__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysEagerLemmas CVC4_PUBLIC; #line 26 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysConfig__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysConfig CVC4_PUBLIC; #line 29 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysReduceSharing__option_t { typedef bool type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysReduceSharing CVC4_PUBLIC; #line 32 "../../../src/options/arrays_options" extern struct CVC4_PUBLIC arraysPropagate__option_t { typedef int type; type operator()() const; bool wasSetByUser() const; void set(const type& v); } arraysPropagate CVC4_PUBLIC; #line 38 "../../../src/options/base_options_template.h" }/* CVC4::options namespace */ #line 8 "../../../src/options/arrays_options" template <> void Options::set(options::arraysOptimizeLinear__option_t, const options::arraysOptimizeLinear__option_t::type& x); #line 8 "../../../src/options/arrays_options" template <> const options::arraysOptimizeLinear__option_t::type& Options::operator[](options::arraysOptimizeLinear__option_t) const; #line 8 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysOptimizeLinear__option_t) const; #line 8 "../../../src/options/arrays_options" template <> void Options::assignBool(options::arraysOptimizeLinear__option_t, std::string option, bool value); #line 11 "../../../src/options/arrays_options" template <> void Options::set(options::arraysLazyRIntro1__option_t, const options::arraysLazyRIntro1__option_t::type& x); #line 11 "../../../src/options/arrays_options" template <> const options::arraysLazyRIntro1__option_t::type& Options::operator[](options::arraysLazyRIntro1__option_t) const; #line 11 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysLazyRIntro1__option_t) const; #line 11 "../../../src/options/arrays_options" template <> void Options::assignBool(options::arraysLazyRIntro1__option_t, std::string option, bool value); #line 14 "../../../src/options/arrays_options" template <> void Options::set(options::arraysWeakEquivalence__option_t, const options::arraysWeakEquivalence__option_t::type& x); #line 14 "../../../src/options/arrays_options" template <> const options::arraysWeakEquivalence__option_t::type& Options::operator[](options::arraysWeakEquivalence__option_t) const; #line 14 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysWeakEquivalence__option_t) const; #line 14 "../../../src/options/arrays_options" template <> void Options::assignBool(options::arraysWeakEquivalence__option_t, std::string option, bool value); #line 17 "../../../src/options/arrays_options" template <> void Options::set(options::arraysModelBased__option_t, const options::arraysModelBased__option_t::type& x); #line 17 "../../../src/options/arrays_options" template <> const options::arraysModelBased__option_t::type& Options::operator[](options::arraysModelBased__option_t) const; #line 17 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysModelBased__option_t) const; #line 17 "../../../src/options/arrays_options" template <> void Options::assignBool(options::arraysModelBased__option_t, std::string option, bool value); #line 20 "../../../src/options/arrays_options" template <> void Options::set(options::arraysEagerIndexSplitting__option_t, const options::arraysEagerIndexSplitting__option_t::type& x); #line 20 "../../../src/options/arrays_options" template <> const options::arraysEagerIndexSplitting__option_t::type& Options::operator[](options::arraysEagerIndexSplitting__option_t) const; #line 20 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysEagerIndexSplitting__option_t) const; #line 20 "../../../src/options/arrays_options" template <> void Options::assignBool(options::arraysEagerIndexSplitting__option_t, std::string option, bool value); #line 23 "../../../src/options/arrays_options" template <> void Options::set(options::arraysEagerLemmas__option_t, const options::arraysEagerLemmas__option_t::type& x); #line 23 "../../../src/options/arrays_options" template <> const options::arraysEagerLemmas__option_t::type& Options::operator[](options::arraysEagerLemmas__option_t) const; #line 23 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysEagerLemmas__option_t) const; #line 23 "../../../src/options/arrays_options" template <> void Options::assignBool(options::arraysEagerLemmas__option_t, std::string option, bool value); #line 26 "../../../src/options/arrays_options" template <> void Options::set(options::arraysConfig__option_t, const options::arraysConfig__option_t::type& x); #line 26 "../../../src/options/arrays_options" template <> const options::arraysConfig__option_t::type& Options::operator[](options::arraysConfig__option_t) const; #line 26 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysConfig__option_t) const; #line 26 "../../../src/options/arrays_options" template <> void Options::assign(options::arraysConfig__option_t, std::string option, std::string value); #line 29 "../../../src/options/arrays_options" template <> void Options::set(options::arraysReduceSharing__option_t, const options::arraysReduceSharing__option_t::type& x); #line 29 "../../../src/options/arrays_options" template <> const options::arraysReduceSharing__option_t::type& Options::operator[](options::arraysReduceSharing__option_t) const; #line 29 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysReduceSharing__option_t) const; #line 29 "../../../src/options/arrays_options" template <> void Options::assignBool(options::arraysReduceSharing__option_t, std::string option, bool value); #line 32 "../../../src/options/arrays_options" template <> void Options::set(options::arraysPropagate__option_t, const options::arraysPropagate__option_t::type& x); #line 32 "../../../src/options/arrays_options" template <> const options::arraysPropagate__option_t::type& Options::operator[](options::arraysPropagate__option_t) const; #line 32 "../../../src/options/arrays_options" template <> bool Options::wasSetByUser(options::arraysPropagate__option_t) const; #line 32 "../../../src/options/arrays_options" template <> void Options::assign(options::arraysPropagate__option_t, std::string option, std::string value); #line 44 "../../../src/options/base_options_template.h" namespace options { #line 8 "../../../src/options/arrays_options" inline arraysOptimizeLinear__option_t::type arraysOptimizeLinear__option_t::operator()() const { return (*Options::current())[*this]; } #line 8 "../../../src/options/arrays_options" inline bool arraysOptimizeLinear__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 8 "../../../src/options/arrays_options" inline void arraysOptimizeLinear__option_t::set(const arraysOptimizeLinear__option_t::type& v) { Options::current()->set(*this, v); } #line 11 "../../../src/options/arrays_options" inline arraysLazyRIntro1__option_t::type arraysLazyRIntro1__option_t::operator()() const { return (*Options::current())[*this]; } #line 11 "../../../src/options/arrays_options" inline bool arraysLazyRIntro1__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 11 "../../../src/options/arrays_options" inline void arraysLazyRIntro1__option_t::set(const arraysLazyRIntro1__option_t::type& v) { Options::current()->set(*this, v); } #line 14 "../../../src/options/arrays_options" inline arraysWeakEquivalence__option_t::type arraysWeakEquivalence__option_t::operator()() const { return (*Options::current())[*this]; } #line 14 "../../../src/options/arrays_options" inline bool arraysWeakEquivalence__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 14 "../../../src/options/arrays_options" inline void arraysWeakEquivalence__option_t::set(const arraysWeakEquivalence__option_t::type& v) { Options::current()->set(*this, v); } #line 17 "../../../src/options/arrays_options" inline arraysModelBased__option_t::type arraysModelBased__option_t::operator()() const { return (*Options::current())[*this]; } #line 17 "../../../src/options/arrays_options" inline bool arraysModelBased__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 17 "../../../src/options/arrays_options" inline void arraysModelBased__option_t::set(const arraysModelBased__option_t::type& v) { Options::current()->set(*this, v); } #line 20 "../../../src/options/arrays_options" inline arraysEagerIndexSplitting__option_t::type arraysEagerIndexSplitting__option_t::operator()() const { return (*Options::current())[*this]; } #line 20 "../../../src/options/arrays_options" inline bool arraysEagerIndexSplitting__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 20 "../../../src/options/arrays_options" inline void arraysEagerIndexSplitting__option_t::set(const arraysEagerIndexSplitting__option_t::type& v) { Options::current()->set(*this, v); } #line 23 "../../../src/options/arrays_options" inline arraysEagerLemmas__option_t::type arraysEagerLemmas__option_t::operator()() const { return (*Options::current())[*this]; } #line 23 "../../../src/options/arrays_options" inline bool arraysEagerLemmas__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 23 "../../../src/options/arrays_options" inline void arraysEagerLemmas__option_t::set(const arraysEagerLemmas__option_t::type& v) { Options::current()->set(*this, v); } #line 26 "../../../src/options/arrays_options" inline arraysConfig__option_t::type arraysConfig__option_t::operator()() const { return (*Options::current())[*this]; } #line 26 "../../../src/options/arrays_options" inline bool arraysConfig__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 26 "../../../src/options/arrays_options" inline void arraysConfig__option_t::set(const arraysConfig__option_t::type& v) { Options::current()->set(*this, v); } #line 29 "../../../src/options/arrays_options" inline arraysReduceSharing__option_t::type arraysReduceSharing__option_t::operator()() const { return (*Options::current())[*this]; } #line 29 "../../../src/options/arrays_options" inline bool arraysReduceSharing__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 29 "../../../src/options/arrays_options" inline void arraysReduceSharing__option_t::set(const arraysReduceSharing__option_t::type& v) { Options::current()->set(*this, v); } #line 32 "../../../src/options/arrays_options" inline arraysPropagate__option_t::type arraysPropagate__option_t::operator()() const { return (*Options::current())[*this]; } #line 32 "../../../src/options/arrays_options" inline bool arraysPropagate__option_t::wasSetByUser() const { return Options::current()->wasSetByUser(*this); } #line 32 "../../../src/options/arrays_options" inline void arraysPropagate__option_t::set(const arraysPropagate__option_t::type& v) { Options::current()->set(*this, v); } #line 50 "../../../src/options/base_options_template.h" }/* CVC4::options namespace */ }/* CVC4 namespace */ #endif /* __CVC4__OPTIONS__ARRAYS_H */ cvc4-1.5/src/options/base_handlers.h000066400000000000000000000057411313116454100174510ustar00rootroot00000000000000/********************* */ /*! \file base_handlers.h ** \verbatim ** Top contributors (to current version): ** Tim King, Paul Meng ** This file is part of the CVC4 project. ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS ** in the top-level source directory) and their institutional affiliations. ** All rights reserved. See the file COPYING in the top-level source ** directory for licensing information.\endverbatim ** ** \brief [[ Add one-line brief description here ]] ** ** [[ Add lengthier description here ]] ** \todo document this file **/ #include "cvc4_private.h" #ifndef __CVC4__BASE_HANDLERS_H #define __CVC4__BASE_HANDLERS_H #include #include #include #include "options/option_exception.h" namespace CVC4 { namespace options { template