pax_global_header00006660000000000000000000000064115634306040014514gustar00rootroot0000000000000052 comment=26d86f4b49f7c95352e4f5f06e22ba1b411cb248 morla-0.16.1/000077500000000000000000000000001156343060400127135ustar00rootroot00000000000000morla-0.16.1/AUTHORS000066400000000000000000000000521156343060400137600ustar00rootroot00000000000000Andrea Marchesini morla-0.16.1/COPYING000066400000000000000000000431101156343060400137450ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. morla-0.16.1/ChangeLog000066400000000000000000000054311156343060400144700ustar00rootroot000000000000002011-02-07 morla 0.16.1 removed 'deprecated' flag 2008-03-11 morla 0.16dev ige-mac-integration package rasqal 0.9.16 supported 2008-03-07 morla 0.15 bug about the abort function 2007-07-24 morla 0.14 morla_is_darwin ? commit ML rasql_query_prepare for checks g_get_user_config_dir() gtk 2.12 updated 2007-07-23 morla 0.13 a bug in the RDF parser enviroment for the DOT cmd 0.13 released 2007-06-20 morla 0.12 textview widget with highlights textview != treeview highlighting in preferences demo in preferences javascript engine module support gconf support for proxy setting http://www.morlardf.net 2007-03-06 morla 0.11 CACert is supported import of templates as parameters (for the windows release) close button in the gtknotebook blank_node name in the preferences preferences with a single dialog for the dot files Copyright updated Properties with LowerCase 2006-10-05 morla 0.10.2 Proxy/Authentication libnxml 0.15 with proxy Curl for any download 2006-09-26 morla 0.10.1 bug on datatype saving error fixed warning window must not be editable libnxml 0.14 with useragent 2006-08-24 morla 0.10 open empty documents memorize the dimensions of the window bugfixed on the maker.c and empty namespaces templates with literal inputs but without language template on the startup with -t option template window with dinamic sizes sparql and rdql supported datatypes 2006-06-19 morla 0.9 info about resources recursive edit templates 2006-05-22 morla 0.8 n-triples and turtle formats (reading and writing) error log (with colors) no loop of remote template request template edit automatic extensions (.rdf/.turtle/.nt) kill under UNIX 2006-04-29 morla 0.7 info for the property in the navigator MinCardinality and Max in templates and RDFS of morla recursive templates (a typevalue of a input can be another template) bugfix: file locale to/from uri 2006-04-08 morla 0.6 gtkobject -> gobject and no gtkWidget deprecates new bootsplash and bold in the strings pedantic and ascii compatible codes english and italian update 2006-03-21 morla 0.5 a little bug fixes bootsplash from gimp 2006-03-16 morla 0.4 This:Document New bootsplash default program from register of win32 last documents help with xslt Interface section in preference 2006-02-06 morla 0.3 message error if execve returns errors merge with rename of blanknode %s substitution with the name of uri/file when morla execs a command transient windows tooltips with different languages Reduce the string too long in the graph Category in templates and alternative in inputs A new system for the list in edit_triple fopen -> g_open stat -> g_stat exec/fork -> g_child && g_spawn 2006-01-08 morla 0.2 boot splash preferences templates navigator 2005-12-14 morla 0.1 initial release morla-0.16.1/INSTALL000066400000000000000000000172271156343060400137550ustar00rootroot00000000000000Basic Installation ================== These are generic installation instructions. 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, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). 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 at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' 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. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. 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. 4. Type `make install' to install the programs and any data files and documentation. 5. 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. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 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 must use a version of `make' that supports the `VPATH' variable, such as 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 `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have 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. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' 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. 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'. Optional Features ================= 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. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM 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 host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. 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. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--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. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. morla-0.16.1/JAVASCRIPT000066400000000000000000000060741156343060400143130ustar00rootroot00000000000000MORLA's JAVASCRIPT ~~~~~~~~~~~~~~~~~~ Functions ~~~~~~~~~ The Javascript code for the functionInit, functionCheck, functionDestroy and functionSave is able to use these internal functions: - morla_alert(something) - it shows a popup and returns NULL. ex: morla_alert("test 1"); - morla_confirm(something) - it asks something to the user and returns 1 if it has choosed "OK", otherwise 0. ex: if(morla_confirm("Do you like morla?")) morla_alert("Cool!"); else morla_alert("Doh..."); - morla_get_value() - it returns an array. This is an example: ex: var what=morla_get_value(); var text="The value is: " + what[MORLA_VALUE] + "\nThe lang is: " + what[MORLA_LANGUAGE] + "\nThe datatype is: " + what[MORLA_DATATYPE] + "\nThe type is: "; switch(what[MORLA_TYPE]) { case MORLA_RDF_RESOURCE: text+="Resource"; break; case MORLA_RDF_LITERAL: text+="Language"; break; case MORLA_RDF_BLANKNODE: text+="Bnode"; break; default: text+="Unknown"; break; } morla_alert(text); - morla_set_value(array) - it sets the values into the current input. ex: morla_set_value(["value", "lang", "datatype", MORLA_RDF_LITERAL]); - morla_version() - it returns the morla version as a string. Global Variables ~~~~~~~~~~~~~~~~ There are these variables: - MORLA_OK -> 0 - MORLA_FAILURE -> 1 - MORLA_VALUE -> 0 - MORLA_LANGUAGE -> 1 - MORLA_DATATYPE -> 2 - MORLA_TYPE -> 3 - MORLA_RDF_BLANKNODE -> 0 - MORLA_RDF_LITERAL -> 1 - MORLA_RDF_RESOURCE -> 2 Morla must return a morla_status=0 if every thing is fine. If it is not, the template does't show messages so the javascript code must do it. functionInit ~~~~~~~~~~~~ The functioInit must be a Javascript that contains the init procedure. You can manage the inputs and the single elements of it. For example you can set a default value or creates variables for the next functions. It is not important the morla_status flag. functionDestroy ~~~~~~~~~~~~~~~ This function is executed when the object is destroied. It is really useless but maybe you can show popup, messages, or other info when the template will be closed. The morla_status is not important. functionCheck ~~~~~~~~~~~~~ You can use this function if you want check the value of the input. The important info about this function is the check: the morla_status must be 0 and it means "no error about this input". If the morla_status contains other values (1, -1, what you want) the checking procedure will be stopped. The checking procedure runs before saving the data so if you stop this procedure with a functionCheck returing a morla_status to 1, the template doesn't save the data. An important stuff is the message. This function must show the reason of the error with a morla_alert of something like that. functionSave ~~~~~~~~~~~~ This function is the latest function before saving. If you want change the value of the current input you must use morla_set_value here. The morla_status variable is not important here. Questions, contacts ~~~~~~~~~~~~~~~~~~~ Write me: bakunin@morlardf.net morla-0.16.1/Makefile.am000066400000000000000000000002761156343060400147540ustar00rootroot00000000000000SUBDIRS = po src icons docs modules EXTRA_DIST = morla morla.sh bootsplash.png doap.rdf morla.1.in JAVASCRIPT icon_DATA = bootsplash.png icondir = $(datadir)/@PACKAGE@ man_MANS = morla.1 morla-0.16.1/Makefile.in000066400000000000000000000557261156343060400147770ustar00rootroot00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/morla.1.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS config.guess config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = morla.1 SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(icondir)" NROFF = nroff MANS = $(man_MANS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; iconDATA_INSTALL = $(INSTALL_DATA) DATA = $(icon_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dot = @dot@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ firefox_js_CFLAGS = @firefox_js_CFLAGS@ firefox_js_LIBS = @firefox_js_LIBS@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ gtkhtml_CFLAGS = @gtkhtml_CFLAGS@ gtkhtml_LIBS = @gtkhtml_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ ige_mac_integration_CFLAGS = @ige_mac_integration_CFLAGS@ ige_mac_integration_LIBS = @ige_mac_integration_LIBS@ 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@ rasqal_CFLAGS = @rasqal_CFLAGS@ rasqal_LIBS = @rasqal_LIBS@ redland_CFLAGS = @redland_CFLAGS@ redland_LIBS = @redland_LIBS@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ xulrunner_js_CFLAGS = @xulrunner_js_CFLAGS@ xulrunner_js_LIBS = @xulrunner_js_LIBS@ SUBDIRS = po src icons docs modules EXTRA_DIST = morla morla.sh bootsplash.png doap.rdf morla.1.in JAVASCRIPT icon_DATA = bootsplash.png icondir = $(datadir)/@PACKAGE@ man_MANS = morla.1 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi 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) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 morla.1: $(top_builddir)/config.status $(srcdir)/morla.1.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) test -z "$(icondir)" || $(mkdir_p) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \ $(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \ done uninstall-iconDATA: @$(NORMAL_UNINSTALL) @list='$(icon_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \ rm -f "$(DESTDIR)$(icondir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/po @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(icondir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-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-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-iconDATA install-man install-exec-am: install-info: install-info-recursive install-man: install-man1 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-iconDATA uninstall-info-am uninstall-man uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man1 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-iconDATA install-info install-info-am \ install-man install-man1 install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-iconDATA uninstall-info-am \ uninstall-man uninstall-man1 # 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: morla-0.16.1/NEWS000066400000000000000000000002271156343060400134130ustar00rootroot00000000000000If you can afford to donate us some money let us know, we also need new and old working hardware. you can send a mail to mail: bakunin@morlardf.net morla-0.16.1/README000066400000000000000000000000351156343060400135710ustar00rootroot00000000000000See http://www.morlardf.net/ morla-0.16.1/aclocal.m4000066400000000000000000010666711156343060400145740ustar00rootroot00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 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. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) 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* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | 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=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_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_AC_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}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_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= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_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_AC_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}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # 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 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR morla-0.16.1/bootsplash.png000066400000000000000000002053261156343060400156070ustar00rootroot00000000000000PNG  IHDR2FG1bKGDlLti pHYs  ~tIME ,BtEXtCommentCreated with The GIMPd%n IDATxԽgdu&/]ey]]U @Ht $rR4V+0b7b+.'vC!4#)(ԒC$I0@{]yo2+5JUY^sw Ϡʿ+߱/9u?W~}Mׄr40;Y3,_Yxg xX]LNg~ώ~]wȑm Zͷi Jk#X,5q9![s5]{¦,6>:nI\8#k[CU~7)瑾 %Hsoلk3ٱh-CY3 š]1Sa#ܑC wfm4*t˺̟k\sXJ{r_xbPEMgՌٌsx9W1=<2Cמ 8866:ACFv,~v) ]FQ6*܇l-- <3xy_h hpU ؄_*oܰB lBꞀvLYIM!h2q>Wɡ GƖK _=Ύ5z䐋mAuG=DDXWd²5 N֠}Lf@:"%ӼlW@^BJL<<TFB6MiZ\pY>SU6xZf!ӂ7 Tkצ0lk<6Q]xpx>T'ȀF1r(~$oz. X0y^䐇54dy&Ȓsi2=˘\rypj(9q`9>)+bq{^< O{ftRr NJdE  n2e-"}Te[.Ì#߱[uc5(%l`QN&k6cH 7@S rbBj1F<1ke` 6O8\8 vy% OyO>I>^0;mY ~6 .z5BB ^ؕ`B-F˓#2?jqhl@Pb(滑A̰'*$x|.c,Y*hdb4 ; 0>U׼fplq5] cG)ql %<=d㳑}Œo]ޯa)6f} %Ƽ E%< &,fV=[ݮt'BmDa;#0b,{-Ȳ'f@)i[D#قHFk qq|UN < ( CeI pR#J,-za8Y< 2ydB%aY^ve-^2mqfdl]Jٵ\—^ku쨁Ma,w w=Wc#w!*4|H+v.)h(s S籘[nG<{l160p@XK)iؒې6<ƧQՆ^XR"mB @C.&}e ;B0 ;i2^)군 TȔU+mƓZ|lI]Au#5Ppy g٪a1")˸4vr{z^=#,pϮ%d١Ea5p3{> tq\l<6Y~@ԀlTS"{\c5CxazIeun ~6 $x"qtŹl!:*L<3֬kg>Ʈ5r ?-llپG ،L#Ņs )AN=~(N\=2ran"g9Cjl`,93jbA?\r e`(e> µ]ú9UoRgj#]*Ӓ @͸!KtA.ڧe)Ibdq+$we[!/*0}j`g;?|/>śrK"^="رa &Vh<EдQgmQ.>S*泉m'ܖ,9.ʧȵ|W&cJ 70$ȵ.\Ɗk3Zj8ԷmOڬt_f1mqa~ aGĭ7gf<&'pk:i?zDߵzNfr(r#s@'<,BY wFȲh|%O;0뛘4d/TwѦ:$؟ q%%u}.#vŚ};-vc&NՔ\x~]\.\xw\[Mq{0ʸ8wo %.jZďϼ8X6J\uhga hs$+[%;˩31VI赘|)|j7 aXXtzt)#d!IIQ,P>Ə"Tglod}ڄMR}Wïy/j5Kse),}2q޹p~tV%Hԏnx ֎}ֹW.Yأ_żu ?Z9E+`1u]ʟXcR6ݲpYfR me]Q!$为5Zڟh&AKڦalc ӇPš&kvPi.f_U a*1:f>-a .Wi+R(҉`bnzw)d"2&<-ajp}P8GwRD.†m`Dk}A:"];Fji#U/*i b!3']' ɣ&5ͲPƋlj]Lq{+y%DyNc *c<{9b@.cD=BǢ\ǭ枾[yE*uoި\frBA8|B*dUD:Pzbl@`V8&Cly!K]:ab H) 5|֢MP/2܅i,"j-!W\Ʒ$EY 2jIs+_f_h\8?RkD(&hAT5J_gx[:e]^G2P˘_rKM 2mތt3ڛ:ЖiS)sR*aiyI;tŰ~<@ M+Gs_V<~˯w(s9r|!cWέw;ao+[O2# ݓu)nWLd$l:}rRy2z\>/2$%h)|)K|\]@\mBEUHݧ!!$c`DRd@ewo7ǻf ]I:>׵_Ss8|M M_\v~ő(@[]-]eV voDb5^Լ6e>w %+(}8;~H{kWgpRyPB#]l{G,BGl,B kF+ B~2 :V~:R< )i>FS5romaR0Exי<: 4GNMJWLVO[*&dzD#jBu찰Ym 8֦6ܳ~l]XRϠT֗kr`E馠){ |7=#| oxXXOVl|%çѫ%jUEfx6"Aa@Xl2ɗG`Uz=)&>2 ${6!jkMugv0%vEe26ܽ1\:ǹӸk=#CD!}kDxjɱ9!օKHޛ:ymáeW16l*UyDUL b(WI NyeH_Ta8$'[ʣ_g5:0iӾ8̦rL1Tj8(%DYbK\'qLH;Q8QEH_+{73o-JC,sπn*`Lz[0nASX S&wn+R m]_g=`7suj޺POjl(<+7q=⎄6kHk5 dwOcRŷ$␗O$\IQ~ro=M!U]`E4;JoΚ{pDp0+OJov:bN9׏3IP տ KFMj[AA~0; EcA1Vi"#VYGVLFl , G (Jd[e;J<F*K񝿎;="[:[>U,^< ,gaO4[ꊰei G! Cќnz(D2ec蟣j-P,/Q(P,je.G$dƀ؀x#xIR^łaC҃01QFf(FGYIXqjX'h|5zWÑ@`CUPXxbo_qa쨱TB͈'z)Ba\r1gU )r'1͂dq L$J!uOkr}xV LQuޔ3RDۆ$\QR łpҹhi5yzR$.%k_@liXJA3xf18|.^n)eБï=?㫯~2V$"t(X\cHm"U賏H ɍJR"kMekXЙ6Ch{K4Nƽ'ZZH"! aQp*BZ0lI R9Ue*CiS Kq[4,C+'Q- F5@o%GrǶ+( 6R1dgP(.cja#3C[FkHŇ+ʥ2 ZR-H[2CZ6x?#0еd32%Cd"T0ǼnɪX\oH+V-P`[[Ao$Byɚ Zbw]JtG:|sW04}Ѻ^斦pu NЖFK}[a!)޺=\8c!;7JP'ru&'|'$0/OUE͙|})4r!r"IR::V JbjИN1K IDAT(]< „\" @BkYU`T@6|XJ4d)e5;[̉2( X-y !_c17,~:9Պ02ahl(q y/aD-4%g :HIcq7`^I.PA*VRىH'"Sh C6pj$0 ƵK9oَ'Z:ٵΩ)+<ῖTgXuu = ҉fMhŦ=x`G2D,-xxlW1DMF Up(W&4|Ui*rH㫊 "I3kUGp`jqY̚hSDD I0taDW "$ "zC`5S=r-YJ(¥*1+QHd!D_!J.&ZԞBǙ(A *ToVraM(NLc$+ׅof00YuύPZƿOj]ZYi98,gM-3rrfgNI6k#[zҋ$㉺_]ǕLZ.LV*'PHpE!G D$J3'5I+J#$h͹YtǒaSOPUdī;6?^+ge\ KajaƎރw$vJQgpgnA @֕7f#R"H-PhƗ6N) v$zbA`ljy퉨]⾪<3L[1zVs|H&V7M}.kÈY8HxRR9[S4@)Pfgj 7vSQ]H7ɰTHSYLƒ$%qU O_b~,-~XJ&_Ÿ4Nr+Ǚ'p''N4[@_&4%2.O_sk<őFR2?l"k׼ !kYۉ<8QTg$.A4N1  |lA,&|zZg_~b̘Z߿g8z%z Ӌc~k0,ֵm׈1 rUDL.Q@xӮ ]tnRܔMk@f+:#vώ>[M1U]MiS)p4z[ْɐ;ߐE*rץFoijt 0^ӘvTy4rJ\EyϏaQS(qq,Ώn-0BeL/Nyʥ_˘_5=Wa&;XC"L KF<>zW\R==r6$J uGG kO0fWc]=]\ful.:kw`GɵYOK,.Ǚښ]@Vk)2(V ,hT;:ɦ{7) Ed"ckXRIЖ 0C_CcRQ# 7anɬ|!B|~ ^ʺ &?#6$I-ǟ҉bƟV3of$%,mغ[&iZH[߇B< Bf=(J #DQ֢B6#|@JGWx!~Ȟ Bz `5A7&q’NSc5XZf)=KP,09?P,0K'ݏ mh ;ѓ. &oARRnEo˝{gBA_Гcyww=q%{ 3Q,oBZN8ط.lކT"!Q;$Xd_Qh !\o%P\66mJ4#z:4}(p_Ĉik"bkV`3" |ewS Ë'bP@EokEl!Cމt9o+7( "~z>c zpt-uvX)\] ŕ*>d^jFB)LUWUQSY6R{O0i(cY+2$$GWYY1By"IVhߖ y/Kad^,PJ]R flO7O\…NciyQAaZڲ܇x;.)aR&(G{2!_"O ȗM@s$r9R GR^Rqӥa!.bq<%yRSW1:;ڰ;9"l|\;&/H`f3X(RjtuRgaE@BC,_W2]Ue@ǯbtEu6%W(H gB|- BlN0Q.1p%dX.{seO]uz4i.'beT ۑRQlA~F:;)q+Y% HR -%G)qVj>Bǜ$6٤k@ R+!Ҧ{攅:r12i,"Cjp)j$>*wjaZwR(9Hӳ.kp}ꊷ`^/`r~.Չh]į O=w<'6(Zy"n7ўZQ?;?1]D/;Տ=-"Euɭ@\ƍ3_ĉ0~c8{ eo/c_5\Fvyg'¥xw0C%l^7Qxջk2ONahR(\XفSP][Zbh, rO@-Yr6S24ixv#64T24tfR~!ZDNđPb6%WCWHuyClfsI"PhkXZQN;KY羏I[Z'^Bn3i䗗Tlß <g40vPZ1lxl"bHw֌ co# |a3Q9-\?%,gD1,Ns?ĉ뇱o/߁v(J`:nՓ V1URUo֜jE&قqDa13g!`&6 N¹C1#!fYYuE<~w_(b?ko2Ayߋ8>l gԩ'2aլ%h"@ZY*b{p@%:~2wßGI]X\A[#Gp}NJ7q˸9WxJ.+g_`!7W똰Bn/7̠3+'PRwǻ{>t ΦJ뿏 @ }AX+:)ln [P xW}Yj_*ś33@C @067k+O,ûBejƨdb|ؗqa6:3:O) K V[ꍛ9<M-ލz.eNaAlSd/ M܉q"cgj*im5QWc,W:X=`3E5û 5HWj:6~}RA8`700kTE\ 7Bpq>Y<^/'ՏuAnlOݎtrzy>㯿^,\@k"s즔bؕy;3ƒ=ޘ&ϼ,ojfɅQܶnްdstj;YE=67Go.c-޼<~P@8沓4v\ԩ>䞃 uEܶ% ?sIL- 3!`+ k7^TiZ[Ϭnl2Nצ6"Xs@W/фF3rQר-:EکWk b%JTb,#_ɣŘ\ D붵IuOKW+Api .Ʌ1yU>]ʌӓ%i/SwcOL^mO1.%@ 􍺗4؀m>\.AD3oPRNϿWƿԪ特4^><.߉mnQ(J+ ]]/m"}Ds]-0>7} ]>}c\ 98ko z]DGDط9*0p mdPZ l1~j4ZR:*ZEJ'q ٫yTآIg}QtSHUaTcA2XV(EHS{$\E7 ,cFU 9hc%@a/DF{lW_5B}#*gx@k *Ǔ8ruzЫӶP 3.Ago= lُvxx3w¯f-o Ec 9BwS=>U.6{?[s¡gqvU{̌Sqc 6vmÁmbCFDāֶt]J~fbjRd=D,7 'L3#>?F,7Ǩ v8fSldlY ȯc[^(r pK=Qxz]ߋ\=U"M^`,8oEFtU 46H)܄*C=e9UD#;\ujoW1 60/$m] :́W)$p0 3ZZlkq*tM6m[r meTx+\3RR?! Լv?-w=FE{'+;h\J35ζU*%ZűkSkk2k焔āZ^G9 UW&cra nýF"&r90w2qӞx=Ӊq-^?]؂,5^VOw$,EGWa1CH eyOQY9y%$vuܥUpi,$HXf04rb=d$Qm ubV0RG+Xl饡dNV7T!ȽtlZc$Icu2·ggUTdq*,EV ry\d=r}2V.l]ztЌw?w(/6#a0<x *}v=JP$(mؖ9'/-> GV5 9*;`K[ތ帐-¨7YdIt'nx^:W(޽Iy3c83 _ۅ&|)UU&V]WFkf\#@.9vY\)jƽ.j'9A:ijZʳ+4k&Y+kZ.V!ZuɆ W8 Yf`1`JG W`X=Vl{/oUP8B=" bm oH `)}\4$`!ja|ny cBnux|AlHm+ m@rݙho9}ozADEt7 RIe Q-^ᾮOxio1;byw l.إTD" A.ĮY"5؛V:V2?eŔݷGNbh]\sG'?ݻN4k4^? ^94f'hrI2kP^˴5ޅ:wF04s {veGP@,2x~ǚުvLJx+kje]DP~K %(>j1$Ԡrgh°^FB2 bi<ծ%:lFD[ȱHYk,p,hYTo"Bq5S-"bSZH,({,(cƥqcaL:wm*Ҙ_@7,6t ˵Tz7 6TәH%-pS#q*A{1@ <8q6pyj=F\h/aQ#Z{un9$hB-o۔l};߃o r}e: ® wawaۺ:d"c'LE)(3h|!z,&MSQ0%@m~72r>nm,})M,ߎ-o 26?Buj`ƞGe"Ǐ[PmoFɮ$7.bZ_k' E V%ضfhT ?:WaG_6} +\-Յ0X.D\ qY=*dv/ wkV֠ZTB[OHQ̢[4t} 5C+Ts~FQBy1L 7JCY} +>+ٰ5ϝ/,7WUֲO 6v of7!_J"[Y۹:r9 h5ǬELQZ[OjZ'4f0xױxioѿBX14nAm8#wHxlv @wzޓI~YD E޵1&]ϕ1¥7%.QT+6r&aЁb]f2zh& M^0dd 4ۻWD="b:F%aɎc-!CHz| [L9A9'[,% TsTke*"\ )`,]^sǿ>*%ؑ'66>O-!%V)BPJa:N=]@sA AP@W뉛R6>1+u`]Mhߟ"P+&9592C<(b,+%qyeמ@׏qr~۬o_+-'sMw5^p{oeP'1:{9$n=|Q(kg.-/Q<}ևNd4L:5Z.X,bc3޺*NK$26L"-32>` =Ew~Ń2oR\߲{'#>xLeL4jrS$$)DH<&0}k`Yz!5ǨzJzheeHҾ{e(ɘUzygvr6bW5>Տ4YC+M[oyV1 V?G6jE V+R9lv/|S}{(J+rE TkqOGU)gŅIW+]IVSWK]y,N !2s|A ICY\Mtm7>|/c{I ^+ $/#buz_z:r9p{1`r.?X0ww d\*q\! A eYSfcH ̦q&|c5!S>O4r_ФAb5?ij)n=xl5V`KCt2ll:[P HAAT $^8M3 LvɁ'?jAȔX:ߪ)"@6;x׽TA tEKp`NۼHI ߞXZ!ws2?{_'ZĿ{.:~ jEbxsV٥)\8t=-?P 5%B~AK֡HFIbknܾ>tezPqo'o#ܿXڄcS/c&g9rIpᄇJh焯l̋hNs? MƱܹA}#oI!"=Xh.j?၍]5ڎ[VoU'!E׉V/ 'q&"IOµ 决rm- L,)P}V$pdeBIxՊHM ɢ"9 KJM,q\5P|\;abq!.)3f~I$b[_](o&AggbD%o~93꫘nV "t>gsc{}y^TsNbba݊ӗWN|nE2Ll!WEYSƊ5f"V7jcW~LeD'qWc ^1X{ a?=_Ɵ+Xk!eזQ6!a~ d)PQ2NO} Ilʬ!$> O"ӘPB#sfYWtV#CYcd!R=IhIUfūhVc2pmIX :H6YRZ^ d0IJ Sn+HϫrCe`#dl:W=|c 1mN)N*|ߣ%hlNK/:G-Wbzqx2ɖz6Wm ᳾͊P[pY\?eltm$B('=X}~0Ķqcqk9,uƇq'd:2˥~|;xė1^sK-HTZ_t-R! L0h{ւFvEk΢_49Ljk*\$ï::ُµ Z8uus#iJdaHq]04ش\2)8z5v{X.jۏS Ɗ',e0ԇhmScX"\X MQ *%ܜld~|5lj_t_?:jӉ89&ޏy=m#w1e#*g*jN*ު^/f'vHhWNc:oFeN]. _].2%;9Q{tJI ]3'N`d D nɦ&^k9^R3⅂uiTuJ *M(*>4}H/(P=$#NI$E$`wG{\4"MER!hTR1,_(-xޏ9g3Kel[]{JӚ@&16Zy o`ۆsxUm214s>wx'1б(Oɋ'4ۯoڄۺI@ob#>Es3"$lum+):[GX1{ )6j{B_۠l{(c|c!-V1XZG LͲBY} YuE% tay|Og'oB6ミ- n>^85F#=701yG91nt`c0pGq/! Y[q[˿cbN b*?bX7+݈֟֞q9$a؝zPΞφ=\U3>gby$17-[.O`->ށlnBS # XϡX.X^D;PǑoa.{$5oLZY._QFXb|JZ]Cvt0ٱ(ohjUAʭ#OկH!gP`}(c>ԽKT'A$^q:;N#M]hh3nO ~ X$Tܼdz0SO8el|S6pI:(bI趰&[Xo"Z+1`~n1tƶ[;5gww,s^\_=[~b0rL 7I$fkc懑76'1мKoTn}V|2|⩯c>}_NYh$fu~ګA';?QȆbkP(I-cؠ?d7 )>;ktjI$YgXA&- ƤeU&%*TPJ:QÑB%C&Bs6]~fxf zћ*/܍a>iU^Wts0)Qm.ց[צCEyEl} WBLЅ{~ RFM݆-kY?^x/ )&kjН%uCjjXiA[JD~;RTUF6֒*JL@C\\܆G{^wb$W46uaksu῝ nja+pu&El~ 3Q.'~J>a|kKM*8ܤU6vojK+8y(Ӟ"+TЊG{~ |afy &==rKˋx|)L&Bb^`=! FV 9[z(Ȭ vf5< DK6USG`ñ+J%TX@/df2!B*ބXCOt5C"VJĹ[!3aɉ!׉&CdM(dXzCIf[=D^`rQ.uYℚBPB VMW/pf0(F\\[W^_ɕA,X;Q,%#ݯ̵][c2R 4utrZK`қS3/"Ym0L "B[?_.`c_{v?tg}T]ڸ}sA4rnBm"Z^C +e$ ([ơ5Ձz4ڐ7uZ)D"L!%435*3rSX*,y ^|nr"\q*ѨhbbDMi}w$uw:yg'&v"B`$ي~-Fd V,le"XMZv'<==S}tUӳfg­[sUհpX\pZKr "/'$$BR]HAE"r;N{MeQy޺#d ՘/\6)U< )vB*TEpKAIӡzO3<ZduW#ޓ82LcR &/CsiBH"%<o Yjw*5hZrg5YjuJB]B">.cٳ$UU?Qj&=irZ1?$OED2~/ms1LG0C{n[)VnƲvTڕD]?A!h1Ԋ/e NiLH:JDMJ3?y?R?}#'0<߃SD&B*m1|w++kp?خP+@ꖥaxJ..Q}97Tj3ݧư qLz)X҉E®e‘ *k1n}?eo,=bo .|qi!Wl]%#Culp-`f" Vn "~5eDസ=uB"Eqv ݍ-iaƑd:MQMMSkDA1]|\spY2 IDATExȜ.+q| 9~̅`a-pY=`H^,+B@&.s$b(ERTŞGlζ[җ kiNu8( b'DӀ)HK 86_##8KI$^#*Ιa'>׻iQPu/þߢo,((.yT՛ žU'E6 l G`7:[£K/}llhy ,Puh@$V:=' @yIƈ  ב@`ԇU`)7 yKHmYo:T`2=Z{%f1 8 ^Dv",mrU#=5&8gc_386&#RRheaq $sE⋅P83)+Ch͞ųg~h28ó=Q_v'v \SÝˋ ZKU9-6f c"І`2K^J*H^b#3{0f^!%l&,&X(77$b5 zD K,t8zG4@A1@$,7"2V1nqg,-ӢNM'* )dGo.b eസf:*Quq\ӧF38<ip-'[aqV0bC䠈XVȁO69E*K{2aBN%`wtM@Ri/xT鉒A#*K%uBXf4w{ ^|x~A]% &i V*Kz1@<)GxpXR N՟DZ0:]̵6ռƊ7AAX7y zC6o JcLB_A=ڠvDhq^ `4|<8M8 MӜN×e%l qT!a?\`ߏS3{!0 aL.tD$/2ơgSt NG_ N,,C`51[r';e`fSW *N |=IJUpZ `‘ 3luv¤d(t\ E,2eE"iH ≌FM%b=vZ+T ԤDWaQT?:01&l?PPGlёa$BOb!Lqf0l<.RwuE’6rW?1.&: { ίGaDP`KmL U%ČW&8 Ɏ-Mק<? T`pzp^4A8مvTi$v#׼.ՃmaXQyx '"VIJLYxXbuCNV{ lldxP{)41F(HG8az #\11G< 65<Ƨ8݂k 0t#pxX8;8-%XU aDDd$Y气+ԋ_dH"ޙ97! 66F:k#\&c>̕Q 9}BqY#{t=`ٍL۫ojM%Ƅ#u85z;j LLXCDi БwWqKޗ|ZL!m:TrV{k6*F2QHYM [ l9iI .7zAf*~OMMVܱ8r3kI{A`sZFuq@G弪j2o#w & “.lƍ1PyM8|' 6Gxf3KޣqWϝAy剥_%29nl!k )(/[PTyI^~tf7>iS 7ލ<;`elc/vL1iY@"fB-ʑ?t1jKWAy+jeX)rr@N ]Uq+ϋ5axzs),9\+?Ʌ8sKiwX*;SNs\R3 #kDZX+Z*Viqa64$Hk ^'@5 >ÆzSibL,Jcm!D9e);r!0;LD#9$s "{勦8:*&ћ~l-1T ;Ȯ}fG,i=<9ʒ^/F"6`/GsTUEc4mMӗ=GEch(?(pԌ@5zZ[~-?|aQFYfCЌ mkpfEs<,:`3&/l1ӊzO ‰s4SQxxxLp;t+ܼ*IhIL -cIf ,pӖ$n  f9pp<`l+֧ Ţߢ)4'd;Sb/ǪZE4B<]2 Gĉ 3>ՌGgm1tVpXvZ 4@MqUy|$nE8J0>G|}g0AVRt*t~/# FhDBTIr؝mw>$aMxlH-}#AXQm#*,”0W[_xD<S㖮T!IgB&$hNpBE$u U YDzRT8KGS-$~T<Ob:8k-`c50s/C(RSwc[cfs;:? I|kXb2> *Ya-+ellL~O3y$p9T:QWҜ }QI֟ /;w!7:3WY/A6Y#F'CԚ{ܺ2s 8GP7laCZ՟'02Ao7<<;V;Sz*bE(bF3xk&i"ė$âu<!*WLKYODžcXM~<2ٔ2ڎ-pbʇq U &yfFłg޿.4uP#P<3qpĻxk^gBq?~w8;q$l)(xiڨ$ 9J1*Q F:Q!Ì4CGS De⣒Jvd Sr^gHǖ$Do; aBR]FfݪXp7½M=b_Hq\{,R|ĴxBJxL!25۷T0zZ Gu% Z ]I<93Z/'bx8:*8>.T\|$DI4;;/#087|v([t[(+(e7=ZO_6ʃK's jm[~LSV`tEuqCiN~fF\Q_Ҋ;W}w$=+cPy2^. {*M`FPI8DtY]ecwpHjxZHT7B@S7K(.YgFtpOQo9 %6Xg@IQDr|"t/uP*UY&yBXDتI3BqaM8yY۱seHCSg_p`GΐWJE`k -YJur#/l$:ۿhpVD͗{dG~k)$\Ęqu;z LYƦ41{ 9LBaNlE8OiKLu]j~|1c6Ge4S6F~ptSp`J-DMD$-ƈl!2kn2#209H3" ?4bɰ nrẪVM,̬MtB$n] Tx,/b3CsUUc_!d Iqx_$NC4J:-l\v)؂ph]J m1"%y^)}[L6 (]xz> ł%vo 0)O9ۋSD/7Q] fK d=+%@jKhm0S8 QJ>p|{{и-1eBlgaFFoߨ5]MIorT3f3z?I/ s!_[pHt鼦lнE=E]Ѷ~ٞEOna}aܹ'\hB\`BsE꒥rr~z^W3u [jg¤Zk8-#hs<ܹ'^ԋ7D(U,a IDATN0W>B-!bAH(^~ DP;وoB6gF' Gfk{V型0K]wPbECER[~T/7h$Ѳ15AM k|J$W0֞Y+ps`ȕCrMyމL}^S|{K+tV})0,%Tm?fV~5+Hp1Eb{U \tG%~oN1 N;=>@l^_1瀨3͝75Y<2cqzBJnΉ øyY{7UdHQ5$q1S(ZWQWjp|5(1YGL"["+5hFgPa4^ oDOR9rϹa&x}=.uW[8&t5fA`eQ.ASŗ+Ch*k{z[83y0k/~}[xs%̄FSY]!-ȶb>zZxhQ !^lrb;Ux ֵ[4M8NjE<KGH!!RS "d` 9&)HNAJt^@-CD- 0ۤSF0Ӽ]밹% -@͸0~$D섗;ǰr1L - nP6_0^j$s4VսOc`^pu₧z޸9!~lnXUߏ`o^ k8#/a:80r|fwDJŞBIfhΦPHosb|/&i{Dӓ!LD2 zK7)N$=ϾUI'XԖkgLOqf@WJSX}"MF%kzB^Hs$(g'وn f 87yþ7V'[z[yy.܆1*MO1ݫaxlTܝ%0Bo>y!PVv ; &6?01UPzoF$P,fd1?aKFsmgCcxgVZIqxwH&PO#Bj P U tp^"u|e]2E=F~Q3L%Ds7|oPl!S 2H s'B$ɟx&!i4~x) JۈT8hIݡ !0r Y7{><##/zNWߌ:[=LsV ]5] OIe-_ oD/(ʽsڦ`xeMn殯j KCC,V1d2+ G;z?mR#J_Eml*{þ4Vj$b&OKW/h[͸#,FCP;k-ޜ0$9ϾrWA+c.c7[Tg4ɶ ^//WcT%6>1:B-`?w]!Q.kpa/;?e5aN5x \ sl ##/*JR4]g=>4, qEuFAr)7}IPBATqQ>R펌&MtFyQ>(yJUQE08~zk׮<4-vC եgQ/[lEuucM ,FރHvȚA-xfD[ۏq ڎGa?4/{ލynž?%Ӕi]dޔmPObS%gXuUK(Zp9X PtYAk{li:JsUTEBJBbJqcŴGDSN*4D-'˺7mAFh4+p^jt+wb9bj3:A\9V~p$E}!lWLѢr HX L Ivvl[58W<$ 3aP$BB }WnхnWU>ηذ#]b|VX4[c E%1T'+ȹd Ǡ{T#Z)B%AYا(Tu^lxk\J *KrϨ*hhCĭm9& APƀݏ5 Do Gj ʋ ¡s[$ns?Mxj{"hSJK|ƆӸ3ړd,5>¥͵AW[? θ .%:\|>-IJJRLyf$:b[A)(K+Ae ##DqdE$:,1acCnc`pvKNMl9+kd FX VmT2#K&oUnM Ocyqp܃pz9?&mw :]D6iƅ{qCd*Tff񎚏κ5]qL%CGsy~nZb[mB~!`h.VؾzhoԮ-?lN]P.S`fR (‚D"Qoǐ! 6".gbtA\յ{LG1g0AĜaYUTۗ-t 8^U`*=] ]u)+=M]CU$ڍ:]=8eb7;7~ e%T'\8~SxWI]ik'[4,Fڂq=k΂erɆT'T&Ocp7.<\rH 7~joǧC]pe0KT+FcHY6 SI!%AP!ăxsnV6ZKTAm]CEXP |N+QWz2J(g6/`o>i$8zߋdeSmD$\\sugQ_yD?\gY7չYcwI"#Lj_{¼ƆQ W<{s;q|&^EI1jJ$+OJfXEEN!% ~r{B$@u6J¢hƧIKs}?!6؆hsuM@ ڎkSF%(scگ\_,Q0n,kJ<ctfzXC4V6vt}]ٕs Ԁ>\S]+w݇U:xP .\8΁BSݦJ\_aEphDCnL{&м޺u%$Qtw%PK%hI_L(Z%(R:ܵ"7A,ő5_&Ʌ7X IΆ3/`ūpcǪo7O}aa"F(h3f/L!CnzMl8iQQvk[gHx3u4?>ǚhl-nu/Z-FT3w߫Kn54&陼!MNMf\S?:fQze#(/Rk*WQb %a zȫEԏ3{AvJtV)Li.Mp'ދodܩ#RjPA8QSqsX6+'@0̠fæU_]ZȯӐbjv]L806ol4꫎- uC߃ojPޜsZn\ s GYm[Y4y%R-Z@WG4r aѻ=Qm|ʷ tTB|?'rIU eTo7\6z˘,gB910*݃ص(\0Hǖp;QsAS˪rsj粲0@PTGcMǿ\/~jphƴ"1U]-{Ū_3Z}^aUAt.-4`ãB~rm=aUB8Խ|[~NLz~w{KnbOr1u G$B[i2{~)3lvܞR@!Ebxs:ƖVG!xS@ь 2E2a)DT*oTo$ 6 fjD"Yf4]@fЉ*ݡW8.*T r0X&5"L4:4qAEmuʻ=Snٳ:^ *8.+-`ʜ+~)aa_DHTԯk:FQ: ݞj` @{#cΡ ܎ ]&x/NB0+6݆"TĹ:>_d 3gs\J$G xxZ@F=FJO% J)36y Krsw]~$췼y#,H86I 0LrT&_>ȉ4͹@Whr_?^rx;@RzT}/^ȯ7٦Ð/ * ЊgP~}WgOQuCs J!]jk11}m^(=/ i0܄WXQfSѩB5P_2u}et?'q_C5gWo0Vvŵg}{{qx#&{ k*9lM&-Pcʱҿ<ώ~/7!K%83D,Ÿt0P< JcD@\'xĒs`tF{$Mb,ЍMD"f|":0 )Ԩ,w33"X>^C(%jpdN4c[o94X E1O evZ4\tccyC&EsqFU6c3Oujo&2WZxP NMZMN +yuW7(̓|Nq)Hmg1wK.ei8-D4Y `*܂fST:v-1a` E-fOAJ5M4|jϠs paobߙĂ=OyJLhJ3Χdjo}籘p%b^al{'=c!Fqbʅׇx .DrǢy8 Jikӡa p[E^(GEai&PAk6+jk$cnXMT:E=$]0z7,CkUVL.`ڷC3 /zHnjKp(]/Bo#8/Ŕ:Gs7qg1Щ2Dth`5mylf?JcgL*+`uϲ [D`Ʒ3t<|P5oPzܞ/X^̦wgx6+A/tI7xnFSс<~km0!i(]{ _4JØAC9 R9MOP(*LF$y?ص^%6A >LU⯷ ,Ʋ^_V`hjfZ״wΏފM) vg89x$zyތikm*=ݨ(=kKCD+ǰe #J) p(t"Cv:}.VkC{p _Fh7~2y/nf`fHǦ\?Jpn6X DI idq.ػ2 4ez%4MEEdRo(Lgf>a&4+{ 7?eNοP"J$ LM}l ST~PZ=@6#˒ҜR#7jIʜcؾwWT3 ½6v @( OIB:01t> A*:c.]Qh l#ڊrڎCGhŦmc-- `YI"E$_:ls}A  G]6@gL^ب˖O މdIT /J#& IDATD$*Ī YLQ P89ZVjIϟD9w`d<1kiXL0Gkjo[15_>0m:"/ő .۬!0%T _@=Aa[,N|ɄXU_cHf$Ec+Xӂc2-zbrޟy$PYqk:`2\y.܋7O(gC{ZYI]Pz^ς ̢ 0kƈ?33V:h‰0 0&64f(x;5@X ƙ6nT đ#VQ.Q^؇\`lxOM1$Sp$ؠ Iq}FpM& i_$L.&QV^]RD ,1W9'l3x?G81 `X=]M/1 F03.wcKS1X-v .U+^bBGo涟b.?(uN`oS_H+#E4ZPNϰ'(l670XyÚe |: ϭFH$m(Ng1§]8/jJ/4@VƶƾH mh:(s(+Ōwcj6so/!kuMQbl}N=FGoz$5b{ʟ|?BgO63oA:a,oaav[2V9p$)"8F% 陏SJ[*e8D*aagEl\݃OYr0r#(֨+!D}P7Y@T){r/:@ Zu5f:]Xެ~)9 =Ռ#X5:".GuI?.oL:0:cskrσ$_XSU+~7*Eexz.b`h*)f1i<^Ìw#@kP\WO0#qHSJ0<O& ~AM-Xf"opA¤F-HtN\~[r3J'+G?IL͏3cnڇ\xfa6o&ʹ!hE<цy B+:D:F75oE_w?-߭a9![ fH"dk ᵕG-:+18Q{qK) 1hu*! H"% `"F1*r@T R\3<]jo{!)dyĐ"5܄\H700,yc6|!Zpz浒)uRTeJ܈~l{9\RMu$1<'.ĺ"iל-jl@`h?>W$1 Qslͯ eA>¶uD;]񙍘\9Ty[}Q;?Z|5D8Y[`Q>Rܘ8E,U n1e6g9 (;lQ;7ѣNsF m0(y,FY5^/*-yLͬcͯc{h 9A!8tF.6LuCQeΦJ"TKt:^4՝F=oV_&hnއk/"v3227o2f6?sIcӚ@sX@8ƒgAFK غnٛ9GlHŗ n;F)S3qJ"j ÃxWI/-sdb=\ݑ"ʟs/A%<.¦78Mc#"llM3[+ގU]bS.xDF=6uX &zpbdF7!CӤ*2Lqԯ5߆P @0/xտ@"]ay譟wBC!+X7FGbǰqͷ!c (*=_t ٪hD)"1[8XHӐHic/ۃ:qIdd]$/KUau*33+c.v4yPرx;5߄iK!$BI6C<10 cSk#Uj{tMLs(ҵݏW^vID -[{1fHt Yt co+ŝ=UM~DT̠~lY@ENm_{>!u;p:~ћzZ}` nRq$xB>yu|H:bZ6o2ʜdڈ`r r1o@.4{5O3ђfQ e]JuCǙ8:_&GLaY+i>}`pzN_ $܉I,bpn oޏutɡj:[ S T#N9ޟcʻPwTw`f:7Fl\lC1QKPBu(329\Rsq`/@/ҁ$/ķP6:50447"}\%]ȟ`~HL9ɒEe]uL^M5]Z+T0) V=ɹ> OnR1k|NR$ƫGߍWᲵm!JvG")hGK>X/\鵈Dτ:G?k/gc1k*C(Ix- c6?Ѡ"#X{y^~ӴL`a qcj&L%P-tD4( 㽧S U\ x^L#]Ihk\+j46Ev7X'd4w2Μ8nHC|n"eObJ c*UȺ 6Z#cb=x'yl] B{'1lzCcِ WG/ű밾`EB|Aӥc09AHXn4E`Rwͤn{J(Kb"TZN#I+k}hPM֐89"ObLg`0% HC|!w6`f`dhp=umάZVbĹqnt;6|;oIE$0Hpw!jĉ00 3HC?^DBn_=<AEⵣjD*Nlƣ3+xAL\g]Mt[Wރs[qvrLm@"@5_gnŦSD=74ii%boc!|6X8_3sM0ӂV2$O1`qܩ>Y#NX_K=&On,Ȍ2#(8|"5$SV#42r&RƛMH<È쑒/~M@R5Rgގuظa,kr.+x-êgu/87\)9 gS5rM-bSƒ %RqO bS$Z-𛏙tMV, n( 1q Z&R}=J̤6D#E4>$@SМ$XYѦR %X9|<^5BYo\PXC"Sm m۴_͓ 3S!ҡj_Oxd y?s8"6xu ~vI4֝EcY}#k10z &b&Wb6txۥIAzgm_Ǔ,.` W-Wۓ)RH=540^ !>̪$"-č(eaŨ=Р*"9]\ :ZPHLHP&q<^1 ;@ټ|jܙ'.m #(UٕKS}"|8=#밮1c5, 2ulI3pj*MC" ͐jv]hՏ!Rz@jKYW X+?; }UxQoѸy$h(<2xS $i$Z=uE/]Zf|PQNPcFB";E*rGtuRRZ *@&2t.hݖŎセ~m Ldy7Ʒ`{tte* OT}Q,o{}/arn'6NOct$[ټj"xd 7$+]]zZuIuC>Q l?Q= R ӪEn # nx>[kT" A!h i Xx(d&ޞuبuV#>,SYʫfg&-6ɒS%քWK0 #jy?Hm⋊I4Oaݲ1Ɖk08~1s=PUflR {裸/^J@+1VZ9_ێxxt-L02}< y j<)5y~\֥; 鋒' HLQz3WXBH"_%4;@΂7&KdY_6+GkT{tja4@4RA/٘lKIJ TU‘3btr56+^$k fA`4Ny)DJc[L۰u)X]oK(мU'dX6HŖ[)(L\Whj8AJ3@ωi?g v/40h$A|JgHNÕR#%,aZ:n~hb@xX}3|\HDr5Q.g!SƆp] fXZu Q%sDQ 0D4=4O77hv׆`Yy4Ka0y g0:8RPܦ:O"z,? :`NJ7I>qX;",؃D:bh|-ew3IsNOP(BP%E_X&MJ6/JGD;N;EV'Jc qS FSgp*ĔIԄB' !>tW`Y`= FoŻy Iz^R XN}waHZgg IDAT:FH@]E@3JM(re>S:El@Ė| ΞubАI@T %*5jr[|r^ebŏG1@BM vN`|@{hc}d#.oډFOK$O&U)*3}/OiL)ҎY 'pdB%t%k;Vh 2УTnDi}XKL"@c"!10WEšq4x(12fe'Tۂ*V45(Y ucdr!W Sɛ2Fɴ9%䤌X IEja,2NO\ͯ0iLELƑwANa"u uda:Ys89 >4z\t+b^_m^ [Zx bfr@oA,E 0hMڐ,mn-JV*jZJ=-Xx˨5P@dnz}o7&w\l+-&Nw%L((#⒦qM A(0<={IĔ+ M*86 pmuW8<ړ6t':C2'x 1"0^ā.<5}ĕ*09 8JLTQfiN@>PwX K*)aQ'A`H'e̔!-XTɗdv0ǣ郘QHSO>\ּ7ނ֗8xl' jєoOސ~?>y;5H˝kgS>?hNM+8Mޡ(^{H7+øu]!:j):!Oqp$EJL,8?'GCb6=QR0&oqA%n 6#(j[MjefnZa)_@ҀQ>,xMf++.oRz2ɀ Eas\et1,Y0 m{/Z?DE”R74SkDЯA89_=gR1M8c?@RsI5SƱF_p#Ԅ&OEOn(d*cnNQ9ϚvW Cz֋lkz6=3 1 7 QxM;2$VoۅéI[߁Zo&CCb"5V!+gq/0Y!#h/VO&|{_3񄊅R`93Hon^+\ 17#s84&[/n?0ýԙEk}L'q|peI h:{ ҬJD˕LN+r5Jrw fQ ͢MH`PfQΊ'$2}j_`К_H6 ξVI:qש7oL'xlaԂE{?2߹U2rOE} 968hJÿ=?~X:.{0Ma d-_ޕnY7`Ss_ P* Ni JCzf(5 VNX-J]pQ*܇T 1b9[JñEΟ3 ~Z[ }~| 7|ᡡo.4jiم5M 4RJ,:NT VYpZQ'K[WoGsG/f `c6&D&zf75bǩ-5 y5/`J/ 9_7o4%;d !)N4b) vW|+k ?TgݡuX״3o$bLVJaR~Q|**eApC^dg̨v2 (V] d&ɦ1ܣf 4H@Ϟ>͡VMpL>+XH=@<'VR9N)lf+A -ԩ s^v LDzT.y MW#iT6q(Kd9˝Ϲ({.ey~"p6U닔Lbo4FBw /b8{&i3xg2'Rtk*S'x Ž5<'Vc,`h$WW'Āƕ]3^;h{&1+3=Ƙ XʬLiBc&1^\Č=y+N@:"QlDEó8>?Ԕ<`o.#owA/ zH'Z9_p>W͗+@\:w'J"71s ,xC/2*jUO8*ɷoc.=<AO^2T˧rڤ[G ˅c$yX^EBA,aJ=a?fXv> H(%\]@E"v0\ЌN'Cai~M)~?y*$Iu)é8xM9G]t@N2Bre?*[+$a9?1_,- %k:ӵl䱌HO 3_3ĸ&ddx+{C5i'ZH*sxua<>J o}lmy;}]83ÚcƎ!@͙}tBAw$`qx:CkrA$Rx7qdfO0q7.Ắ\`i0T{?\Vr@ȖXmz/Ü救Kpuׇ!@4XdL>.%)WyHdeE5]Y>ёG:2ìUMqLex_ 갣4{.yH;;;"!Y Nܾ`PgG5mÔ<l- ڂ1Oº`kXDBvdۚ]k>ΕvYK)F=M W1; ' >- {q/-%RFĠ JXLD !՜o ~ ơRNbyLSy$Չ4 R7ŊUOX|Eg=@⮨ {ZŲ-Ż`#&4l:lץߍ`Y|pnY2|;8ĸTt jEh#:On#,ocdr\vR͸M(oO[,ºy'2$9],rkJm!867SGE {3BԄ;V~AKzn_yFk{$ݫ[&Ȯ:\Ge9r /! >e7+AݣAJ9CƠ[tɋT_|thRRG`$Ff_/~}_b}5nG.u>kafX2ikďM[B>(t~|cc8-N98Q>B fvE . a-Qhr6\z1>0 MV5\1&_z6gǛskxO294>L.pîODNq 7ލeWST/đ8w! f}9RHox\=r,$"|1~Zom^p;Y~1j Pk;\c扒_VCI&f늌1 7FbPYɓي m ĔIcB mB{`I&8m*r6%f48klYkžxŠ[6$B𾤮z{asH,|bH%{)79^Ck&ؗ/:O2XHwëzoA2%2"f 5"SV#UȖX˙oxڀ3>r 3({Kd1N &XkfsZ[r/ރk;?hxB֒ع_&JH1} .nK/n싘Ѕ~ɭ˙^E^5ZU l|YIU4+i</휆Dr>Z[zk`X9Wiˈ -0I:B2"!M2=owYic&mTV)z( IDATpc鳃йa;,v%LqWjmS >N 0 YK+\|F@\Mޢxȇ-MoCoh>u0,jRN3A^wMqhVi~3~%(ex^#u*xzz^|t+n]xJWͲJG5HE|-/_k\L6_3N%+h ob=k<͘M:G.i5DHɈG֐Gem碽챓FĘk57Gk|o=m!00jS=_cYpYErиF_XWXO ߅MLӐ8^'~ Ziu"*֠1A$=9T8z7bP&d3 ͯV@"+p{_`e`ޡ ZVAM(@H"H&nj照 /I0bԸe.5@ P&P2fxU{T|c<k峛񻃧ڬONd\m 8'sڣ)XeHouFaSq(AW{=p6v`A!! A1:2_ 'Ġ0G9G]ɘHD̂o e3;Tdgů/"h{?*E1(qJ\eN&(#EPc`ZԨeLV064\~]urb!]2: 5,wHr)#BC4 Yh| AiTg}4(Ddw6JĐ@6 DmIwiFҥ n't@\~>#O6t"V/Ǟ?\4vzD Qf0x 7ߎoމx}%YR/:r%Vm5_Ue0.!̗x f^;܍s#L}gdKS!k듸MqhWI L-5*~1Fo6ߊuW׍Ԙ}W{bdR ai0yFNW.Zip>R l.ʾ{4z0:HtBe=f)wNȯ{<-`URC8ݍ)ٍiypAEhaud':k*΢,NX{P( "wW(W2%֨kx 7\]\`?XmMᡁ]@ǂteӄ:1LX'pupߙ]xV)THE' =MP2P0N?iy1e e 5 YK@eihr$B"/?:l x80kWDyk;hf$j]moɽj kN%s\L72KǞqs Fz^|ȟ])@/ݙ1rDyI|eQɺQ,n&uN|m%e72`C)XJ(N#~-Μ1ĵ=;<&j_AeI`HjV~9o  \N>yYظf;(6֞?CӶc\]#=S!t 7 /u>zR9qB{m3-dWrd ˆa勁pED%,u; V<{9-) ke3{&HN Rq})g { 1-ƽ'h$+ڛƦ5׵$$@P ;Zދֵ@Q##I,؆nf܉/ێu}"yN#d.ռ Ҙ/ŗSð׵'deDH/N³I7(]*-U)/v'<'cK9V͋sАTϓfg|5n6~Kp,j* _y@8yM覹֜0JমOwc)P\[z> /z_7B&d%۠vW_溵v6 ][Sv)V\ ݟd2A؛oj TmNf3}Xq Ab l@2I ~?Gh1pN0n;i,/5b&0NcY6n}Gx~K{.Z0ص\| !:sB$$C?2F M(8a(mO< G(=`k3"A@ 5`-4Ck.Og}pGߢo1cp!ٴ,BC0„| CR#޿+pz&G^âcm i1[Y$(pcO:EشOMyY`NAM ^ΒTr̭FFnXHWSq{w3ڵ v™FJӎ/2F>@'Zu7,(+ua+h~0Sm[m,% Y˺dL&6gqgv#nB0l`5%[ϠݢY\ Z1SWud: f41vSP, K AUB֪ӂ,(7~B&&9,cշ:vjw? ؇gn?0%-HlĀ: Olk]hbnc3TeYM~pؐQ.1.0I2*hml36d0MױBmi[?dړa̲+RАʵls:MS2!7b| Lϝ{۫v~&doo,n1: Wm?S 3>Ʈ a3i65z_m=Tu냏:dvfcL|z ˅˯GSZFޗ UC%16}0uUyX<1ؚlZRlsWLSfB!^`0-U/ Ldi,sf07ÍؘDX[[?Ը@#q]'rX8ȘFpyo2c\]='pcǧ_CG`M /s!L'^@B:Ʉjd15놑uN,O'.ƠyƧ܌`EwgCA|zo^#z3-F<0Efڏa\X.ϔfY5͆*dL&|R9T?NЂKU1,|i;7ˬe'1(.\Y<U&mMc˓b8yIo"llx+m-y.j.d?{B5o`.ko,t>awpd[@\bSϨ`rS|Ur 3 k~=[W xueNJ VpJSA6GXhh3Vfc/<{8)l;Dv4#s!6ra7%npsg8} Ϗ)SPYzޭIBԂfl0BPȻ jE,HmۥHQ>*+1? =s] DӣL+SM# %Dž.no_iLߦ">!Ca :s;A*%e6.W 0%fڮۏ%7o%̜@* J@ys>"_1efE.)sd%ǶciVr[PXE`N@ zGsNaT(ONǢrǹq(5ʱP2 9^{:c DU r.-jy!Kx Y[ ܰ+&ߝp=Z,Wƌjü3PZK27v۾ŽP69܆ ]>ROAҌI+U<ӭH|!H4*x%+3}ZՑߵOW? V@)q^8Q5O JɑOws%ѭ26˝ ʑž{#s( Q.*u=_t!\{,O4ءoS#оSD3 ?[69K&+qTA5A!ܘq w7t0r[lwl?/ u-p}z}Ǹ0$} !?P{}V^i|R=gfV"f#WycDxZB ʛ"ү2$!!L=i2k5, ,x #X&d%p7+Ѵ*gW^ oRs l 4SӀ5p/,S>NUΉU!M /N.7嗨pj}.,K %nvd"w]GCg{lp>B%+C[as[ghgcM'Jkc  _ʆ #chvowZu (vYT.Cc]qy=WyЌX&{0u|dcLsH ٨tkׂĮuE@' {J{v>HF+oT< N NF2!uxz,w7>JdyXWՙGPš+*SrEio{&Nk݄ _tv[y X*6 oy^śP!X]~^.'MP֣"KV֧eR'R3 rxRrl~E5#iwOVkaNiGTƣD1.5 ^yw&;'4s65յHQC8h7IXdEc"%E ??ui-!3I:j_1p0Tk#ɛ`@?Vؗǒ<D`WnWHJ"bu~ӁEBS \~oD p}1 B]&, Ƭמ3>L&Sh^?TGew7G:u`[y IDATׁoyGl5~K+eFSEyיU:KFq'y8퓁H"q*A9s} +gwQ9<2ZѧW?U!VGxee_xWHw)W[O=]Uj?^w"sfjM]XM9槮VRVܖX2`*)W Ǝ U[O 46~[ ,uj]^^UoHs:?5b oؙ3Jr\|}kvDD[;ф |{vB. diC+X g o.:D7>84s@Rbo{3>q1| j/>sqx82ܭn`h21{\ѹz`(|(nV53AVvB!˅{%gG}"\Ea)%%{5֏T?*QQҫU)zFSO ^Q1`t /LeOEu&E,{,Էh hLt״F!b|CT8HX|8M&>'.$\ԍRhҚ|nyaJFDC*RRlM+;j4㾬@!ĥk_L#,TЇT*P:gC͕(Q4e$sQjP4zЦ#74`~M /Xg*:Aۉ  /Vt$xl2Š:e]`%,띪FvtE[?G=P\sr^QڠYzZ#Z"Z0JrbY. Z>!ש O2 o3k/(f`g;~,l)arNN5q[u1 kT;uS8d>e-'= U{cb4Nx=!qQl~-җ}[ G5OxGpit{K*P#'Kܵp&n*_OQMʯ!$@%CkY)ȗ9lIEAO2cRkYƍmezKxFOigd!vmm؋<]Qn{ FpLMY5 {T73)ڔ!l\Tfӡ84φ(-P>U? U^4}_\oQ9;Ea M~J,ξ114G\ 11RM,gM#6=8oD*PajJ`֌;,)("fSle] ɨHQ Tܼoy_S!m-~rsj֓p.9\mg]pPra M!%Ų/`aYgza 1v@͂8?6K֦pW g#oKW 'd%Q@z~ >ׯv(ifE7Z׀k<obξb"ɿ?C樊=8d)kQC*A$q $+60P?X0ʿbgجiŊTpCy/" {YE7r쑙މE7muj|`|2{9N}|OÍ4(T;d;u0x{r{خ`!}:Ǖeo ,o)#}4'`c/lϺO$q$nɨ~wp Xm/<c{ߟ4}d\|*yv'N>C?ͮ^H}oggoW;ϭF{_/?~* ?^1y5N;N;oAxiv9O;N;vivN;N;iviN;Axivi . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa:Linux:*:*) echo xtensa-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: morla-0.16.1/config.h.in000066400000000000000000000075011156343060400147410ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Do you want a native macosx building? */ #undef ENABLE_MACOSX /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Gettext */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_GRP_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the `rasqal' library (-lrasqal). */ #undef HAVE_LIBRASQAL /* Define to 1 if you have the `rdf' library (-lrdf). */ #undef HAVE_LIBRDF /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_PWD_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_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define the location where the catalogs will be installed */ #undef LOCALEDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if we can use libgconf */ #undef USE_GCONF /* Define to 1 if we can use gtkhtml */ #undef USE_GTKHTML /* Define to 1 if we can use a javascript engine */ #undef USE_JS /* Define to 1 if we can use mozillajs */ #undef USE_MOZILLA_JS /* Define to 1 if we can use libjs */ #undef USE_NGS_JS /* Define to 1 if we can use old rasqal releases */ #undef USE_RASQAL_OLD /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* 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 morla-0.16.1/config.sub000077500000000000000000000777241156343060400147170ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-06-28' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; 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 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: morla-0.16.1/configure000077500000000000000000027273101156343060400146360ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 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= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS ige_mac_integration_LIBS ige_mac_integration_CFLAGS dot xulrunner_js_LIBS xulrunner_js_CFLAGS firefox_js_LIBS firefox_js_CFLAGS redland_LIBS redland_CFLAGS rasqal_LIBS rasqal_CFLAGS gtk_LIBS gtk_CFLAGS gtkhtml_LIBS gtkhtml_CFLAGS gconf_LIBS gconf_CFLAGS PKG_CONFIG MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS GETTEXT_PACKAGE LIBTOOL ac_ct_F77 FFLAGS F77 CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP NMEDIT DSYMUTIL RANLIB AR ECHO EGREP GREP SED LN_S am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot AWK mkdir_p INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM SET_MAKE target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_shared enable_static enable_fast_install with_gnu_ld enable_libtool_lock with_pic with_tags with_gconf with_gtkhtml with_javascript ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS PKG_CONFIG gconf_CFLAGS gconf_LIBS gtkhtml_CFLAGS gtkhtml_LIBS gtk_CFLAGS gtk_LIBS rasqal_CFLAGS rasqal_LIBS redland_CFLAGS redland_LIBS firefox_js_CFLAGS firefox_js_LIBS xulrunner_js_CFLAGS xulrunner_js_LIBS ige_mac_integration_CFLAGS ige_mac_integration_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --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 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-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-gconf=none|auto (default=auto) do you want gconf? --with-gtkhtml=none|auto (default=auto) do you want gtkhtml? --with-javascript=none|ngs|mozilla|firefox|xulrunner|auto (default=auto) set a javascript engine Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility gconf_CFLAGS C compiler flags for gconf, overriding pkg-config gconf_LIBS linker flags for gconf, overriding pkg-config gtkhtml_CFLAGS C compiler flags for gtkhtml, overriding pkg-config gtkhtml_LIBS linker flags for gtkhtml, overriding pkg-config gtk_CFLAGS C compiler flags for gtk, overriding pkg-config gtk_LIBS linker flags for gtk, overriding pkg-config rasqal_CFLAGS C compiler flags for rasqal, overriding pkg-config rasqal_LIBS linker flags for rasqal, overriding pkg-config redland_CFLAGS C compiler flags for redland, overriding pkg-config redland_LIBS linker flags for redland, overriding pkg-config firefox_js_CFLAGS C compiler flags for firefox_js, overriding pkg-config firefox_js_LIBS linker flags for firefox_js, overriding pkg-config xulrunner_js_CFLAGS C compiler flags for xulrunner_js, overriding pkg-config xulrunner_js_LIBS linker flags for xulrunner_js, overriding pkg-config ige_mac_integration_CFLAGS C compiler flags for ige_mac_integration, overriding pkg-config ige_mac_integration_LIBS linker flags for ige_mac_integration, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_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 "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_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;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_f77_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_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_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_f77_try_compile # ac_fn_f77_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_f77_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_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_f77_try_link 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 $as_me, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if test "${ac_cv_target+set}" = set; 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_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 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` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $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 mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi 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 test "${ac_cv_prog_AWK+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $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 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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 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=morla VERSION=0.16.1 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { $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=no 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 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $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 # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { $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='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi 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 test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $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 whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; 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_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then : break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${lt_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 $as_echo "$SED" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5 $as_echo_n "checking for BSD-compatible nm... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | 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=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4925 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 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 test "${am_cv_CXX_dependencies_compiler_type+set}" = set; 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'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" $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 F77=$ac_cv_prog_F77 if test -n "$F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 $as_echo "$F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" $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_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 $as_echo "$ac_ct_F77" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { $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 F77=$ac_ct_F77 fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 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 rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 $as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat > conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF if ac_fn_f77_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_f77_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 $as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 $as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then : $as_echo_n "(cached) " >&6 else FFLAGS=-g cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_compile "$LINENO"; then : ac_cv_prog_f77_g=yes else ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 $as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi if test $ac_compiler_gnu = yes; then G77=yes else G77= 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $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 # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? $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 < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $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 case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7324: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7328: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7614: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7618: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7718: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7722: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_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= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd* | 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 ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { $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 if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { { eval echo "\"\$as_me\":${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 # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5 $as_echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=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" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then : withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) as_fn_error $? "invalid tag name: $tagname" "$LINENO" 5 ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then as_fn_error $? "tag name \"$tagname\" already exists" "$LINENO" 5 fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&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 # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext 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 # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | 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' ;; *) 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) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12197: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12201: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12301: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12305: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=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 LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 $as_echo "$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13899: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13903: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14003: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14007: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_F77" >&5 $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_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= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="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_F77="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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5 $as_echo "$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 $as_echo "$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $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_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5 $as_echo "$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=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" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16177: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16181: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_GCJ" >&5 $as_echo "$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16467: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16471: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16571: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16575: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 $as_echo "$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_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= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="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_GCJ="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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_GCJ" >&5 $as_echo "$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_GCJ" >&5 $as_echo "$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { $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_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_GCJ" >&5 $as_echo "$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=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" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=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" ;; *) as_fn_error $? "Unsupported tag name: $tagname" "$LINENO" 5 ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" as_fn_error $? "unable to update list of available tagged configurations." "$LINENO" 5 fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 test "${am_cv_CC_dependencies_compiler_type+set}" = set; 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'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $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 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if test "${ac_cv_c_inline+set}" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval "test \"\${$as_ac_Header+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi for ac_header in stdio.h sys/stat.h sys/types.h unistd.h fcntl.h string.h dirent.h malloc.h pwd.h grp.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 for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = x""yes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done GETTEXT_PACKAGE=morla cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="it" for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = x""yes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $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 bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=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_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $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 ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=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_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $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 dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=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_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $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 ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=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_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $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 dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=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_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $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; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" cat >>confdefs.h <<_ACEOF #define LOCALEDIR "$localedir" _ACEOF # Check whether --with-gconf was given. if test "${with_gconf+set}" = set; then : withval=$with_gconf; GCONF=$withval else GCONF=auto fi 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 test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 gconf" >&5 $as_echo_n "checking for gconf... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$gconf_CFLAGS"; then pkg_cv_gconf_CFLAGS="$gconf_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.10.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gconf-2.0 >= 2.10.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gconf_CFLAGS=`$PKG_CONFIG --cflags " gconf-2.0 >= 2.10.0 " 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$gconf_LIBS"; then pkg_cv_gconf_LIBS="$gconf_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" gconf-2.0 >= 2.10.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " gconf-2.0 >= 2.10.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gconf_LIBS=`$PKG_CONFIG --libs " gconf-2.0 >= 2.10.0 " 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 gconf_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " gconf-2.0 >= 2.10.0 "` else gconf_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " gconf-2.0 >= 2.10.0 "` fi # Put the nasty error message in config.log where it belongs echo "$gconf_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } gconf="" elif test $pkg_failed = untried; then gconf="" else gconf_CFLAGS=$pkg_cv_gconf_CFLAGS gconf_LIBS=$pkg_cv_gconf_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } gconf="gconf-2.0 >= 2.10.0" fi if test "$GCONF" = none; then gconf="" fi # Check whether --with-gtkhtml was given. if test "${with_gtkhtml+set}" = set; then : withval=$with_gtkhtml; GTKHTML=$withval else GTKHTML=auto fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtkhtml" >&5 $as_echo_n "checking for gtkhtml... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$gtkhtml_CFLAGS"; then pkg_cv_gtkhtml_CFLAGS="$gtkhtml_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libgtkhtml-2.0 >= 2.0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " libgtkhtml-2.0 >= 2.0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtkhtml_CFLAGS=`$PKG_CONFIG --cflags " libgtkhtml-2.0 >= 2.0.0 " 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$gtkhtml_LIBS"; then pkg_cv_gtkhtml_LIBS="$gtkhtml_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libgtkhtml-2.0 >= 2.0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " libgtkhtml-2.0 >= 2.0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtkhtml_LIBS=`$PKG_CONFIG --libs " libgtkhtml-2.0 >= 2.0.0 " 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 gtkhtml_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " libgtkhtml-2.0 >= 2.0.0 "` else gtkhtml_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " libgtkhtml-2.0 >= 2.0.0 "` fi # Put the nasty error message in config.log where it belongs echo "$gtkhtml_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } gtkhtml="" elif test $pkg_failed = untried; then gtkhtml="" else gtkhtml_CFLAGS=$pkg_cv_gtkhtml_CFLAGS gtkhtml_LIBS=$pkg_cv_gtkhtml_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } gtkhtml="libgtkhtml-2.0 >= 2.0.0" fi if test "$GTKHTML" = none; then gtkhtml="" fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk" >&5 $as_echo_n "checking for gtk... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$gtk_CFLAGS"; then pkg_cv_gtk_CFLAGS="$gtk_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 \$gconf \$gtkhtml \""; } >&5 ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtk_CFLAGS=`$PKG_CONFIG --cflags " glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml " 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$gtk_LIBS"; then pkg_cv_gtk_LIBS="$gtk_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 \$gconf \$gtkhtml \""; } >&5 ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_gtk_LIBS=`$PKG_CONFIG --libs " glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml " 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 gtk_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml "` else gtk_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml "` fi # Put the nasty error message in config.log where it belongs echo "$gtk_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml ) were not met: $gtk_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables gtk_CFLAGS and gtk_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables gtk_CFLAGS and gtk_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5 ; } else gtk_CFLAGS=$pkg_cv_gtk_CFLAGS gtk_LIBS=$pkg_cv_gtk_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi LDFLAGS="$LDFLAGS $gtk_LIBS" CFLAGS="$CFLAGS $gtk_CFLAGS" if test "$gconf" != ""; then $as_echo "#define USE_GCONF 1" >>confdefs.h fi if test "$gtkhtml" != ""; then $as_echo "#define USE_GTKHTML 1" >>confdefs.h fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rasqal" >&5 $as_echo_n "checking for rasqal... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$rasqal_CFLAGS"; then pkg_cv_rasqal_CFLAGS="$rasqal_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rasqal\""; } >&5 ($PKG_CONFIG --exists --print-errors "rasqal") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_rasqal_CFLAGS=`$PKG_CONFIG --cflags "rasqal" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$rasqal_LIBS"; then pkg_cv_rasqal_LIBS="$rasqal_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rasqal\""; } >&5 ($PKG_CONFIG --exists --print-errors "rasqal") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_rasqal_LIBS=`$PKG_CONFIG --libs "rasqal" 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 rasqal_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "rasqal"` else rasqal_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "rasqal"` fi # Put the nasty error message in config.log where it belongs echo "$rasqal_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_RASQAL=no elif test $pkg_failed = untried; then HAVE_RASQAL=no else rasqal_CFLAGS=$pkg_cv_rasqal_CFLAGS rasqal_LIBS=$pkg_cv_rasqal_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_RASQAL=yes fi if test "$HAVE_RASQAL" != yes; then ac_fn_c_check_header_mongrel "$LINENO" "rasqal.h" "ac_cv_header_rasqal_h" "$ac_includes_default" if test "x$ac_cv_header_rasqal_h" = x""yes; then : else as_fn_error $? "librasqal is required to compile morla" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rasqal_new_query in -lrasqal" >&5 $as_echo_n "checking for rasqal_new_query in -lrasqal... " >&6; } if test "${ac_cv_lib_rasqal_rasqal_new_query+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrasqal $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 rasqal_new_query (); int main () { return rasqal_new_query (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rasqal_rasqal_new_query=yes else ac_cv_lib_rasqal_rasqal_new_query=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_rasqal_rasqal_new_query" >&5 $as_echo "$ac_cv_lib_rasqal_rasqal_new_query" >&6; } if test "x$ac_cv_lib_rasqal_rasqal_new_query" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRASQAL 1 _ACEOF LIBS="-lrasqal $LIBS" else as_fn_error $? "librasqal is required to compile morla" "$LINENO" 5 fi else LDFLAGS="$LDFLAGS $rasqal_LIBS" CFLAGS="$CFLAGS $rasqal_CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rasqal_new_world in -lrasqal" >&5 $as_echo_n "checking for rasqal_new_world in -lrasqal... " >&6; } if test "${ac_cv_lib_rasqal_rasqal_new_world+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrasqal $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 rasqal_new_world (); int main () { return rasqal_new_world (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rasqal_rasqal_new_world=yes else ac_cv_lib_rasqal_rasqal_new_world=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_rasqal_rasqal_new_world" >&5 $as_echo "$ac_cv_lib_rasqal_rasqal_new_world" >&6; } if test "x$ac_cv_lib_rasqal_rasqal_new_world" = x""yes; then : RASQAL_OLD=no else RASQAL_OLD=yes fi if test "$RASQAL_OLD" = yes; then $as_echo "#define USE_RASQAL_OLD 1" >>confdefs.h fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for redland" >&5 $as_echo_n "checking for redland... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$redland_CFLAGS"; then pkg_cv_redland_CFLAGS="$redland_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"redland\""; } >&5 ($PKG_CONFIG --exists --print-errors "redland") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_redland_CFLAGS=`$PKG_CONFIG --cflags "redland" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$redland_LIBS"; then pkg_cv_redland_LIBS="$redland_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"redland\""; } >&5 ($PKG_CONFIG --exists --print-errors "redland") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_redland_LIBS=`$PKG_CONFIG --libs "redland" 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 redland_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "redland"` else redland_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "redland"` fi # Put the nasty error message in config.log where it belongs echo "$redland_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_RDF=no elif test $pkg_failed = untried; then HAVE_RDF=no else redland_CFLAGS=$pkg_cv_redland_CFLAGS redland_LIBS=$pkg_cv_redland_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_RDF=yes fi if test "$HAVE_RDF" != yes; then ac_fn_c_check_header_mongrel "$LINENO" "redland.h" "ac_cv_header_redland_h" "$ac_includes_default" if test "x$ac_cv_header_redland_h" = x""yes; then : else as_fn_error $? "librdf is required to compile morla" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for librdf_node_get_type in -lrdf" >&5 $as_echo_n "checking for librdf_node_get_type in -lrdf... " >&6; } if test "${ac_cv_lib_rdf_librdf_node_get_type+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrdf $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 librdf_node_get_type (); int main () { return librdf_node_get_type (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rdf_librdf_node_get_type=yes else ac_cv_lib_rdf_librdf_node_get_type=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_rdf_librdf_node_get_type" >&5 $as_echo "$ac_cv_lib_rdf_librdf_node_get_type" >&6; } if test "x$ac_cv_lib_rdf_librdf_node_get_type" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRDF 1 _ACEOF LIBS="-lrdf $LIBS" else as_fn_error $? "librdf is required to compile morla" "$LINENO" 5 fi else LDFLAGS="$LDFLAGS $redland_LIBS" CFLAGS="$CFLAGS $redland_CFLAGS" fi # JAVASCRIPT CHECK: # Check whether --with-javascript was given. if test "${with_javascript+set}" = set; then : withval=$with_javascript; JAVASCRIPT=$withval if ! test "$JAVASCRIPT" = none && ! test "$JAVASCRIPT" = ngs && ! test "$JAVASCRIPT" = mozilla && ! test "$JAVASCRIPT" = firefox && ! test "$JAVASCRIPT" = xulrunner && ! test "$JAVASCRIPT" = auto; then JAVASCRIPT=auto elif test "$JAVASCRIPT" = firefox || test "$JAVASCRIPT" = xulrunner; then JAVASCRIPT=mozilla fi else JAVASCRIPT=auto fi if ! test "$JAVASCRIPT" = none; then if test "$JAVASCRIPT" = ngs || test "$JAVASCRIPT" = auto; then ac_fn_c_check_header_mongrel "$LINENO" "js.h" "ac_cv_header_js_h" "$ac_includes_default" if test "x$ac_cv_header_js_h" = x""yes; then : HAVE_JS=yes else HAVE_JS=no fi if test "$HAVE_JS" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for js_create_interp in -ljs" >&5 $as_echo_n "checking for js_create_interp in -ljs... " >&6; } if test "${ac_cv_lib_js_js_create_interp+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljs $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 js_create_interp (); int main () { return js_create_interp (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_js_js_create_interp=yes else ac_cv_lib_js_js_create_interp=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_js_js_create_interp" >&5 $as_echo "$ac_cv_lib_js_js_create_interp" >&6; } if test "x$ac_cv_lib_js_js_create_interp" = x""yes; then : HAVE_JS=yes else HAVE_YES=no fi if test "$HAVE_JS" = yes; then $as_echo "#define USE_JS 1" >>confdefs.h $as_echo "#define USE_NGS_JS 1" >>confdefs.h JAVASCRIPT=ngs LDFLAGS="$LDFLAGS -ljs" fi fi fi if test "$JAVASCRIPT" = mozilla || test "$JAVASCRIPT" = auto; then if ! test "$HAVE_JS" = yes; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for firefox_js" >&5 $as_echo_n "checking for firefox_js... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$firefox_js_CFLAGS"; then pkg_cv_firefox_js_CFLAGS="$firefox_js_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"firefox-js\""; } >&5 ($PKG_CONFIG --exists --print-errors "firefox-js") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_firefox_js_CFLAGS=`$PKG_CONFIG --cflags "firefox-js" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$firefox_js_LIBS"; then pkg_cv_firefox_js_LIBS="$firefox_js_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"firefox-js\""; } >&5 ($PKG_CONFIG --exists --print-errors "firefox-js") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_firefox_js_LIBS=`$PKG_CONFIG --libs "firefox-js" 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 firefox_js_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "firefox-js"` else firefox_js_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "firefox-js"` fi # Put the nasty error message in config.log where it belongs echo "$firefox_js_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_JS=no elif test $pkg_failed = untried; then HAVE_JS=no else firefox_js_CFLAGS=$pkg_cv_firefox_js_CFLAGS firefox_js_LIBS=$pkg_cv_firefox_js_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_JS=yes fi; if test "$HAVE_JS" = yes; then LDFLAGS="$LDFLAGS $firefox_js_LIBS" CFLAGS="$CFLAGS $firefox_js_CFLAGS" $as_echo "#define USE_JS 1" >>confdefs.h $as_echo "#define USE_MOZILLA_JS 1" >>confdefs.h JAVASCRIPT=firefox fi fi if ! test "$HAVE_JS" = yes; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xulrunner_js" >&5 $as_echo_n "checking for xulrunner_js... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$xulrunner_js_CFLAGS"; then pkg_cv_xulrunner_js_CFLAGS="$xulrunner_js_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xulrunner-js\""; } >&5 ($PKG_CONFIG --exists --print-errors "xulrunner-js") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_xulrunner_js_CFLAGS=`$PKG_CONFIG --cflags "xulrunner-js" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$xulrunner_js_LIBS"; then pkg_cv_xulrunner_js_LIBS="$xulrunner_js_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xulrunner-js\""; } >&5 ($PKG_CONFIG --exists --print-errors "xulrunner-js") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_xulrunner_js_LIBS=`$PKG_CONFIG --libs "xulrunner-js" 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 xulrunner_js_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xulrunner-js"` else xulrunner_js_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xulrunner-js"` fi # Put the nasty error message in config.log where it belongs echo "$xulrunner_js_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_JS=no elif test $pkg_failed = untried; then HAVE_JS=no else xulrunner_js_CFLAGS=$pkg_cv_xulrunner_js_CFLAGS xulrunner_js_LIBS=$pkg_cv_xulrunner_js_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_JS=yes fi; if test "$HAVE_JS" = yes; then LDFLAGS="$LDFLAGS $xulrunner_js_LIBS" CFLAGS="$CFLAGS $xulrunner_js_CFLAGS" $as_echo "#define USE_JS 1" >>confdefs.h $as_echo "#define USE_MOZILLA_JS 1" >>confdefs.h JAVASCRIPT=xulrunner fi fi if ! test "$HAVE_JS" = yes; then ac_fn_c_check_header_mongrel "$LINENO" "jsapi.h" "ac_cv_header_jsapi_h" "$ac_includes_default" if test "x$ac_cv_header_jsapi_h" = x""yes; then : HAVE_JS=yes else HAVE_JS=no fi if test "$HAVE_JS" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewContext in -ljs" >&5 $as_echo_n "checking for JS_NewContext in -ljs... " >&6; } if test "${ac_cv_lib_js_JS_NewContext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljs $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 JS_NewContext (); int main () { return JS_NewContext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_js_JS_NewContext=yes else ac_cv_lib_js_JS_NewContext=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_js_JS_NewContext" >&5 $as_echo "$ac_cv_lib_js_JS_NewContext" >&6; } if test "x$ac_cv_lib_js_JS_NewContext" = x""yes; then : HAVE_JS=yes else HAVE_YES=no fi if test "$HAVE_JS" = yes; then $as_echo "#define USE_JS 1" >>confdefs.h $as_echo "#define USE_MOZILLA_JS 1" >>confdefs.h LDFLAGS="$LDFLAGS -ljs" JAVASCRIPT=mozilla fi fi fi fi if test "$JAVASCRIPT" != ngs && test "$JAVASCRIPT" != firefox && test "$JAVASCRIPT" != xulrunner && test "$JAVASCRIPT" != mozilla; then JAVASCRIPT=none fi fi # DOT CHECK: # 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 test "${ac_cv_path_dot+set}" = set; then : $as_echo_n "(cached) " >&6 else case $dot in [\\/]* | ?:[\\/]*) ac_cv_path_dot="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_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 dot=$ac_cv_path_dot if test -n "$dot"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dot" >&5 $as_echo "$dot" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$dot" = ""; then as_fn_error $? "No dot (graphviz) found!" "$LINENO" 5 fi # MACOSX: case "$host_os" in darwin*) DARWIN=yes; ;; esac if test "$DARWIN" = yes; then $as_echo "#define ENABLE_MACOSX 1" >>confdefs.h pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ige_mac_integration" >&5 $as_echo_n "checking for ige_mac_integration... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$ige_mac_integration_CFLAGS"; then pkg_cv_ige_mac_integration_CFLAGS="$ige_mac_integration_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" ige-mac-integration >= 0.6 \""; } >&5 ($PKG_CONFIG --exists --print-errors " ige-mac-integration >= 0.6 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ige_mac_integration_CFLAGS=`$PKG_CONFIG --cflags " ige-mac-integration >= 0.6 " 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$ige_mac_integration_LIBS"; then pkg_cv_ige_mac_integration_LIBS="$ige_mac_integration_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" ige-mac-integration >= 0.6 \""; } >&5 ($PKG_CONFIG --exists --print-errors " ige-mac-integration >= 0.6 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ige_mac_integration_LIBS=`$PKG_CONFIG --libs " ige-mac-integration >= 0.6 " 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 ige_mac_integration_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " ige-mac-integration >= 0.6 "` else ige_mac_integration_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " ige-mac-integration >= 0.6 "` fi # Put the nasty error message in config.log where it belongs echo "$ige_mac_integration_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( ige-mac-integration >= 0.6 ) were not met: $ige_mac_integration_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables ige_mac_integration_CFLAGS and ige_mac_integration_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables ige_mac_integration_CFLAGS and ige_mac_integration_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5 ; } else ige_mac_integration_CFLAGS=$pkg_cv_ige_mac_integration_CFLAGS ige_mac_integration_LIBS=$pkg_cv_ige_mac_integration_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi LDFLAGS="$LDFLAGS $ige_mac_integration_LIBS" CFLAGS="$CFLAGS $ige_mac_integration_CFLAGS" IGE_MAC_INTERATION="ige-mac-integration : yes" fi # Generic stuff: CFLAGS="$CFLAGS -Wall -DDOT_CMD=\\\"$dot\\\"" ac_config_files="$ac_config_files Makefile po/Makefile.in src/Makefile icons/Makefile docs/Makefile modules/Makefile morla.1" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs 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 "${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__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. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' 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" _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" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "icons/Makefile") CONFIG_FILES="$CONFIG_FILES icons/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "modules/Makefile") CONFIG_FILES="$CONFIG_FILES modules/Makefile" ;; "morla.1") CONFIG_FILES="$CONFIG_FILES morla.1" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in "$ac_file" | "$ac_file":* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $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"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Morla build summary: host : $host_os glib : yes gtk+ : yes libxslt : yes nxml : yes libcurl : yes Dot (graphviz) : $dot Javascript engine : $JAVASCRIPT GConf : $gconf GtkHtml : $gtkhtml $IGE_MAC_INTERATION " >&5 $as_echo " Morla build summary: host : $host_os glib : yes gtk+ : yes libxslt : yes nxml : yes libcurl : yes Dot (graphviz) : $dot Javascript engine : $JAVASCRIPT GConf : $gconf GtkHtml : $gtkhtml $IGE_MAC_INTERATION " >&6; } morla-0.16.1/configure.ac000066400000000000000000000142231156343060400152030ustar00rootroot00000000000000AC_PREREQ(2.54) AC_INIT(src/main.c) AC_CANONICAL_HOST AC_CANONICAL_TARGET AC_PROG_MAKE_SET AM_SANITY_CHECK AM_INIT_AUTOMAKE(morla, 0.16.1) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_PROG_CC AC_PROG_LN_S AC_ISC_POSIX AC_PROG_LIBTOOL AC_PROG_INSTALL AM_PROG_CC_STDC AC_C_CONST AC_C_INLINE AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_HEADERS(stdio.h sys/stat.h sys/types.h unistd.h fcntl.h string.h dirent.h malloc.h pwd.h grp.h) AC_FUNC_VPRINTF GETTEXT_PACKAGE=morla AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext]) ALL_LINGUAS="it" AM_GLIB_GNU_GETTEXT AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR) AC_ARG_WITH(gconf, AC_HELP_STRING([--with-gconf=none|auto (default=auto)],[do you want gconf?]), GCONF=$withval, GCONF=auto) PKG_CHECK_MODULES(gconf, [ gconf-2.0 >= 2.10.0 ], gconf="gconf-2.0 >= 2.10.0", gconf="") if test "$GCONF" = none; then gconf="" fi AC_ARG_WITH(gtkhtml, AC_HELP_STRING([--with-gtkhtml=none|auto (default=auto)],[do you want gtkhtml?]), GTKHTML=$withval, GTKHTML=auto) PKG_CHECK_MODULES(gtkhtml, [ libgtkhtml-2.0 >= 2.0.0 ], gtkhtml="libgtkhtml-2.0 >= 2.0.0", gtkhtml="") if test "$GTKHTML" = none; then gtkhtml="" fi PKG_CHECK_MODULES(gtk, [ glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0 gmodule-2.0 >= 2.6.0 gtk+-2.0 >= 2.6.0 libxslt > 1.0.0 nxml >= 0.18.0 libcurl >= 7.15.0 $gconf $gtkhtml ]) LDFLAGS="$LDFLAGS $gtk_LIBS" CFLAGS="$CFLAGS $gtk_CFLAGS" AH_TEMPLATE([USE_GCONF], [Define to 1 if we can use libgconf]) AH_TEMPLATE([USE_GTKHTML], [Define to 1 if we can use gtkhtml]) if test "$gconf" != ""; then AC_DEFINE(USE_GCONF) fi if test "$gtkhtml" != ""; then AC_DEFINE(USE_GTKHTML) fi PKG_CHECK_MODULES(rasqal, [rasqal], HAVE_RASQAL=yes, HAVE_RASQAL=no) if test "$HAVE_RASQAL" != yes; then AC_CHECK_HEADER(rasqal.h,,AC_MSG_ERROR(librasqal is required to compile morla)) AC_CHECK_LIB(rasqal,rasqal_new_query,, AC_MSG_ERROR(librasqal is required to compile morla)) else LDFLAGS="$LDFLAGS $rasqal_LIBS" CFLAGS="$CFLAGS $rasqal_CFLAGS" fi AH_TEMPLATE([USE_RASQAL_OLD], [Define to 1 if we can use old rasqal releases]) AC_CHECK_LIB(rasqal,rasqal_new_world,RASQAL_OLD=no, RASQAL_OLD=yes) if test "$RASQAL_OLD" = yes; then AC_DEFINE(USE_RASQAL_OLD) fi PKG_CHECK_MODULES(redland, [redland], HAVE_RDF=yes, HAVE_RDF=no) if test "$HAVE_RDF" != yes; then AC_CHECK_HEADER(redland.h,,AC_MSG_ERROR(librdf is required to compile morla)) AC_CHECK_LIB(rdf,librdf_node_get_type,, AC_MSG_ERROR(librdf is required to compile morla)) else LDFLAGS="$LDFLAGS $redland_LIBS" CFLAGS="$CFLAGS $redland_CFLAGS" fi # JAVASCRIPT CHECK: AC_ARG_WITH(javascript, AC_HELP_STRING([--with-javascript=none|ngs|mozilla|firefox|xulrunner|auto (default=auto)],[set a javascript engine]), JAVASCRIPT=$withval if ! test "$JAVASCRIPT" = none && ! test "$JAVASCRIPT" = ngs && ! test "$JAVASCRIPT" = mozilla && ! test "$JAVASCRIPT" = firefox && ! test "$JAVASCRIPT" = xulrunner && ! test "$JAVASCRIPT" = auto; then JAVASCRIPT=auto elif test "$JAVASCRIPT" = firefox || test "$JAVASCRIPT" = xulrunner; then JAVASCRIPT=mozilla fi , JAVASCRIPT=auto ) AH_TEMPLATE([USE_JS], [Define to 1 if we can use a javascript engine]) AH_TEMPLATE([USE_NGS_JS], [Define to 1 if we can use libjs]) AH_TEMPLATE([USE_MOZILLA_JS], [Define to 1 if we can use mozillajs]) if ! test "$JAVASCRIPT" = none; then if test "$JAVASCRIPT" = ngs || test "$JAVASCRIPT" = auto; then AC_CHECK_HEADER(js.h,HAVE_JS=yes, HAVE_JS=no) if test "$HAVE_JS" = yes; then AC_CHECK_LIB(js,js_create_interp, HAVE_JS=yes, HAVE_YES=no) if test "$HAVE_JS" = yes; then AC_DEFINE(USE_JS) AC_DEFINE(USE_NGS_JS) JAVASCRIPT=ngs LDFLAGS="$LDFLAGS -ljs" fi fi fi if test "$JAVASCRIPT" = mozilla || test "$JAVASCRIPT" = auto; then if ! test "$HAVE_JS" = yes; then PKG_CHECK_MODULES(firefox_js, [firefox-js], HAVE_JS=yes, HAVE_JS=no); if test "$HAVE_JS" = yes; then LDFLAGS="$LDFLAGS $firefox_js_LIBS" CFLAGS="$CFLAGS $firefox_js_CFLAGS" AC_DEFINE(USE_JS) AC_DEFINE(USE_MOZILLA_JS) JAVASCRIPT=firefox fi fi if ! test "$HAVE_JS" = yes; then PKG_CHECK_MODULES(xulrunner_js, [xulrunner-js], HAVE_JS=yes, HAVE_JS=no); if test "$HAVE_JS" = yes; then LDFLAGS="$LDFLAGS $xulrunner_js_LIBS" CFLAGS="$CFLAGS $xulrunner_js_CFLAGS" AC_DEFINE(USE_JS) AC_DEFINE(USE_MOZILLA_JS) JAVASCRIPT=xulrunner fi fi if ! test "$HAVE_JS" = yes; then AC_CHECK_HEADER(jsapi.h,HAVE_JS=yes, HAVE_JS=no) if test "$HAVE_JS" = yes; then AC_CHECK_LIB(js, JS_NewContext, HAVE_JS=yes, HAVE_YES=no) if test "$HAVE_JS" = yes; then AC_DEFINE(USE_JS) AC_DEFINE(USE_MOZILLA_JS) LDFLAGS="$LDFLAGS -ljs" JAVASCRIPT=mozilla fi fi fi fi if test "$JAVASCRIPT" != ngs && test "$JAVASCRIPT" != firefox && test "$JAVASCRIPT" != xulrunner && test "$JAVASCRIPT" != mozilla; then JAVASCRIPT=none fi fi # DOT CHECK: AC_PATH_PROG(dot, dot) if test "$dot" = ""; then AC_MSG_ERROR(No dot (graphviz) found!) fi # MACOSX: AH_TEMPLATE([ENABLE_MACOSX], [Do you want a native macosx building?]) case "$host_os" in darwin*) DARWIN=yes; ;; esac if test "$DARWIN" = yes; then AC_DEFINE(ENABLE_MACOSX) PKG_CHECK_MODULES(ige_mac_integration, [ ige-mac-integration >= 0.6 ]) LDFLAGS="$LDFLAGS $ige_mac_integration_LIBS" CFLAGS="$CFLAGS $ige_mac_integration_CFLAGS" IGE_MAC_INTERATION="ige-mac-integration : yes" fi # Generic stuff: CFLAGS="$CFLAGS -Wall -DDOT_CMD=\\\"$dot\\\"" AC_OUTPUT([ Makefile po/Makefile.in src/Makefile icons/Makefile docs/Makefile modules/Makefile morla.1 ]) AC_MSG_RESULT([ Morla build summary: host : $host_os glib : yes gtk+ : yes libxslt : yes nxml : yes libcurl : yes Dot (graphviz) : $dot Javascript engine : $JAVASCRIPT GConf : $gconf GtkHtml : $gtkhtml $IGE_MAC_INTERATION ]) morla-0.16.1/depcomp000077500000000000000000000371001156343060400142710ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: morla-0.16.1/doap.rdf000066400000000000000000000044511156343060400143370ustar00rootroot00000000000000 Andrea Marchesini baku a1e4d78463d750cb5d804dcc98d941da389516b3 :pserver:anonymous@ippolita.net:/home/cvs morla morla 2003-11-16 A RDF editor and a RDF navigator C DOAP for morla project Some informations about morla project morla-0.16.1/docs/000077500000000000000000000000001156343060400136435ustar00rootroot00000000000000morla-0.16.1/docs/Makefile.am000066400000000000000000000000321156343060400156720ustar00rootroot00000000000000EXTRA_DIST = *.xml *.xslt morla-0.16.1/docs/Makefile.in000066400000000000000000000232301156343060400157100ustar00rootroot00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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 = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dot = @dot@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ firefox_js_CFLAGS = @firefox_js_CFLAGS@ firefox_js_LIBS = @firefox_js_LIBS@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ gtkhtml_CFLAGS = @gtkhtml_CFLAGS@ gtkhtml_LIBS = @gtkhtml_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ ige_mac_integration_CFLAGS = @ige_mac_integration_CFLAGS@ ige_mac_integration_LIBS = @ige_mac_integration_LIBS@ 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@ rasqal_CFLAGS = @rasqal_CFLAGS@ rasqal_LIBS = @rasqal_LIBS@ redland_CFLAGS = @redland_CFLAGS@ redland_LIBS = @redland_LIBS@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ xulrunner_js_CFLAGS = @xulrunner_js_CFLAGS@ xulrunner_js_LIBS = @xulrunner_js_LIBS@ EXTRA_DIST = *.xml *.xslt 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: morla-0.16.1/docs/about.xml000066400000000000000000000017371156343060400155070ustar00rootroot00000000000000 About Morla... Andrea Marchesini Creative Commons By - Sa 3.0
About Morla...

Morla is a multiplatform editor of RDF documents. It is based on libnxml and librdf libraries. With Morla you can manage more RDF documents simultaneously, visualize graphs and use templates for quick writing.

With Morla you can import RDFS documents and use its content to write new RDF triples. Templates are also RDF documents and they make Morla easily personalizeble and expandable.

You can also use Morla as RDF navigator, wandering among the net knots of the RDF documents present on internet exactly as we are used to do with normal browsers.

Morla is a FreeSoftware project released under license GPL v2.0.

morla-0.16.1/docs/error.xml000066400000000000000000000007371156343060400155250ustar00rootroot00000000000000 Error! Page not found! Andrea Marchesini Creative Commons By - Sa 3.0

The request page can't be showed. Check the network of your computer, and the link. After these checks, send an email to the morla team.

Thank you for your collaboration.

morla-0.16.1/docs/faq.xml000066400000000000000000000006431156343060400151370ustar00rootroot00000000000000 Morla - FAQ Andrea Marchesini Creative Commons By - Sa 3.0
Do you have some questions?

Send me your questions, and I will insert them in this page.

morla-0.16.1/docs/functions.xml000066400000000000000000000023751156343060400164040ustar00rootroot00000000000000 Morla's functions Andrea Marchesini Creative Commons By - Sa 3.0
List of morla's functions RDF documents: how you can open local files or URIs RDFS: to see, to change, to import vocabolaries RDF Triples: to add and to change semantic RDF triples The templates: What the templates are, how morla imports and uses them. How you can create new templates The graphs: to transform a RDF Document in an image The navigator: to surf between RDF Triples Queries: morla supports 2 type of query languages (RDQL and SPARQL).
morla-0.16.1/docs/index.xml000066400000000000000000000013451156343060400154770ustar00rootroot00000000000000 Morla Documentation Andrea Marchesini Creative Commons By - Sa 3.0
Index of documentation pages What is a RDF Document? About morla... Functions References External Links FAQ
morla-0.16.1/docs/links.xml000066400000000000000000000021541156343060400155070ustar00rootroot00000000000000 External Links Andrea Marchesini Creative Commons By - Sa 3.0
Some important links Morla Web Site Author's HomePage Ippolita è un server e una comunità di "scriventi", un crocevia per condividere strumenti e competenze tra i linguaggi del digitale e i linguaggi della scrittura. RDF site on W3.org SchemaWeb is a directory of RDF schemas expressed in the RDFS, OWL and DAML+OIL schema languages.
morla-0.16.1/docs/rdf.xml000066400000000000000000000012331156343060400151370ustar00rootroot00000000000000 What is a RDF Document? Andrea Marchesini Creative Commons By - Sa 3.0
The RDF format

The Resource Description Framework (RDF) can be described as a list of statements. Any statement is composed by a subject, a predicate and an object. With a RDF Document you can describe what you want with some semantic rules. You documents will be machines-understanble.

About RDF, read the links page and visit some external links.

morla-0.16.1/docs/references.xml000066400000000000000000000074561156343060400165220ustar00rootroot00000000000000 References Andrea Marchesini Creative Commons By - Sa 3.0
RDF raccomandations

The RDF, Resource Description Framework, is an idea of W3C members. These links are the ufficial documentation about this format:

RDF/XML Syntax Specification RDF Vocabulary Description Language 1.0: RDF Schema RDF Primer Resource Description Framework (RDF): Concepts and Abstract Syntax RDF Semantics RDF Test Cases
OWL raccomandations

Ontology is about the exact description of things and their relationships. For the web, ontology is about the exact description of web information and relationships between web information.

OWL Web Ontology Language Overview OWL Web Ontology Language Guide OWL Web Ontology Language Reference OWL Web Ontology Language Semantics and Abstract Syntax OWL Web Ontology Language Test Cases
XML raccomandations

The Extensible Markup Language ((XML) is a W3C-recommended general-purpose markup language for creating special-purpose markup languages, capable of describing many different kinds of data.

Extensible Markup Language (XML) 1.0 Extensible Markup Language (XML) 1.1 Namespaces in XML XML Inclusions (XInclude) XML Path Language (XPath) XSL Transformations (XSLT) XPointer Framework XPointer element() Scheme XPointer xmlns() Scheme XML Linking Language (XLink) XML Base XML Schema Part 0: Primer XML Schema Part 1: Structures XML Schema Part 2: Datatypes
morla-0.16.1/docs/todo.xml000066400000000000000000000003011156343060400153240ustar00rootroot00000000000000 Morla - TODO Andrea Marchesini Creative Commons By - Sa 3.0 morla-0.16.1/docs/xslt.xslt000066400000000000000000000103671156343060400155600ustar00rootroot00000000000000







  • {.} {.} {.}
    <xsl:value-of select="/morla/title"/>


    morla-0.16.1/icons/000077500000000000000000000000001156343060400140265ustar00rootroot00000000000000morla-0.16.1/icons/128_BN.png000066400000000000000000000075501156343060400154340ustar00rootroot00000000000000PNG  IHDR>asBIT|d pHYs  ~%tEXtSoftwareMacromedia Fireworks MX 2004vtEXtCreation Time02/16/06x*%IDATx]_hGܻ8ɑ@]^~PՄٙ~|32"@pw @!p @!p @!p @!p @!p @!p @!p @dɌ1bduZxx0k9 NDHXW~2Ȳ J\`D$@MLLIG>W.yR@놢d\@dR!ɤA=+km߽Ǣ7uf>HJ+צNP(TTUuݪBQNEQlvR4)z[\C^sh;4+[.,hP6]! LOO$OsO5`<c@ b;===V$IZsi]22pwH$JDr? tĉa}Q&|闸߇P,[I|ƪW9 <::›_ / Yfzz:eUS%MDTT՞yXv+Jh}b5UU2==2]_3Y8͛wyrUq↩v;hqq15`})(Xa8Gr Z(^$Y٫IT҈»L맟~gmneHF^6y8Uk_&s4Bz!zLVnN晿WuA[3)Pܪ:3===޻wn "@Ό9c&^D"z…|eY[o'&c]d2s_NϤt:|P,z ^62_s{O2LAvxD62BʼnIk󲱬̉{M"r}&;O2FGGW6ɾEʜ#-F6VWWKۗG^ D .$yDWy%*Ťuֱ< ^]Cs\:]i(fLږeE"Vq7aΊEvu"  [k4髅>/ނR 33ڹ9P m (C=co&?(LMW,Phj ϟ;;opa~YP>@Vϴ lCU5{ irA=C߽߀ TcffkX!ڹvoi.ETc31&Θm"*&&&ns=qhVXΗ_~mmmJҏ\N{=ço/8uT?~w>DkrapImg[dOb9TR)N$S,`;E&!1{Сr?Y{d2/ͥ߿nܸꈛ|d.\Px<B%fF`7.^V,;w ?P=#1 -Ӂ 5pї/^ЕgϞM߿?c wQVxw(V%H^ŔQg:7`nS7Jwttc"c%csssr\0nU%oOy%HX>422֝TUu}J$ٸEfnWyas> IigB0}#C;śe||r-䫕BI810avݎNFZIS_S:ZX dEh4̆]j6j.||N.@;`E.As) {pIy,I@-R  [ jb"˥tŤJB传cssHBytXLԉZE ۞Z*F::d>q݋ը7XXu#6$~6ˌ-̻ "Z&80kD"7hW~V*\~b;@DsІ>>C0`]O|{k1D(y68AD?0JH_MP dqYϣ ?CqO$|}u,} ^c憉`w^j;"*铴+N= crHnF;Qc =y-U^NrvՕ^>p.ʱtm@] <9} @!p @!p @!p @!p @!p @!p @!phKIENDB`morla-0.16.1/icons/128_color.png000066400000000000000000000207161156343060400162520ustar00rootroot00000000000000PNG  IHDR>asBIT|d pHYs  ~%tEXtSoftwareMacromedia Fireworks MX 2004vtEXtCreation Time02/16/06x*% IDATx}{|U$iӤI*- Ҡ@rJdŻx)⾂xeEV_WYqE/Eq"T$@i-ҤMҴ93L&K/~>瓹<̙y9yΙ "+@"A8Gq 9s$H Α @#A8Gq 9s$H Α @#A8Gq 9s$H Α @#A8Gq 9 ![ !$^x xGp`qk | hYtê < `E+a.<!z׏Q L>eSX.v떰 -!d !!K>~1mQDMCPQhD [ Z\Sj˞|t>a<bR\t}Zet㍯1vzJ5 ȓr1  !l@BH5Yd/w?E,A9mrJi9W mX)9FfV|R~>LնdYձKŁM5y~Ϻt?qLVɒ${ǽԓysֻ>Lv"Y`ixRz<ty> x~ ֶv͊ Ke㼋 pe7#TmDQ7;+KǦ_\w,ё8 m?k.C !UU;j z| d:,\~ a0$p.yϽ joi`f .Z*~.I c J;ͷ,~M֜ Kp~،Ӫ>ٶ$pmkW[s $gIBՎ<5Hb~_'=}*$IsH4OXŽUh1 BfN|𔯔Ej|40%kfOUptʔR_+A[sS<!gq{α]@ /VN`~ ]^h (Ќ)-注Y}!06RnЧ0nTZ/H!j-X|;XIgI.~zxzǴ?I vٿ*䒼^ez:hd{SsX:y>v|l|䳒6WN1wm{OW"vhkWH@)զ=6voNwn袔Nz^5$8e,.oɯo*Q$RS4gZΜ4s>//4>,.^R`vP. yl_!X:R3/ƦO)>c&kSF%ڝ[|n o#Kx݆T@̹HU7%BD_J)7\3's@6bR>DiJ]U['h<_8/]R6GH]*֩f (S~a)?_hVzҪ'!!H)}"Ga~ҁ%_kg]Vf^rXosC_]u^p|{*_ȭ{؛|ۓ"OrՊFW.?9SBuBkgfX;Z+E^I 1zI)'s Dyt6gWw RDy9wߦ> \dxR>@Z. 6[b1&MpN4^s dJ9ӳR|ֿ ]0 <J47-0e2k}ռ]bYt;zJ#̟bC8k6/Ѵ@"B6L5RJsDm8=F9煗 %AMT U~ShwLizYUwQMD#o]tOQJ &QJRJijB3 0BzaGSD1ūY 6wvޮw+^'hDҭ`fx5uX >923̧FTvy5`r0e7a^B^ LGG_.f&[L 8$LhguX B(8̕){o1p-1Tf)Nɯ컿%kXDҭsw[>z1XFYeNæMц໤_׎δwnN)ȳY(?$#ޓn]/g(BbHXV5,*`Uu BZGP>(󛮂G?2vٚ(b"f݋/[vNWRcmEL;l '+D}<ϗ! V~P`# |V(CS0voj`=@T=$h QM~& / *X?WО/-RJ=j !TsmSY bdv(>W~:F1$:Wm#١_4勗5:F.Ht_rE?b9)?h->҃O+Xܝ_"ϲ]R6y?I$Tsdz2Ӭ" ~'] ejZ?cˤގdA=hHϵV/>U"6\W2@j[¨|!`"`H}k0P \;0$FKۥ.%f1σ@p1 ;3gP@Wz+<]YoԀ1K_#5=u,}/U? !sf/\Wl/ɭ@\;,)OOc}꣣ >Nn{<#2.xraV2Ңޒj贻,rB 9yjB/GS:aaߑ]?lHg \5vz)[ CJHNjwKl:=4 UrCв hΒ`pv4I~]>ugs6ϢT=䕒y e[Y5.r,O]0?'FmMM"mrn_&sf61$%@w]INAP 5DrPf{pΗ3sA?nڼ!R+^WRyffaN-]LOA-6D z-o̞/&L-*?lAj! 31)0ti,|%Im~`@NxS'\*qV|(4C;V絓n4(zu䟣_Vw/^មŔ+]x.-4$sE0B=1m{o\O0s֏}.o=ϙ-TDq*KՁGKMQ@ eΠt_Wm ԏ{_ C߭b vNՎ]/ gI祎 &Fvfnxyj6./AkD7]3ڝ()r9LV2 @x;6 GB>-&jGM"šy";co)@Ȥn̉wXtz4! m̪:Zf Xx\tU,<-}isΫV7\uuKt gU,_YQSCMV~tWNFp-qrs\ߝ](cST[N_#Y(K}Dcyl:=/Tޙ6RLH  I%\2pV~_M3y@2eR!S(4(@~ŹkS' 9ʰl<+0Ct5ER0X*f~Ƒ1k!纱/{ǧ6`jTWJIdr˓u ~ir#K''LҴuY~YFˤ.B9'3^3qdIf~h`74P6!T| ^(A43p 0M 2U +h=\8b|ЀuN2%#$F@yRq:Jёv~pfٿu=U*ũ= 6Nʤ._!]Q`[󲯟8 vuT[x]۾q^fE~q$:?Al *?0 "0j<5KQ$2| r%!溚=7k߰]voH~}tMAcA{Zk$UkhKr %j-ݟ:%k@%& å c-%Z>ۣmE# 6pr囖zhK)o~ęoAkLrP.8!ѫ 4桀UrAP>Ǣ߀$^950H9>MV1 RDݽu9!ҊRb^%b44HYҊNPtK(}ӝMQdE\ſbCl $޿oˏkUݭL&Tr`!ņ+fg3, N\ z(;nExO:+CJ?wVŪ|VS\5好V~c}Xi66fv~ň  I pP3]^ʗܰ=..@G _w1+\ W͞:ˇn͢u/LJ@enlVf f[5bS{%Uxj|1Y14LUwyDwVXqxɳQ(A.pU~8KBsspdk^?+S-o)^m]XkؘB&hu ᒘu/h槍Bg.CY:ZcO#WGE|p%J*B6CN/Up)eFMe1ރ`"pOÝ-= TրYm&:< b:NaH$k8+"[`+ↁI |]4[ 󠋂8)h~0v]k o\X- }KJ9j!|}%`TDb!P"rǭ7A_Ͼb|…żeŦ|ʏ׼r~ڍTa+FR~"[z_t'0PJ-my(rMo#lE! 0),QMNTx/G, 9kͽDy(CȒ wAބB%ܽ*~ C%BSAk WHǐVοîOZ Āj>%=i `pJi{+@Ҏ"!5jpZ12 m`/\8 4dۏ%a7RJ91-RQ&E-0Eo0䊵Q/P(6>wM눥~b,{B̂AQJӹM}seX w*ԃ!pf}?\;?GpeOuBA)=N$_ }6 `o4JIDAT8_҇E0R b)e¯j_`qa}>16.N?kp>@yKHr(e=D֙~dBeg-XY }v)l=V[kw}$зH Α @#A8Gq 9s$H Α @#A8Gq 9s$H Α @#A8Gq 9s$H Α @#A8Gq%ܮIENDB`morla-0.16.1/icons/32_BN.png000066400000000000000000000020471156343060400153420ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs  ~%tEXtSoftwareMacromedia Fireworks MX 2004vtEXtCreation Time02/16/06x*%vIDATxVK#WnwdbjB}PBV!iK^BI`V,bIBZKق;˼Lea2iR48.;˘ƎR{ss.s0"uk~#F+-1&1nC;2|De| 0BƘ,,-\)NmYgvZv hGn;y,Huebb#fRȆaaJP.3xt4͟Dd2JkkkO4MS^IirrUUy}xxX 5 Chr Ӹ `tt۳gSCHnaabf4jPU&]MӔ)nX0OlHT?=[T*1zg^K7t_4 f<<<<;99arYy@ "bG/-缞H$|333S_\\ bfu 9'*LP"М|>/·zz<bsu]$I}~~jnHF'<ّrYZZZjooo}6Z-O8UN8`nnMy6_ @Rε$ 7==]|>imz-)$$Iju<x!>,Yܲh4@UêmQœ6O?;b&QKL& c$ca~6Ǔ?~)ktooB ]D;Ut+__ n@CDĥA0{ 7ፀW_M%H%IENDB`morla-0.16.1/icons/32_color.png000066400000000000000000000031421156343060400161560ustar00rootroot00000000000000PNG  IHDR szzsBIT|d pHYs  ~%tEXtSoftwareMacromedia Fireworks MX 2004vtEXtCreation Time02/16/06x*%IDATx{pW$džI DH"%Z+DE:S(g4"eFGtSbHB }dw:팓=߹ܹS")ǚ}`` -x9|Lu1T)@?onvo"'z|fGJ245Gfsyi.J? wo,?{loD& hJS $#o[J{ ]kM*CzI`1GlnKJE5J[D*q[,Km?QQͳhfk}+ }ss\y;z7H께c ReF7^B pgyWsƳoK?3/QI].RꁭVo-Ǵ2r3f$3&8Usqu+.U%寉']Ë/ =av޺a!=JǕRu,RŮv6XIS}:vh{80t,w9S4VJfS_>ŽrL(鿮cxW۩v)^vuJ栓E!}(6Q5EVᆵU%JO35_Hm'˽/GlV(7H`riXWbhUm (^)UqX )h\ GPGRs>un\ఐPazx?]ufmSRzI\#&N]ĬWV:KqC?{ H 鵋 6/T~E,)ɽMnKēh0Zմp(ѪO}7uaDDf:Υ5~o“f2<"$iQ"RuS閇7:<њ Ym>oZ`6z04ML< pi%=sS][`4!?.r,n aPr 4UKW/2P`šP׃ff%[MZ}0 fg޼7ffňg ~O>~;7~O>~;p0"110Ɔ ˲,J2HDot0 @@Tr6,yQL\cdxc#SiY!3S@5-B8{dcMQ1`_mDQd2_6St?Qp5\__HER|K")#r \D4V.4dYNmiZI|8DS kmƙ$dfr"()RbjZEQ9R,>@@HC]`f9sv\.7M 4MS8(:Q:;V\P&p74MSx;a70ׯ_/ڿ[Un %o=ƟJ^EQF(t:/`8 ^XX8m(R$,Ɵs>MJXא&LSh.3osi-w6TU=L `Z$"SSykjHgE97C فP"(Vբ; Ub*m-{)U5[v~ 㯥7.wEQB;O}$"@=[鏊[n- bX}eA0'^7{Q-,,un3ezIWɓTf]rLa `: o~y\Dp~d2a~ҥK3J7o\lwwVWVVt{A0>pڑ$w'fn4W*єV d+WXKKKﭬAh\|Y0/\w+;kkk'=ztX,~HDSd_|ii_"(޻wO>) M,U{ol-SSS/ܹ2'$~{@ ۖZf;wOݸq# jS@"b/^(ɓ'O ˗/_:Y4M?uԻ###Ɩa{7D 4^LCCC$dY~ի^[R3A"Jgl˲)FˡPȾ!L& $)κh4Z6Ml4Ͳ -Ut)$IR$IRA0:NX,9րv׊ eY:7j`9g4Mq.vJ75O $ L&vmA]^Taaf9rn]f]u54$&sxx؋\qa7v^CV'$8\!Cֽ<9ڔWknzLv^8/IAU"^>t4n^m\j&A8 \9%EQ YQ$I%o|/p\~݋Ip0m 7ƭPB+Х]Ag"z 1cL@S'"] o:ցIɠq'}WuC+x'g_L'Ǽ<o$z>~;7~O>~;7~CΗ:IENDB`morla-0.16.1/icons/64_color.png000066400000000000000000000067131156343060400161720ustar00rootroot00000000000000PNG  IHDR@@iqbKGD pHYs  ~tIME 6}+ XIDATx{pSי~ʖXlܘ[˄%!LL3$KB,lIӆ< L3yfS4@B&vP -c%%CW,h7s9|ww$J)*OQQQQQQQQQQQQQ_8DVDD$ "6tÍo_lh#\ 8:n-ީU XR"ED49IY#)"R$"Ko_ N)k ҒrǕR_Yu=6}>=AIRsc2$ _d=֏Զ?R/5r]`44.~l7ާ JGhʖ8"bKQ:CJ_ˋ~?/".ku͌ۀ&2ۿ}2ϼsnk,̟(!ŃG/1֌ΤX^`YUX ԋSD}sǸUY)Bck~|ndNjwuss[,>{>&E@(ylSEO!:S9OmjFmqT H,4ӓڿ1gl8iet>kw / A S+;-BROso&5 ʻ}k~Z<pnK9^ ޗ6p(w,v=EFZwgfxS|9S<]VWR1VSmI ?*,LOvo(A R듹OJ*rRXw%'(\M -F`ż ݿ#S:Fzw>9[HC']4˒tjFz&Res7 WLzŖbl*íc< 84h~O#R nG#Y)bq7WDZAkD)c_=zQa̽{\^dP쒰i@G("uBN*-:~?ӑ#" "ܤYڻ3QIE6dv22Dz2viѾd I% k}ɞp.ԦGf51CJ5E[Ob]=c!W'?m)8:qO/綍p^ zI 5zsF @m~É@m[̹l'{{K\i}N_SLOWamz"˸g+J\87}8&?(:pMO(}͇ZjwÃJObh$'HwZ m6`3e ܖh[](4͵](*etLm©E@۠ﱏ*xqYkв΂e}ʧ5!&{5&әY72Yk^o|ګ8ߧ|_-qXd/ bL|hVtТbst㈴%cƥ]/o.ڳ+\?{cw8~TR~A5CQcϛ):Ynm 췜L<ް/Rzpm؞4U~H3EGZL `&-`Ì0> gz!P(|kLA>Vg4{=n/cݡ..Ŷ~_ʯ>@];Ys17Ґ#n0 (BQ0jJ4{cfŰ ,?Otk cҮ-sblAW'^ =W*(ZQɭV fK;ӯ@b\big $PA.w6DAڀ 8bux}SIƔ v;(=mww彖ЛgI/nfJ际{腀'3IbXČ(N>Z i&"VpEhmhiЛ2!`qu4|;|҅?``4Iф!bV\CW#36a|E[_[k (3Bޮki}K ?)Q'o|zV2Q_~)ҩu8>7MK𴧅YQaL ͚ `'s>\b&s~=]~:ؕt90WBcysR #Dk5?S(;8 1,D`e)p )0/x97_LIym; =ކ\sbF"W֡}qܔ<6 R.I0dO}\~!.Z5èP< a{0.?QTM!$5YM*R9X~H,rmY+1p)F䛁*/ ?G+FNPF&u$ }E#qhKJe!|`'"RY-TD(gyj ұcQy$.Q+mTFccij׆yȋxw,oa$,|yy_+/[@ 殑-RqkpKTe }C(:E 5|;4)굸PGTc߷U?uMEa IENDB`morla-0.16.1/icons/700_color.png000066400000000000000000001503451156343060400162500ustar00rootroot00000000000000PNG  IHDRYsBIT|d pHYs  ~%tEXtSoftwareMacromedia Fireworks MX 2004vtEXtCreation Time02/16/06x*% IDATxy|T?LL27 DpA jU\R[mUZqV-.ŪVl` @"I@2IH6L&y;w zkf?syasAADb AALHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x  /AAՐ%  AADTC  jHAAQ ^  "!KAAD5$x "J`c-ga*&Cᶏ 㜇  1v=[lp-|} #/AARc < Mr(t"!KA 8(p6][E A(B݉. T<  FW#A! Ma<A(:G yzh<A0Ɩ ܢ4p)6HAD[`A'xM*$x "a( 93´6AADf ӕb  "&('9;&wux^"j AAQ6 7NzgVbA sm[uȚJCyx "P J,1:_bq_Zzpio ǍE ^ 3JW` XfB'9CbKpqs+kADi  ˆRAyEgP υ]c+?T'L clmI% @젹cXR]5Wylq\n" bTB  „Kz1커tIΠxs=>B}_'d& Ș Y; "R^ >HfL[]_빶\k9Xwg4eĨ<A[[[kb*&*fgI[1%9â}׵o/ JNr'!џ "AG49~( ~-VO材بVZs۱]b:%E"kel F%% HOm+u*!_)@EOr/@B&Ŧf,rz cP-KY~.P#Q ^ ∂161V`4N1RL|%BW˃빨 _/[UrQFRl[dl'H/AqĠT3 8 NY׆!M>zI9ǖ \c}DYRJ/jx|} "" KA06]WAb,a5x{/GӣƠݕ2?J(m% %L%gL\]lL| |ccf=U1]%ї  ^ "jQ<[a5 ,a>cOBa BW˫#O,=EPX1ݑJA/+]7 E!SAad55za*mS$]/AAQG])N,9eH WhؘA󘒿 F$x h#b rHH@N g "tPHAU06!̤SK.S9/9>q8%mٜwzɯo+X, .E>PϵwHNxCiތjVy.'AADԠT:nt|E֬zGsVrA b1nj= \m5w˾v DaSt۠F \_-zʵNț*S F $x @I#c3 nά%HQR:+ֱμ w^t`ڸ-`ިa̓^]x^BHdn8BaAIyls.wqů,R2(jş[zkىc޹ԔP ja FCo2H(G8NmnCeifw}6?6Դ 0I_+Z&E!0\B{hU.c3*~{͏I >-1m@H{ i"*76A3u. iʵw1#E :cXkE c!ؤxj'[0R\_kϻ쿶? ;!w*Z>Z6l{=:"(%V-j dH QM*h^Y^Ca_?Ȏ[\Iiǖ…QoA ?ubpxu8 ;~R R=+Ҡhhs`{$DX!K&]n/*A?\ëWe*Wi[}ʺsYQG< rcwĮf0Y.'?s˷ϽwGU۴)p[Yz{l85PR|j_itԢl"UMzWpqW7~4/1j`S0 A%MS?~Z;c:O'm9M%F;,3}.Ɂ zxE <~%0/{q6>qY| +Kp谳~=Zny{ " $PN 9[QM[AKO^XA^#e:g& \\Aoڃ'7tWʘ)Mwo'۴M;Mϴ_u;fW5_sXmc"lPЁ1611sX`bUC^8C07-1b2V)R(1'H~o=(˼E {|Een+--*t]0KI'>{;+/+ZнKj?0m?e#A A yvk5ܞZ )5GDC,):%+1:LˎmbIwәZ "ĉ煭o]Sju Gύist(adQ.3f]>)6NG c{> aHE8WlE֬IYǖc[0mY7b0YOgxHG"m=7U*Ce1,kgmRDG1Vzx>ԓ7"CkT-V ywokB yHCN"!KD1lK۶\]) ێTX>N/( pl {S%13``lZEfV~]_/{p[W>QD ܟF m!eMNfGύiiK۴: &1,/Β㹟h'NH20^sץw=\îCI3X0SO2أpO юNoØFVPOˈ^}+m‘ks|AD$xQr OC]9Rch5^^^Ōk W5 ``GБ3ӿWBU.Pd}l^%7m9AHĞYS 51p;[k0t$!unU ]jq<[j1ñW~z2!jEg~4X_c7LuP?]6 <%F7~'@=\@O R ݞل )-qOf lLbyvT{˅$&fhOO::揷:%286>{3Aࡔ&VP2ௐx&"~}Wa=ލxncb OEަ;n (n;j jIe/1jP'Բ:mp5T/m[P '[SKZlHhzlƲ߿\E(܌&b]|Gy6c} lMQzy,["xUiF+j o䱚ZyLsPڏ Mc9nC Kc\RZ K۶ܘxU *fψm\<:dvt)Y ;;@Ű%Uyp7.qSڎC[4\XYP?Lb i_}]˫݇M}F !Xspt$A񘊄4>PSPc/GΠhv+CK~Mo#Je͡D$@H/8 Ѓ?oWp$6@5022KXfyo۞7f- `[ؘ}'s^95V[RO,z`w~VGVZjξ}vW$fI1v9SLc.rE=j:WYSŮ&:ޢ0hN:~-bS 96Po{gޚO(Rb( ̄/Q(0 ƅ| 9篪_G)-3-tR͟O{~¾0bE"Db _ge83儆ڬ= R}v L}f?ظ:i_ssV׀ӬRf w$|CGTջzj ll %v]*vyww:k?ڴΝw d(!// 0DhQ Ibep+ :>aNGCB pߚ DXk;5_޳$ hYwsudGi^$`\g.lHyI-B^j%zoY:IF߯A;mXKMpw91=8̧.*k{^B$|i/ UUbxYaԄ/u5d MV RG4z[u޹^6liZ'racKΝ/,I'S!K ]!m0%:%=9&YSwN!WfKIjh`5bذ`]~Sr3ܧͮp,n|  ծ1Q 5-4ZB?=AkRLƳ$%Bclcl3"Dzks iq_91뜍wNF%'V SP@m߮*~ ,x;cuaz6^jW= @w)- 1|^iD񰆖:0 ԳKt 1 THA1ND`y xn<+>p-pk7-!.wĒ9J>] "ݻP|[f?%v\^L?ks>zAߦɞ5!< G4=Dc^^5/zy{ ~eT2ObxGA7_ F$RUpQa*$x[LiG*9?w ϟkO*H+ߞnΰmJzczn->jl;+G~2/ C;oRe^xiUF;}%,x]bWO೎5vf9k%ufH%S!KczX+EagE'6)9Ws%j;?iׯLh10Ʋ8W`sGvWAOItx{u}Gz{}?^B#P̧M?𒾷Y_e| IDAT A yx Cx[]R;Ŧ{&]՞z߱wްj`) ƙۦg?Y,1<Ԥs%v~xuEpSj;quN,6k;RŮ?D,/0$z?{@i~K߼JlY?Lm`'|O!XC"[8^"%QN$Gg/|㦲e܄|s! 9{;?M 2?`be*kh -"iH(^FK`֠Wǵ%97MfƀܴXi~,fxeo/:k Fy<ɚzmK+k!|oj}m(zSW.Y՝[jRONyucCk6 V+#p}ixx 9"㘑1"x1=dἿK@1UAd1=#js}__쌏mX[XaikNm|}#mFEق؂ P]5͓dMKo]m|BXvoZM㧶V^Vgo';scY-/,_^.۫G<}[ qRvYo[0.u7Y# A.JpD :B$k÷Uo4Mksd6q+Ptuk ?HP;?L{~l1ˊc7n"|6*|9Nl 9:bP6]U!dl]֕Z9lsj$i ^`f5x>^w>ňJZL˙6BJX;9Vj`69 i 4Qbu?@K+Wu\[`B #m {g$6l^[ I ƨ`yjO:Ro:땸UUz9\w{yG=x8vcc BU6nWG<6WjkN?ke "pH#Un^B{'?ߴcńͭƨ 1y - ﮬ/b۝_]cTGF"tے7Vx䏚JEm?+*Qy=Enʦ5 lݽh|"VtM+"+ ^bJ^ݝFֹmLsnnB: Wt+䜍t16{Cuziks#m8O슌3K[ۈZB&3yCTdM+`q1biqwմc u(͋!Q"lىf4dB7A=3` 6&>o4L[+nP}[/\e:+3ŅdoټY UF;Dq[mYKf}3Ů?%*kmgjě`3cnذ0lp{vywoB(mϮF m8Ёg^5]xzV%Be?3:tJypVEԻ:Mbb}g,ἌO'teq3[V)ȞPw{狚+0' mTkJLo95a6eϼ>4:_/wvnK4<>wWUH0Ɩý1-(fSbҜN~ڒ , Z=Z9Tdؾ锷#m@|lxsFEL8`7x\dbw+gu&'nODBF aX G _qc^մ}Yd#Cc rǿ(PLa"*hiJRC${}EFXpjc2X37:Ǯvq8xwz`]p9O;7(b9Љa!"S. )ZV& V+ܡ&DtC$! e)S7]g6Qeu?e1 k&C/Vm(g|h3Aq˄Z'2?.M+[/LW۫߇`:gN?Fqo@v6Q*vfrcKB[uVʤ(o;qd@+! qQ|ӗɵ¢|ڂgG0O(^{@R܁㯟0׮-+RN ^31`/k,̝NN؂a+EJ$p@Q 6yp13,~o?ҏ-&We&|E/p q:P?rUOj\\Af5KBBٙܺ3OKmSf[`焑1Js^ht)uZS[]>zusg۴{qkǥɵy{4|r,ڳ8xPb|T Wv ..? jcP3 ..uGz{x-ܒzeC Ȼwj@|e,A™7ջbe`T(ŨP (F[ Y%JmGIV!3Bhki( )cWdQD\nAp<$PHu0} n$m8sg+{TGH"Wch.Y,qjoR6̻zliQryϞCۄSyxf%rY mGO`o 91I;|`#Èk/vl_N#_ȗCC7JQ.2{޲7=^8kd䞾voԭO*_+\^a3Qy+`:52pS]V4$vаf hb`p土ю:v"o_o~nWOa32VV=ry5X0$jj/rޗWS8 %(1V .s]~Me;,Q7ߡlݨc˟bBvo35û;-;<κcۍoؕ w}\|\9oϲmܺK&@n*cA?w4zA},>RІ`PYs9X,q}=o{o_}vI;OpaWOsS{OuY{ZK9oݭ09q]ḱ\ Jxkla(|]{2.q_ !bh~ݿ sn:@!~vmsNȺlߜT5@na=l+v7RW0*prŎ}k.S[vƸÉ{]:}ݼYԶ#i_]&wv0Kz_i! (@E LT\ u]齵Rg[I~rxS.4pˤ'^a >VI&hfP ݑbZ}ssG{ˌ;{i˻nܸmvJ;~:eVH9篚4gQ¿r'P+P^R$>o.(ϽwfYqΥD0 ; F&ޣeIV5[!" aiXgeJbcCGwJJ(7:(r6i.&P ,vwꜝyϛ[KSjlMg+}30qTyroT߱apgpjҜ+2X,! "2Z{gsZqrO56 !KD imO%]e8>i/ۇHyr6wߘƀ* Xj Wxi):t9Q.%q:a= q+}ްQ]/-&*ʹg>#v ɚشoSR昹эXd'qZܖ;LbQ9`RƱ׮"[yE$v(s݁[-1kfK1%/rAØ%NCK\l PP]"BW!;m_}9y}ǡq!n*[]xw20j`~XbӺM>UX|}.qv^WF rDA7 TY{g@3j(E>GOu$i'">^mw6ChP bXlZ#N;a!sx~lcF8)o*kW%LOhL[&\"+]hG˫&v5D/w;.Cy2{"J4CԈHbxGKHOx^|c6Hdjp>Ò06CG$m2^"k &?JT/3hdpk\߮{3@Ẩv㑩5|}\W[_cyQE=ʤwTo(0[^}5.fI7va|Ɗ[^۟lwaU75il^3ÞH ɲ> ػh(CCD(?GlH?_;?ks$YRלҰgJx1D_ƦVz?\d%KYyyGz =sNwQvx.1QBX|xqG4{mFD/]=߉Q\ |fym :)>ȼri7a̩ȼz}E"vj/sіgZO+a˶L,-~Km;n*wskW\_++~ͣ@50Vfj~`]\fa1Z.3fe5Z C8C1'Z_;8} ܢwoL"v߇*7˒;k_"5:^Fm l >RXn$!Rv΄mQ̶/bGN2a>3~NiďRƠ^»ZM0_~bqoSg R\s`GFz;*6u98&"Ȑwtrr=Nb'8j_š@Μ{fVhc}ȹ E̶'/l$ZDW8R2굋]A/oWo9<qNY?sObzW 7@E"cքy d'̥*zEV`ic3:dD?dʦod⇉!6HoQVyB|.8{ f*.| b74mo\SyM3NYfպ]^+mGkVS s>ME .A[j;qSw$zK-z\.;`O;9'oMlZ^a?b>}ks2VScl*cc;IZcmL4C7L(_2%i&v=WfOZ} VhYYذ [U7 l7~6 <" kvC6_7[jn>hgi))Ha1 rb!v=\P'\O7/;N8#upO*ԡ IDATc˗b01||nft..VCƎ%"ǧ$j8nگGVSss˶xuEwsD&[[s'W~pCWK _\}w8S ;T#BF —BLoQЧhg?J}Q.zKGw)htێ)q1>PyKjl1)<􄕌X֘Μ{f552ʆ(i ].ѫx@/D2o:٫Տ9Y/ozpngv(:_w7trd:*jUt@Lqnw!E(X[=2yM~~#*ŝMRx^4#"xߗsW:+e7X? mE|qKNcWPٶM}|N_/Z4}q{q ßԄya ikW9!k4gzWNXfO̴ðݡ^g}w`{7|Q4_8q" 7QDx|nbzbǖ`MEo~]Hom@drj 8mhoP6zz|5m1֞ryG c7Wk36Kw%l{wTkc6 PA)3T ^= *+hw|ۙ'?C sx֩&#|^ f^Wf0s~^{ q!1=Zr ؅ e:E)?]akBžZ;#J sן W_2gDkg(+mgV3v B+cy ϋVRS;'\m36WkyTI5Y5m헝5~ +tFݷqY?Dz{ ݄ &y^%|_0b,ϵ 8c Y^VT굉չ6}{:|MuM% 9_f;Fd/!b7iX|`KGqykFn?镤q^3i󚑷R,bl$3_m{ ada9E'^g_bRq pU0w7k50`u],b11ihi^sBL#H(Yx Gq`mkcĆcˑ{QAO_*:|a!!DUbXcI(iz5am/GfBuZ'.ݶcEE_$%3iDdDmİjj>C6siS#"W6Ĩ腙e!Qlp0-̔TDj<2 g;аlw/XCH\,#lڌ`bXUOK~~:[y=#Y4h>lRM i"r2>c5%@KϾû&;BWfh o[ o` ݩ|P_\c zkIIjh8GN5(bۜ~Tn /eVX}%"6E Okq ?φ;geQ9Wp1v!BhR+jA1{[Lj[Zmj}EƉ=&x{[o{܈1}EhF% s[@V|nT1FzuB#ʻxz5 |Lh99AC47=#? ,+٠QϥbήSMgȦ>ںjE7cn1҄y 9< p` wj,b7= 'ށܹ%pQ罅NQoh ;YUwc hf,g%P0!ʵH.FY[sMUO_iAƸweF[x8hXgeJw&^5 YuKt ⋄{iKےWSr6lsk2k*zݜ_x_Y^B^\C&c<'h WJ߇ (*r64|GΆwKO7;NW 5+*V( ZVc5VDX8CdM&aw껳8p%\qwCす^&>zK{=enxH{fyݤ$7T?*̀-57k'|z"dsiqk.8' -A1'hz+rs7(}EH<ַ RcA]?· q ? ^Qb^ tDk+kIt)8UnkNF N^֨-FIǶ70 7]'&ء ǝy@55/\d1aS,= (·X7 Aݖ֕pd$"կZ$dAHY\?]=o#aw'aM5 B3&- ƈ^>_=vEobV ?`ae:/3Q9HI $T+"Yf-7U3&!x%>j<{H^h H$YR+]dB fnss~{w30g1+Pr:Z%t=^*o-ju-cl;{A u? ^/zTOz\VI6`{F6 #zk%]DFdo*ʫ+iZ7Cct&^~/MFf1*987l^oDys@D f(dzN)# {%|Q 9lͳG浼Ov7߸6i'\ =}k/{Rx̵W_ΒqRǟ&L5] (S.38:yʸ *|凨zNLȂm\z;ƶC n{Dof# 4r/vL7æXwGnBBすbF鳂"C!6&=epl3~y"=67kQh55iC{^ i0;^WC~eLpob hP"ppzvElQCRg"u[Ś^ͳH )3#ؚ396H76=P@IY xzG/{Z/<ᇱ9h ^ܱ$ĵIܐ'CSNu~RMMbك);9 gZV54=?ˍMlDz":ހ/^uҟF:F;̷DӏC~`^9RE/ xZN|~ϋo(ۼ$Gh.<7Y{>]|9dLA2!! 6M\QZQںPvUk+k݊ԸD@d#$}cfYr|>;{޻̽}{Λ MS9>#ڬ3*D('e;4>SBJqW3FvGK2aL]!) PA+ "A"2uӌ^qw0f{tsfo*ݬ .nwwD\B캰p-x.<Ie#>Sɼ~2´PApO 'xL_Џni -qمoj[ AfA`Dz>EDYirҌ'W΃dBvĀ=G™V} '`@Gv !nf0V^K/q֦S]O UFxyzw u Y~S|6p`UPtBW9ɮ 4]1"4-+vd7ģ)h*1Spyp/UbcICT\EeCzO/0M=BMoU+ *2 ؍8rOL kxFMcg"͓7Moa {LT[= s"whv9Iߣ)y!#*L_xχoyE Ԃ3zvR;w-@mIDdҴ- h@˺Y(U$;NxDo9G;L8 7\)\$iNy` ̾ɞA LA 2›B6!YQ_OGKя8bNvP{8t)9O)\Nh\bhEzU(Nfe0.PbVϝOjട::hbUi Uj^%C ; 3[+/y,06?0)K԰qG0[Grd@X %yv$}w3)eV qT(CR^'^tHGCj]Im$#ȏ9a>+.6+ ^)jF:ȷDg\ "Ɍr;?+)(ڤt Ǟ_CfⳒ66L@=YyG9ሖo7'጖]FA">XÓ DhN*E4WPz$߳d.J֍B8Hq]jh?x|OĄGgZ9O-7{6SHO*1oV=j79[3no>+Q}a9`% !Wg 9"g^-ʾ/ҘH`#wQ)8_G* @Es`%K$2X B3s!ǟ'||#yiRCח5e\-)t7[i#?T(la(4FUC礤JBj [~ VYO}Őü%w8)Mdhmʹ*=Ll)y'+r{gr w$i+4|"i:NoChnZ>yl~yN)q  Ӟ:Rɪ;7=8Ef:olxǁPq%~NofԬ_)rH!\@bݥ9&j.~JWVSc'R?bw64Zn!V?ym?@d忮7ad_C?yo0@\BLB)~Ca*k.1sFn"4z"rjW**dpZ^g*ǂ쥮7Ԍ˥ئjrWI9kRȶ"b%IvrƢY?-ݭDc5KKirȱo;Qa`[Z˅2Pl}*d8{5mR|lGfX!ׇEui.xdՎz!PWmBOPhBIJ.52*3avcQFܑBD]*Ky".?xAb߄{F^ƻ4j}Xo㠼cц+gpn[@@awNАQbF_-)}Um`Rḩs1Y@tN_o"aAj,]oh[jߖ . ͗<-<\+N[|*)eXK3 IDAT#as6eQ ݶssg'd^W]9@ofMyL)Rծ,/xy݂ @mR,A(]c6\qeg__=REzΙO5U7s"Mr_@N#,^%ͪH+!~Ev"R\~)+僚Xi_iLQ*N[ O%"2h՛QertL18HiɦP!oYL)z;cNFs Ǥ/3jYuP:2}X!ax8aO^iI/ӥS]̞r¾t-ekVcc|SNLw]e?"aF`?d\8s*5HcKFeo)C4WbU|:NK|as7#jEYo-km}ɕJ_[]h^P2Ȯ ~WRv g\*/JNUmNT^"_ĵ ɱ=&TamV9=Av_F %ͺ3-D#r yYp)aOE^%hu`ci,m*mK qw/$A!O ӒB@52OU%6b Gf~td62]`rj ̪f5m8&@ ]Yq&ORLTXO-V_i1HU.;Bn0Xέ~_{aGYy.jϩl/1Ǘ: s!#rmjEv"UJXVAv^Z%qZhӎ:>d~6Fq hjbmyR N);n3x.+U 9먦55YgTЕf}@"-ޜ'caӫFDPocw{Fv=Aj{*pFwӓ~UNd׻M CNM{AOSeT(iCx9Ä8iI5$ّppjYBJ\s5gR!)~gSnO_) 7E+U6")%*rPcFa0XK\vm3e-0g7e1̛"B,b~MueH[5_#* fU4 '^BhSޟ*&An^w>y@œ?}ғ዗0Gwe ҴQ\mjmXa]Wѥ/;4ں3ًgN3ϠBWq'H|#eC-1,gQ=*y«}#D}“3˙ Q{0(gg )!W0xXMJWOLFmοCh7=|[OsGga(zj]g3̙.witͱ+mpo6%eSXo׺LS`.HDvikIk?P0 /`HjH4Ik]b]O GRh!|wt_cLÜg{]MhgqڄԞr#tHN]mNw)GRp(RFoKJlŷW{a%ӪϿ*}SVa%*ۑ))SXGo/gQ>ȑk80ʛai|ŽO?$+xأMer % #r#h:Kݪf5ASi( TW+*9x>В^VrGMe*L_-Uo;iGwеWNOxQ^@L p#+%q ZV.1Mx`z|4KTX!ԩ 2Eu:m$&}Xo~r>UFԓVkKv?HbŒVSS@eoX/7ƚ և=Z6uaO0XŤ/Դm4NyKe;ABU 2',%U.|m㍥u?01G(ˬQ_)B0ƺ53OSv($ WOnD`aC]3/Ҵ *sLY6Bz}ǘ8NIHU"@ȰitR իxO^esD)xf=b`H^cVZ^g+dR>/#%,&'vecia}OL!4:]}]>e b"iJHR+TI@CL)wW}./` !BI .yL3b&UzPe?gc8n.q68&$; '?uѴnAAB\U"5qHvqCWS mu>O$,'_W̆U;W/oA !@Ytׅ * tcQTJʅi _w!u:yy"yPqxk2LWkKAƖvؾg`}VB8s7>B837ჯnpzgR ݰivK{jʉMq1T,f!|toLo9}[jg>91hՄæa]Te]F JdN}t׵|u/t6Abx itЙO`~p^p,!R+FzU;23wt̟,?|Z LJr(/BJHoc ӊbVk^~u}o Q]>}δ;EH#D>L3zJ%_ez7^?hFaZ.Ar_1֛J=*!+jP^ I#qQp#m=L=@ $E+zxإDd0tbY410r蹍f_,dR!Oxx!@LjDdoh#PQeߕ7dUTEw*Gi ^H\ҫ<6ÜC\H+7td0NM:kBv /ʻb5{u:f&\pQHx˹C&vV[|ModD[l#,P+ܶzҝ'?ww 9B7R`ɻp zKAn4>DهGf=$:\}tm.N7r<[Ko]d_1dʫ'tt@#H 8\ sځ".]|DRx恀;W'ڻE J.mm3X95GyL4'*DecDෘǑYҤ|r9v(:9V'ܔφÜ^C8E)n/t;^nHKhLrzQ5AW*|0 "܍9?` ?w| )ё5 E!\q*/ !Ox ♎Wr= #B̐fFOHH N875@j(v'靦 ĩsYƮ}8LN+pٖ?J5D7ۏ,8vTS{Hjj"8zRerHi ,{yA˅> ]Jw ȮVyrᏚ~%psQ.JH'Y~&t@ 䡷"jDzuCaXNv7>Q$@G/b1NfBlGp ] `p\`B=x@;ןs\&R}.3kq\MrWd0"- ˷طubwu w]з"&[G8N8nR:^wDOr܍ULs.nme`֔7*C4DLEz;4 v$o?,_|]%*2|Ͳ7z2vY K^__ڒ/8k]&DGe5) 1]yp/R(9=m95ò?. "Ձ.ZudDz;Ă!ĹOZ^GΓNbۀ$xv0cD=O[`pВwM_oqHX,SWb> &%(=֛R9* F"iSƶ9a}%yczRH@Ȯ6._Ajj" ga~_qҧp^zL˦TO}D+w|.Hv0ބ@v#a ={y Ed)n)4>%jVn%yGoF?9M>9~X sGb8d@u< u2GÕg&E]v}/1!P>* U*o}||8^xwUFO 9xiG_,'#7,Wyk1-i#J`^r9ˊ7 꺃X;~~ն J 5Rۿ1׉o¼DuNtU!B˪]^=;peOx6 ~`>х^7. T!jq⏴qd|T}ūFuyCF~rGF~a2T6.l}xU=Z5nuѦ/r߰n⃯UM9"Iv@gd~ZUt[a!_9Dwf)_Lʜ~> QFB.JĔ98t*O{Ub>9vi#ެXNnt).5rJSc_K)ٸr:Aڈr.H.") [ }uƦDw!qC 6N*#(!B6 9 M]>d/6>2OAG/_5Ypeޤ<£:~^7RqTtp |"rLU&xb;u /Vec%~]N?T'i&O^u99T'r#RrHus,I<=ϼUT[S%%CY8.ӗ첀 ';3I" |]ec6ԥ`Eݵyq &n 1EBN("B(B!`;=%ʡ֗Xײ5'EO>?OLAvVrFp IDAT_Bh.f|^l2%] } auWiˣRHvCQHs!˺~BnVBB OQUI#Tso`d}}Z]Z9ma-DA h>xRD#^nVq[-:_?v HNCb`1:m' #aȧ C6pT sEnw!7h2 dp| 4pG4Fs 0Ž=lB`v#z'Ats_;\Q>z~_,c:-D'Q>(#G_gc_#9 G5ZD5.M=}HݾkSlBgjHv<Ԕ\0)؇"kO.l}b,j@^0`6U9 ^%Q]O]>Y룈)#.l޶䄽4p쫢YWSӀҟ|rb K9t-eY!d'EQP] ٕk_D쳖RĆ``ʏ* }lA.sY3B: fD0! A*xQq{SgqX$ W8q':dCX&e  5$F:Mdg<Ϧ[>{>?ݚQ 2 2˝)+QslEC}˙'f6m$_gwFKb\d3 nFa#.6](orži;mN\D꜐"m'}TtI:TĨrjnߦc_^%u^'R#'Ƈw 6%(c?j_ǑdC8uEhF"z# HF4@<"$|`&$eNb|.| 14:ǷH 1d{ź JR9+C [fRoXV?ajh`_M-i8bN[S=ii{}ʥWw6hLvaZ%m4ۀE_(Vp]vWRFF}uEb\zH $T z*]z^h 5VVR3F9#}a]j]ǎ_g$jD]"G?n~fkq@8 2ъؑ8a{N2:VjZ8C/q2u#fiWZDYfZ̄*H-^S7r.™b/dPS-,oϙ*g $O ]DDp]9|bGZGT./_r}y n@BUWw&O 9,F{ˌ-]tkٚgU'ڿ㊗ d/~n!y):,K1OGv ! M ֢7G<3?Ab gjCfZYĤJ2g; n sa5/,ցFAӷxbTOF): O:ۗ7]LJ*Ձċ,_W@؄ 8DЁ TLI?iR%ۋ b7rLJ!A>1ᮎ8):i:UwyCB֋uvgU Xo{75;wCϑA$lA7& 9 !պaw,xP .R:ɶ $+aWU㱦}f=͟f͌ Ey^)1̅5?ctLc}cXn]/]HoE8v%j礿ߡJ_dWtv0`oͭ-Ow ECrɬTdWLA\QIhAшm*}:GrO>AqRB) ;,N{ dgUv=ȭ\:܊Nz܌\ 3Hg094e?X!W! &Yf&Xctq4B>1kl)2\pZ^ +_憢yfyu}͓ҭFTRAzQ6;[_HE: .h1c2ɮj,1堳N<]B)!6dPkЈ; H0c*jEB!r( \i,˔pUyԎR ?{k??Jr#C\ތu%?n!zpFkYj{6h8yc)]\gAE%2E(4q+vβ9{S^\znWe֞@@.ɕ6:Hّ&ݬZ@~sPK` fv%(%ZܱLU /k:^ʎ,0hh.]SSo6ΧQ%D s*^wqŸVd&bdlϽ@]笓00ӪZ2&*U/s,d''|[=->wE#F ۍG_8jg*IɠҴʉ /K!vL Xcq4@^(ME'1#X/ۧ?5vXT3ݏ3%)|sol(2ϔ`#{_pY \W8\Y@v5K!:˗ܤybmi]^TNڂ83:K^vȈ6(vBmldWͲԄv$ ŰV\S#۔qC;P ƒ[Dp  n=[1t#*#CԯK/+'c]U##$ÎGU ;HZ/;$11aǗ1;cRl\z~9R1RhrI?ɮT߾6N^u .;5zG*A.&:ޤV ;:^cqwB)' : Ԝkey˧3sߪ{evUX/̞򖵣;bwΟ+u~wd*IY`2sꭟluVdSsҵW=ɮW20;ow9c5^zikdDzS ĐFF Te)7QA uÄS+#HTTq-/Z#}1@Р&6(MUMmd(Fg_P~St7*X9a k8тaFo11#( /,JQȁ]ў3E?y~iN ;Iy8WzvΛ`%ʎ{wNITWP|}Xoqsr#}%>9IG]o9r|ABQ ExHTXRt^fF j@+$p3/ߋ2 L58W)+45.GmG/JmFs=;Ñx97.Z|OE^RUj) J8UUhTtug:C? EUs0ɮ7h"B:cV9e^'й4@JN>+Gϻ?>?Jװ`3!Gm1\\$#!PXG{AGx !YbYt%R$W{])[~in!L'/:OE;}Ê?IyPF&ڠa CP@% |ٳ ֕g_[zZVB JЦ=ꨝU^4DS(+mjP4ryXOdB,>E a?qHd02-/[Xg2dpreSV#עР'D]%ka5^[pڟ˕<(''~zaY60Nv,#!F ,PxKLidHw#R}ӥoS:(qZ\(@*:+ᕊJ3BeӓѐPT,mRn e1d(631=LzUHx XOU6j6@O"p\Dz. 괍Q-ECцWXWpyr|Lb۬Nێ]C3J`'*KG> zɹT,[B7_򘟶dWzړ+'T+IJ3Ҟg|W>4mRrR:/"B*!oRfVWkR=I4FP^g.S9yse$WVi_d(Vnxړ*jEatR.!)-qɪ_s Xni4˃'1;h]#3oQidS>C캯YXXU#T6Nv=!7JJt!NL6A̶dR#u$-#|QY Ex-G''LcZ]S&*k,hW+3լ3b;2eG[? c'+wԕLߒ3ҠBw& &_0z+=5J+6Wj U*ѥ !+aQFR;y⎪3{ݎ8٥wQ[vZ+GV^S}S:Fe]f]oN`\EXPK?F-+!肣?ɪ){/cS8E)>"N $#G g 9x#עF4WIDmXƺ!;,Rx0NvUO]oG K]Zl|2@ 'fOܨn`.2-e{;嚋 G11[bQW!˷ ɵ,a%@oؒZ1 XoTFx@QҜ 'k01bWW&ymUzt<+Ykοz?HmxUTH6"G /j$kWtC.u#r+Ft](NZ˖;0ctNu}ow(!AxLЏ04ՔXF ^$tq,zJl) ,JsE_A jo/LR}7jfdiJz"6a}Yd9S.GMr}V\Th9yVy⧥r|B ..M=.\rW;S%-VFM̚H@831 q#'tw<#R]a4j]q8bAӏX:㘀AJ/tm_XeO!k>Bȍ^~y?Mm{+,L1MiB>h㈵Ö}%t+',zԯVdWݔ:z9b:Z#:d{;ߔXZ9$ZjIs IDAT̽ߖw 6'Lٰ 'sbro3|a|Rm PC2}/?E HylxY0jKkЈ52PqT=U,JiIwN_~ O}SIF(KgJ0ZW-7{+4,<Fg>4핛GRkJߥɻ%,iB)b4-<%0Z׀!ԗPߐMCZaG8ldl@~T< Q ~< }KF(4i$ y,uaO@QxHo.X'aJg4CJi?wƦ|=GU6|!2";Z@Mn4aΔor U| qK|#Ұ7{|9|me4d8R+MiBvžcc@.ЄH[_19>j4/CLF8ъ@p6Yf[KЏ~&sCJAk΂ɮ^'@%5m;XGwWAkΡw˫3q<,ÜG.Ꙙ!fzjɝ*ӈ ( zKAvul=Cj`fi.n s|)BB6dE>y G;6ctcA+ǧS4<퉥#"lYщ~RR؅`IiE)+vD wv_l~.8|Ww驲ZvBpa]tpI('뻇;ڶw|[dOٜd$Wow!x1"@Dק7X;{㍖Di:lz}`҉.Nyd$W op1M}'hg (bk~(JOPCՆæAG=yk?!MxY^_#j\).%rvҕ^1O|g*܊F$:'"M[QE\aRqG:c7qsTC /!G^8u^džKFMm?1NL@E) o09cp[ౡ_F \țkk3KcӣC>tj8S7Ed$xq;ޘ$n|j`ӿ ;M fx^(5nmͺ@\!5Y?qD~Al_w$U@X3Q y3!;:d׵[.iS0<Cl*_1詆` p\sJodNh)gv8oץvwpuˢͼ $焟ŲiDooEvp[ZG_;. ?ߘ#dj(D#~ɏ~^k_4^~DtXmNz[_jgԙ0ָi4-J}?ɯ?Z<48.$TP`$ eYwtEw 7_M FT8zш8Lėu Cx MPKM`|K; /b;'~?@Б0 , /p^miOfu[ZyZOCY* VWG8Ny i@/TcU޻w#}^el[$}z}-onDVͩƳ^ % DXΔH7Q@vCxCSN4U>cCDtgjC켳jX߬ .RH,q\:jw2=BhqOxzd+ygP6^۽ȴ<ֵxAݫEtࢿZU%Gw *wB >n]_l0o$j@PG]eb0<0Ƅ|SeئaFܪ1ȮkYJ}+%6C_^K6(({ṃ6X"pK ֌T/CLYdwr FHŚKu-"u1}̆zX#furߊ2CN%=MP뜡A6R_c/?gbݻp0<=M!#"{7b"$E\f_}8h ɇy3ɫ1Dv`O n) &/9FyNanH{r7\wܱƱjUd߈!JPH]/&{_GHoGE? 5o0꩎@GxӤE|E.SFuozpZ|r@]SgW8u>mkQ]!Դf?Q2(KQC>b6nc_]wOtsQ]!Xpƾ#0=n"^tJU9^1,#4䖆("&+NȎ\ZFgEd'ٸ{0h»EiFz}77Vpj =Wc 8ԝT1w~ݛuVZcdW][祆 j``/ؾLp9ެҫ!}ۻ 9Fkr2*9JN,ۘ;a'Ɗ.N!غKU(ϗG9q:3A}$,80>ذ ޕ2Zi~E9==UyvW<`Un<:;z#/c@}3!OtW[󞢫AmcOT4& Q3q׋vUw݆ᱹ),v$b]?+ v}?}`gE#k G6⫽ɪʻ v& W5vw1Wt|$ű) 1#fkJX3~:qdյ|9'F =iHS¬"ĵ a6q}Mz\ИÎ徨רNobe3"G |l ӯRm~ ]ƻ~UǥOc;<7QܢQ)B)| @.**M>l ;]m{Ǐj.m^Zۤjm)Zű‹ҡѳ?kے=vRC:fOSfsϮcZ[MZݍ QA7I6鶨~L[du7J>/m/h$0&"/kw|;{ϖAwڛii*oAU׮T}aJ'.踚6䆅ʤ%fָ0q潯-|u΋92V3iqE^1LO-O}w={fNڞ+6O-g0=:;h#AQw<9w1<Oj[ _+d{IEm#c +x+uIW$Ӟ>r<_3\iǁ=yepV/Z]TNRnooJ-Mmo~@vl/Eu~@sV7.94;ɰ}SǧvTsc3ݹ_*zH Zj$߸jnIN&q;q3rޮ$}{mg/r4tKT׼o[Z.FA]G2OE[bVQSܰh\7]T0MZ Y]"o>nװת^x,'**rYa$63?=xZCӑ~^C7>Au-4RzE+tv Q8i7. nWۢ$=&I~o>֨v%.]Q/F*xޱ;CY <2:?Z8Ͼ1OiыhX 6*m6hQcO6}QjJIjtY_Q- SP ?:i۶"Ru|4oX[yYb[5!˕ ua4h?66Oo\~ TӇ5Alf0^B1qRG&9W[m(G^㔢G.ݨsFm qT! ;Nm_GݨvQAcL{5m׺VdG)*Z㢤m=Z2!Ƨv2Co'ڨpGX@N% ~ᷨ'L®IzG} o<4zvӄᤁ6M,}\VHkv[_Ԙw/wyE/LwhiZnx=Gv"I{XIUmCҨ$kQzJvǪf3$}f5uԨVkWͨI]҄ݸq/S.쎘 TxUWHmOfH] #sˤJ/tSsUyPZ̖٠m,AƧv[Μʠ+O2ؽ+_UV҆ݨ*t=NܱyC_h:[7n+=LsIFrOF~y<&KcBsP{||ILHOw;k΄igΆTW֞Π+O_J=MX`:ǵIzLIp\_qm; 5LNP?.VDj\F4q3p92S}m/ sߧG}s?kSvBcB]J7ʳ=\:6߷\JjefkMQzpq!7**`[cƍ#6a$/cDMjZY5IpZ;4,6>AltX%nrW%֚ٶf.6*e&oaKGLͅ+t+ uIݘٵ6ܡwPYh]h{p6q}mWۢuxA hTI ~E]lOY؝UBо_10⯈tۙ.*UP?l?KzoVT~uItRut]ze:EIDAT IUlKOok>a]\ʊ A٘.zU,F.؋տoYSNV5aZðzJXvCOy.-'gwaV?hZuRܨmT a_ ic܏/v~Dka'"TfRC3Ɂq ["W]`^,͌~?͠^<%;]4r2[\ŷAڠǎ_Tc6 '96yH5A=U{;5ca@vwHFA0gOpH#b_*o̗4yV[ZU,TunKvm/4KßfΨJ湌'zUӞ~].I7Im ip\ ;/CWiUF'-Lؕ@֬nKGT%4|5Gܗq7g_!7jMo#:Q4rն-.E࠾ 'M6SSMҤ#Q+x?PcZ%Deg~PldgQ2+58|Skgڧ_$joX_I6Kz5$M*+vbosO~Le\. %N.Wj>̤ݬIUÎ ڗ~0t!MLWas+v%4~:"d%f~&ktP{5 ۳ ;&M8~Tk4uzU݅JT2J^>51ٲḧ́hnШۛuW!;M$i[ӏ*㪮`H d묢HYy1zr'Z$ݩ3vö_Xn*Anֈ~WIkNK+v%/33e_]WJ7g?Zy\~ iNǴYoKvۅu& .oZ"Y{yͰS2*G|?m'۵z[kנ6YLk:mmIIrPI?r?|=A_Ty7ctsEehec] !Ikryy-}2v:A'VF%u'A6I4KúUgj2Q ' =;vue /zHy҄^?~21UQ(7Iymf"gZe*h@۴Z gkޭ`K0tZCN(m Fu]o֫Z.dӒ>߶d(=t'=5IDng#FYހ8w'5yYъ }Z\lyfIU/f4zvHM 5_:gU7ۭяiެ 9 GU^U+I4y5e߅~C Rli'0XӒިNfʞsfy/y!-O%_Fk=oagtt%UٚjyzO pR>aSD4uj&_'7I!&$Z :Zn-4E=<}>]RXJeno+9$5%B$}Ϳ=A3NԬI=V@ʊ2ڮ ֹE^Pz]{@۩^cf=;[ELsHE+m j쌺AX e߃+zfJZ'iT\Cͫ-#f_'G/z/fYګ՜BYKlcуq eTX@69_cf7r5/|tsFEYm)zwO@/z_~=SLuC]ݞ k8~nLu8G͢Cژ9 5$4c+_D.2jYoq2 5O=<"̸L1̮mn5Լ AEiٵ*koκz3[\ͪn!w-.eTKWZKPk\n cj|Bn">!S wY{ s~IR3upy]O_\Zff=*.5 [{63y9?Ixl9ΒI3@ Ij^~D\ I$yEaTwI*zM yI.h .fl/J*oOPݭ0-81TOHzICCTw泒V 8I1Ikp_}RpԗVQnU /ˋt+b 5/Y15 ⻋d __8q=S֋Qp?qS{@x$3[^ŧhuIA?U EA.nσI h[:T8S^8mǦf"mq@'p_dEFE86!D2Az !1!az ᇺ ""#~R8 /*eNoWo0Iv N/Ӆ=/*空Wj@7M7dflwE I&r@/*Ϳ"uƼfJ 3U!ϕթKl}ZOoxSre.Y]|t;W@!-y*rKOK:.df7s Eթ$S>55:3[\]{/?ېY͊Z3{Al:G{ @Ex-^G$]mfKl=])F3[ϫ1x^שYU?ސslnky^ifǩ9aH9r$RxC t$}DNt|6$"5W[ ܢ<{_~@#kO?xxwx7%-K%i2CӘ x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/FpN#i^8 x4/F?c"IENDB`morla-0.16.1/icons/Makefile.am000066400000000000000000000001151156343060400160570ustar00rootroot00000000000000EXTRA_DIST = *.png icons_DATA = *.png iconsdir = $(datadir)/@PACKAGE@/icons morla-0.16.1/icons/Makefile.in000066400000000000000000000254351156343060400161040ustar00rootroot00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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 = icons DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(iconsdir)" iconsDATA_INSTALL = $(INSTALL_DATA) DATA = $(icons_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dot = @dot@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ firefox_js_CFLAGS = @firefox_js_CFLAGS@ firefox_js_LIBS = @firefox_js_LIBS@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ gtkhtml_CFLAGS = @gtkhtml_CFLAGS@ gtkhtml_LIBS = @gtkhtml_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ ige_mac_integration_CFLAGS = @ige_mac_integration_CFLAGS@ ige_mac_integration_LIBS = @ige_mac_integration_LIBS@ 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@ rasqal_CFLAGS = @rasqal_CFLAGS@ rasqal_LIBS = @rasqal_LIBS@ redland_CFLAGS = @redland_CFLAGS@ redland_LIBS = @redland_LIBS@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ xulrunner_js_CFLAGS = @xulrunner_js_CFLAGS@ xulrunner_js_LIBS = @xulrunner_js_LIBS@ EXTRA_DIST = *.png icons_DATA = *.png iconsdir = $(datadir)/@PACKAGE@/icons 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu icons/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu icons/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) test -z "$(iconsdir)" || $(mkdir_p) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(iconsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(iconsdir)/$$f'"; \ $(iconsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(iconsdir)/$$f"; \ done uninstall-iconsDATA: @$(NORMAL_UNINSTALL) @list='$(icons_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(iconsdir)/$$f'"; \ rm -f "$(DESTDIR)$(iconsdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(iconsdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-iconsDATA install-exec-am: install-info: install-info-am install-man: 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-iconsDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-iconsDATA install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-iconsDATA uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: morla-0.16.1/install-sh000077500000000000000000000220211156343060400147140ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; 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 for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # 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 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $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 "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: morla-0.16.1/ltmain.sh000066400000000000000000006064671156343060400145560ustar00rootroot00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION="1.5.26 Debian 1.5.26-1ubuntu1" TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; *.sx) xform=sx ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$deplibdir/$depdepl" ; then depdepl="$deplibdir/$depdepl" elif test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" else # Can't find it, oh well... depdepl= fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG 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 fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: morla-0.16.1/missing000077500000000000000000000254061156343060400143210ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: morla-0.16.1/mkinstalldirs000077500000000000000000000013221156343060400155170ustar00rootroot00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here morla-0.16.1/modules/000077500000000000000000000000001156343060400143635ustar00rootroot00000000000000morla-0.16.1/modules/Makefile.am000066400000000000000000000003701156343060400164170ustar00rootroot00000000000000EXTRA_DIST = index.xml incdir = $(libdir)/@PACKAGE@ inc_DATA = index.xml INCLUDES=-I../src pkglib_LTLIBRARIES = libmorla_test.la libmorla_test_la_SOURCES = test.c libmorla_test_la_LDFLAGS = -module -avoid-version pkglibdir=$(libdir)/@PACKAGE@ morla-0.16.1/modules/Makefile.in000066400000000000000000000404111156343060400164300ustar00rootroot00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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 = modules DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(incdir)" pkglibLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(pkglib_LTLIBRARIES) libmorla_test_la_LIBADD = am_libmorla_test_la_OBJECTS = test.lo libmorla_test_la_OBJECTS = $(am_libmorla_test_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libmorla_test_la_SOURCES) DIST_SOURCES = $(libmorla_test_la_SOURCES) incDATA_INSTALL = $(INSTALL_DATA) DATA = $(inc_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibdir = $(libdir)/@PACKAGE@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dot = @dot@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ firefox_js_CFLAGS = @firefox_js_CFLAGS@ firefox_js_LIBS = @firefox_js_LIBS@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ gtkhtml_CFLAGS = @gtkhtml_CFLAGS@ gtkhtml_LIBS = @gtkhtml_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ ige_mac_integration_CFLAGS = @ige_mac_integration_CFLAGS@ ige_mac_integration_LIBS = @ige_mac_integration_LIBS@ 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@ rasqal_CFLAGS = @rasqal_CFLAGS@ rasqal_LIBS = @rasqal_LIBS@ redland_CFLAGS = @redland_CFLAGS@ redland_LIBS = @redland_LIBS@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ xulrunner_js_CFLAGS = @xulrunner_js_CFLAGS@ xulrunner_js_LIBS = @xulrunner_js_LIBS@ EXTRA_DIST = index.xml incdir = $(libdir)/@PACKAGE@ inc_DATA = index.xml INCLUDES = -I../src pkglib_LTLIBRARIES = libmorla_test.la libmorla_test_la_SOURCES = test.c libmorla_test_la_LDFLAGS = -module -avoid-version 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu modules/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu modules/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)" @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \ $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \ else :; fi; \ done uninstall-pkglibLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \ done clean-pkglibLTLIBRARIES: -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmorla_test.la: $(libmorla_test_la_OBJECTS) $(libmorla_test_la_DEPENDENCIES) $(LINK) -rpath $(pkglibdir) $(libmorla_test_la_LDFLAGS) $(libmorla_test_la_OBJECTS) $(libmorla_test_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-incDATA: $(inc_DATA) @$(NORMAL_INSTALL) test -z "$(incdir)" || $(mkdir_p) "$(DESTDIR)$(incdir)" @list='$(inc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(incDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(incdir)/$$f'"; \ $(incDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(incdir)/$$f"; \ done uninstall-incDATA: @$(NORMAL_UNINSTALL) @list='$(inc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(incdir)/$$f'"; \ rm -f "$(DESTDIR)$(incdir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(incdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-incDATA install-exec-am: install-pkglibLTLIBRARIES install-info: install-info-am install-man: 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-incDATA uninstall-info-am \ uninstall-pkglibLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-incDATA install-info install-info-am \ install-man install-pkglibLTLIBRARIES install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-incDATA \ uninstall-info-am uninstall-pkglibLTLIBRARIES # 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: morla-0.16.1/modules/index.xml000066400000000000000000000004551156343060400162200ustar00rootroot00000000000000 morla-0.16.1/modules/test.c000066400000000000000000000033471156343060400155150ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include "morla-module.h" static gboolean open_function (MorlaModule * data, GList ** rdf, gchar ** uri); static gboolean save_function (MorlaModule * data, GList * rdf); static gboolean view_function (MorlaModule * data, GList * rdf); static MorlaModule module = { "Morla Test", open_function, "Morla Test Open", save_function, "Morla Test Save", view_function, "Morla Test View", NULL }; G_MODULE_EXPORT MorlaModule * morla_module_init (void) { return &module; } static gboolean open_function (MorlaModule * data, GList ** rdf, gchar ** uri) { g_message ("Open!"); *uri = g_strdup ("http://test.net/example.rdf"); return TRUE; } static gboolean save_function (MorlaModule * data, GList * rdf) { g_message ("Save!"); return TRUE; } static gboolean view_function (MorlaModule * data, GList * rdf) { g_message ("View!"); return TRUE; } /* EOF */ morla-0.16.1/morla000066400000000000000000000550351156343060400137600ustar00rootroot00000000000000 ]> Andrea Marchesini Category Set the category for this subject. yes Input Set the inputs for this subject. yes 1 0 yes yes no set a comment a this subject yes Comment Default value Set a default value for this input no 1 empty_type yes no no 1 Has Version Set the version of this template Visible Is this input visible? yes Language Does this input need of a language value? yes Long Text Does this input have a long text? yes Default Language Insert a default language value no no Datatype Does this input need of a datatype value? yes Default Language Insert a default datatype value no no RDFS The RDFS for this input 1 Type Value The type of values for this input Minimum Cardinality 0 Minimum Cardinality value for this subject no no 1 Maximum Cardinality Maximum Cardinality value for this subject (0 for infinite) 1 no no 1 yes yes no 1 Label Set the label for this subject. yes no no Function Init The javascript code for the initialize procedure. yes yes no no Function Check The javascript code for the checking procedure. yes yes no no Function Destroy The javascript code for the destroy procedure. yes yes no no Function Save The javascript code for the saving procedure. yes Name Name of this template 1 no no yes no yes no yes no yes no Empty widget for rdf:type no 1 Andrea Marchesini Copyright © 2005-2007 Andrea Marchesini Model for template of morla application/dc+xml A list of alternative literals List of Alternative Literals. A list of alternative resources List of Alternative Resources. The category of this template Category Default value for this property Default Value Has Input Set a input for this template. Set this RDFS for the subject resource. Has RDFS The version of this template Has Version An input for the subject resource. Input Minimum Cardinality value for this subject resource? Minimum Cardinality Maximum Cardinality value for this subject resource? Maximum Cardinality Template The template. Type Value Type of this input. Is this resource visible? (yes or no) Visible Does this literal input need a language? (yes or no) Language Does this literal input need a datatype? (yes or no) Datatype The default datatype for this input Default Datatype The default language for this input Default Language The javascript code for the init procedure Function Init The javascript code for the checking procedure Function Check The javascript code for the destroy procedure Function Destroy The javascript code for the saving procedure Function Save Template for inputs 0.7 Template for templates 0.7 morla-0.16.1/morla.1.in000066400000000000000000000021171156343060400145150ustar00rootroot00000000000000.TH MORLA 1 "9 April 2006" morla "User Commands" .SH NAME morla \- editor and browser of RDF document @VERSION@ .SH SYNOPSIS .B morla [ .I -h .B | .I --help .B ] [ .I -t .B | .I --template .I template_name .B | .I template_uri .B ] [ .I -i .B | .I --import .I template_uri .B ] [ .I files... .B | .I URLs... .B ] .SH DESCRIPTION Morla is a multiplatform editor of RDF documents. It is based on libnxml and librdf libraries. With Morla you can manage more RDF documents simultaneously, visualize graphs and use templates for quick writing. With Morla you can import RDFS documents and use its content to write new RDF triples. Templates are also RDF documents and they make Morla easily personalizeble and expandable. You can also use Morla as RDF navigator, wandering among the net knots of the RDF documents present on internet exactly as we are used to do with normal browsers. Morla is a FreeSoftware project released under license GPL v2.0. .SH AUTHOR .nf morla written by Andrea Marchesini Man page written by Andrea Marchesini morla-0.16.1/morla.sh000066400000000000000000000003451156343060400143630ustar00rootroot00000000000000#!/bin/bash if ! test -e ./morla; then echo "./morla doesn't exit!" exit; fi echo -n "gchar morla_rdfs[] =" > src/morla.h cat ./morla | sed -e 's/"/\\"/g' -e 's/$/\\n"/g' -e 's/^/"/g' >> src/morla.h echo ";" >> src/morla.h morla-0.16.1/po/000077500000000000000000000000001156343060400133315ustar00rootroot00000000000000morla-0.16.1/po/ChangeLog000066400000000000000000000001261156343060400151020ustar00rootroot000000000000002006-04-05 Andrea Marchesini * it: Add Italian translation. morla-0.16.1/po/Makefile.in.in000066400000000000000000000176101156343060400160100ustar00rootroot00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -c -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e "s/^\[.*\] +//" \ -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: morla-0.16.1/po/POTFILES.in000066400000000000000000000005511156343060400151070ustar00rootroot00000000000000src/about.c src/browser.c src/checks.c src/datatype.c src/dialog.c src/edit.c src/editor.h src/file.c src/filechooser.c src/graph.c src/help.c src/info.c src/init.c src/last.c src/main.c src/maker.c src/merge.c src/namespace.c src/navigator.c src/preferences.c src/query.c src/rdf.c src/rdfs.c src/search.c src/splash.c src/template.c src/unredo.c src/update.c morla-0.16.1/po/it.gmo000066400000000000000000001117661156343060400144650ustar00rootroot00000000000000!,,, , - -7-8U-2-?-2.[4.G.R.*+/,V/2/-/5/400O0020T01,1 <1 H1 T1`1 o1}11111 11&1212C2 X2d2m2|22222 222 22 2 23o 3 |333333334(4 /4:4A4H4 Q4 [4e4j444 44445 5)5 =5 K5Y5 j5 t5553676^F666 6667 77/7D7M7 T7b7|7'77 7"7,7 8+8"F8i8 ~8888@8999W9#v99999&: /:P:i::::N:;(;C;L;a;|;;;; ;;N; 8< E<Q< W<c<k<s<{< <<<< <<<<<==7= T=b======d=bP>>>>>>?(? E?Q?2`? ? ?????? ? ?@@@ @(@ 0@>@ G@U@i@ z@ @ @@ @@ AA2AIAcA iAwANAA A AAA BB B (B2BIBcB|B)B@B%C'CEC_C~CCCCC C DD2DGDbD!tDDDDDD DDE EEE!!ECESEhE|E!EEEEE F'FDFVF%hFF F FF FFF FGG&G>GGG\GqGyG GGG G G G%GGGH'H 6HBHFHVHgHwH HHHHHHH II!I@IGI WIdIIII IIIIIJ J J&J.J5JOJhJJJJJJ%J!#KEK$\KKKKKKKKK LL&L8LOLbL#|LLLL LLLMM(MBM[MyMMMM M#M MNNN.N 4N ?N8INNNNNNNNNNO0O5O>OSO dOnOOO\OROMPiP/P8P8P\&QQ Q$QQ Q#QRH5RV~R3RM S9WSASS9STT T$T*T:T IT ST ^T iT wT TTTTTTT TTTTTU UUU%U*U9UV VWWW/W5W DWRWYW_W vW#WW WWW#WXX/X6XiLidi)kii i,i5i% j,0j(]j jj'j!j'jRk(lk%k%k,k&l5l!Ul+wl.l,l%l)%mOm$ommRmm"n(n0n"Fn in!nn nn nDn4oSodojoro{ooooooo ooo/op,1p^p2zpp&pppq%(qNqbqqprrrrr&r$r s-s<=szs ssssssssstt t !t+t :t EtStgt#}t t t%t't u"u7uRu!puu uuVuvv 'v2v7v Kv Yv cv pv|v vv!v/v<,w)iw+ww-wx!x1xFxcx#xxxx#xxy0/y`y~yyyy&y yyyyyyz!0zRzhz!xzzz2zz1{%E{k{~{+{{ {{{ ||%| 8| B|P|&Y| ||| | | |||| }}%$}J}[}v}} }}}}}}}~'~=~S~f~y~~~~~~ ~,~";Xn}  )Hf-x*À(6N+i&ρց$BTj,9)Ec s#)Ӄ!('Hpw&'ʄ!5=Q:c %ʅ&%)="gÆ̆ކ8T8 ͇>8)b~$҈%(CY`<S?K8Ċ<Ȋ " 3A Q _m΋ԋ܋  ",G OY bm r~{ ȎΎݎ (D ]iz&Ïҏُ ߏ .>X!x B< / 9D LV_gltzK3ϑZ/^U#AT\ al p{ Ǔ˓Γӓړޓ * 8C-GE fKx:<3xh*Cp%9bM$[N1R"5  {YB2 t]_`~0W8J'`rEwp $eV P F]/X-&gOJSk=|6+_&t^Y(D[GyqV !5BmM/.liHQ z^uI 9lRes:IO T3 zD sTAumA=a\@,#qo7.+1H0)j,P?}odL<higvv@!aU; 4r?6K \cc'#y4jkL|"%Z 7QW}b>2>fXUZw(FdN;)Sn{n~ with template) without template)%s: (B) %s%s: (L) %s%s: (R) %s%sThe object '%s' is not a base64Binary value (0AF37CD)%sThe object '%s' is not a boolean value (true or false)%sThe object '%s' is not a date value (0001-01-01)%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)%sThe object '%s' is not a decimal value (-12, 20)%sThe object '%s' is not a double value (-1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF)%sThe object '%s' is not a duration value (P1347Y, P1347M and P1Y2MT2H)%sThe object '%s' is not a float value (-1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0)%sThe object '%s' is not a gDay value (DD)%sThe object '%s' is not a gMonth value (05)%sThe object '%s' is not a gMonthDay value (MM:DD)%sThe object '%s' is not a gYear value (2005)%sThe object '%s' is not a gYearMonth value (2005-04)%sThe object '%s' is not a hexBinary value (0AF37CD)%sThe object '%s' is not a time value (00:00:00)'%s' = url or image(This input can be a directory of a remote server)(You can use '%d' if you want specify where the number should be: the_%d_blank_node)... from a file... from an uri(B) (L) (R) GenericObjectPredicate ItemPredicatePreview for these colorsSubjectTemplateTypeA new release of %s is out! Try %s %s!About Libraries...Add RDF triple...Add a new RDF tripleAlternativeArtists:AuthenticationAuthorAuthors:AutoAutomatic ExtensionsBackBackground:BagBase64 encoded binary dataBlank nodeBlank node nameBlank nodesBlanknodeBoldBoolean has the value space required to support the mathematical concept of binary-valued logic: {true, false}.Boolean valueCA Certificate File:CA Certificate SSL FileCategoryCertificate File:Certificate SSL FileChange Prefix for...Close this RDF DocumentClose without save?ClosedClosing...Color:ColorsComment:Comment: CondensedCopyCopy all nodes/archs like thisCopy this RDF tripleCopy this RDFSCreate _GraphCreating graph error!Creating the RDFS morla fileCreating the config fileCutCut all nodes/archs like thisCut this RDF tripleCut this RDFSData and TimeDatatype unknownDatatype:Datatype: DateDateTime values may be viewed as objects with integer-valued year, month, day, hour and minute properties, a decimal-valued second property, and a boolean timezoned property.DayDecimal numberDecimal represents a subset of the real numbers; which can be represented by decimal numerals.Default prefixDeleteDelete all nodes/archs like thisDelete this RDF tripleDelete this RDFSDemoDescriptionDo you want exit from %s?Documentation ServerDomain: DoubleDouble numberDuplicated template '%s'!DurationDuration represents a duration of time.EdgeEditing...Error creating the directory '%s'!Error creating the enviroment for your queryError creating the file '%s'!Error executing the query!Error importing the RDFS document!Error in your query!Error memory!Error opening '%s' resource!Error opening URI %s!Error opening resource '%s'Error opening resource '%s' Try to search some RDFs in this URI?Error opening resource '%s'!Error opening the RDF URI %s!Error opening the RDF file %s!Error opening the RDF resource '%s'Error opening the RDF resultsError opening the RDFS!Error parsing URI '%s'!Error saving the template file!Error saving the template into a file!Error saving the temporary file.Error writing file '%s'!Error writing on RDF file '%s'!Error writing on file.Error writing on the RDF file.Error!Execution of external software error. Check the softwares in your preferences!Exit without save?Exit without save? Check: ExpandedExport a template...Export a template: abortedExport a template: done.Export a template: error.Extra CondensedExtra ExpandedFill Color:Find ResourcesFloat is patterned after the IEEE single-precision 32-bit floating point type.Float numberFont Color:Font:Foreground:Format:ForwardGeneralGnomeGraph saved!GraphsHeavyHelpHighlightingIgnored propertiesImport a RDF URI...Import a RDF URI: abortedImport a RDF file...Import a RDF file: abortedImport a new template...Import a new template: aboutImport as RDFImport as RDF in a new windowImport from a _file...Import from an _URI...Import other RDFS...Import template error!Import this RDFSIn the document this object is a blank node. This triple can create some incongruences You are sure?In the document this object is a resource. This triple can create some incongruences You are sure?Incompatible Prefix!Incompatible RDFS!IndexInfo about an URIInfo about an URI...Info about the selected elementInfo about this RDF DocumentInformationInformation...Input '%s' has no rdfs, label or istance of input!Insert RDFSInterfaceInvalid object!Invalid predicate!Invalid subject!ItalicLabel: Language:Language: Last DocumentsLightListList of RDFsLiteralLiteral nodesLiteral:Max Card.: %dMax Card.: infiniteMemory error ?!?Merge more one RDF in a graph...Meta RDFsMin Card.: %dModify all URIs like this...Modify all nodes/archs like thisModify the RDF resourceModify the prefixModify this RDF URI...Modify this RDF tripleModify this RDF triple...MonthMonth and DayMorla BootSplashNOTATION represents the NOTATION attribute type from XML 1.0 (Second Edition).NameNamespaceNavigatorNetworkNew RDF DocumentNew RDFS...New TagNew Tag...New URI: No RDF Document found!No RDF Document found! %sNo RDF Document present!No RDF Document selected!No URI, name or version for template '%s'No a compatible blank node. Do you want create a automatic name?No a compatible documentation server!No a compatible image viewer!No a compatible resource!No a compatible update server!No a compatible web browser!No a valid URI!No a valid prefix!No a valid proxy value!No compatible URI!No compatible value for input %sNo data found!No errors in your query.No info for this URINo input for template '%s'No selected item!No template in this RDF Document!No updates found!NoneNormalNormal Background:Normal Foreground:Not enough elements for input %sNotationNumber: ObjectObliqueOpenOpen RDF URI for the navigator...Open _navigatorOpen a QUERY file...Open a RDF DocumentOpen a RDF URIOpen a RDF URI with the navigatorOpen a RDF _URIOpen a new RDF file...Open a new RDF file: abortedOpen a template file...Open a template file: abortedOpen a template file: error!Open in a browserOpen in a new tabOpen navigator with this RDF DocumentOpen with this editorOther RDFsOutput formatParsing local dump of '%s'Password:PastePlease Wait...PredicatePreferences...PrefixPrefix already used for namespace '%s'Prefix: Prelight Background:Prelight Foreground:PreviewPropertyProperty: ProxyProxy Password:Proxy Port:Proxy Server:Proxy User:QName represents XML qualified names.Qualified NameQuery a RDF documentQuery a RDF file...Querying done!Question...RDFRDF URI merged!RDF file merged!RDF file saved!RDF file saving...RDF founderRDF triples ignoredRDF/N-TRIPLES formatRDF/N-TRIPLES parser:RDF/TURTLE formatRDF/TURTLE parser:RDF/XML formatRDF/XML parser:RDFSRDFS already present in the list!RDFS: RDFS: %sRDFSs importRDQL (RDF Data Query Language)Range: Reading the config fileReading the template fileRedo editingRemote templatesRenameReset the default tagsResourceResource nodesResource:Resource: ResultsSPARQLSSL Client AuthenticationSave Graph_viz Source AsSave a QUERY in a file...Save in a new RDF file...Save the RDF fileSave the RDF file: abortedSave the graph in a file...Save the graph: abortedSave the graphviz source in a file...Save the graphviz source: abortedSave this RDF DocumentSave this RDF Document as a new fileSave your graphSaving the config fileScale:Search datas...Seconds:Select a Subject!Select a input!Select a item of the list!Select a tag!Select a template!Select some URIs!Select some templates!Select the SubjectSelect your image viewer:Select your last documents history:Select your undo level:Select your web browser:Semi CondensedSemi ExpandedSemiboldSequenceSet %d of %d RDF triplesSet a subject!Set automatic extensions:Set the blank node name:Set the documentation server:Set the update server:Shape:Show error messagesShow info about this elementShow the RDFSShow the graph of this RDF DocumentShow updateShow with popup:SingleSingle input...SmallSmall CapsSoftwaresSome property/class is unknown. Do you want import them?Stretch:StringString:Style:SubjectSure to remove these RDFs?Sure to remove this RDFS ?Sure to remove this tag?Sure to remove this template?Syntax error in file '%s'TagsTemplateTemplate %s importedTemplate edit...Template:Templates importTextThe RDF file '%s' openedThe double datatype is patterned after the IEEE double-precision 64-bit floating point type.The error file does not exist, or your computer has some problem with the network!The file exists. Overwrite?The graphviz source saved!The index can be 0! Active the auto numeration?The input '%s' tries to use a impossibile datatype '%s'.The string datatype represents character strings in XML.The subject of this triple is not a bag, a sequence or a alternative! Do you want create it?The tag cann't be empty!This DocumentThis RDF Document is already opened!This RDF document is empty!This documentThis document has not a XML syntax!This document is empty!This index is already used for this subject! Active the auto numeration?This input '%s' has a alternative list of value but it is not a alternative typevalue!This input '%s' has no a alternative list of value!This input '%s' is novisible but has max_cardinality or min_cardinality != 1!This input '%s' is novisible but has not a defualt value!This template requires other templates. Do you want import them? TimeTime represents an instant of time that recurs every day.TimeoutType:URIURI: Ultra CondensedUltra ExpandedUltraboldUltralightUnderline:Undo and RedoUndo editingUpdate ServerUriUse Gnome Setting:User:Value:Value: Variant:Verify Peer:VersionVisibleWeight:Welcome to RDF editor!X LargeX SmallXX LargeXX SmallYearYear and MonthYour system has not a compatible or stable release of libRDF - Redland (%s). Some RDF document may not be opened. Other ones crash and if it is, morla crashes too. Try to update this library. Lib RDF - Redland copyright: %sYour system has not a stable release of lib Rasqal (%s). Some query may not return true results. Other ones crash and if it is, morla crashes too. Try to update this library (maybe also Redland). Lib Rasqal copyright: %s_Add RDFS_Add from templates_Edit_Export a template_File_Find resource_Find updates_Graph_Help_Import a RDF Document_Information_Merge more RDF Document in a Graph_Modify with templates_Navigator_Open a RDF URI_Open a RDF file_Open the Web Page of Morla Project_Open with Morla_Preferences..._Query_RDFS_Results_Save Graph As_Save file_Search RDF in an URI_Show RDFS_Show templates_Show used Libraries_Special Opening procedure_Special Saving procedure_Template_ViewanyURI represents a Uniform Resource Identifier Reference (URI).base64Binary represents Base64-encoded arbitrary binary data.boldboxcircledasheddiamonddottedeggellipsefalsefilledgDay is a gregorian day that recurs, specifically a day of the month such as the 5th of the month.gMonth is a gregorian month that recurs every year.gMonthDay is a gregorian date that recurs, specifically a day of the year such as the third of May.gYear represents a gregorian calendar year.gYearMonth represents a specific gregorian month in a specific gregorian year.gifgraphhex-encoded binary datahexBinary represents arbitrary hex-encoded binary data.hexagonhouseinvisjpgnavigatornew RDF editor createdno datatypeoctagonparallelogramplaintextpngpsrdfssolidsvgtrapeziumtriangletrueProject-Id-Version: morla 0.6 Report-Msgid-Bugs-To: POT-Creation-Date: 2011-02-07 20:32+0200 PO-Revision-Date: 2007-08-02 11:55+0100 Last-Translator: Andrea Marchesini Language-Team: Italian Language: it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: Italian X-Poedit-Country: ITALY con modello) senza modello)%s: (B) %s%s: (L) %s%s: (R) %s%sL'oggetto '%s' non e' un valore base64Binary (0AF36CD)%sL'oggetto '%s' non e' un valore booleano (true o false)%sL'oggetto '%s' non e' un valore data (0001-01-01)%sL'oggetto '%s' non e' un valore dateTime (0001-01-01T00:00:00)%sL'oggetto '%s' non e' un valore decimale (-12, 20)%sL'oggeto '%s' non e' un double value (-1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF)%sL'oggetto '%s' non e' un valore durata (P1347Y, P1347M and P1Y2MT2H)%sL'oggetto '%s' non e' un valore a virgola mobile (-1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0)%sL'oggetto '%s' non e' un valore gDay (DD)%sL'oggetto '%s' non e' un valore gMonth (05)%sL'oggetto '%s' non e' un valore gMonthDay (MM:DD)%sL'oggetto '%s' non e' un valore gYear (2005)%sL'oggetto '%s' non e' un valore gYearMonth (2005-04)%sL'oggetto '%s' non e' un valore hexBinary (0AF36CD)%sL'oggetto '%s' non e' un valore time (00:00:00)'%s' = uri o immagine(Questo input puoi essere una directory o un server remotato)(Puoi usare '%d' se vuoi specificare dove il numero deve essere inserito nella stringa: nodo_%d_vuoto)... da un file... da un uri(N) (L) (R) GenericoOggettoPredicato numeratoPredicatoAnteprima di questi coloriSoggettoModelloTipologiaUna nuova release di %s è uscita Prova %s %s!Librerie usate...Aggiunta di una tripletta RDF...Aggiungi una nuova tripletta RDFAlternativaArtisti:AutenticazioneAutoreAutori:AutoEstensioni automaticheIndietroSfondo:ListaDato binario encodato in Base64Nodo vuotoName Nodi vuotiNodi vuotiNodo vuotoGrassettoUn booleano ha uno spazio di valori compatibile per il supporto di concetti matematici binari logici: {vero, falso}.Valore BooleanoIl File di Certificato della CA:Certificato SSL della CACategoriaFile del Certificato:Certificato SSLCambia prefisso per...Chiudi questo documento RDFChiudere senza salvare?ChiusoChiusura...Colore:ColoriCommento:Commento: CondensatoCopiaCopia tutti i nodi/archi come questoCopia questra tripletta RDFCopia questo RDFSCrea _GrafoErrore nella creazione del grafo!Creazione del file RDFS di morlaCreazione del file di configurazioneTagliaTaglia tutti i nodi/archi come questoTaglia questra tripletta RDFTaglia questo RDFSData e OraDatatype sconosciutoDatatype:Datatype:DataI valori DateTime possono essere visti come oggetti con valori interi per indicare anno, mese, giorno, ora e minuti, un valore decimale e un booleano per la zonaGiornoNumero decimaleUn decimale rappresenta un sottoinsieme dei numeri reali, i quali possono essere rappresentati da numeri decimali.Prefisso di defaultCancellaCancella tutti i nodi/archi come questoCancella questa tripletta RDFCancella questo RDFSEsempioDescrizioneVuoi uscire da %s?Server di DocumentazioneDominio: DoppioNumero DoubleModello '%s' duplicato!DurataDurata rappresentata una durata in tempo.ArchiModifica...Errore nella creazione della directory '%s'!Errore nella crazione dell'ambiente di interrogazioneErrore nella scrittura del file '%s'!Errore nell'esecuzione della interrogazione!Errore nella lettura del documento RDFS!Query errata!Errore di memoria!Error nell'apertura della risorsa '%s'!Errore nell'apertura dell'URI %s!Errore nell'apertura della risorsa '%s'Errore nell'apertura della risorsa '%s' Provare a ricercare RDF dentro questo URI?Errore nell'apertura della risorsa '%s'!Errore nell'apertura dell'URI RDF %s!Errore nell'apertura del file RDF %s!Errore nell'apertura della risorsa RDF '%s'!Errore nell'apertura dei risultati RDFErrore nell'apertura dell'RDFS!Errore nell'analisi dell'URI '%s'Errore nel salvataggio del file di modello!Errore nel salvataggio del modello in un file!Errore nel salvaaggio di un file temporaneo.Errore nella scrittura del file '%s'!Errore nella scrittura del file RDF '%s'!Errore nella scrittura su file.Errore nella scrittura del file RDF.Errore!Errore di avvio di un programma esterno. Controllare i programmi nelle preferenze!Uscire senza salvare?Uscire senza salvare? Controllare:EspansoEsporta un modello...Esportazione del modello: abortitaEsportazione del modello: fatto.Esportazione del modello: errore.Estra CondensatoEstra EspansoColore di riempimentoTrova RisorseUn numero a virgola mobile e' un numero a singola precisione 32 bit.Numero a vigola mobile (float)Colore del Font:Font:Colore:Formato:AvantiGeneraleGnomeGrafo salvato!GrafiPesanteAiutoColorazioneProprietà ignorateImporta un URI RDF...Importazione di un URI RDF: operazione abortitaImporta un RDF file...Apertura di un RDF file: operazione abortitaImporta un nuovo modello...Importazione un nuovo modello: operazione abortitaImporta come RDFImporta come RDF in una nuova finestraImporta da un _file...Importa da un _URI...Importa altri RDFS...Errore nell'importazione del modello!Importa questo RDFSIn questo documento questo oggetto è un blank node. Questa tripletta può causare qualche incongruenza Sei sicuro di voler continuare?In questo documento questo oggetto è una risorsa. Questa tripletta può causare qualche incongruenza Sei sicuro di voler continuare?Prefisso incompatibile!RDFS incompatibile!IndiceInformazioni su un URIInformazioni su un URI...Informazioni sull'elemento selezionatoInformazioni su questo Documento RDFInformazioneInformazione...L'input '%s' non ha un RDFS, un nome o una istanza di input!Inseriscei RDFSInterfacciaOggetto non valido!Predicato non valido!Soggetto non valido!ItalicoNome: Lingua:Lingua: Ultimi documentiLeggeroListaLista di RDFLetteraleNodi letteraliLetterale:Max Card.: %dMax Card.: infinitoErrore di memoria ?!?Unire più di un RDF in un grafo...RDF nei MetaMin Card.: %dModifica tutti gli URI come questo...Modifica tutti i nodi/archi come questoModifica la risorsa RDFModifica il prefissoModifica questo URI RDF...Modifica questa tripletta RDFModifica questra tripletta RDF...MeseMese e GiornoMorla Scherma di AvvioNOTATION rappresenta un attributo NOTATION nella tipologia XML 1.0 (Seconda Edizione).NomeSpazio di nomiNavigatoreReteNuovo documento RDFNuovo RDFS...Nuovo TagNuovo Tag...Nuovo URI: Nessun documento RDF trovato!Nessun documento RDF trovato! %sNessun documento RDF presente!Nessun documento RDF selezionato!NessunURI, nome o versione per il modello '%s'Incompatibile blank node. Vuoi creare il nome in automatico?Server di documentazione non compatibile!Visualizzatore di immagini non compatibile!Risorsa Incompatibile!Server per gli aggiornamenti non compatibile!Browser web non compatibile!URI non valido!Prefisso non valido!Valore del proxy non valido!URI non compatibile!Valore incompatibile per l'input %sNessun dato trovato!Nessun errore nella tua query.Nessuna informazione per questo URINessun input nel modello '%s'Nessun elemento selezionato!Nessun modello presente in questo documento RDF!Nessun aggiornamento trovato!NienteNormalSfondo normale:Superficie normale:Non abbastanza elementi per l'input %sNotazioneNumero: OggettoObliquoApriApri URI RDF nell navigatore...Apri _navigatoreApri un file di interrogazione...Apri un documento RDFApri un URI RDFApri un URI RDF con il navigatoreApri un _URI RDFApri un nuovo file RDF...Apertura di un nuovo file RDF: operazione abortitaApri un file di modello...Apertura del file di modello: operazione abortitaApertura del file di modello: errore!Apri in un browserApri in una nuova tabApri il navigatore con questo documento RDFApri con questo editorAltri RDFFormato di outputAnalisi del file locale di '%s'Password:IncollaAttendere Prego...PredicatoPreferenze...PrefissoPrefisso già usato dal namespace '%s'Prefisso: Sfondo selezionato:Superficie selezionato:AnteprimaProprietàProprietà: ProxyPassword del Proxy:Porta del Proxy:Proxy Server:Utente del Proxy:QName rappresenta un nome XML valido.Nome qualificatoInterroga un Documento RDFInterroga un file RDF...Query effettuata!Domanda...RDFURI RDF unito!File RDF unito!File RDF salvato!Salvataggio del file RDF...Ricercatore di RDFTriplette RDF ignorateFormato RDF/N-TRIPLESParser RDF/N-TRIPLES:Formato RDF/TURTLEParser RDF/TURTLE:Formato RDF/XMLParser RDF/XML:RDFSRDFS già presente nella lista!RDFS: RDFS: %sRDF importatiRDQL (Linguaggio di Query per Documenti RDF)Range: Lettura del file di configurazioneLettura del file dei modelliRipristina operazioneModelli remotiRinaminaReinserisci i tag di defaultRisorsaNodi di risorseRisorsa:Risorsa:RisultatiSPARQLAutenticazione SSL lato ClientSalva il sorgente Graph_viz ComeSalva questa interrogazione in un file...Salva in un nuovo file RDF...Salve il file RDFSalvataggio del file RDF: operazione abortitaSalva il grafo in un file...Salvataggio del grafo: operazione abortitaSalva il sorgente graphviz in un file...Salvataggio del sorgente graphviz: operazione abortitaSalva questo documento RDFSalva questo documento RDF in un nuovo fileSalva il tuo grafoSalvataggio del file di configurazioneScala:Ricerca dati...Secondi:Seleziona un Soggetto!Seleziona un elemento!Selezionare un elemento della lista!Seleziona un tag!Seleziona un modello!Selezionare qualche RDF!Seleziona qualche modello!Seleziona il SoggettoSeleziona il tuo visualizzatore di immagini:Seleziona il livello di documenti recenti da memorizzare:Seleziona il tuo livello di annullamenti:Seleziona il tuo web browser:Semi CondensatoUltra EspansoSemi GrassettoSequenzaRiconosciute %d di %d triplette RDFInserire un soggetto!Imposta le estensioni in modo automatico:Inserisci il nome dei nodi vuoti:Imposta il server per la documentazione:Imposta il server per gli aggiornamentiForma:Mostra i messaggi di erroreMostra informazioni su questo elementoMostra gli RDFSMostra il grafo di questo documento RDFMostra aggiornamentiMostra con popup:SingoloSingolo elemento...PiccoloCaratteri minuscoliProgrammi esterniQualche proprieta'/classe e' sconosciuta. Vuoi importarle?Stiratura:StringaStringa:Stile:SoggettoSicuro di voler rimuovere questi RDF?Sicuro di voler rimuovere questo RDFS?Sicuro di voler rimuovere questo tag?Sicuro di voler rimuovere questo modello?Errore nell'apertura del file '%s'TagModelloModello %s importatoModifica con modello...Modello:Modelli importatiTestoIl file RDF '%s' è apertoUn numero double e' un numero a 64 bit a virgola mobile.Il file di errore non esiste oppure il tuo computer ha problemi di accesso alla reteIl file esiste. Sovrascrivere?Il Sorgente graphviz è salvato!Attivare l'auto numerazione?L'input '%s' ha cercato di usare un datatype impossibile '%s'.Il datatype stringa rappresenta caratteri stringa in XMLSi vuole crearlo come tale?Il tag non puo' essere vuoto!Questo documentoQuesto documento RDF è già aperto!Questo documento RDF è vuoto!Questo documentoIl documento non ha una sintassi XML!Questo documento è vuoto!Attivare l'auto numerazione?Questo input '%s' ha una alternativa di valori ma non ha una tipologia delle alternative!Questo input '%s' non ha una lista di valori di alternativa!Questo input '%s' è invisibile ma ha un max_cardinality o un min_cardinality != 1!Questo input '%s' è invisibile ma non ha un valore di default!Questo modello richiede altri modelli. Vuoi importarli? OraOra rappresenta un istante di tempo che ricorre ogni giorno.TimeoutTipologia:URIURI: Ultra CondensatoUltra EspansoUltra GrassettoUltra leggeroSottolineato:Annula e RipristinaAnnulla operazioneServer per gli aggiornamentiUriUsa i settaggi di Gnome:User:Valore:Valore: Variante:Verificare Cerficato del server:VersioneVisibileSpessore:Benvenuto nell'editor RDF!X LargoX PiccoloXX LargoXX PiccoloAnnoAnno e MeseQuesto sistema non ha una versione compatibile e stabile di libRDF - Redland (%s). Qualche Documento RDF puo' non essere aperto. Altri possono crashiare provocando un crash di morla. Prova ad aggiornare questa libreria. Lib RDF - Redland copyright: %sQuesto sistema non ha una versione stabile di lib Rasqal (%s). Qualche query potrebbe non ritornare risultati corretti. Altre possono crashiare causando un crash di morla. Prova ad aggiornare questa libreria (probabilmente anche Redland). Copyright Lib Rasqal: %s_Aggiungi un RDFS_Aggiungi da modello_Modifica_Esporta un modello_File_Trova risorse_Cerca aggiornamenti_Grafo_Aiuto_importa un documento RDF_Informazioni_Unire più RDF in un Grafo_Modifica con un modello_Navigatore_Apri un URI RDF_Apri un file RDF_Apri la pagina web del progetto Morla_Apri con Morla_Preferenze..._Query_RDFS_Risultati_Salva Grafo Come_Salva file_Cerca RDF in un URI_Mostra gli RDFS_Mostra Modelli_Mostra le librerie usate_Aperture speciali di documenti_Salvataggi speciali di documenti_Modelli_VisualizzaanyURI rappresenta un Uniform Resource Identifier Reference (URI).base64Binary rappresenta un dato binario encodato in base64.grassettorettangolocerchiopuntinatodiamantepuntatouovoellissefalsoriempitogDay e' un giorno gregoriano che ricorre ogni ogni mese come il 5 del mese.gMonth e' un mese gregoriano che ricorre ogni anno.gMonthDay e' una data gregoriana che ricorra un preciso giorno dell'anno come il 1 Maggio.gYear rappresenta un specifico anno gregoriano.gYearMonth rappresenta uno specifico mese gregoriano e uno specifico anno gregoriano.gifgrafoDati binari encodati in exadecimalehexBinary rappresenta un arbitrario dato encodato in esadecimale.esagonocasainvisibilejpgnavigatoreNuovo editor RDF creatonessun datatypeottagonoparallelogrammasolo testopngpsrdfssolidosvgtrapeziotriangoloveromorla-0.16.1/po/it.po000066400000000000000000001536511156343060400143200ustar00rootroot00000000000000# Italian translations for morla package. # Copyright (C) 2006 THE morla'S COPYRIGHT HOLDER # This file is distributed under the same license as the morla package. # Andrea Marchesini , 2006. # msgid "" msgstr "" "Project-Id-Version: morla 0.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-02-07 20:32+0200\n" "PO-Revision-Date: 2007-08-02 11:55+0100\n" "Last-Translator: Andrea Marchesini \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Italian\n" "X-Poedit-Country: ITALY\n" #: src/about.c:63 msgid "Authors:" msgstr "Autori:" #: src/about.c:72 msgid "Artists:" msgstr "Artisti:" #: src/about.c:117 msgid "About Libraries..." msgstr "Librerie usate..." #: src/checks.c:37 #, c-format msgid "" "Your system has not a stable release of lib Rasqal (%s).\n" "Some query may not return true results. Other ones crash and if it is, morla " "crashes too.\n" "Try to update this library (maybe also Redland).\n" "\n" "Lib Rasqal copyright:\n" "%s" msgstr "" "Questo sistema non ha una versione stabile di lib Rasqal (%s).\n" "Qualche query potrebbe non ritornare risultati corretti. Altre possono " "crashiare causando un crash di morla.\n" "Prova ad aggiornare questa libreria (probabilmente anche Redland).\n" "Copyright Lib Rasqal:\n" "%s" #: src/checks.c:60 #, c-format msgid "" "Your system has not a compatible or stable release of libRDF - Redland " "(%s).\n" "Some RDF document may not be opened. Other ones crash and if it is, morla " "crashes too.\n" "Try to update this library.\n" "\n" "Lib RDF - Redland copyright:\n" "%s" msgstr "" "Questo sistema non ha una versione compatibile e stabile di libRDF - Redland " "(%s).\n" "Qualche Documento RDF puo' non essere aperto. Altri possono crashiare " "provocando un crash di morla.\n" "Prova ad aggiornare questa libreria.\n" "\n" "Lib RDF - Redland copyright:\n" "%s" #: src/datatype.c:70 msgid "no datatype" msgstr "nessun datatype" #: src/datatype.c:74 msgid "String" msgstr "Stringa" #: src/datatype.c:76 msgid "The string datatype represents character strings in XML." msgstr "Il datatype stringa rappresenta caratteri stringa in XML" #: src/datatype.c:80 msgid "Boolean value" msgstr "Valore Booleano" #: src/datatype.c:83 msgid "" "Boolean has the value space required to support the mathematical concept of " "binary-valued logic: {true, false}." msgstr "" "Un booleano ha uno spazio di valori compatibile per il supporto di concetti " "matematici binari logici: {vero, falso}." #: src/datatype.c:87 msgid "Decimal number" msgstr "Numero decimale" #: src/datatype.c:90 msgid "" "Decimal represents a subset of the real numbers; which can be represented by " "decimal numerals." msgstr "" "Un decimale rappresenta un sottoinsieme dei numeri reali, i quali possono " "essere rappresentati da numeri decimali." #: src/datatype.c:94 msgid "Float number" msgstr "Numero a vigola mobile (float)" #: src/datatype.c:97 msgid "" "Float is patterned after the IEEE single-precision 32-bit floating point " "type." msgstr "Un numero a virgola mobile e' un numero a singola precisione 32 bit." #: src/datatype.c:101 msgid "Double number" msgstr "Numero Double" #: src/datatype.c:104 msgid "" "The double datatype is patterned after the IEEE double-precision 64-bit " "floating point type." msgstr "Un numero double e' un numero a 64 bit a virgola mobile." #: src/datatype.c:108 msgid "Duration" msgstr "Durata" #: src/datatype.c:109 msgid "Duration represents a duration of time." msgstr "Durata rappresentata una durata in tempo." #: src/datatype.c:113 msgid "Data and Time" msgstr "Data e Ora" #: src/datatype.c:116 msgid "" "DateTime values may be viewed as objects with integer-valued year, month, " "day, hour and minute properties, a decimal-valued second property, and a " "boolean timezoned property." msgstr "" "I valori DateTime possono essere visti come oggetti con valori interi per " "indicare anno, mese, giorno, ora e minuti, un valore decimale e un booleano " "per la zona" #: src/datatype.c:120 msgid "Time" msgstr "Ora" #: src/datatype.c:122 msgid "Time represents an instant of time that recurs every day." msgstr "Ora rappresenta un istante di tempo che ricorre ogni giorno." #: src/datatype.c:126 msgid "Date" msgstr "Data" #: src/datatype.c:129 msgid "" "The value space of date consists of top-open intervals of exactly one day in " "length on the timelines of dateTime, beginning on the beginning moment of " "each day (in each timezone), i.e. '00:00:00', up to but not including " "'24:00:00' (which is identical with '00:00:00' of the next day)." msgstr "" #: src/datatype.c:133 msgid "Year and Month" msgstr "Anno e Mese" #: src/datatype.c:136 msgid "" "gYearMonth represents a specific gregorian month in a specific gregorian " "year." msgstr "" "gYearMonth rappresenta uno specifico mese gregoriano e uno specifico anno " "gregoriano." #: src/datatype.c:140 msgid "Year" msgstr "Anno" #: src/datatype.c:142 msgid "gYear represents a gregorian calendar year." msgstr "gYear rappresenta un specifico anno gregoriano." #: src/datatype.c:146 msgid "Month and Day" msgstr "Mese e Giorno" #: src/datatype.c:149 msgid "" "gMonthDay is a gregorian date that recurs, specifically a day of the year " "such as the third of May." msgstr "" "gMonthDay e' una data gregoriana che ricorra un preciso giorno dell'anno " "come il 1 Maggio." #: src/datatype.c:153 msgid "Day" msgstr "Giorno" #: src/datatype.c:156 msgid "" "gDay is a gregorian day that recurs, specifically a day of the month such as " "the 5th of the month." msgstr "" "gDay e' un giorno gregoriano che ricorre ogni ogni mese come il 5 del mese." #: src/datatype.c:160 msgid "Month" msgstr "Mese" #: src/datatype.c:162 msgid "gMonth is a gregorian month that recurs every year." msgstr "gMonth e' un mese gregoriano che ricorre ogni anno." #: src/datatype.c:166 msgid "hex-encoded binary data" msgstr "Dati binari encodati in exadecimale" #: src/datatype.c:168 msgid "hexBinary represents arbitrary hex-encoded binary data." msgstr "hexBinary rappresenta un arbitrario dato encodato in esadecimale." #: src/datatype.c:172 msgid "Base64 encoded binary data" msgstr "Dato binario encodato in Base64" #: src/datatype.c:174 msgid "base64Binary represents Base64-encoded arbitrary binary data." msgstr "base64Binary rappresenta un dato binario encodato in base64." #: src/datatype.c:178 msgid "Uri" msgstr "Uri" #: src/datatype.c:180 msgid "anyURI represents a Uniform Resource Identifier Reference (URI)." msgstr "anyURI rappresenta un Uniform Resource Identifier Reference (URI)." #: src/datatype.c:184 msgid "Qualified Name" msgstr "Nome qualificato" #: src/datatype.c:185 msgid "QName represents XML qualified names." msgstr "QName rappresenta un nome XML valido." #: src/datatype.c:189 msgid "Notation" msgstr "Notazione" #: src/datatype.c:192 msgid "" "NOTATION represents the NOTATION attribute type from XML 1.0 (Second " "Edition)." msgstr "" "NOTATION rappresenta un attributo NOTATION nella tipologia XML 1.0 (Seconda " "Edizione)." #: src/datatype.c:230 msgid "Datatype unknown" msgstr "Datatype sconosciuto" #: src/datatype.c:270 #, c-format msgid "%sThe object '%s' is not a boolean value (true or false)" msgstr "%sL'oggetto '%s' non e' un valore booleano (true o false)" #: src/datatype.c:292 #, c-format msgid "%sThe object '%s' is not a decimal value (-12, 20)" msgstr "%sL'oggetto '%s' non e' un valore decimale (-12, 20)" #: src/datatype.c:306 #, c-format msgid "" "%sThe object '%s' is not a float value (-1E4, 1267.43233E12, 12.78e-2, 12 , " "-0, 0)" msgstr "" "%sL'oggetto '%s' non e' un valore a virgola mobile (-1E4, 1267.43233E12, " "12.78e-2, 12 , -0, 0)" #: src/datatype.c:324 #, c-format msgid "" "%sThe object '%s' is not a double value (-1E4, 1267.43233E12, 12.78e-2, 12 , " "-0, 0 and INF)" msgstr "" "%sL'oggeto '%s' non e' un double value (-1E4, 1267.43233E12, 12.78e-2, 12 , " "-0, 0 and INF)" #: src/datatype.c:350 #, c-format msgid "%sThe object '%s' is not a duration value (P1347Y, P1347M and P1Y2MT2H)" msgstr "%sL'oggetto '%s' non e' un valore durata (P1347Y, P1347M and P1Y2MT2H)" #: src/datatype.c:373 src/datatype.c:376 src/datatype.c:379 src/datatype.c:382 #: src/datatype.c:385 src/datatype.c:388 src/datatype.c:391 src/datatype.c:394 #: src/datatype.c:397 src/datatype.c:400 src/datatype.c:403 src/datatype.c:406 #: src/datatype.c:409 src/datatype.c:412 src/datatype.c:415 src/datatype.c:418 #: src/datatype.c:421 src/datatype.c:424 src/datatype.c:427 #, c-format msgid "%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)" msgstr "%sL'oggetto '%s' non e' un valore dateTime (0001-01-01T00:00:00)" #: src/datatype.c:441 src/datatype.c:443 src/datatype.c:445 src/datatype.c:447 #: src/datatype.c:449 src/datatype.c:451 src/datatype.c:453 src/datatype.c:455 #, c-format msgid "%sThe object '%s' is not a time value (00:00:00)" msgstr "%sL'oggetto '%s' non e' un valore time (00:00:00)" #: src/datatype.c:469 src/datatype.c:471 src/datatype.c:473 src/datatype.c:475 #: src/datatype.c:477 src/datatype.c:479 src/datatype.c:481 src/datatype.c:483 #: src/datatype.c:485 src/datatype.c:487 #, c-format msgid "%sThe object '%s' is not a date value (0001-01-01)" msgstr "%sL'oggetto '%s' non e' un valore data (0001-01-01)" #: src/datatype.c:501 src/datatype.c:503 src/datatype.c:505 src/datatype.c:507 #: src/datatype.c:509 src/datatype.c:511 src/datatype.c:513 #, c-format msgid "%sThe object '%s' is not a gYearMonth value (2005-04)" msgstr "%sL'oggetto '%s' non e' un valore gYearMonth (2005-04)" #: src/datatype.c:526 src/datatype.c:527 src/datatype.c:528 src/datatype.c:529 #, c-format msgid "%sThe object '%s' is not a gYear value (2005)" msgstr "%sL'oggetto '%s' non e' un valore gYear (2005)" #: src/datatype.c:542 src/datatype.c:543 #, c-format msgid "%sThe object '%s' is not a gMonth value (05)" msgstr "%sL'oggetto '%s' non e' un valore gMonth (05)" #: src/datatype.c:557 src/datatype.c:559 src/datatype.c:561 src/datatype.c:563 #: src/datatype.c:565 #, c-format msgid "%sThe object '%s' is not a gMonthDay value (MM:DD)" msgstr "%sL'oggetto '%s' non e' un valore gMonthDay (MM:DD)" #: src/datatype.c:578 src/datatype.c:579 #, c-format msgid "%sThe object '%s' is not a gDay value (DD)" msgstr "%sL'oggetto '%s' non e' un valore gDay (DD)" #: src/datatype.c:600 #, c-format msgid "%sThe object '%s' is not a hexBinary value (0AF37CD)" msgstr "%sL'oggetto '%s' non e' un valore hexBinary (0AF36CD)" #: src/datatype.c:629 #, c-format msgid "%sThe object '%s' is not a base64Binary value (0AF37CD)" msgstr "%sL'oggetto '%s' non e' un valore base64Binary (0AF36CD)" #: src/dialog.c:41 src/dialog.c:89 src/edit.c:2233 msgid "Question..." msgstr "Domanda..." #: src/dialog.c:142 src/dialog.c:182 src/navigator.c:1394 src/template.c:5930 msgid "Information..." msgstr "Informazione..." #: src/dialog.c:267 msgid "Show error messages" msgstr "Mostra i messaggi di errore" #: src/dialog.c:304 src/dialog.c:327 msgid "Please Wait..." msgstr "Attendere Prego..." #: src/edit.c:629 msgid "Search datas..." msgstr "Ricerca dati..." #: src/edit.c:661 src/query.c:416 msgid "Results" msgstr "Risultati" #: src/edit.c:702 msgid "Select a item of the list!" msgstr "Selezionare un elemento della lista!" #. Uso editor_triple per la creazione della tripletta #: src/edit.c:1066 msgid "Add RDF triple..." msgstr "Aggiunta di una tripletta RDF..." #. Soggetto risorsa: #: src/edit.c:1149 src/template.c:1937 src/template.c:6101 msgid "Subject" msgstr "Soggetto" #: src/edit.c:1164 src/template.c:1952 src/template.c:6116 msgid "Resource: " msgstr "Risorsa:" #: src/edit.c:1189 src/graph.c:370 src/graph.c:397 src/maker.c:598 #: src/maker.c:1978 src/navigator.c:109 src/template.c:5829 msgid "This Document" msgstr "Questo documento" #: src/edit.c:1207 msgid "Predicate" msgstr "Predicato" #: src/edit.c:1229 src/rdfs.c:366 msgid "RDFS: " msgstr "RDFS: " #: src/edit.c:1319 msgid "Property: " msgstr "Proprietà: " #. I campi di informazione: #: src/edit.c:1364 msgid "Information" msgstr "Informazione" #: src/edit.c:1377 src/navigator.c:1421 msgid "Label: " msgstr "Nome: " #: src/edit.c:1409 src/navigator.c:1471 msgid "Comment: " msgstr "Commento: " #: src/edit.c:1441 src/navigator.c:1521 msgid "Domain: " msgstr "Dominio: " #: src/edit.c:1457 src/navigator.c:1536 msgid "Range: " msgstr "Range: " #: src/edit.c:1474 msgid "Predicate Item" msgstr "Predicato numerato" #: src/edit.c:1493 msgid "Number: " msgstr "Numero: " #: src/edit.c:1506 msgid "Auto" msgstr "Auto" #: src/edit.c:1556 msgid "Object" msgstr "Oggetto" #: src/edit.c:1575 src/preferences.c:1035 src/template.c:4756 msgid "Literal" msgstr "Letterale" #: src/edit.c:1580 src/preferences.c:613 src/template.c:2474 #: src/template.c:4764 src/template.c:5304 msgid "Resource" msgstr "Risorsa" #: src/edit.c:1585 src/preferences.c:824 src/template.c:4773 #: src/template.c:5309 msgid "Blank node" msgstr "Nodo vuoto" #: src/edit.c:1617 msgid "Language: " msgstr "Lingua: " #: src/edit.c:1635 msgid "Datatype: " msgstr "Datatype:" #: src/edit.c:1665 src/template.c:5319 msgid "Value: " msgstr "Valore: " #: src/edit.c:1786 src/template.c:2023 src/template.c:6192 msgid "Invalid subject!" msgstr "Soggetto non valido!" #: src/edit.c:1805 msgid "Invalid predicate!" msgstr "Predicato non valido!" #: src/edit.c:1833 msgid "Invalid object!" msgstr "Oggetto non valido!" #: src/edit.c:1840 msgid "" "In the document this object is a blank node.\n" "This triple can create some incongruences\n" "You are sure?" msgstr "" "In questo documento questo oggetto è un blank node.\n" "Questa tripletta può causare qualche incongruenza\n" "Sei sicuro di voler continuare?" #: src/edit.c:1856 msgid "" "In the document this object is a resource.\n" "This triple can create some incongruences\n" "You are sure?" msgstr "" "In questo documento questo oggetto è una risorsa.\n" "Questa tripletta può causare qualche incongruenza\n" "Sei sicuro di voler continuare?" #: src/edit.c:2098 msgid "Set a subject!" msgstr "Inserire un soggetto!" #: src/edit.c:2172 #, c-format msgid "" "This index is already used for this subject!\n" "Active the auto numeration?" msgstr "Attivare l'auto numerazione?" #: src/edit.c:2176 #, c-format msgid "" "The index can be 0!\n" "Active the auto numeration?" msgstr "Attivare l'auto numerazione?" #: src/edit.c:2251 msgid "" "The subject of this triple is not a bag, a sequence or a alternative!\n" "Do you want create it?" msgstr "Si vuole crearlo come tale?" #: src/edit.c:2255 msgid "Alternative" msgstr "Alternativa" #: src/edit.c:2260 msgid "Sequence" msgstr "Sequenza" #: src/edit.c:2263 msgid "Bag" msgstr "Lista" #: src/edit.c:2346 src/edit.c:2350 msgid "Import a RDF file..." msgstr "Importa un RDF file..." #: src/edit.c:2353 msgid "Import a RDF file: aborted" msgstr "Apertura di un RDF file: operazione abortita" #: src/edit.c:2371 #, c-format msgid "Error opening URI %s!" msgstr "Errore nell'apertura dell'URI %s!" #: src/edit.c:2398 msgid "RDF file merged!" msgstr "File RDF unito!" #: src/edit.c:2419 src/edit.c:2421 msgid "Import a RDF URI..." msgstr "Importa un URI RDF..." #: src/edit.c:2423 msgid "Import a RDF URI: aborted" msgstr "Importazione di un URI RDF: operazione abortita" #: src/edit.c:2438 #, c-format msgid "Error opening the RDF URI %s!" msgstr "Errore nell'apertura dell'URI RDF %s!" #: src/edit.c:2464 msgid "RDF URI merged!" msgstr "URI RDF unito!" #: src/file.c:66 msgid "This RDF Document is already opened!" msgstr "Questo documento RDF è già aperto!" #: src/file.c:87 #, c-format msgid "Error opening the RDF file %s!" msgstr "Errore nell'apertura del file RDF %s!" #: src/file.c:149 #, c-format msgid "Error opening the RDF resource '%s'" msgstr "Errore nell'apertura della risorsa RDF '%s'!" #: src/file.c:188 src/file.c:193 src/merge.c:324 msgid "Open a new RDF file..." msgstr "Apri un nuovo file RDF..." #: src/file.c:196 msgid "Open a new RDF file: aborted" msgstr "Apertura di un nuovo file RDF: operazione abortita" #: src/file.c:207 #, c-format msgid "The RDF file '%s' opened" msgstr "Il file RDF '%s' è aperto" #: src/file.c:229 src/file.c:354 src/graph.c:112 src/graph.c:276 #: src/graph.c:469 src/query.c:155 src/template.c:6040 msgid "This document is empty!" msgstr "Questo documento è vuoto!" #: src/file.c:235 msgid "Save in a new RDF file..." msgstr "Salva in un nuovo file RDF..." #: src/file.c:240 msgid "Save the RDF file" msgstr "Salve il file RDF" #: src/file.c:243 src/file.c:285 src/file.c:298 src/file.c:310 src/file.c:383 msgid "Save the RDF file: aborted" msgstr "Salvataggio del file RDF: operazione abortita" #: src/file.c:283 src/graph.c:297 src/graph.c:491 src/query.c:562 #: src/query.c:1208 msgid "The file exists. Overwrite?" msgstr "Il file esiste. Sovrascrivere?" #: src/file.c:296 msgid "Error writing on file." msgstr "Errore nella scrittura su file." #: src/file.c:307 #, c-format msgid "Error writing on RDF file '%s'!" msgstr "Errore nella scrittura del file RDF '%s'!" #. Sbocco la statusbar e libero la memoria: #. Sblocco la statusbar e ritorno #: src/file.c:341 src/file.c:392 msgid "RDF file saved!" msgstr "File RDF salvato!" #: src/file.c:375 msgid "RDF file saving..." msgstr "Salvataggio del file RDF..." #: src/file.c:381 msgid "Error writing on the RDF file." msgstr "Errore nella scrittura del file RDF." #: src/file.c:420 msgid "Exit without save?" msgstr "Uscire senza salvare?" #: src/file.c:426 msgid "Closing..." msgstr "Chiusura..." #. Sblocco la statusbar #: src/file.c:468 msgid "Closed" msgstr "Chiuso" #: src/file.c:475 #, c-format msgid "Do you want exit from %s?" msgstr "Vuoi uscire da %s?" #. Setto la statusbar: #: src/file.c:496 msgid "new RDF editor created" msgstr "Nuovo editor RDF creato" #: src/filechooser.c:64 msgid "RDF/XML format" msgstr "Formato RDF/XML" #: src/filechooser.c:67 msgid "RDF/N-TRIPLES format" msgstr "Formato RDF/N-TRIPLES" #: src/filechooser.c:70 msgid "RDF/TURTLE format" msgstr "Formato RDF/TURTLE" #: src/filechooser.c:176 msgid "URI: " msgstr "URI: " #: src/filechooser.c:185 msgid "_Preferences..." msgstr "_Preferenze..." #: src/filechooser.c:192 msgid "Authentication" msgstr "Autenticazione" #: src/filechooser.c:201 msgid "User:" msgstr "User:" #: src/filechooser.c:210 src/filechooser.c:237 msgid "Password:" msgstr "Password:" #: src/filechooser.c:217 msgid "SSL Client Authentication" msgstr "Autenticazione SSL lato Client" #: src/filechooser.c:226 msgid "Certificate File:" msgstr "File del Certificato:" #: src/filechooser.c:230 msgid "Certificate SSL File" msgstr "Certificato SSL" #: src/filechooser.c:247 msgid "CA Certificate File:" msgstr "Il File di Certificato della CA:" #: src/filechooser.c:251 msgid "CA Certificate SSL File" msgstr "Certificato SSL della CA" #: src/filechooser.c:258 msgid "Verify Peer:" msgstr "Verificare Cerficato del server:" #: src/filechooser.c:264 msgid "Timeout" msgstr "Timeout" #: src/filechooser.c:273 msgid "Seconds:" msgstr "Secondi:" #: src/filechooser.c:316 msgid "No compatible URI!" msgstr "URI non compatibile!" #: src/graph.c:118 src/graph.c:191 msgid "Creating graph error!" msgstr "Errore nella creazione del grafo!" #: src/graph.c:150 src/main.c:1364 msgid "" "Execution of external software error.\n" "Check the softwares in your preferences!" msgstr "" "Errore di avvio di un programma esterno.\n" "Controllare i programmi nelle preferenze!" #: src/graph.c:282 msgid "Save the graph in a file..." msgstr "Salva il grafo in un file..." #: src/graph.c:287 msgid "Save your graph" msgstr "Salva il tuo grafo" #: src/graph.c:290 src/graph.c:299 src/graph.c:309 msgid "Save the graph: aborted" msgstr "Salvataggio del grafo: operazione abortita" #. Libero memoria, sblocco la statusbar e ritorno: #: src/graph.c:317 msgid "Graph saved!" msgstr "Grafo salvato!" #: src/graph.c:475 src/graph.c:480 msgid "Save the graphviz source in a file..." msgstr "Salva il sorgente graphviz in un file..." #: src/graph.c:484 src/graph.c:493 src/graph.c:503 msgid "Save the graphviz source: aborted" msgstr "Salvataggio del sorgente graphviz: operazione abortita" #. Libero memoria, sblocco la statusbar e ritorno: #: src/graph.c:511 msgid "The graphviz source saved!" msgstr "Il Sorgente graphviz è salvato!" #: src/help.c:362 src/help.c:364 msgid "Error!" msgstr "Errore!" #: src/help.c:366 msgid "" "The error file does not exist, or your computer has some problem with the " "network!" msgstr "" "Il file di errore non esiste oppure il tuo computer ha problemi di accesso " "alla rete" #: src/help.c:445 msgid "Help" msgstr "Aiuto" #: src/help.c:485 msgid "Back" msgstr "Indietro" #: src/help.c:504 msgid "Index" msgstr "Indice" #: src/help.c:524 msgid "Forward" msgstr "Avanti" #: src/info.c:184 msgid "No selected item!" msgstr "Nessun elemento selezionato!" #: src/info.c:203 src/navigator.c:94 msgid "This RDF document is empty!" msgstr "Questo documento RDF è vuoto!" #: src/info.c:216 msgid "Info about an URI" msgstr "Informazioni su un URI" #: src/info.c:237 msgid "Import other RDFS..." msgstr "Importa altri RDFS..." #: src/info.c:248 msgid "Some property/class is unknown. Do you want import them?" msgstr "Qualche proprieta'/classe e' sconosciuta. Vuoi importarle?" #: src/info.c:252 msgid "Ignored properties" msgstr "Proprietà ignorate" #: src/info.c:276 msgid "Property" msgstr "Proprietà" #: src/info.c:375 src/navigator.c:1388 msgid "No info for this URI" msgstr "Nessuna informazione per questo URI" #. Setto il titolo nello splash #: src/init.c:124 msgid "Reading the config file" msgstr "Lettura del file di configurazione" #: src/init.c:128 msgid "Error memory!" msgstr "Errore di memoria!" #: src/init.c:133 src/init.c:139 src/init.c:145 src/init.c:204 src/init.c:213 #: src/init.c:222 src/init.c:269 src/init.c:279 src/init.c:313 src/init.c:470 #: src/init.c:476 src/init.c:482 src/init.c:488 src/init.c:798 src/init.c:811 #: src/init.c:824 src/init.c:837 src/init.c:850 src/init.c:863 src/init.c:876 #, c-format msgid "Syntax error in file '%s'" msgstr "Errore nell'apertura del file '%s'" #. Aggiorno lo splash e parso questo rdfs: #: src/init.c:256 #, c-format msgid "Parsing local dump of '%s'" msgstr "Analisi del file locale di '%s'" #. Splash: #: src/init.c:532 msgid "Creating the config file" msgstr "Creazione del file di configurazione" #: src/init.c:537 src/init.c:548 #, c-format msgid "Error creating the directory '%s'!" msgstr "Errore nella creazione della directory '%s'!" #. Salvo la configurazione appena creata: #: src/init.c:572 msgid "Saving the config file" msgstr "Salvataggio del file di configurazione" #: src/init.c:591 src/query.c:531 src/query.c:1241 #, c-format msgid "Error creating the file '%s'!" msgstr "Errore nella scrittura del file '%s'!" #: src/init.c:1096 msgid "Creating the RDFS morla file" msgstr "Creazione del file RDFS di morla" #: src/init.c:1112 #, c-format msgid "Error writing file '%s'!" msgstr "Errore nella scrittura del file '%s'!" #: src/init.c:1157 msgid "Reading the template file" msgstr "Lettura del file dei modelli" #: src/init.c:1175 msgid "Import template error!" msgstr "Errore nell'importazione del modello!" #: src/last.c:112 msgid "" msgstr "" #: src/main.c:145 src/main.c:940 src/maker.c:199 src/maker.c:223 msgid "New RDF Document" msgstr "Nuovo documento RDF" #. Creo la scritta per il popup: #: src/main.c:161 #, c-format msgid "" "Exit without save?\n" "Check: " msgstr "" "Uscire senza salvare?\n" "Controllare:" #: src/main.c:204 src/main.c:229 src/merge.c:352 msgid "Open a RDF URI" msgstr "Apri un URI RDF" #. MENU FILE #: src/main.c:358 src/query.c:199 msgid "_File" msgstr "_File" #: src/main.c:381 src/merge.c:102 msgid "_Open a RDF file" msgstr "_Apri un file RDF" #: src/main.c:395 msgid "_Open a RDF URI" msgstr "_Apri un URI RDF" #: src/main.c:404 msgid "_Search RDF in an URI" msgstr "_Cerca RDF in un URI" #: src/main.c:413 msgid "_Special Opening procedure" msgstr "_Aperture speciali di documenti" #: src/main.c:427 src/preferences.c:206 msgid "Last Documents" msgstr "Ultimi documenti" #: src/main.c:449 msgid "_Save file" msgstr "_Salva file" #: src/main.c:468 msgid "_Special Saving procedure" msgstr "_Salvataggi speciali di documenti" #. MENU EDIT #: src/main.c:506 src/query.c:259 msgid "_Edit" msgstr "_Modifica" #: src/main.c:535 msgid "_Add from templates" msgstr "_Aggiungi da modello" #: src/main.c:551 msgid "_Modify with templates" msgstr "_Modifica con un modello" #: src/main.c:567 msgid "_Import a RDF Document" msgstr "_importa un documento RDF" #: src/main.c:576 msgid "... from a file" msgstr "... da un file" #: src/main.c:584 msgid "... from an uri" msgstr "... da un uri" #. INFO #: src/main.c:621 msgid "_Information" msgstr "_Informazioni" #: src/main.c:628 msgid "Info about this RDF Document" msgstr "Informazioni su questo Documento RDF" #: src/main.c:644 msgid "Info about the selected element" msgstr "Informazioni sull'elemento selezionato" #: src/main.c:659 msgid "Info about an URI..." msgstr "Informazioni su un URI..." #. TEMPLATE #: src/main.c:674 msgid "_Template" msgstr "_Modelli" #: src/main.c:681 msgid "Import from a _file..." msgstr "Importa da un _file..." #: src/main.c:690 msgid "Import from an _URI..." msgstr "Importa da un _URI..." #: src/main.c:702 msgid "_Export a template" msgstr "_Esporta un modello" #: src/main.c:717 msgid "_Show templates" msgstr "_Mostra Modelli" #. MENU RDFS #: src/main.c:726 msgid "_RDFS" msgstr "_RDFS" #: src/main.c:732 msgid "_Add RDFS" msgstr "_Aggiungi un RDFS" #: src/main.c:744 msgid "_Show RDFS" msgstr "_Mostra gli RDFS" #. MENU VIEW #: src/main.c:752 msgid "_View" msgstr "_Visualizza" #. MENU GRAPH #: src/main.c:761 msgid "_Graph" msgstr "_Grafo" #: src/main.c:767 msgid "Create _Graph" msgstr "Crea _Grafo" #: src/main.c:779 msgid "_Save Graph As" msgstr "_Salva Grafo Come" #: src/main.c:788 msgid "Save Graph_viz Source As" msgstr "Salva il sorgente Graph_viz Come" #: src/main.c:802 msgid "_Merge more RDF Document in a Graph" msgstr "_Unire più RDF in un Grafo" #. MENU NAVIGATOR #: src/main.c:811 msgid "_Navigator" msgstr "_Navigatore" #: src/main.c:817 msgid "Open _navigator" msgstr "Apri _navigatore" #: src/main.c:831 msgid "Open a RDF URI with the navigator" msgstr "Apri un URI RDF con il navigatore" #. MENU QUERY #: src/main.c:840 src/query.c:210 msgid "_Query" msgstr "_Query" #: src/main.c:846 msgid "SPARQL" msgstr "SPARQL" #: src/main.c:856 msgid "RDQL (RDF Data Query Language)" msgstr "RDQL (Linguaggio di Query per Documenti RDF)" #. HELP #: src/main.c:865 msgid "_Help" msgstr "_Aiuto" #: src/main.c:880 msgid "_Find updates" msgstr "_Cerca aggiornamenti" #: src/main.c:891 msgid "_Open the Web Page of Morla Project" msgstr "_Apri la pagina web del progetto Morla" #: src/main.c:905 msgid "_Show used Libraries" msgstr "_Mostra le librerie usate" #: src/main.c:948 msgid "Open a RDF Document" msgstr "Apri un documento RDF" #: src/main.c:959 msgid "Save this RDF Document" msgstr "Salva questo documento RDF" #: src/main.c:967 msgid "Save this RDF Document as a new file" msgstr "Salva questo documento RDF in un nuovo file" #: src/main.c:979 msgid "Undo editing" msgstr "Annulla operazione" #: src/main.c:988 msgid "Redo editing" msgstr "Ripristina operazione" #: src/main.c:999 msgid "Close this RDF Document" msgstr "Chiudi questo documento RDF" #: src/main.c:1011 msgid "Add a new RDF triple" msgstr "Aggiungi una nuova tripletta RDF" #: src/main.c:1028 msgid "Cut" msgstr "Taglia" #: src/main.c:1035 msgid "Copy" msgstr "Copia" #: src/main.c:1042 msgid "Paste" msgstr "Incolla" #: src/main.c:1052 msgid "Delete" msgstr "Cancella" #: src/main.c:1059 msgid "rdfs" msgstr "rdfs" #: src/main.c:1063 msgid "Show the RDFS" msgstr "Mostra gli RDFS" #: src/main.c:1070 msgid "graph" msgstr "grafo" #: src/main.c:1076 msgid "Show the graph of this RDF Document" msgstr "Mostra il grafo di questo documento RDF" #: src/main.c:1084 msgid "navigator" msgstr "navigatore" #: src/main.c:1090 msgid "Open navigator with this RDF Document" msgstr "Apri il navigatore con questo documento RDF" #: src/main.c:1182 msgid "Welcome to RDF editor!" msgstr "Benvenuto nell'editor RDF!" #: src/maker.c:137 msgid "Editing..." msgstr "Modifica..." #: src/maker.c:545 src/template.c:5808 src/template.c:5975 msgid "Subject" msgstr "Soggetto" #: src/maker.c:555 src/template.c:5982 msgid "Predicate" msgstr "Predicato" #: src/maker.c:565 src/template.c:5989 msgid "Object" msgstr "Oggetto" #: src/maker.c:627 msgid "(R) " msgstr "(R) " #: src/maker.c:631 msgid "(L) " msgstr "(L) " #: src/maker.c:635 msgid "(B) " msgstr "(N) " #: src/maker.c:724 msgid "Namespace" msgstr "Spazio di nomi" #: src/maker.c:734 msgid "Prefix" msgstr "Prefisso" #: src/maker.c:744 msgid "Visible" msgstr "Visibile" #: src/maker.c:938 src/maker.c:1121 msgid "Open with this editor" msgstr "Apri con questo editor" #: src/maker.c:953 src/maker.c:1136 src/navigator.c:839 msgid "Open in a browser" msgstr "Apri in un browser" #: src/maker.c:968 msgid "Modify this RDF triple" msgstr "Modifica questa tripletta RDF" #: src/maker.c:981 msgid "Modify all nodes/archs like this" msgstr "Modifica tutti i nodi/archi come questo" #: src/maker.c:997 msgid "Cut all nodes/archs like this" msgstr "Taglia tutti i nodi/archi come questo" #: src/maker.c:1009 msgid "Copy all nodes/archs like this" msgstr "Copia tutti i nodi/archi come questo" #: src/maker.c:1022 msgid "Delete all nodes/archs like this" msgstr "Cancella tutti i nodi/archi come questo" #: src/maker.c:1037 msgid "Cut this RDF triple" msgstr "Taglia questra tripletta RDF" #: src/maker.c:1048 msgid "Copy this RDF triple" msgstr "Copia questra tripletta RDF" #: src/maker.c:1059 msgid "Delete this RDF triple" msgstr "Cancella questa tripletta RDF" #: src/maker.c:1075 msgid "Show info about this element" msgstr "Mostra informazioni su questo elemento" #: src/maker.c:1106 msgid "Import this RDFS" msgstr "Importa questo RDFS" #: src/maker.c:1151 msgid "Modify the RDF resource" msgstr "Modifica la risorsa RDF" #: src/maker.c:1162 msgid "Modify the prefix" msgstr "Modifica il prefisso" #: src/maker.c:1177 msgid "Cut this RDFS" msgstr "Taglia questo RDFS" #: src/maker.c:1188 msgid "Copy this RDFS" msgstr "Copia questo RDFS" #: src/maker.c:1200 msgid "Delete this RDFS" msgstr "Cancella questo RDFS" #: src/maker.c:1372 msgid "Change Prefix for..." msgstr "Cambia prefisso per..." #: src/maker.c:1382 #, c-format msgid "RDFS: %s" msgstr "RDFS: %s" #: src/maker.c:1394 src/rdfs.c:376 msgid "Prefix: " msgstr "Prefisso: " #: src/maker.c:1421 msgid "No a valid prefix!" msgstr "Prefisso non valido!" #: src/maker.c:1459 msgid "Modify all URIs like this..." msgstr "Modifica tutti gli URI come questo..." #: src/maker.c:1471 src/maker.c:1655 msgid "New URI: " msgstr "Nuovo URI: " #: src/maker.c:1498 src/maker.c:1686 msgid "No a valid URI!" msgstr "URI non valido!" #: src/maker.c:1584 msgid "Modify this RDF triple..." msgstr "Modifica questra tripletta RDF..." #: src/maker.c:1643 msgid "Modify this RDF URI..." msgstr "Modifica questo URI RDF..." #: src/maker.c:1806 #, c-format msgid "Error opening '%s' resource!" msgstr "Error nell'apertura della risorsa '%s'!" #: src/merge.c:47 msgid "Merge more one RDF in a graph..." msgstr "Unire più di un RDF in un grafo..." #: src/merge.c:59 msgid "List of RDFs" msgstr "Lista di RDF" #: src/merge.c:83 src/search.c:412 src/search.c:455 msgid "RDF" msgstr "RDF" #: src/merge.c:116 msgid "Open a RDF _URI" msgstr "Apri un _URI RDF" #: src/merge.c:144 msgid "No RDF Document present!" msgstr "Nessun documento RDF presente!" #: src/merge.c:179 #, c-format msgid "Error parsing URI '%s'!" msgstr "Errore nell'analisi dell'URI '%s'" #: src/merge.c:275 msgid "No RDF Document selected!" msgstr "Nessun documento RDF selezionato!" #. Chiedo conferma: #: src/merge.c:280 msgid "Sure to remove these RDFs?" msgstr "Sicuro di voler rimuovere questi RDF?" #: src/navigator.c:138 msgid "Navigator" msgstr "Navigatore" #: src/navigator.c:646 msgid "No data found!" msgstr "Nessun dato trovato!" #: src/navigator.c:797 msgid "Open" msgstr "Apri" #: src/navigator.c:805 msgid "Open in a new tab" msgstr "Apri in una nuova tab" #: src/navigator.c:817 msgid "Import as RDF" msgstr "Importa come RDF" #: src/navigator.c:827 msgid "Import as RDF in a new window" msgstr "Importa come RDF in una nuova finestra" #: src/navigator.c:1028 src/navigator.c:1073 src/navigator.c:1224 #: src/navigator.c:1260 #, c-format msgid "" "Error opening resource '%s'\n" "Try to search some RDFs in this URI?" msgstr "" "Errore nell'apertura della risorsa '%s'\n" "Provare a ricercare RDF dentro questo URI?" #: src/navigator.c:1252 msgid "Open RDF URI for the navigator..." msgstr "Apri URI RDF nell navigatore..." #: src/navigator.c:1297 #, c-format msgid "Error opening resource '%s'!" msgstr "Errore nell'apertura della risorsa '%s'!" #: src/preferences.c:147 msgid "Preferences..." msgstr "Preferenze..." #: src/preferences.c:162 msgid "General" msgstr "Generale" #: src/preferences.c:164 msgid "Softwares" msgstr "Programmi esterni" #: src/preferences.c:173 msgid "Select your web browser:" msgstr "Seleziona il tuo web browser:" #: src/preferences.c:183 msgid "Select your image viewer:" msgstr "Seleziona il tuo visualizzatore di immagini:" #: src/preferences.c:190 #, c-format msgid "'%s' = url or image" msgstr "'%s' = uri o immagine" #: src/preferences.c:193 msgid "Undo and Redo" msgstr "Annula e Ripristina" #: src/preferences.c:199 msgid "Select your undo level:" msgstr "Seleziona il tuo livello di annullamenti:" #: src/preferences.c:212 msgid "Select your last documents history:" msgstr "Seleziona il livello di documenti recenti da memorizzare:" #: src/preferences.c:219 msgid "Show update" msgstr "Mostra aggiornamenti" #: src/preferences.c:225 msgid "Show with popup:" msgstr "Mostra con popup:" #: src/preferences.c:233 msgid "Update Server" msgstr "Server per gli aggiornamenti" #: src/preferences.c:239 msgid "Set the update server:" msgstr "Imposta il server per gli aggiornamenti" #: src/preferences.c:246 msgid "Documentation Server" msgstr "Server di Documentazione" #: src/preferences.c:255 msgid "Set the documentation server:" msgstr "Imposta il server per la documentazione:" #: src/preferences.c:266 msgid "(This input can be a directory of a remote server)" msgstr "(Questo input puoi essere una directory o un server remotato)" #: src/preferences.c:269 msgid "Blank node name" msgstr "Name Nodi vuoti" #: src/preferences.c:278 msgid "Set the blank node name:" msgstr "Inserisci il nome dei nodi vuoti:" #: src/preferences.c:290 #, c-format msgid "" "(You can use '%d' if you want specify where the number should be: the_" "%d_blank_node)" msgstr "" "(Puoi usare '%d' se vuoi specificare dove il numero deve essere inserito " "nella stringa: nodo_%d_vuoto)" #: src/preferences.c:293 msgid "Automatic Extensions" msgstr "Estensioni automatiche" #: src/preferences.c:299 msgid "Set automatic extensions:" msgstr "Imposta le estensioni in modo automatico:" #: src/preferences.c:311 msgid "Interface" msgstr "Interfaccia" #: src/preferences.c:313 msgid "Colors" msgstr "Colori" #: src/preferences.c:322 msgid "Normal Background:" msgstr "Sfondo normale:" #: src/preferences.c:333 msgid "Normal Foreground:" msgstr "Superficie normale:" #: src/preferences.c:344 msgid "Prelight Background:" msgstr "Sfondo selezionato:" #: src/preferences.c:355 msgid "Prelight Foreground:" msgstr "Superficie selezionato:" #: src/preferences.c:363 src/preferences.c:609 src/preferences.c:820 #: src/preferences.c:1031 src/preferences.c:1131 msgid "Preview" msgstr "Anteprima" #: src/preferences.c:404 msgid "Graphs" msgstr "Grafi" #: src/preferences.c:406 msgid "Resource nodes" msgstr "Nodi di risorse" #: src/preferences.c:418 src/preferences.c:629 src/preferences.c:840 #: src/preferences.c:1051 msgid "Color:" msgstr "Colore:" #: src/preferences.c:429 src/preferences.c:640 src/preferences.c:851 #: src/preferences.c:1062 msgid "Font Color:" msgstr "Colore del Font:" #: src/preferences.c:440 src/preferences.c:651 src/preferences.c:862 #: src/preferences.c:1085 src/preferences.c:1430 msgid "Style:" msgstr "Stile:" #: src/preferences.c:446 src/preferences.c:657 src/preferences.c:868 msgid "filled" msgstr "riempito" #: src/preferences.c:449 src/preferences.c:660 src/preferences.c:871 #: src/preferences.c:1091 msgid "solid" msgstr "solido" #: src/preferences.c:452 src/preferences.c:663 src/preferences.c:874 #: src/preferences.c:1094 msgid "dashed" msgstr "puntinato" #: src/preferences.c:455 src/preferences.c:666 src/preferences.c:877 #: src/preferences.c:1097 msgid "dotted" msgstr "puntato" #: src/preferences.c:458 src/preferences.c:669 src/preferences.c:880 #: src/preferences.c:1100 msgid "bold" msgstr "grassetto" #: src/preferences.c:461 src/preferences.c:672 src/preferences.c:883 #: src/preferences.c:1103 msgid "invis" msgstr "invisibile" #: src/preferences.c:498 src/preferences.c:709 src/preferences.c:920 msgid "Fill Color:" msgstr "Colore di riempimento" #: src/preferences.c:509 src/preferences.c:720 src/preferences.c:931 msgid "Shape:" msgstr "Forma:" #: src/preferences.c:515 src/preferences.c:726 src/preferences.c:937 msgid "plaintext" msgstr "solo testo" #: src/preferences.c:518 src/preferences.c:729 src/preferences.c:940 msgid "ellipse" msgstr "ellisse" #: src/preferences.c:521 src/preferences.c:732 src/preferences.c:943 msgid "circle" msgstr "cerchio" #: src/preferences.c:524 src/preferences.c:735 src/preferences.c:946 msgid "egg" msgstr "uovo" #: src/preferences.c:527 src/preferences.c:738 src/preferences.c:949 msgid "triangle" msgstr "triangolo" #: src/preferences.c:530 src/preferences.c:741 src/preferences.c:952 msgid "box" msgstr "rettangolo" #: src/preferences.c:533 src/preferences.c:744 src/preferences.c:955 msgid "diamond" msgstr "diamante" #: src/preferences.c:536 src/preferences.c:747 src/preferences.c:958 msgid "trapezium" msgstr "trapezio" #: src/preferences.c:539 src/preferences.c:750 src/preferences.c:961 msgid "parallelogram" msgstr "parallelogramma" #: src/preferences.c:542 src/preferences.c:753 src/preferences.c:964 msgid "house" msgstr "casa" #: src/preferences.c:545 src/preferences.c:756 src/preferences.c:967 msgid "hexagon" msgstr "esagono" #: src/preferences.c:548 src/preferences.c:759 src/preferences.c:970 msgid "octagon" msgstr "ottagono" #: src/preferences.c:600 src/preferences.c:811 src/preferences.c:1022 #: src/preferences.c:1073 msgid "Font:" msgstr "Font:" #. BLANK NODE #: src/preferences.c:617 msgid "Blank nodes" msgstr "Nodi vuoti" #. LITERAL #: src/preferences.c:828 msgid "Literal nodes" msgstr "Nodi letterali" #. EDGE #: src/preferences.c:1039 msgid "Edge" msgstr "Archi" #. FORMAT #: src/preferences.c:1157 msgid "Output format" msgstr "Formato di output" #: src/preferences.c:1163 msgid "Format:" msgstr "Formato:" #: src/preferences.c:1169 msgid "png" msgstr "png" #: src/preferences.c:1172 msgid "jpg" msgstr "jpg" #: src/preferences.c:1175 msgid "gif" msgstr "gif" #: src/preferences.c:1178 msgid "ps" msgstr "ps" #: src/preferences.c:1181 msgid "svg" msgstr "svg" #: src/preferences.c:1212 msgid "Network" msgstr "Rete" #: src/preferences.c:1217 msgid "Proxy" msgstr "Proxy" #: src/preferences.c:1251 msgid "Proxy Server:" msgstr "Proxy Server:" #: src/preferences.c:1262 msgid "Proxy Port:" msgstr "Porta del Proxy:" #: src/preferences.c:1274 msgid "Proxy User:" msgstr "Utente del Proxy:" #: src/preferences.c:1285 msgid "Proxy Password:" msgstr "Password del Proxy:" #: src/preferences.c:1295 msgid "Gnome" msgstr "Gnome" #: src/preferences.c:1301 msgid "Use Gnome Setting:" msgstr "Usa i settaggi di Gnome:" #: src/preferences.c:1316 src/preferences.c:1321 msgid "Highlighting" msgstr "Colorazione" #: src/preferences.c:1364 msgid "Tags" msgstr "Tag" #: src/preferences.c:1401 msgid "Rename" msgstr "Rinamina" #: src/preferences.c:1436 src/preferences.c:1466 src/preferences.c:1499 #: src/preferences.c:1547 src/preferences.c:1592 msgid "Normal" msgstr "Normal" #: src/preferences.c:1439 msgid "Oblique" msgstr "Obliquo" #: src/preferences.c:1442 msgid "Italic" msgstr "Italico" #: src/preferences.c:1460 msgid "Variant:" msgstr "Variante:" #: src/preferences.c:1469 msgid "Small Caps" msgstr "Caratteri minuscoli" #: src/preferences.c:1487 msgid "Weight:" msgstr "Spessore:" #: src/preferences.c:1493 msgid "Ultralight" msgstr "Ultra leggero" #: src/preferences.c:1496 msgid "Light" msgstr "Leggero" #: src/preferences.c:1502 msgid "Semibold" msgstr "Semi Grassetto" #: src/preferences.c:1505 msgid "Bold" msgstr "Grassetto" #: src/preferences.c:1508 msgid "Ultrabold" msgstr "Ultra Grassetto" #: src/preferences.c:1511 msgid "Heavy" msgstr "Pesante" #: src/preferences.c:1529 msgid "Stretch:" msgstr "Stiratura:" #: src/preferences.c:1535 msgid "Ultra Condensed" msgstr "Ultra Condensato" #: src/preferences.c:1538 msgid "Extra Condensed" msgstr "Estra Condensato" #: src/preferences.c:1541 msgid "Condensed" msgstr "Condensato" #: src/preferences.c:1544 msgid "Semi Condensed" msgstr "Semi Condensato" #: src/preferences.c:1550 msgid "Semi Expanded" msgstr "Ultra Espanso" #: src/preferences.c:1553 msgid "Expanded" msgstr "Espanso" #: src/preferences.c:1556 msgid "Extra Expanded" msgstr "Estra Espanso" #: src/preferences.c:1559 msgid "Ultra Expanded" msgstr "Ultra Espanso" #: src/preferences.c:1577 msgid "Scale:" msgstr "Scala:" #: src/preferences.c:1583 msgid "XX Small" msgstr "XX Piccolo" #: src/preferences.c:1586 msgid "X Small" msgstr "X Piccolo" #: src/preferences.c:1589 msgid "Small" msgstr "Piccolo" #: src/preferences.c:1595 msgid "X Large" msgstr "X Largo" #: src/preferences.c:1598 msgid "XX Large" msgstr "XX Largo" #: src/preferences.c:1616 msgid "Foreground:" msgstr "Colore:" #: src/preferences.c:1628 msgid "Background:" msgstr "Sfondo:" #: src/preferences.c:1640 msgid "Underline:" msgstr "Sottolineato:" #: src/preferences.c:1646 msgid "None" msgstr "Niente" #: src/preferences.c:1649 msgid "Single" msgstr "Singolo" #: src/preferences.c:1652 msgid "Double" msgstr "Doppio" #: src/preferences.c:1667 msgid "Reset the default tags" msgstr "Reinserisci i tag di default" #: src/preferences.c:1672 msgid "Demo" msgstr "Esempio" #: src/preferences.c:1733 msgid "No a compatible web browser!" msgstr "Browser web non compatibile!" #: src/preferences.c:1739 msgid "No a compatible image viewer!" msgstr "Visualizzatore di immagini non compatibile!" #: src/preferences.c:1745 msgid "No a compatible update server!" msgstr "Server per gli aggiornamenti non compatibile!" #: src/preferences.c:1751 msgid "No a compatible documentation server!" msgstr "Server di documentazione non compatibile!" #: src/preferences.c:1759 msgid "No a valid proxy value!" msgstr "Valore del proxy non valido!" #: src/preferences.c:2665 msgid "Preview for these colors" msgstr "Anteprima di questi colori" #: src/preferences.c:2899 msgid "New Tag..." msgstr "Nuovo Tag..." #: src/preferences.c:2911 msgid "New Tag" msgstr "Nuovo Tag" #: src/preferences.c:2937 msgid "The tag cann't be empty!" msgstr "Il tag non puo' essere vuoto!" #: src/preferences.c:2990 src/preferences.c:3018 msgid "Select a tag!" msgstr "Seleziona un tag!" #: src/preferences.c:3022 msgid "Sure to remove this tag?" msgstr "Sicuro di voler rimuovere questo tag?" #: src/query.c:164 msgid "Query a RDF file..." msgstr "Interroga un file RDF..." #: src/query.c:167 msgid "Query a RDF document" msgstr "Interroga un Documento RDF" #: src/query.c:235 msgid "_Results" msgstr "_Risultati" #: src/query.c:242 msgid "_Open with Morla" msgstr "_Apri con Morla" #: src/query.c:265 msgid "_Find resource" msgstr "_Trova risorse" #: src/query.c:357 msgid "Insert RDFS" msgstr "Inseriscei RDFS" #: src/query.c:366 msgid "Find Resources" msgstr "Trova Risorse" #: src/query.c:381 msgid "Text" msgstr "Testo" #: src/query.c:459 msgid "Querying done!" msgstr "Query effettuata!" #: src/query.c:478 msgid "Open a QUERY file..." msgstr "Apri un file di interrogazione..." #: src/query.c:557 src/query.c:1203 msgid "Save a QUERY in a file..." msgstr "Salva questa interrogazione in un file..." #: src/query.c:607 msgid "Close without save?" msgstr "Chiudere senza salvare?" #: src/query.c:660 msgid "Error creating the enviroment for your query" msgstr "Errore nella crazione dell'ambiente di interrogazione" #: src/query.c:681 msgid "Error executing the query!" msgstr "Errore nell'esecuzione della interrogazione!" #: src/query.c:1087 msgid "true" msgstr "vero" #: src/query.c:1087 msgid "false" msgstr "falso" #: src/query.c:1115 msgid "Error saving the temporary file." msgstr "Errore nel salvaaggio di un file temporaneo." #: src/query.c:1174 msgid "Error opening the RDF results" msgstr "Errore nell'apertura dei risultati RDF" #: src/query.c:1449 msgid "Error in your query!" msgstr "Query errata!" #: src/query.c:1454 msgid "No errors in your query." msgstr "Nessun errore nella tua query." #: src/rdf.c:182 msgid "RDF/XML parser:" msgstr "Parser RDF/XML:" #: src/rdf.c:229 msgid "RDF/N-TRIPLES parser:" msgstr "Parser RDF/N-TRIPLES:" #: src/rdf.c:276 msgid "RDF/TURTLE parser:" msgstr "Parser RDF/TURTLE:" #: src/rdfs.c:49 src/rdfs.c:62 msgid "RDFSs import" msgstr "RDF importati" #: src/rdfs.c:89 msgid "RDFS" msgstr "RDFS" #: src/rdfs.c:100 msgid "Default prefix" msgstr "Prefisso di default" #: src/rdfs.c:146 msgid "Sure to remove this RDFS ?" msgstr "Sicuro di voler rimuovere questo RDFS?" #: src/rdfs.c:354 msgid "New RDFS..." msgstr "Nuovo RDFS..." #: src/rdfs.c:414 msgid "Incompatible RDFS!" msgstr "RDFS incompatibile!" #: src/rdfs.c:420 msgid "Incompatible Prefix!" msgstr "Prefisso incompatibile!" #: src/rdfs.c:434 msgid "RDFS already present in the list!" msgstr "RDFS già presente nella lista!" #: src/rdfs.c:443 #, c-format msgid "Prefix already used for namespace '%s'" msgstr "Prefisso già usato dal namespace '%s'" #: src/rdfs.c:469 msgid "Error opening the RDFS!" msgstr "Errore nell'apertura dell'RDFS!" #: src/rdfs.c:490 msgid "Error importing the RDFS document!" msgstr "Errore nella lettura del documento RDFS!" #: src/search.c:201 src/search.c:211 msgid "Memory error ?!?" msgstr "Errore di memoria ?!?" #: src/search.c:225 msgid "This document has not a XML syntax!" msgstr "Il documento non ha una sintassi XML!" #: src/search.c:364 #, c-format msgid "No RDF Document found! %s" msgstr "Nessun documento RDF trovato! %s" #: src/search.c:368 #, c-format msgid "No RDF Document found!" msgstr "Nessun documento RDF trovato!" #: src/search.c:376 msgid "RDF founder" msgstr "Ricercatore di RDF" #: src/search.c:385 msgid "Meta RDFs" msgstr "RDF nei Meta" #: src/search.c:428 msgid "Other RDFs" msgstr "Altri RDF" #: src/search.c:510 msgid "Select some URIs!" msgstr "Selezionare qualche RDF!" #: src/splash.c:87 msgid "Morla BootSplash" msgstr "Morla Scherma di Avvio" #: src/template.c:201 src/template.c:236 #, c-format msgid "Generic" msgstr "Generico" #: src/template.c:270 src/template.c:319 src/template.c:321 msgid "Import a new template..." msgstr "Importa un nuovo modello..." #: src/template.c:275 msgid "Open a template file..." msgstr "Apri un file di modello..." #: src/template.c:278 msgid "Open a template file: aborted" msgstr "Apertura del file di modello: operazione abortita" #: src/template.c:292 src/template.c:334 #, c-format msgid "Template %s imported" msgstr "Modello %s importato" #: src/template.c:299 msgid "Open a template file: error!" msgstr "Apertura del file di modello: errore!" #: src/template.c:323 msgid "Import a new template: about" msgstr "Importazione un nuovo modello: operazione abortita" #: src/template.c:388 #, c-format msgid "Error opening resource '%s'" msgstr "Errore nell'apertura della risorsa '%s'" #: src/template.c:435 msgid "No template in this RDF Document!" msgstr "Nessun modello presente in questo documento RDF!" #: src/template.c:487 #, c-format msgid "Duplicated template '%s'!" msgstr "Modello '%s' duplicato!" #: src/template.c:552 src/template.c:577 #, c-format msgid "No input for template '%s'" msgstr "Nessun input nel modello '%s'" #: src/template.c:558 #, c-format msgid "No URI, name or version for template '%s'" msgstr "NessunURI, nome o versione per il modello '%s'" #: src/template.c:749 #, c-format msgid "Input '%s' has no rdfs, label or istance of input!" msgstr "L'input '%s' non ha un RDFS, un nome o una istanza di input!" #: src/template.c:770 #, c-format msgid "This input '%s' is novisible but has not a defualt value!" msgstr "Questo input '%s' è invisibile ma non ha un valore di default!" #: src/template.c:788 #, c-format msgid "" "This input '%s' is novisible but has max_cardinality or min_cardinality != 1!" msgstr "" "Questo input '%s' è invisibile ma ha un max_cardinality o un " "min_cardinality != 1!" #: src/template.c:809 src/template.c:826 src/template.c:871 #, c-format msgid "" "This input '%s' has a alternative list of value but it is not a alternative " "typevalue!" msgstr "" "Questo input '%s' ha una alternativa di valori ma non ha una tipologia delle " "alternative!" #: src/template.c:840 src/template.c:855 #, c-format msgid "This input '%s' has no a alternative list of value!" msgstr "Questo input '%s' non ha una lista di valori di alternativa!" #: src/template.c:898 #, c-format msgid "The input '%s' tries to use a impossibile datatype '%s'." msgstr "L'input '%s' ha cercato di usare un datatype impossibile '%s'." #: src/template.c:1254 src/template.c:1261 msgid "Error saving the template file!" msgstr "Errore nel salvataggio del file di modello!" #: src/template.c:1290 src/template.c:1295 msgid "Export a template..." msgstr "Esporta un modello..." #: src/template.c:1298 msgid "Export a template: aborted" msgstr "Esportazione del modello: abortita" #: src/template.c:1305 msgid "Error saving the template into a file!" msgstr "Errore nel salvataggio del modello in un file!" #: src/template.c:1306 msgid "Export a template: error." msgstr "Esportazione del modello: errore." #: src/template.c:1319 msgid "Export a template: done." msgstr "Esportazione del modello: fatto." #: src/template.c:1423 src/template.c:1436 msgid "Templates import" msgstr "Modelli importati" #: src/template.c:1463 src/template.c:1928 src/template.c:5277 #: src/template.c:6092 msgid "Template" msgstr "Modello" #: src/template.c:1470 src/update.c:388 msgid "Version" msgstr "Versione" #: src/template.c:1477 msgid "Category" msgstr "Categoria" #: src/template.c:1484 msgid "URI" msgstr "URI" #: src/template.c:1516 src/template.c:1529 msgid "Select a template!" msgstr "Seleziona un modello!" #: src/template.c:1533 msgid "Sure to remove this template?" msgstr "Sicuro di voler rimuovere questo modello?" #: src/template.c:1716 msgid "This template requires other templates. Do you want import them?\n" msgstr "Questo modello richiede altri modelli. Vuoi importarli?\n" #: src/template.c:1977 src/template.c:6141 msgid "This document" msgstr "Questo documento" #: src/template.c:2169 msgid "Select a input!" msgstr "Seleziona un elemento!" #: src/template.c:2216 msgid "Single input..." msgstr "Singolo elemento..." #: src/template.c:2476 msgid "Blanknode" msgstr "Nodo vuoto" #: src/template.c:2479 #, c-format msgid " with template)" msgstr " con modello)" #: src/template.c:2481 #, c-format msgid " without template)" msgstr " senza modello)" #: src/template.c:2495 #, c-format msgid "%s: (L) %s" msgstr "%s: (L) %s" #: src/template.c:2500 #, c-format msgid "%s: (R) %s" msgstr "%s: (R) %s" #: src/template.c:2505 #, c-format msgid "%s: (B) %s" msgstr "%s: (B) %s" #: src/template.c:2562 src/template.c:2649 src/template.c:2691 #: src/template.c:2703 src/template.c:2741 src/template.c:2778 #: src/template.c:2794 src/template.c:2838 src/template.c:2847 #, c-format msgid "No compatible value for input %s" msgstr "Valore incompatibile per l'input %s" #: src/template.c:2872 #, c-format msgid "Not enough elements for input %s" msgstr "Non abbastanza elementi per l'input %s" #: src/template.c:4302 msgid "String:" msgstr "Stringa:" #: src/template.c:4354 src/template.c:4783 msgid "Language:" msgstr "Lingua:" #: src/template.c:4389 src/template.c:4810 msgid "Datatype:" msgstr "Datatype:" #: src/template.c:4449 src/template.c:4555 msgid "Resource:" msgstr "Risorsa:" #: src/template.c:4501 msgid "Literal:" msgstr "Letterale:" #: src/template.c:4625 msgid "Template:" msgstr "Modello:" #: src/template.c:4751 msgid "Type:" msgstr "Tipologia:" #: src/template.c:4840 msgid "Value:" msgstr "Valore:" #: src/template.c:4965 msgid "List" msgstr "Lista" #: src/template.c:5002 #, c-format msgid "Min Card.: %d" msgstr "Min Card.: %d" #: src/template.c:5009 #, c-format msgid "Max Card.: infinite" msgstr "Max Card.: infinito" #: src/template.c:5011 #, c-format msgid "Max Card.: %d" msgstr "Max Card.: %d" #: src/template.c:5187 msgid "Comment:" msgstr "Commento:" #: src/template.c:5285 msgid "Type" msgstr "Tipologia" #: src/template.c:5337 msgid "Template" msgstr "Modello" #: src/template.c:5439 src/template.c:5561 msgid "No a compatible resource!" msgstr "Risorsa Incompatibile!" #: src/template.c:5457 src/template.c:5579 msgid "No a compatible blank node. Do you want create a automatic name?" msgstr "Incompatibile blank node. Vuoi creare il nome in automatico?" #: src/template.c:5769 msgid "Template edit..." msgstr "Modifica con modello..." #: src/template.c:5782 msgid "Select the Subject" msgstr "Seleziona il Soggetto" #: src/template.c:5841 msgid "Select a Subject!" msgstr "Seleziona un Soggetto!" #: src/template.c:5946 #, c-format msgid "Set %d of %d RDF triples" msgstr "Riconosciute %d di %d triplette RDF" #: src/template.c:5951 msgid "RDF triples ignored" msgstr "Triplette RDF ignorate" #: src/update.c:246 #, c-format msgid "" "A new release of %s is out!\n" "Try %s %s!" msgstr "" "Una nuova release di %s è uscita\n" "Prova %s %s!" #: src/update.c:321 msgid "No updates found!" msgstr "Nessun aggiornamento trovato!" #: src/update.c:326 src/update.c:339 msgid "Remote templates" msgstr "Modelli remoti" #: src/update.c:364 msgid "Name" msgstr "Nome" #: src/update.c:372 msgid "Description" msgstr "Descrizione" #: src/update.c:380 msgid "Author" msgstr "Autore" #: src/update.c:417 msgid "Select some templates!" msgstr "Seleziona qualche modello!" #~ msgid "Size:" #~ msgstr "Dimensione:" #~ msgid "Copyright 2005-2006 - GPL - Andrea Marchesini" #~ msgstr "Copyright 2005-2006 - GPL - Andrea Marchesini" morla-0.16.1/po/morla.pot000066400000000000000000001206521156343060400151750ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-02-07 20:32+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/about.c:63 msgid "Authors:" msgstr "" #: src/about.c:72 msgid "Artists:" msgstr "" #: src/about.c:117 msgid "About Libraries..." msgstr "" #: src/checks.c:37 #, c-format msgid "" "Your system has not a stable release of lib Rasqal (%s).\n" "Some query may not return true results. Other ones crash and if it is, morla " "crashes too.\n" "Try to update this library (maybe also Redland).\n" "\n" "Lib Rasqal copyright:\n" "%s" msgstr "" #: src/checks.c:60 #, c-format msgid "" "Your system has not a compatible or stable release of libRDF - Redland " "(%s).\n" "Some RDF document may not be opened. Other ones crash and if it is, morla " "crashes too.\n" "Try to update this library.\n" "\n" "Lib RDF - Redland copyright:\n" "%s" msgstr "" #: src/datatype.c:70 msgid "no datatype" msgstr "" #: src/datatype.c:74 msgid "String" msgstr "" #: src/datatype.c:76 msgid "The string datatype represents character strings in XML." msgstr "" #: src/datatype.c:80 msgid "Boolean value" msgstr "" #: src/datatype.c:83 msgid "" "Boolean has the value space required to support the mathematical concept of " "binary-valued logic: {true, false}." msgstr "" #: src/datatype.c:87 msgid "Decimal number" msgstr "" #: src/datatype.c:90 msgid "" "Decimal represents a subset of the real numbers; which can be represented by " "decimal numerals." msgstr "" #: src/datatype.c:94 msgid "Float number" msgstr "" #: src/datatype.c:97 msgid "" "Float is patterned after the IEEE single-precision 32-bit floating point " "type." msgstr "" #: src/datatype.c:101 msgid "Double number" msgstr "" #: src/datatype.c:104 msgid "" "The double datatype is patterned after the IEEE double-precision 64-bit " "floating point type." msgstr "" #: src/datatype.c:108 msgid "Duration" msgstr "" #: src/datatype.c:109 msgid "Duration represents a duration of time." msgstr "" #: src/datatype.c:113 msgid "Data and Time" msgstr "" #: src/datatype.c:116 msgid "" "DateTime values may be viewed as objects with integer-valued year, month, " "day, hour and minute properties, a decimal-valued second property, and a " "boolean timezoned property." msgstr "" #: src/datatype.c:120 msgid "Time" msgstr "" #: src/datatype.c:122 msgid "Time represents an instant of time that recurs every day." msgstr "" #: src/datatype.c:126 msgid "Date" msgstr "" #: src/datatype.c:129 msgid "" "The value space of date consists of top-open intervals of exactly one day in " "length on the timelines of dateTime, beginning on the beginning moment of " "each day (in each timezone), i.e. '00:00:00', up to but not including " "'24:00:00' (which is identical with '00:00:00' of the next day)." msgstr "" #: src/datatype.c:133 msgid "Year and Month" msgstr "" #: src/datatype.c:136 msgid "" "gYearMonth represents a specific gregorian month in a specific gregorian " "year." msgstr "" #: src/datatype.c:140 msgid "Year" msgstr "" #: src/datatype.c:142 msgid "gYear represents a gregorian calendar year." msgstr "" #: src/datatype.c:146 msgid "Month and Day" msgstr "" #: src/datatype.c:149 msgid "" "gMonthDay is a gregorian date that recurs, specifically a day of the year " "such as the third of May." msgstr "" #: src/datatype.c:153 msgid "Day" msgstr "" #: src/datatype.c:156 msgid "" "gDay is a gregorian day that recurs, specifically a day of the month such as " "the 5th of the month." msgstr "" #: src/datatype.c:160 msgid "Month" msgstr "" #: src/datatype.c:162 msgid "gMonth is a gregorian month that recurs every year." msgstr "" #: src/datatype.c:166 msgid "hex-encoded binary data" msgstr "" #: src/datatype.c:168 msgid "hexBinary represents arbitrary hex-encoded binary data." msgstr "" #: src/datatype.c:172 msgid "Base64 encoded binary data" msgstr "" #: src/datatype.c:174 msgid "base64Binary represents Base64-encoded arbitrary binary data." msgstr "" #: src/datatype.c:178 msgid "Uri" msgstr "" #: src/datatype.c:180 msgid "anyURI represents a Uniform Resource Identifier Reference (URI)." msgstr "" #: src/datatype.c:184 msgid "Qualified Name" msgstr "" #: src/datatype.c:185 msgid "QName represents XML qualified names." msgstr "" #: src/datatype.c:189 msgid "Notation" msgstr "" #: src/datatype.c:192 msgid "" "NOTATION represents the NOTATION attribute type from XML 1.0 (Second " "Edition)." msgstr "" #: src/datatype.c:230 msgid "Datatype unknown" msgstr "" #: src/datatype.c:270 #, c-format msgid "%sThe object '%s' is not a boolean value (true or false)" msgstr "" #: src/datatype.c:292 #, c-format msgid "%sThe object '%s' is not a decimal value (-12, 20)" msgstr "" #: src/datatype.c:306 #, c-format msgid "" "%sThe object '%s' is not a float value (-1E4, 1267.43233E12, 12.78e-2, 12 , " "-0, 0)" msgstr "" #: src/datatype.c:324 #, c-format msgid "" "%sThe object '%s' is not a double value (-1E4, 1267.43233E12, 12.78e-2, 12 , " "-0, 0 and INF)" msgstr "" #: src/datatype.c:350 #, c-format msgid "%sThe object '%s' is not a duration value (P1347Y, P1347M and P1Y2MT2H)" msgstr "" #: src/datatype.c:373 src/datatype.c:376 src/datatype.c:379 src/datatype.c:382 #: src/datatype.c:385 src/datatype.c:388 src/datatype.c:391 src/datatype.c:394 #: src/datatype.c:397 src/datatype.c:400 src/datatype.c:403 src/datatype.c:406 #: src/datatype.c:409 src/datatype.c:412 src/datatype.c:415 src/datatype.c:418 #: src/datatype.c:421 src/datatype.c:424 src/datatype.c:427 #, c-format msgid "%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)" msgstr "" #: src/datatype.c:441 src/datatype.c:443 src/datatype.c:445 src/datatype.c:447 #: src/datatype.c:449 src/datatype.c:451 src/datatype.c:453 src/datatype.c:455 #, c-format msgid "%sThe object '%s' is not a time value (00:00:00)" msgstr "" #: src/datatype.c:469 src/datatype.c:471 src/datatype.c:473 src/datatype.c:475 #: src/datatype.c:477 src/datatype.c:479 src/datatype.c:481 src/datatype.c:483 #: src/datatype.c:485 src/datatype.c:487 #, c-format msgid "%sThe object '%s' is not a date value (0001-01-01)" msgstr "" #: src/datatype.c:501 src/datatype.c:503 src/datatype.c:505 src/datatype.c:507 #: src/datatype.c:509 src/datatype.c:511 src/datatype.c:513 #, c-format msgid "%sThe object '%s' is not a gYearMonth value (2005-04)" msgstr "" #: src/datatype.c:526 src/datatype.c:527 src/datatype.c:528 src/datatype.c:529 #, c-format msgid "%sThe object '%s' is not a gYear value (2005)" msgstr "" #: src/datatype.c:542 src/datatype.c:543 #, c-format msgid "%sThe object '%s' is not a gMonth value (05)" msgstr "" #: src/datatype.c:557 src/datatype.c:559 src/datatype.c:561 src/datatype.c:563 #: src/datatype.c:565 #, c-format msgid "%sThe object '%s' is not a gMonthDay value (MM:DD)" msgstr "" #: src/datatype.c:578 src/datatype.c:579 #, c-format msgid "%sThe object '%s' is not a gDay value (DD)" msgstr "" #: src/datatype.c:600 #, c-format msgid "%sThe object '%s' is not a hexBinary value (0AF37CD)" msgstr "" #: src/datatype.c:629 #, c-format msgid "%sThe object '%s' is not a base64Binary value (0AF37CD)" msgstr "" #: src/dialog.c:41 src/dialog.c:89 src/edit.c:2233 msgid "Question..." msgstr "" #: src/dialog.c:142 src/dialog.c:182 src/navigator.c:1394 src/template.c:5930 msgid "Information..." msgstr "" #: src/dialog.c:267 msgid "Show error messages" msgstr "" #: src/dialog.c:304 src/dialog.c:327 msgid "Please Wait..." msgstr "" #: src/edit.c:629 msgid "Search datas..." msgstr "" #: src/edit.c:661 src/query.c:416 msgid "Results" msgstr "" #: src/edit.c:702 msgid "Select a item of the list!" msgstr "" #. Uso editor_triple per la creazione della tripletta #: src/edit.c:1066 msgid "Add RDF triple..." msgstr "" #. Soggetto risorsa: #: src/edit.c:1149 src/template.c:1937 src/template.c:6101 msgid "Subject" msgstr "" #: src/edit.c:1164 src/template.c:1952 src/template.c:6116 msgid "Resource: " msgstr "" #: src/edit.c:1189 src/graph.c:370 src/graph.c:397 src/maker.c:598 #: src/maker.c:1978 src/navigator.c:109 src/template.c:5829 msgid "This Document" msgstr "" #: src/edit.c:1207 msgid "Predicate" msgstr "" #: src/edit.c:1229 src/rdfs.c:366 msgid "RDFS: " msgstr "" #: src/edit.c:1319 msgid "Property: " msgstr "" #. I campi di informazione: #: src/edit.c:1364 msgid "Information" msgstr "" #: src/edit.c:1377 src/navigator.c:1421 msgid "Label: " msgstr "" #: src/edit.c:1409 src/navigator.c:1471 msgid "Comment: " msgstr "" #: src/edit.c:1441 src/navigator.c:1521 msgid "Domain: " msgstr "" #: src/edit.c:1457 src/navigator.c:1536 msgid "Range: " msgstr "" #: src/edit.c:1474 msgid "Predicate Item" msgstr "" #: src/edit.c:1493 msgid "Number: " msgstr "" #: src/edit.c:1506 msgid "Auto" msgstr "" #: src/edit.c:1556 msgid "Object" msgstr "" #: src/edit.c:1575 src/preferences.c:1035 src/template.c:4756 msgid "Literal" msgstr "" #: src/edit.c:1580 src/preferences.c:613 src/template.c:2474 #: src/template.c:4764 src/template.c:5304 msgid "Resource" msgstr "" #: src/edit.c:1585 src/preferences.c:824 src/template.c:4773 #: src/template.c:5309 msgid "Blank node" msgstr "" #: src/edit.c:1617 msgid "Language: " msgstr "" #: src/edit.c:1635 msgid "Datatype: " msgstr "" #: src/edit.c:1665 src/template.c:5319 msgid "Value: " msgstr "" #: src/edit.c:1786 src/template.c:2023 src/template.c:6192 msgid "Invalid subject!" msgstr "" #: src/edit.c:1805 msgid "Invalid predicate!" msgstr "" #: src/edit.c:1833 msgid "Invalid object!" msgstr "" #: src/edit.c:1840 msgid "" "In the document this object is a blank node.\n" "This triple can create some incongruences\n" "You are sure?" msgstr "" #: src/edit.c:1856 msgid "" "In the document this object is a resource.\n" "This triple can create some incongruences\n" "You are sure?" msgstr "" #: src/edit.c:2098 msgid "Set a subject!" msgstr "" #: src/edit.c:2172 #, c-format msgid "" "This index is already used for this subject!\n" "Active the auto numeration?" msgstr "" #: src/edit.c:2176 #, c-format msgid "" "The index can be 0!\n" "Active the auto numeration?" msgstr "" #: src/edit.c:2251 msgid "" "The subject of this triple is not a bag, a sequence or a alternative!\n" "Do you want create it?" msgstr "" #: src/edit.c:2255 msgid "Alternative" msgstr "" #: src/edit.c:2260 msgid "Sequence" msgstr "" #: src/edit.c:2263 msgid "Bag" msgstr "" #: src/edit.c:2346 src/edit.c:2350 msgid "Import a RDF file..." msgstr "" #: src/edit.c:2353 msgid "Import a RDF file: aborted" msgstr "" #: src/edit.c:2371 #, c-format msgid "Error opening URI %s!" msgstr "" #: src/edit.c:2398 msgid "RDF file merged!" msgstr "" #: src/edit.c:2419 src/edit.c:2421 msgid "Import a RDF URI..." msgstr "" #: src/edit.c:2423 msgid "Import a RDF URI: aborted" msgstr "" #: src/edit.c:2438 #, c-format msgid "Error opening the RDF URI %s!" msgstr "" #: src/edit.c:2464 msgid "RDF URI merged!" msgstr "" #: src/file.c:66 msgid "This RDF Document is already opened!" msgstr "" #: src/file.c:87 #, c-format msgid "Error opening the RDF file %s!" msgstr "" #: src/file.c:149 #, c-format msgid "Error opening the RDF resource '%s'" msgstr "" #: src/file.c:188 src/file.c:193 src/merge.c:324 msgid "Open a new RDF file..." msgstr "" #: src/file.c:196 msgid "Open a new RDF file: aborted" msgstr "" #: src/file.c:207 #, c-format msgid "The RDF file '%s' opened" msgstr "" #: src/file.c:229 src/file.c:354 src/graph.c:112 src/graph.c:276 #: src/graph.c:469 src/query.c:155 src/template.c:6040 msgid "This document is empty!" msgstr "" #: src/file.c:235 msgid "Save in a new RDF file..." msgstr "" #: src/file.c:240 msgid "Save the RDF file" msgstr "" #: src/file.c:243 src/file.c:285 src/file.c:298 src/file.c:310 src/file.c:383 msgid "Save the RDF file: aborted" msgstr "" #: src/file.c:283 src/graph.c:297 src/graph.c:491 src/query.c:562 #: src/query.c:1208 msgid "The file exists. Overwrite?" msgstr "" #: src/file.c:296 msgid "Error writing on file." msgstr "" #: src/file.c:307 #, c-format msgid "Error writing on RDF file '%s'!" msgstr "" #. Sbocco la statusbar e libero la memoria: #. Sblocco la statusbar e ritorno #: src/file.c:341 src/file.c:392 msgid "RDF file saved!" msgstr "" #: src/file.c:375 msgid "RDF file saving..." msgstr "" #: src/file.c:381 msgid "Error writing on the RDF file." msgstr "" #: src/file.c:420 msgid "Exit without save?" msgstr "" #: src/file.c:426 msgid "Closing..." msgstr "" #. Sblocco la statusbar #: src/file.c:468 msgid "Closed" msgstr "" #: src/file.c:475 #, c-format msgid "Do you want exit from %s?" msgstr "" #. Setto la statusbar: #: src/file.c:496 msgid "new RDF editor created" msgstr "" #: src/filechooser.c:64 msgid "RDF/XML format" msgstr "" #: src/filechooser.c:67 msgid "RDF/N-TRIPLES format" msgstr "" #: src/filechooser.c:70 msgid "RDF/TURTLE format" msgstr "" #: src/filechooser.c:176 msgid "URI: " msgstr "" #: src/filechooser.c:185 msgid "_Preferences..." msgstr "" #: src/filechooser.c:192 msgid "Authentication" msgstr "" #: src/filechooser.c:201 msgid "User:" msgstr "" #: src/filechooser.c:210 src/filechooser.c:237 msgid "Password:" msgstr "" #: src/filechooser.c:217 msgid "SSL Client Authentication" msgstr "" #: src/filechooser.c:226 msgid "Certificate File:" msgstr "" #: src/filechooser.c:230 msgid "Certificate SSL File" msgstr "" #: src/filechooser.c:247 msgid "CA Certificate File:" msgstr "" #: src/filechooser.c:251 msgid "CA Certificate SSL File" msgstr "" #: src/filechooser.c:258 msgid "Verify Peer:" msgstr "" #: src/filechooser.c:264 msgid "Timeout" msgstr "" #: src/filechooser.c:273 msgid "Seconds:" msgstr "" #: src/filechooser.c:316 msgid "No compatible URI!" msgstr "" #: src/graph.c:118 src/graph.c:191 msgid "Creating graph error!" msgstr "" #: src/graph.c:150 src/main.c:1364 msgid "" "Execution of external software error.\n" "Check the softwares in your preferences!" msgstr "" #: src/graph.c:282 msgid "Save the graph in a file..." msgstr "" #: src/graph.c:287 msgid "Save your graph" msgstr "" #: src/graph.c:290 src/graph.c:299 src/graph.c:309 msgid "Save the graph: aborted" msgstr "" #. Libero memoria, sblocco la statusbar e ritorno: #: src/graph.c:317 msgid "Graph saved!" msgstr "" #: src/graph.c:475 src/graph.c:480 msgid "Save the graphviz source in a file..." msgstr "" #: src/graph.c:484 src/graph.c:493 src/graph.c:503 msgid "Save the graphviz source: aborted" msgstr "" #. Libero memoria, sblocco la statusbar e ritorno: #: src/graph.c:511 msgid "The graphviz source saved!" msgstr "" #: src/help.c:362 src/help.c:364 msgid "Error!" msgstr "" #: src/help.c:366 msgid "" "The error file does not exist, or your computer has some problem with the " "network!" msgstr "" #: src/help.c:445 msgid "Help" msgstr "" #: src/help.c:485 msgid "Back" msgstr "" #: src/help.c:504 msgid "Index" msgstr "" #: src/help.c:524 msgid "Forward" msgstr "" #: src/info.c:184 msgid "No selected item!" msgstr "" #: src/info.c:203 src/navigator.c:94 msgid "This RDF document is empty!" msgstr "" #: src/info.c:216 msgid "Info about an URI" msgstr "" #: src/info.c:237 msgid "Import other RDFS..." msgstr "" #: src/info.c:248 msgid "Some property/class is unknown. Do you want import them?" msgstr "" #: src/info.c:252 msgid "Ignored properties" msgstr "" #: src/info.c:276 msgid "Property" msgstr "" #: src/info.c:375 src/navigator.c:1388 msgid "No info for this URI" msgstr "" #. Setto il titolo nello splash #: src/init.c:124 msgid "Reading the config file" msgstr "" #: src/init.c:128 msgid "Error memory!" msgstr "" #: src/init.c:133 src/init.c:139 src/init.c:145 src/init.c:204 src/init.c:213 #: src/init.c:222 src/init.c:269 src/init.c:279 src/init.c:313 src/init.c:470 #: src/init.c:476 src/init.c:482 src/init.c:488 src/init.c:798 src/init.c:811 #: src/init.c:824 src/init.c:837 src/init.c:850 src/init.c:863 src/init.c:876 #, c-format msgid "Syntax error in file '%s'" msgstr "" #. Aggiorno lo splash e parso questo rdfs: #: src/init.c:256 #, c-format msgid "Parsing local dump of '%s'" msgstr "" #. Splash: #: src/init.c:532 msgid "Creating the config file" msgstr "" #: src/init.c:537 src/init.c:548 #, c-format msgid "Error creating the directory '%s'!" msgstr "" #. Salvo la configurazione appena creata: #: src/init.c:572 msgid "Saving the config file" msgstr "" #: src/init.c:591 src/query.c:531 src/query.c:1241 #, c-format msgid "Error creating the file '%s'!" msgstr "" #: src/init.c:1096 msgid "Creating the RDFS morla file" msgstr "" #: src/init.c:1112 #, c-format msgid "Error writing file '%s'!" msgstr "" #: src/init.c:1157 msgid "Reading the template file" msgstr "" #: src/init.c:1175 msgid "Import template error!" msgstr "" #: src/last.c:112 msgid "" msgstr "" #: src/main.c:145 src/main.c:940 src/maker.c:199 src/maker.c:223 msgid "New RDF Document" msgstr "" #. Creo la scritta per il popup: #: src/main.c:161 #, c-format msgid "" "Exit without save?\n" "Check: " msgstr "" #: src/main.c:204 src/main.c:229 src/merge.c:352 msgid "Open a RDF URI" msgstr "" #. MENU FILE #: src/main.c:358 src/query.c:199 msgid "_File" msgstr "" #: src/main.c:381 src/merge.c:102 msgid "_Open a RDF file" msgstr "" #: src/main.c:395 msgid "_Open a RDF URI" msgstr "" #: src/main.c:404 msgid "_Search RDF in an URI" msgstr "" #: src/main.c:413 msgid "_Special Opening procedure" msgstr "" #: src/main.c:427 src/preferences.c:206 msgid "Last Documents" msgstr "" #: src/main.c:449 msgid "_Save file" msgstr "" #: src/main.c:468 msgid "_Special Saving procedure" msgstr "" #. MENU EDIT #: src/main.c:506 src/query.c:259 msgid "_Edit" msgstr "" #: src/main.c:535 msgid "_Add from templates" msgstr "" #: src/main.c:551 msgid "_Modify with templates" msgstr "" #: src/main.c:567 msgid "_Import a RDF Document" msgstr "" #: src/main.c:576 msgid "... from a file" msgstr "" #: src/main.c:584 msgid "... from an uri" msgstr "" #. INFO #: src/main.c:621 msgid "_Information" msgstr "" #: src/main.c:628 msgid "Info about this RDF Document" msgstr "" #: src/main.c:644 msgid "Info about the selected element" msgstr "" #: src/main.c:659 msgid "Info about an URI..." msgstr "" #. TEMPLATE #: src/main.c:674 msgid "_Template" msgstr "" #: src/main.c:681 msgid "Import from a _file..." msgstr "" #: src/main.c:690 msgid "Import from an _URI..." msgstr "" #: src/main.c:702 msgid "_Export a template" msgstr "" #: src/main.c:717 msgid "_Show templates" msgstr "" #. MENU RDFS #: src/main.c:726 msgid "_RDFS" msgstr "" #: src/main.c:732 msgid "_Add RDFS" msgstr "" #: src/main.c:744 msgid "_Show RDFS" msgstr "" #. MENU VIEW #: src/main.c:752 msgid "_View" msgstr "" #. MENU GRAPH #: src/main.c:761 msgid "_Graph" msgstr "" #: src/main.c:767 msgid "Create _Graph" msgstr "" #: src/main.c:779 msgid "_Save Graph As" msgstr "" #: src/main.c:788 msgid "Save Graph_viz Source As" msgstr "" #: src/main.c:802 msgid "_Merge more RDF Document in a Graph" msgstr "" #. MENU NAVIGATOR #: src/main.c:811 msgid "_Navigator" msgstr "" #: src/main.c:817 msgid "Open _navigator" msgstr "" #: src/main.c:831 msgid "Open a RDF URI with the navigator" msgstr "" #. MENU QUERY #: src/main.c:840 src/query.c:210 msgid "_Query" msgstr "" #: src/main.c:846 msgid "SPARQL" msgstr "" #: src/main.c:856 msgid "RDQL (RDF Data Query Language)" msgstr "" #. HELP #: src/main.c:865 msgid "_Help" msgstr "" #: src/main.c:880 msgid "_Find updates" msgstr "" #: src/main.c:891 msgid "_Open the Web Page of Morla Project" msgstr "" #: src/main.c:905 msgid "_Show used Libraries" msgstr "" #: src/main.c:948 msgid "Open a RDF Document" msgstr "" #: src/main.c:959 msgid "Save this RDF Document" msgstr "" #: src/main.c:967 msgid "Save this RDF Document as a new file" msgstr "" #: src/main.c:979 msgid "Undo editing" msgstr "" #: src/main.c:988 msgid "Redo editing" msgstr "" #: src/main.c:999 msgid "Close this RDF Document" msgstr "" #: src/main.c:1011 msgid "Add a new RDF triple" msgstr "" #: src/main.c:1028 msgid "Cut" msgstr "" #: src/main.c:1035 msgid "Copy" msgstr "" #: src/main.c:1042 msgid "Paste" msgstr "" #: src/main.c:1052 msgid "Delete" msgstr "" #: src/main.c:1059 msgid "rdfs" msgstr "" #: src/main.c:1063 msgid "Show the RDFS" msgstr "" #: src/main.c:1070 msgid "graph" msgstr "" #: src/main.c:1076 msgid "Show the graph of this RDF Document" msgstr "" #: src/main.c:1084 msgid "navigator" msgstr "" #: src/main.c:1090 msgid "Open navigator with this RDF Document" msgstr "" #: src/main.c:1182 msgid "Welcome to RDF editor!" msgstr "" #: src/maker.c:137 msgid "Editing..." msgstr "" #: src/maker.c:545 src/template.c:5808 src/template.c:5975 msgid "Subject" msgstr "" #: src/maker.c:555 src/template.c:5982 msgid "Predicate" msgstr "" #: src/maker.c:565 src/template.c:5989 msgid "Object" msgstr "" #: src/maker.c:627 msgid "(R) " msgstr "" #: src/maker.c:631 msgid "(L) " msgstr "" #: src/maker.c:635 msgid "(B) " msgstr "" #: src/maker.c:724 msgid "Namespace" msgstr "" #: src/maker.c:734 msgid "Prefix" msgstr "" #: src/maker.c:744 msgid "Visible" msgstr "" #: src/maker.c:938 src/maker.c:1121 msgid "Open with this editor" msgstr "" #: src/maker.c:953 src/maker.c:1136 src/navigator.c:839 msgid "Open in a browser" msgstr "" #: src/maker.c:968 msgid "Modify this RDF triple" msgstr "" #: src/maker.c:981 msgid "Modify all nodes/archs like this" msgstr "" #: src/maker.c:997 msgid "Cut all nodes/archs like this" msgstr "" #: src/maker.c:1009 msgid "Copy all nodes/archs like this" msgstr "" #: src/maker.c:1022 msgid "Delete all nodes/archs like this" msgstr "" #: src/maker.c:1037 msgid "Cut this RDF triple" msgstr "" #: src/maker.c:1048 msgid "Copy this RDF triple" msgstr "" #: src/maker.c:1059 msgid "Delete this RDF triple" msgstr "" #: src/maker.c:1075 msgid "Show info about this element" msgstr "" #: src/maker.c:1106 msgid "Import this RDFS" msgstr "" #: src/maker.c:1151 msgid "Modify the RDF resource" msgstr "" #: src/maker.c:1162 msgid "Modify the prefix" msgstr "" #: src/maker.c:1177 msgid "Cut this RDFS" msgstr "" #: src/maker.c:1188 msgid "Copy this RDFS" msgstr "" #: src/maker.c:1200 msgid "Delete this RDFS" msgstr "" #: src/maker.c:1372 msgid "Change Prefix for..." msgstr "" #: src/maker.c:1382 #, c-format msgid "RDFS: %s" msgstr "" #: src/maker.c:1394 src/rdfs.c:376 msgid "Prefix: " msgstr "" #: src/maker.c:1421 msgid "No a valid prefix!" msgstr "" #: src/maker.c:1459 msgid "Modify all URIs like this..." msgstr "" #: src/maker.c:1471 src/maker.c:1655 msgid "New URI: " msgstr "" #: src/maker.c:1498 src/maker.c:1686 msgid "No a valid URI!" msgstr "" #: src/maker.c:1584 msgid "Modify this RDF triple..." msgstr "" #: src/maker.c:1643 msgid "Modify this RDF URI..." msgstr "" #: src/maker.c:1806 #, c-format msgid "Error opening '%s' resource!" msgstr "" #: src/merge.c:47 msgid "Merge more one RDF in a graph..." msgstr "" #: src/merge.c:59 msgid "List of RDFs" msgstr "" #: src/merge.c:83 src/search.c:412 src/search.c:455 msgid "RDF" msgstr "" #: src/merge.c:116 msgid "Open a RDF _URI" msgstr "" #: src/merge.c:144 msgid "No RDF Document present!" msgstr "" #: src/merge.c:179 #, c-format msgid "Error parsing URI '%s'!" msgstr "" #: src/merge.c:275 msgid "No RDF Document selected!" msgstr "" #. Chiedo conferma: #: src/merge.c:280 msgid "Sure to remove these RDFs?" msgstr "" #: src/navigator.c:138 msgid "Navigator" msgstr "" #: src/navigator.c:646 msgid "No data found!" msgstr "" #: src/navigator.c:797 msgid "Open" msgstr "" #: src/navigator.c:805 msgid "Open in a new tab" msgstr "" #: src/navigator.c:817 msgid "Import as RDF" msgstr "" #: src/navigator.c:827 msgid "Import as RDF in a new window" msgstr "" #: src/navigator.c:1028 src/navigator.c:1073 src/navigator.c:1224 #: src/navigator.c:1260 #, c-format msgid "" "Error opening resource '%s'\n" "Try to search some RDFs in this URI?" msgstr "" #: src/navigator.c:1252 msgid "Open RDF URI for the navigator..." msgstr "" #: src/navigator.c:1297 #, c-format msgid "Error opening resource '%s'!" msgstr "" #: src/preferences.c:147 msgid "Preferences..." msgstr "" #: src/preferences.c:162 msgid "General" msgstr "" #: src/preferences.c:164 msgid "Softwares" msgstr "" #: src/preferences.c:173 msgid "Select your web browser:" msgstr "" #: src/preferences.c:183 msgid "Select your image viewer:" msgstr "" #: src/preferences.c:190 #, c-format msgid "'%s' = url or image" msgstr "" #: src/preferences.c:193 msgid "Undo and Redo" msgstr "" #: src/preferences.c:199 msgid "Select your undo level:" msgstr "" #: src/preferences.c:212 msgid "Select your last documents history:" msgstr "" #: src/preferences.c:219 msgid "Show update" msgstr "" #: src/preferences.c:225 msgid "Show with popup:" msgstr "" #: src/preferences.c:233 msgid "Update Server" msgstr "" #: src/preferences.c:239 msgid "Set the update server:" msgstr "" #: src/preferences.c:246 msgid "Documentation Server" msgstr "" #: src/preferences.c:255 msgid "Set the documentation server:" msgstr "" #: src/preferences.c:266 msgid "(This input can be a directory of a remote server)" msgstr "" #: src/preferences.c:269 msgid "Blank node name" msgstr "" #: src/preferences.c:278 msgid "Set the blank node name:" msgstr "" #: src/preferences.c:290 #, c-format msgid "" "(You can use '%d' if you want specify where the number should be: the_" "%d_blank_node)" msgstr "" #: src/preferences.c:293 msgid "Automatic Extensions" msgstr "" #: src/preferences.c:299 msgid "Set automatic extensions:" msgstr "" #: src/preferences.c:311 msgid "Interface" msgstr "" #: src/preferences.c:313 msgid "Colors" msgstr "" #: src/preferences.c:322 msgid "Normal Background:" msgstr "" #: src/preferences.c:333 msgid "Normal Foreground:" msgstr "" #: src/preferences.c:344 msgid "Prelight Background:" msgstr "" #: src/preferences.c:355 msgid "Prelight Foreground:" msgstr "" #: src/preferences.c:363 src/preferences.c:609 src/preferences.c:820 #: src/preferences.c:1031 src/preferences.c:1131 msgid "Preview" msgstr "" #: src/preferences.c:404 msgid "Graphs" msgstr "" #: src/preferences.c:406 msgid "Resource nodes" msgstr "" #: src/preferences.c:418 src/preferences.c:629 src/preferences.c:840 #: src/preferences.c:1051 msgid "Color:" msgstr "" #: src/preferences.c:429 src/preferences.c:640 src/preferences.c:851 #: src/preferences.c:1062 msgid "Font Color:" msgstr "" #: src/preferences.c:440 src/preferences.c:651 src/preferences.c:862 #: src/preferences.c:1085 src/preferences.c:1430 msgid "Style:" msgstr "" #: src/preferences.c:446 src/preferences.c:657 src/preferences.c:868 msgid "filled" msgstr "" #: src/preferences.c:449 src/preferences.c:660 src/preferences.c:871 #: src/preferences.c:1091 msgid "solid" msgstr "" #: src/preferences.c:452 src/preferences.c:663 src/preferences.c:874 #: src/preferences.c:1094 msgid "dashed" msgstr "" #: src/preferences.c:455 src/preferences.c:666 src/preferences.c:877 #: src/preferences.c:1097 msgid "dotted" msgstr "" #: src/preferences.c:458 src/preferences.c:669 src/preferences.c:880 #: src/preferences.c:1100 msgid "bold" msgstr "" #: src/preferences.c:461 src/preferences.c:672 src/preferences.c:883 #: src/preferences.c:1103 msgid "invis" msgstr "" #: src/preferences.c:498 src/preferences.c:709 src/preferences.c:920 msgid "Fill Color:" msgstr "" #: src/preferences.c:509 src/preferences.c:720 src/preferences.c:931 msgid "Shape:" msgstr "" #: src/preferences.c:515 src/preferences.c:726 src/preferences.c:937 msgid "plaintext" msgstr "" #: src/preferences.c:518 src/preferences.c:729 src/preferences.c:940 msgid "ellipse" msgstr "" #: src/preferences.c:521 src/preferences.c:732 src/preferences.c:943 msgid "circle" msgstr "" #: src/preferences.c:524 src/preferences.c:735 src/preferences.c:946 msgid "egg" msgstr "" #: src/preferences.c:527 src/preferences.c:738 src/preferences.c:949 msgid "triangle" msgstr "" #: src/preferences.c:530 src/preferences.c:741 src/preferences.c:952 msgid "box" msgstr "" #: src/preferences.c:533 src/preferences.c:744 src/preferences.c:955 msgid "diamond" msgstr "" #: src/preferences.c:536 src/preferences.c:747 src/preferences.c:958 msgid "trapezium" msgstr "" #: src/preferences.c:539 src/preferences.c:750 src/preferences.c:961 msgid "parallelogram" msgstr "" #: src/preferences.c:542 src/preferences.c:753 src/preferences.c:964 msgid "house" msgstr "" #: src/preferences.c:545 src/preferences.c:756 src/preferences.c:967 msgid "hexagon" msgstr "" #: src/preferences.c:548 src/preferences.c:759 src/preferences.c:970 msgid "octagon" msgstr "" #: src/preferences.c:600 src/preferences.c:811 src/preferences.c:1022 #: src/preferences.c:1073 msgid "Font:" msgstr "" #. BLANK NODE #: src/preferences.c:617 msgid "Blank nodes" msgstr "" #. LITERAL #: src/preferences.c:828 msgid "Literal nodes" msgstr "" #. EDGE #: src/preferences.c:1039 msgid "Edge" msgstr "" #. FORMAT #: src/preferences.c:1157 msgid "Output format" msgstr "" #: src/preferences.c:1163 msgid "Format:" msgstr "" #: src/preferences.c:1169 msgid "png" msgstr "" #: src/preferences.c:1172 msgid "jpg" msgstr "" #: src/preferences.c:1175 msgid "gif" msgstr "" #: src/preferences.c:1178 msgid "ps" msgstr "" #: src/preferences.c:1181 msgid "svg" msgstr "" #: src/preferences.c:1212 msgid "Network" msgstr "" #: src/preferences.c:1217 msgid "Proxy" msgstr "" #: src/preferences.c:1251 msgid "Proxy Server:" msgstr "" #: src/preferences.c:1262 msgid "Proxy Port:" msgstr "" #: src/preferences.c:1274 msgid "Proxy User:" msgstr "" #: src/preferences.c:1285 msgid "Proxy Password:" msgstr "" #: src/preferences.c:1295 msgid "Gnome" msgstr "" #: src/preferences.c:1301 msgid "Use Gnome Setting:" msgstr "" #: src/preferences.c:1316 src/preferences.c:1321 msgid "Highlighting" msgstr "" #: src/preferences.c:1364 msgid "Tags" msgstr "" #: src/preferences.c:1401 msgid "Rename" msgstr "" #: src/preferences.c:1436 src/preferences.c:1466 src/preferences.c:1499 #: src/preferences.c:1547 src/preferences.c:1592 msgid "Normal" msgstr "" #: src/preferences.c:1439 msgid "Oblique" msgstr "" #: src/preferences.c:1442 msgid "Italic" msgstr "" #: src/preferences.c:1460 msgid "Variant:" msgstr "" #: src/preferences.c:1469 msgid "Small Caps" msgstr "" #: src/preferences.c:1487 msgid "Weight:" msgstr "" #: src/preferences.c:1493 msgid "Ultralight" msgstr "" #: src/preferences.c:1496 msgid "Light" msgstr "" #: src/preferences.c:1502 msgid "Semibold" msgstr "" #: src/preferences.c:1505 msgid "Bold" msgstr "" #: src/preferences.c:1508 msgid "Ultrabold" msgstr "" #: src/preferences.c:1511 msgid "Heavy" msgstr "" #: src/preferences.c:1529 msgid "Stretch:" msgstr "" #: src/preferences.c:1535 msgid "Ultra Condensed" msgstr "" #: src/preferences.c:1538 msgid "Extra Condensed" msgstr "" #: src/preferences.c:1541 msgid "Condensed" msgstr "" #: src/preferences.c:1544 msgid "Semi Condensed" msgstr "" #: src/preferences.c:1550 msgid "Semi Expanded" msgstr "" #: src/preferences.c:1553 msgid "Expanded" msgstr "" #: src/preferences.c:1556 msgid "Extra Expanded" msgstr "" #: src/preferences.c:1559 msgid "Ultra Expanded" msgstr "" #: src/preferences.c:1577 msgid "Scale:" msgstr "" #: src/preferences.c:1583 msgid "XX Small" msgstr "" #: src/preferences.c:1586 msgid "X Small" msgstr "" #: src/preferences.c:1589 msgid "Small" msgstr "" #: src/preferences.c:1595 msgid "X Large" msgstr "" #: src/preferences.c:1598 msgid "XX Large" msgstr "" #: src/preferences.c:1616 msgid "Foreground:" msgstr "" #: src/preferences.c:1628 msgid "Background:" msgstr "" #: src/preferences.c:1640 msgid "Underline:" msgstr "" #: src/preferences.c:1646 msgid "None" msgstr "" #: src/preferences.c:1649 msgid "Single" msgstr "" #: src/preferences.c:1652 msgid "Double" msgstr "" #: src/preferences.c:1667 msgid "Reset the default tags" msgstr "" #: src/preferences.c:1672 msgid "Demo" msgstr "" #: src/preferences.c:1733 msgid "No a compatible web browser!" msgstr "" #: src/preferences.c:1739 msgid "No a compatible image viewer!" msgstr "" #: src/preferences.c:1745 msgid "No a compatible update server!" msgstr "" #: src/preferences.c:1751 msgid "No a compatible documentation server!" msgstr "" #: src/preferences.c:1759 msgid "No a valid proxy value!" msgstr "" #: src/preferences.c:2665 msgid "Preview for these colors" msgstr "" #: src/preferences.c:2899 msgid "New Tag..." msgstr "" #: src/preferences.c:2911 msgid "New Tag" msgstr "" #: src/preferences.c:2937 msgid "The tag cann't be empty!" msgstr "" #: src/preferences.c:2990 src/preferences.c:3018 msgid "Select a tag!" msgstr "" #: src/preferences.c:3022 msgid "Sure to remove this tag?" msgstr "" #: src/query.c:164 msgid "Query a RDF file..." msgstr "" #: src/query.c:167 msgid "Query a RDF document" msgstr "" #: src/query.c:235 msgid "_Results" msgstr "" #: src/query.c:242 msgid "_Open with Morla" msgstr "" #: src/query.c:265 msgid "_Find resource" msgstr "" #: src/query.c:357 msgid "Insert RDFS" msgstr "" #: src/query.c:366 msgid "Find Resources" msgstr "" #: src/query.c:381 msgid "Text" msgstr "" #: src/query.c:459 msgid "Querying done!" msgstr "" #: src/query.c:478 msgid "Open a QUERY file..." msgstr "" #: src/query.c:557 src/query.c:1203 msgid "Save a QUERY in a file..." msgstr "" #: src/query.c:607 msgid "Close without save?" msgstr "" #: src/query.c:660 msgid "Error creating the enviroment for your query" msgstr "" #: src/query.c:681 msgid "Error executing the query!" msgstr "" #: src/query.c:1087 msgid "true" msgstr "" #: src/query.c:1087 msgid "false" msgstr "" #: src/query.c:1115 msgid "Error saving the temporary file." msgstr "" #: src/query.c:1174 msgid "Error opening the RDF results" msgstr "" #: src/query.c:1449 msgid "Error in your query!" msgstr "" #: src/query.c:1454 msgid "No errors in your query." msgstr "" #: src/rdf.c:182 msgid "RDF/XML parser:" msgstr "" #: src/rdf.c:229 msgid "RDF/N-TRIPLES parser:" msgstr "" #: src/rdf.c:276 msgid "RDF/TURTLE parser:" msgstr "" #: src/rdfs.c:49 src/rdfs.c:62 msgid "RDFSs import" msgstr "" #: src/rdfs.c:89 msgid "RDFS" msgstr "" #: src/rdfs.c:100 msgid "Default prefix" msgstr "" #: src/rdfs.c:146 msgid "Sure to remove this RDFS ?" msgstr "" #: src/rdfs.c:354 msgid "New RDFS..." msgstr "" #: src/rdfs.c:414 msgid "Incompatible RDFS!" msgstr "" #: src/rdfs.c:420 msgid "Incompatible Prefix!" msgstr "" #: src/rdfs.c:434 msgid "RDFS already present in the list!" msgstr "" #: src/rdfs.c:443 #, c-format msgid "Prefix already used for namespace '%s'" msgstr "" #: src/rdfs.c:469 msgid "Error opening the RDFS!" msgstr "" #: src/rdfs.c:490 msgid "Error importing the RDFS document!" msgstr "" #: src/search.c:201 src/search.c:211 msgid "Memory error ?!?" msgstr "" #: src/search.c:225 msgid "This document has not a XML syntax!" msgstr "" #: src/search.c:364 #, c-format msgid "No RDF Document found! %s" msgstr "" #: src/search.c:368 #, c-format msgid "No RDF Document found!" msgstr "" #: src/search.c:376 msgid "RDF founder" msgstr "" #: src/search.c:385 msgid "Meta RDFs" msgstr "" #: src/search.c:428 msgid "Other RDFs" msgstr "" #: src/search.c:510 msgid "Select some URIs!" msgstr "" #: src/splash.c:87 msgid "Morla BootSplash" msgstr "" #: src/template.c:201 src/template.c:236 #, c-format msgid "Generic" msgstr "" #: src/template.c:270 src/template.c:319 src/template.c:321 msgid "Import a new template..." msgstr "" #: src/template.c:275 msgid "Open a template file..." msgstr "" #: src/template.c:278 msgid "Open a template file: aborted" msgstr "" #: src/template.c:292 src/template.c:334 #, c-format msgid "Template %s imported" msgstr "" #: src/template.c:299 msgid "Open a template file: error!" msgstr "" #: src/template.c:323 msgid "Import a new template: about" msgstr "" #: src/template.c:388 #, c-format msgid "Error opening resource '%s'" msgstr "" #: src/template.c:435 msgid "No template in this RDF Document!" msgstr "" #: src/template.c:487 #, c-format msgid "Duplicated template '%s'!" msgstr "" #: src/template.c:552 src/template.c:577 #, c-format msgid "No input for template '%s'" msgstr "" #: src/template.c:558 #, c-format msgid "No URI, name or version for template '%s'" msgstr "" #: src/template.c:749 #, c-format msgid "Input '%s' has no rdfs, label or istance of input!" msgstr "" #: src/template.c:770 #, c-format msgid "This input '%s' is novisible but has not a defualt value!" msgstr "" #: src/template.c:788 #, c-format msgid "" "This input '%s' is novisible but has max_cardinality or min_cardinality != 1!" msgstr "" #: src/template.c:809 src/template.c:826 src/template.c:871 #, c-format msgid "" "This input '%s' has a alternative list of value but it is not a alternative " "typevalue!" msgstr "" #: src/template.c:840 src/template.c:855 #, c-format msgid "This input '%s' has no a alternative list of value!" msgstr "" #: src/template.c:898 #, c-format msgid "The input '%s' tries to use a impossibile datatype '%s'." msgstr "" #: src/template.c:1254 src/template.c:1261 msgid "Error saving the template file!" msgstr "" #: src/template.c:1290 src/template.c:1295 msgid "Export a template..." msgstr "" #: src/template.c:1298 msgid "Export a template: aborted" msgstr "" #: src/template.c:1305 msgid "Error saving the template into a file!" msgstr "" #: src/template.c:1306 msgid "Export a template: error." msgstr "" #: src/template.c:1319 msgid "Export a template: done." msgstr "" #: src/template.c:1423 src/template.c:1436 msgid "Templates import" msgstr "" #: src/template.c:1463 src/template.c:1928 src/template.c:5277 #: src/template.c:6092 msgid "Template" msgstr "" #: src/template.c:1470 src/update.c:388 msgid "Version" msgstr "" #: src/template.c:1477 msgid "Category" msgstr "" #: src/template.c:1484 msgid "URI" msgstr "" #: src/template.c:1516 src/template.c:1529 msgid "Select a template!" msgstr "" #: src/template.c:1533 msgid "Sure to remove this template?" msgstr "" #: src/template.c:1716 msgid "This template requires other templates. Do you want import them?\n" msgstr "" #: src/template.c:1977 src/template.c:6141 msgid "This document" msgstr "" #: src/template.c:2169 msgid "Select a input!" msgstr "" #: src/template.c:2216 msgid "Single input..." msgstr "" #: src/template.c:2476 msgid "Blanknode" msgstr "" #: src/template.c:2479 #, c-format msgid " with template)" msgstr "" #: src/template.c:2481 #, c-format msgid " without template)" msgstr "" #: src/template.c:2495 #, c-format msgid "%s: (L) %s" msgstr "" #: src/template.c:2500 #, c-format msgid "%s: (R) %s" msgstr "" #: src/template.c:2505 #, c-format msgid "%s: (B) %s" msgstr "" #: src/template.c:2562 src/template.c:2649 src/template.c:2691 #: src/template.c:2703 src/template.c:2741 src/template.c:2778 #: src/template.c:2794 src/template.c:2838 src/template.c:2847 #, c-format msgid "No compatible value for input %s" msgstr "" #: src/template.c:2872 #, c-format msgid "Not enough elements for input %s" msgstr "" #: src/template.c:4302 msgid "String:" msgstr "" #: src/template.c:4354 src/template.c:4783 msgid "Language:" msgstr "" #: src/template.c:4389 src/template.c:4810 msgid "Datatype:" msgstr "" #: src/template.c:4449 src/template.c:4555 msgid "Resource:" msgstr "" #: src/template.c:4501 msgid "Literal:" msgstr "" #: src/template.c:4625 msgid "Template:" msgstr "" #: src/template.c:4751 msgid "Type:" msgstr "" #: src/template.c:4840 msgid "Value:" msgstr "" #: src/template.c:4965 msgid "List" msgstr "" #: src/template.c:5002 #, c-format msgid "Min Card.: %d" msgstr "" #: src/template.c:5009 #, c-format msgid "Max Card.: infinite" msgstr "" #: src/template.c:5011 #, c-format msgid "Max Card.: %d" msgstr "" #: src/template.c:5187 msgid "Comment:" msgstr "" #: src/template.c:5285 msgid "Type" msgstr "" #: src/template.c:5337 msgid "Template" msgstr "" #: src/template.c:5439 src/template.c:5561 msgid "No a compatible resource!" msgstr "" #: src/template.c:5457 src/template.c:5579 msgid "No a compatible blank node. Do you want create a automatic name?" msgstr "" #: src/template.c:5769 msgid "Template edit..." msgstr "" #: src/template.c:5782 msgid "Select the Subject" msgstr "" #: src/template.c:5841 msgid "Select a Subject!" msgstr "" #: src/template.c:5946 #, c-format msgid "Set %d of %d RDF triples" msgstr "" #: src/template.c:5951 msgid "RDF triples ignored" msgstr "" #: src/update.c:246 #, c-format msgid "" "A new release of %s is out!\n" "Try %s %s!" msgstr "" #: src/update.c:321 msgid "No updates found!" msgstr "" #: src/update.c:326 src/update.c:339 msgid "Remote templates" msgstr "" #: src/update.c:364 msgid "Name" msgstr "" #: src/update.c:372 msgid "Description" msgstr "" #: src/update.c:380 msgid "Author" msgstr "" #: src/update.c:417 msgid "Select some templates!" msgstr "" morla-0.16.1/src/000077500000000000000000000000001156343060400135025ustar00rootroot00000000000000morla-0.16.1/src/Makefile.am000066400000000000000000000013101156343060400155310ustar00rootroot00000000000000bin_PROGRAMS = morla INCLUDES = \ -DPATH_IMAGE=\"$(datadir)/@PACKAGE@/bootsplash.png\" \ -DPATH_ICON=\"$(datadir)/@PACKAGE@/icons/64_color.png\" \ -DPATH_MODULE=\"$(libdir)/@PACKAGE@\" EXTRA_DIST = editor.h morla.h morla-module.h morla_SOURCES = \ about.c \ blanknode.c \ browser.c \ checks.c \ datatype.c \ dialog.c \ download.c \ edit.c \ file.c \ filechooser.c \ gconf.c \ graph.c \ help.c \ info.c \ init.c \ js.c \ last.c \ main.c \ maker.c \ merge.c \ module.c \ namespace.c \ navigator.c \ ntriples.c \ preferences.c \ query.c \ rdf.c \ rdfs.c \ search.c \ splash.c \ template.c \ textview.c \ unredo.c \ update.c incdir = $(includedir) inc_DATA = morla-module.h morla-0.16.1/src/Makefile.in000066400000000000000000000465241156343060400155620ustar00rootroot00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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 = morla$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(incdir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_morla_OBJECTS = about.$(OBJEXT) blanknode.$(OBJEXT) \ browser.$(OBJEXT) checks.$(OBJEXT) datatype.$(OBJEXT) \ dialog.$(OBJEXT) download.$(OBJEXT) edit.$(OBJEXT) \ file.$(OBJEXT) filechooser.$(OBJEXT) gconf.$(OBJEXT) \ graph.$(OBJEXT) help.$(OBJEXT) info.$(OBJEXT) init.$(OBJEXT) \ js.$(OBJEXT) last.$(OBJEXT) main.$(OBJEXT) maker.$(OBJEXT) \ merge.$(OBJEXT) module.$(OBJEXT) namespace.$(OBJEXT) \ navigator.$(OBJEXT) ntriples.$(OBJEXT) preferences.$(OBJEXT) \ query.$(OBJEXT) rdf.$(OBJEXT) rdfs.$(OBJEXT) search.$(OBJEXT) \ splash.$(OBJEXT) template.$(OBJEXT) textview.$(OBJEXT) \ unredo.$(OBJEXT) update.$(OBJEXT) morla_OBJECTS = $(am_morla_OBJECTS) morla_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(morla_SOURCES) DIST_SOURCES = $(morla_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; incDATA_INSTALL = $(INSTALL_DATA) DATA = $(inc_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dot = @dot@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ firefox_js_CFLAGS = @firefox_js_CFLAGS@ firefox_js_LIBS = @firefox_js_LIBS@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ gtk_CFLAGS = @gtk_CFLAGS@ gtk_LIBS = @gtk_LIBS@ gtkhtml_CFLAGS = @gtkhtml_CFLAGS@ gtkhtml_LIBS = @gtkhtml_LIBS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ ige_mac_integration_CFLAGS = @ige_mac_integration_CFLAGS@ ige_mac_integration_LIBS = @ige_mac_integration_LIBS@ 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@ rasqal_CFLAGS = @rasqal_CFLAGS@ rasqal_LIBS = @rasqal_LIBS@ redland_CFLAGS = @redland_CFLAGS@ redland_LIBS = @redland_LIBS@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ xulrunner_js_CFLAGS = @xulrunner_js_CFLAGS@ xulrunner_js_LIBS = @xulrunner_js_LIBS@ INCLUDES = \ -DPATH_IMAGE=\"$(datadir)/@PACKAGE@/bootsplash.png\" \ -DPATH_ICON=\"$(datadir)/@PACKAGE@/icons/64_color.png\" \ -DPATH_MODULE=\"$(libdir)/@PACKAGE@\" EXTRA_DIST = editor.h morla.h morla-module.h morla_SOURCES = \ about.c \ blanknode.c \ browser.c \ checks.c \ datatype.c \ dialog.c \ download.c \ edit.c \ file.c \ filechooser.c \ gconf.c \ graph.c \ help.c \ info.c \ init.c \ js.c \ last.c \ main.c \ maker.c \ merge.c \ module.c \ namespace.c \ navigator.c \ ntriples.c \ preferences.c \ query.c \ rdf.c \ rdfs.c \ search.c \ splash.c \ template.c \ textview.c \ unredo.c \ update.c incdir = $(includedir) inc_DATA = morla-module.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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done morla$(EXEEXT): $(morla_OBJECTS) $(morla_DEPENDENCIES) @rm -f morla$(EXEEXT) $(LINK) $(morla_LDFLAGS) $(morla_OBJECTS) $(morla_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/about.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blanknode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/browser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datatype.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/download.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filechooser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gconf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/js.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/last.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maker.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/merge.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/namespace.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/navigator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntriples.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preferences.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/splash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textview.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unredo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-incDATA: $(inc_DATA) @$(NORMAL_INSTALL) test -z "$(incdir)" || $(mkdir_p) "$(DESTDIR)$(incdir)" @list='$(inc_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(incDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(incdir)/$$f'"; \ $(incDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(incdir)/$$f"; \ done uninstall-incDATA: @$(NORMAL_UNINSTALL) @list='$(inc_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(incdir)/$$f'"; \ rm -f "$(DESTDIR)$(incdir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(incdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-incDATA install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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 uninstall-incDATA \ uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-incDATA install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-incDATA \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: morla-0.16.1/src/about.c000066400000000000000000000206051156343060400147630ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* Funzione about: */ void about (GtkWidget * w, gpointer dummy) { gint i; gchar *authors[] = { "Andrea Marchesini ", "Ippolita.Net ", "Some Pataphisic Ministers", NULL }; gchar *artists[] = { "Maox http://www.malasystem.com", NULL }; if (splash_showed ()) { splash_hide (); return; } splash_show (); splash_close_on_click (TRUE); splash_set_text_with_effect (PACKAGE " " VERSION); splash_sleep (2); splash_set_text_with_effect (_(MORLA_COPYRIGHT)); splash_sleep (2); splash_set_text_with_effect (MORLA_WEBSITE); splash_sleep (2); splash_set_text_with_effect (_("Authors:")); splash_sleep (2); for (i = 0; authors[i]; i++) { splash_set_text_with_effect (authors[i]); splash_sleep (2); } splash_set_text_with_effect (_("Artists:")); splash_sleep (2); for (i = 0; artists[i]; i++) { splash_set_text_with_effect (artists[i]); splash_sleep (2); } splash_set_text_with_effect (""); splash_sleep (2); splash_set_text_with_effect ("In girum imus nocte ecce et consumimur igni"); splash_sleep (2); splash_hide (); } static void about_libraries_open (GtkWidget * widget, gchar * url) { browser (url); } #define LIB_GTK_WEBSITE "http://www.gtk.org" #define LIB_GLIB_WEBSITE "http://www.gtk.org" #define LIB_GTKHTML_WEBSITE "http://ftp.gnome.org/pub/GNOME/sources/gtkhtml/" #define LIB_LIBXSLT_WEBSITE "http://xmlsoft.org/XSLT/" #define LIB_NXML_WEBSITE "http://www.autistici.org/bakunin/codes.php" #define LIB_CURL_WEBSITE "http://curl.haxx.se/" #define LIB_REDLAND_WEBSITE "http://librdf.org/" #define LIB_RASQAL_WEBSITE "http://librdf.org/rasqal/" void about_libraries (void) { GtkWidget *dialog; GtkWidget *box; GtkWidget *label; GtkWidget *button; gchar s[1024]; gint i; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("About Libraries...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_widget_set_size_request (dialog, 300, -1); box = gtk_table_new (0, 0, FALSE); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), box, TRUE, TRUE, 0); i = 0; /* GTK: */ button = gtk_button_new_with_label ("GTK+"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_GTK_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); g_snprintf (s, sizeof (s), "%d.%d.%d", gtk_major_version, gtk_minor_version, gtk_micro_version); label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; /* Glib: */ button = gtk_button_new_with_label ("Glib"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_GLIB_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); g_snprintf (s, sizeof (s), "%d.%d.%d", glib_major_version, glib_minor_version, glib_micro_version); label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; /* GtkHtml: */ button = gtk_button_new_with_label ("GtkHtml"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_GTKHTML_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); g_snprintf (s, sizeof (s), "2.x"); label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; /* libXSLT: */ button = gtk_button_new_with_label ("LibXSLT"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_LIBXSLT_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); #if defined(LIBXSLT_DOTTED_VERSION) g_snprintf (s, sizeof (s), "%s", LIBXSLT_DOTTED_VERSION); #else g_snprintf (s, sizeof (s), "1.x"); #endif label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; /* nXML: */ button = gtk_button_new_with_label ("nXML"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_NXML_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); #if defined(LIBNXML_VERSION_STRING) g_snprintf (s, sizeof (s), "%s", LIBNXML_VERSION_STRING); #else g_snprintf (s, sizeof (s), "0.x"); #endif label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; /* Curl: */ button = gtk_button_new_with_label ("LibCurl"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_CURL_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); #if defined(LIBCURL_VERSION) g_snprintf (s, sizeof (s), "%s", LIBCURL_VERSION); #else g_snprintf (s, sizeof (s), "1.x"); #endif label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; /* Redland: */ button = gtk_button_new_with_label ("Redland"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_REDLAND_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); g_snprintf (s, sizeof (s), librdf_version_string); label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; /* Rasqal: */ button = gtk_button_new_with_label ("Rasqal"); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (about_libraries_open), LIB_RASQAL_WEBSITE); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_table_attach (GTK_TABLE (box), button, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); g_snprintf (s, sizeof (s), rasqal_version_string); label = gtk_label_new (s); gtk_table_attach (GTK_TABLE (box), label, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); i++; button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } /* EOF */ morla-0.16.1/src/blanknode.c000066400000000000000000000042661156343060400156130ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" gchar *blanknode_name = NULL; gboolean blanknode_get (gchar * what, gint * id) { gchar **sp; gchar buf[1024]; gint len; if (!blanknode_name) return FALSE; if (!(sp = g_strsplit (blanknode_name, "%d", 2))) return FALSE; if (!*sp[0]) { g_strfreev (sp); return FALSE; } len = strlen (sp[0]); if (strncmp (sp[0], what, len)) { g_strfreev (sp); return FALSE; } what += len; *id = atoi (what); snprintf (buf, sizeof (buf), "%d", *id); len = strlen (buf); what += len; if (sp[1]) { len = strlen (sp[1]); if (strncmp (sp[1], what, len)) { g_strfreev (sp); return FALSE; } } g_strfreev (sp); return TRUE; } gchar * blanknode_create (gint id) { gchar **sp; GString *str; if (!blanknode_name) return g_strdup_printf ("%s%d", BLANK_NODE, id); if (!(sp = g_strsplit (blanknode_name, "%d", 2))) return g_strdup_printf ("%s%d", blanknode_name, id); if (!sp[0]) { g_strfreev (sp); return g_strdup_printf ("%s%d", blanknode_name, id); } str = g_string_new (sp[0]); g_string_append_printf (str, "%d", id); if (sp[1]) g_string_append_printf (str, "%s", sp[1]); g_strfreev (sp); return g_string_free (str, FALSE); } /* EOF */ morla-0.16.1/src/browser.c000066400000000000000000000037361156343060400153420ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* Questa funzione esegue un determinato uri dentro ad un browser */ void browser (gchar * what) { GList *list, *old; gchar **a; gint id, ok; /* Funzione interna per lo split dei comandi in liste */ list = old = split (browser_default); /* Creo l'array + 2 (comando e NULL) */ a = g_malloc (sizeof (gchar *) * (g_list_length (list) + 2)); /* Riempo l'array */ ok = id = 0; while (list) { if (!ok && !strcmp ((gchar *) list->data, "%s")) { a[id++] = what; ok++; } else a[id++] = list->data; list = list->next; } if (!ok) a[id++] = what; a[id] = NULL; /* Funzione che esegue il comando. Non passo argomenti particolari * quindi non verra' lanciata nessuna callback al termine del comando */ run (a, NULL, NULL); /* Libero l'array e la lista dei comandi */ g_free (a); g_list_foreach (old, (GFunc) g_free, NULL); g_list_free (old); } /* Questa funzione lancia il browser col sito internet del progetto morla: */ void browser_website (void) { browser (MORLA_WEBSITE); } /* EOF */ morla-0.16.1/src/checks.c000066400000000000000000000040511156343060400151060ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* Check della versione di rasqal. Alcune release crashiano: */ void check_rasqal (void) { gchar s[1024]; if (rasqal_version_major >= 1) return; snprintf (s, sizeof (s), _("Your system has not a stable release of lib Rasqal (%s).\n" "Some query may not return true results. " "Other ones crash and if it is, morla crashes too.\n" "Try to update this library (maybe also Redland).\n\n" "Lib Rasqal copyright:\n%s"), rasqal_version_string, rasqal_copyright_string); dialog_msg (s); } void check_redland (void) { gchar s[1024]; gint version; version = librdf_version_major * 10000 + librdf_version_minor * 100 + librdf_version_release; if (version >= 10002) return; snprintf (s, sizeof (s), _("Your system has not a compatible or stable release of " "libRDF - Redland (%s).\n" "Some RDF document may not be opened. " "Other ones crash and if it is, morla crashes too.\n" "Try to update this library.\n\n" "Lib RDF - Redland copyright:\n%s"), librdf_version_string, librdf_copyright_string); dialog_msg (s); } /* EOF */ morla-0.16.1/src/datatype.c000066400000000000000000000442261156343060400154710ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #define DATATYPE_XSD( a , b , c ) \ if (i >= len || w[i] < a || w[i] > b) \ { \ gchar s[1024]; \ snprintf (s, sizeof (s), c, msg, w); \ dialog_msg (s); \ \ return FALSE; \ } \ else \ i++; static gboolean datatype_check_string (gchar *, gchar *); static gboolean datatype_check_boolean (gchar *, gchar *); static gboolean datatype_check_decimal (gchar *, gchar *); static gboolean datatype_check_float (gchar *, gchar *); static gboolean datatype_check_double (gchar *, gchar *); static gboolean datatype_check_duration (gchar *, gchar *); static gboolean datatype_check_dateTime (gchar *, gchar *); static gboolean datatype_check_time (gchar *, gchar *); static gboolean datatype_check_date (gchar *, gchar *); static gboolean datatype_check_gYearMonth (gchar *, gchar *); static gboolean datatype_check_gYear (gchar *, gchar *); static gboolean datatype_check_gMonth (gchar *, gchar *); static gboolean datatype_check_gMonthDay (gchar *, gchar *); static gboolean datatype_check_gDay (gchar *, gchar *); static gboolean datatype_check_hexBinary (gchar *, gchar *); static gboolean datatype_check_base64Binary (gchar *, gchar *); static gboolean datatype_check_anyURI (gchar *, gchar *); static gboolean datatype_check_qname (gchar *, gchar *); static gboolean datatype_check_notation (gchar *, gchar *); struct datatype_t * datatype_list (void) { static struct datatype_t *datatypes = NULL; if (!datatypes) { datatypes = malloc (sizeof (struct datatype_t) * 21); datatypes[0].uri = ""; datatypes[0].name = ""; datatypes[0].description = _("no datatype"); datatypes[0].check = NULL; datatypes[1].uri = RDF_XSD "string"; datatypes[1].name = _("String"); datatypes[1].description = _("The string datatype represents character strings in XML."); datatypes[1].check = datatype_check_string; datatypes[2].uri = RDF_XSD "boolean"; datatypes[2].name = _("Boolean value"); datatypes[2].description = _ ("Boolean has the value space required to support the mathematical concept of binary-valued logic: {true, false}."); datatypes[2].check = datatype_check_boolean; datatypes[3].uri = RDF_XSD "decimal"; datatypes[3].name = _("Decimal number"); datatypes[3].description = _ ("Decimal represents a subset of the real numbers; which can be represented by decimal numerals."); datatypes[3].check = datatype_check_decimal; datatypes[4].uri = RDF_XSD "float"; datatypes[4].name = _("Float number"); datatypes[4].description = _ ("Float is patterned after the IEEE single-precision 32-bit floating point type."); datatypes[4].check = datatype_check_float; datatypes[5].uri = RDF_XSD "double"; datatypes[5].name = _("Double number"); datatypes[5].description = _ ("The double datatype is patterned after the IEEE double-precision 64-bit floating point type."); datatypes[5].check = datatype_check_double; datatypes[6].uri = RDF_XSD "duration"; datatypes[6].name = _("Duration"); datatypes[6].description = _("Duration represents a duration of time."); datatypes[6].check = datatype_check_duration; datatypes[7].uri = RDF_XSD "dateTime"; datatypes[7].name = _("Data and Time"); datatypes[7].description = _ ("DateTime values may be viewed as objects with integer-valued year, month, day, hour and minute properties, a decimal-valued second property, and a boolean timezoned property."); datatypes[7].check = datatype_check_dateTime; datatypes[8].uri = RDF_XSD "time"; datatypes[8].name = _("Time"); datatypes[8].description = _("Time represents an instant of time that recurs every day."); datatypes[8].check = datatype_check_time; datatypes[9].uri = RDF_XSD "date"; datatypes[9].name = _("Date"); datatypes[9].description = _ ("The value space of date consists of top-open intervals of exactly one day in length on the timelines of dateTime, beginning on the beginning moment of each day (in each timezone), i.e. '00:00:00', up to but not including '24:00:00' (which is identical with '00:00:00' of the next day)."); datatypes[9].check = datatype_check_date; datatypes[10].uri = RDF_XSD "gYearMonth"; datatypes[10].name = _("Year and Month"); datatypes[10].description = _ ("gYearMonth represents a specific gregorian month in a specific gregorian year."); datatypes[10].check = datatype_check_gYearMonth; datatypes[11].uri = RDF_XSD "gYear"; datatypes[11].name = _("Year"); datatypes[11].description = _("gYear represents a gregorian calendar year."); datatypes[11].check = datatype_check_gYear; datatypes[12].uri = RDF_XSD "gMonthDay"; datatypes[12].name = _("Month and Day"); datatypes[12].description = _ ("gMonthDay is a gregorian date that recurs, specifically a day of the year such as the third of May."); datatypes[12].check = datatype_check_gMonthDay; datatypes[13].uri = RDF_XSD "gDay"; datatypes[13].name = _("Day"); datatypes[13].description = _ ("gDay is a gregorian day that recurs, specifically a day of the month such as the 5th of the month."); datatypes[13].check = datatype_check_gDay; datatypes[14].uri = RDF_XSD "gMonth"; datatypes[14].name = _("Month"); datatypes[14].description = _("gMonth is a gregorian month that recurs every year."); datatypes[14].check = datatype_check_gMonth; datatypes[15].uri = RDF_XSD "hexBinary"; datatypes[15].name = _("hex-encoded binary data"); datatypes[15].description = _("hexBinary represents arbitrary hex-encoded binary data."); datatypes[15].check = datatype_check_hexBinary; datatypes[16].uri = RDF_XSD "base64Binary"; datatypes[16].name = _("Base64 encoded binary data"); datatypes[16].description = _("base64Binary represents Base64-encoded arbitrary binary data."); datatypes[16].check = datatype_check_base64Binary; datatypes[17].uri = RDF_XSD "anyURI"; datatypes[17].name = _("Uri"); datatypes[17].description = _("anyURI represents a Uniform Resource Identifier Reference (URI)."); datatypes[17].check = datatype_check_anyURI; datatypes[18].uri = RDF_XSD "QName"; datatypes[18].name = _("Qualified Name"); datatypes[18].description = _("QName represents XML qualified names."); datatypes[18].check = datatype_check_qname; datatypes[19].uri = RDF_XSD "NOTATION"; datatypes[19].name = _("Notation"); datatypes[19].description = _ ("NOTATION represents the NOTATION attribute type from XML 1.0 (Second Edition)."); datatypes[19].check = datatype_check_notation; datatypes[20].uri = NULL; datatypes[20].name = NULL; datatypes[20].description = NULL; datatypes[20].check = NULL; } return datatypes; } gboolean datatype_check (gint id, gchar * what, gchar * msg) { struct datatype_t *datatype = datatype_list (); gchar s[1024]; if (id < 0) return TRUE; if (!datatype[id].check) return TRUE; snprintf (s, sizeof (s), "%s%s", msg ? msg : "", msg ? ": " : ""); return datatype[id].check (what, s); } /* Questa funzione viene avviata quando si cambia il datatype */ void datatype_change (GtkWidget * w, GtkWidget * label) { gint id = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); struct datatype_t *datatype = datatype_list (); gchar s[1024]; if (id < 0) { gtk_label_set_text (GTK_LABEL (label), _("Datatype unknown")); return; } if (*datatype[id].name) snprintf (s, sizeof (s), "%s\n%s", datatype[id].name, datatype[id].description); else snprintf (s, sizeof (s), "%s", datatype[id].description); gtk_label_set_text (GTK_LABEL (label), s); } gint datatype_id (gchar * what) { gint i; struct datatype_t *datatype = datatype_list (); for (i = 0; datatype[i].uri; i++) if (!strcmp (datatype[i].uri, what)) return i; return 0; } static gboolean datatype_check_string (gchar * w, gchar * msg) { return TRUE; } static gboolean datatype_check_boolean (gchar * w, gchar * msg) { if (strcmp (w, "true") && strcmp (w, "false")) { gchar s[1024]; snprintf (s, sizeof (s), _("%sThe object '%s' is not a boolean value (true or false)"), msg, w); dialog_msg (s); return FALSE; } return TRUE; } static gboolean datatype_check_decimal (gchar * w, gchar * msg) { gint len, i; len = strlen (w); i = 0; if (w[i] == '-' || w[i] == '+') i++; for (; i < len; i++) DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a decimal value (-12, 20)")); return TRUE; } static gboolean datatype_check_float (gchar * w, gchar * msg) { if (!strtod (w, NULL) && strcmp (w, "0")) { gchar s[1024]; snprintf (s, sizeof (s), _ ("%sThe object '%s' is not a float value (-1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0)"), msg, w); dialog_msg (s); return FALSE; } return TRUE; } static gboolean datatype_check_double (gchar * w, gchar * msg) { if (!atof (w) && strcmp (w, "0")) { gchar s[1024]; snprintf (s, sizeof (s), _ ("%sThe object '%s' is not a double value (-1E4, 1267.43233E12, 12.78e-2, 12 , -0, 0 and INF)"), msg, w); dialog_msg (s); return FALSE; } return TRUE; } static gboolean datatype_check_duration (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; for (; i < len; i++) { if ((w[i] < '0' || w[i] > '9') && w[i] != 'H' && w[i] != 'M' && w[i] != 'S' && w[i] != 'Y' && w[i] != 'D' && w[i] != 'P') { gchar s[1024]; snprintf (s, sizeof (s), _ ("%sThe object '%s' is not a duration value (P1347Y, P1347M and P1Y2MT2H)"), msg, w); dialog_msg (s); return FALSE; } } return TRUE; } static gboolean datatype_check_dateTime (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; if (w[0] == '-') i++; DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('-', '-', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('-', '-', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('T', 'T', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD (':', ':', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD (':', ':', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); DATATYPE_XSD ('0', '9', _ ("%sThe object '%s' is not a dateTime value (0001-01-01T00:00:00)")); return TRUE; } static gboolean datatype_check_time (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a time value (00:00:00)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a time value (00:00:00)")); DATATYPE_XSD (':', ':', _("%sThe object '%s' is not a time value (00:00:00)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a time value (00:00:00)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a time value (00:00:00)")); DATATYPE_XSD (':', ':', _("%sThe object '%s' is not a time value (00:00:00)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a time value (00:00:00)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a time value (00:00:00)")); return TRUE; } static gboolean datatype_check_date (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('-', '-', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('-', '-', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a date value (0001-01-01)")); return TRUE; } static gboolean datatype_check_gYearMonth (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYearMonth value (2005-04)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYearMonth value (2005-04)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYearMonth value (2005-04)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYearMonth value (2005-04)")); DATATYPE_XSD ('-', '-', _("%sThe object '%s' is not a gYearMonth value (2005-04)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYearMonth value (2005-04)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYearMonth value (2005-04)")); return TRUE; } static gboolean datatype_check_gYear (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYear value (2005)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYear value (2005)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYear value (2005)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gYear value (2005)")); return TRUE; } static gboolean datatype_check_gMonth (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gMonth value (05)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gMonth value (05)")); return TRUE; } static gboolean datatype_check_gMonthDay (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gMonthDay value (MM:DD)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gMonthDay value (MM:DD)")); DATATYPE_XSD (':', ':', _("%sThe object '%s' is not a gMonthDay value (MM:DD)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gMonthDay value (MM:DD)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gMonthDay value (MM:DD)")); return TRUE; } static gboolean datatype_check_gDay (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gDay value (DD)")); DATATYPE_XSD ('0', '9', _("%sThe object '%s' is not a gDay value (DD)")); return TRUE; } static gboolean datatype_check_hexBinary (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; for (; i < len; i++) { if ((w[i] < '0' || w[i] > '9') && (w[i] < 'A' || w[i] > 'F') && (w[i] < 'a' || w[i] > 'f')) { gchar s[1024]; snprintf (s, sizeof (s), _("%sThe object '%s' is not a hexBinary value (0AF37CD)"), msg, w); dialog_msg (s); return FALSE; return FALSE; } } return TRUE; } static gboolean datatype_check_base64Binary (gchar * w, gchar * msg) { gint i, len; len = strlen (w); i = 0; for (; i < len; i++) { if ((w[i] < '0' || w[i] > '9') && (w[i] < 'A' || w[i] > 'F') && (w[i] < 'a' || w[i] > 'f')) { gchar s[1024]; snprintf (s, sizeof (s), _ ("%sThe object '%s' is not a base64Binary value (0AF37CD)"), msg, w); dialog_msg (s); return FALSE; return FALSE; } } return TRUE; } static gboolean datatype_check_anyURI (gchar * w, gchar * msg) { /* Uncheckable */ return TRUE; } static gboolean datatype_check_qname (gchar * w, gchar * msg) { /* Uncheckable */ return TRUE; } static gboolean datatype_check_notation (gchar * w, gchar * msg) { /* Uncheckable */ return TRUE; } gboolean datatype_exists (gchar * what) { struct datatype_t *datatypes = datatype_list (); gint i; for (i = 1; datatypes[i].uri; i++) if (!strcmp (datatypes[i].uri, what)) return TRUE; return FALSE; } /* EOF */ morla-0.16.1/src/dialog.c000066400000000000000000000257201156343060400151130ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* From somax */ gint dialog_ask (gchar * text) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *image; GtkWidget *label; GtkWidget *button; gint ret; gchar s[1024]; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Question...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); label = gtk_label_new (text); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_NO); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); return ret; } gint dialog_ask_with_cancel (gchar * text) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *image; GtkWidget *label; GtkWidget *button; gint ret; gchar s[1024]; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Question...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); label = gtk_label_new (text); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_NO); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); return ret; } void dialog_msg (gchar * text) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *image; GtkWidget *label; GtkWidget *button; gchar s[1024]; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Information...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); label = gtk_label_new (text); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } void dialog_msg_with_error (gchar * text, gchar * error) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *image; GtkWidget *label; GtkWidget *button; gchar s[1024]; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Information...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); label = gtk_label_new (text); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); /* Se c'e' l'errore mostro l'espander: */ if (error) { GtkWidget *expander; GtkWidget *sw; GtkWidget *textview; GtkTextBuffer *buffer; GtkTextIter iter; gint i, j, len; GtkTextTag *tag_init, *tag_error, *tag_warning; expander = gtk_expander_new (NULL); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), expander, TRUE, TRUE, 0); sw = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (expander), sw); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); textview = gtk_text_view_new (); gtk_container_add (GTK_CONTAINER (sw), textview); gtk_widget_set_size_request (textview, -1, 200); gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview), FALSE); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0); tag_init = gtk_text_buffer_create_tag (buffer, NULL, "weight", PANGO_WEIGHT_BOLD, NULL); tag_error = gtk_text_buffer_create_tag (buffer, NULL, "foreground", "red", NULL); tag_warning = gtk_text_buffer_create_tag (buffer, NULL, "foreground", "blue", NULL); for (i = j = 0, len = strlen (error); i < len; i++) { if (error[i] == '\n') { switch (*(error + j)) { case PARSER_CHAR_INIT: gtk_text_buffer_insert_with_tags (buffer, &iter, error + j + 1, i - j, tag_init, NULL); break; case PARSER_CHAR_WARNING: gtk_text_buffer_insert_with_tags (buffer, &iter, error + j + 1, i - j, tag_warning, NULL); break; case PARSER_CHAR_ERROR: gtk_text_buffer_insert_with_tags (buffer, &iter, error + j + 1, i - j, tag_error, NULL); break; } j = i + 1; } } label = gtk_label_new (_("Show error messages")); gtk_expander_set_label_widget (GTK_EXPANDER (expander), label); } button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } static void dialog_wait_destroy (GtkWidget * window, GdkCursor * cursor) { gdk_cursor_unref (cursor); } GtkWidget * dialog_wait (GCallback callback, gpointer data, GtkWidget ** pb_ret) { GtkWidget *window; GtkWidget *frame; GtkWidget *box; GtkWidget *hbox; GtkWidget *image; GtkWidget *pb; GtkWidget *sep; GtkWidget *button; GtkWidget *label; GdkCursor *cursor; gchar s[1024]; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Please Wait...")); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_widget_set_size_request (window, 200, -1); frame = gtk_frame_new (NULL); gtk_container_add (GTK_CONTAINER (window), frame); box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0); image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); label = gtk_label_new (_("Please Wait...")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); pb = gtk_progress_bar_new (); gtk_box_pack_start (GTK_BOX (box), pb, TRUE, TRUE, 0); if (callback) { sep = gtk_hseparator_new (); gtk_box_pack_start (GTK_BOX (box), sep, FALSE, FALSE, 3); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), gtk_hbox_new (0, 0), TRUE, TRUE, 0); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), "clicked", callback, data); } gtk_widget_show_all (window); cursor = gdk_cursor_new (GDK_WATCH); gdk_window_set_cursor (window->window, cursor); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (dialog_wait_destroy), cursor); *pb_ret = pb; return window; } /* EOF */ morla-0.16.1/src/download.c000066400000000000000000000170531156343060400154630ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #define DOWNLOAD_TIMEOUT 10 gchar *download_proxy = NULL; gint download_proxy_port = 0; gchar *download_proxy_user = NULL; gchar *download_proxy_password = NULL; #ifdef USE_GCONF gboolean download_proxy_gconf = TRUE; #endif struct download_mem_t { gchar *mm; gint size; }; static size_t download_memory (void *ptr, size_t size, size_t nmemb, void *data); static gchar *download_codes (gint ret); static gchar *download_mimetype (gchar * uri); gboolean download_uri (gchar * uri, gchar ** buffer, struct download_t *download, gchar ** error) { CURL *curl; CURLcode code; struct download_mem_t *chunk; struct curl_slist *slist = NULL; long retcode; gchar *mime_type; curl_global_init (CURL_GLOBAL_DEFAULT); if (!(curl = curl_easy_init ())) { curl_easy_cleanup (curl); if (error) *error = g_strdup ("Error memory."); return FALSE; } chunk = g_malloc0 (sizeof (struct download_mem_t)); curl_easy_setopt (curl, CURLOPT_URL, uri); curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, download_memory); curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt (curl, CURLOPT_FILE, (void *) chunk); if ((mime_type = download_mimetype (uri))) { slist = curl_slist_append (slist, mime_type); curl_easy_setopt (curl, CURLOPT_HTTPHEADER, slist); } #ifdef USE_GCONF if (download_proxy_gconf) { gchar *proxy; gint port; gchar *user; gchar *password; GSList *list, *l; gboolean ignore = FALSE; if (morla_gconf_proxy (&proxy, &port, &user, &password, &list) == TRUE) { for (l = list; l; l = l->next) { if (g_str_has_prefix (uri, l->data) == TRUE) { ignore = TRUE; break; } } if (ignore == FALSE) { curl_easy_setopt (curl, CURLOPT_PROXY, proxy); curl_easy_setopt (curl, CURLOPT_PROXYPORT, port); if (user && password) { gchar *auth = g_strdup_printf ("%s:%s", user, password); curl_easy_setopt (curl, CURLOPT_PROXYUSERPWD, auth); g_free (auth); } } } } else #endif /* Valori di default: */ if (download_proxy) { curl_easy_setopt (curl, CURLOPT_PROXY, download_proxy); if (download_proxy_port) curl_easy_setopt (curl, CURLOPT_PROXYPORT, download_proxy_port); if (download_proxy_user && download_proxy_password) { gchar *auth = g_strdup_printf ("%s:%s", download_proxy_user, download_proxy_password); curl_easy_setopt (curl, CURLOPT_PROXYUSERPWD, auth); g_free (auth); } } /* Configurazione: */ if (download) { if (download->timeout > 0) curl_easy_setopt (curl, CURLOPT_TIMEOUT, download->timeout); if (download->certfile) { curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, download->verifypeer); curl_easy_setopt (curl, CURLOPT_SSLCERT, download->certfile); if (download->certpassword) curl_easy_setopt (curl, CURLOPT_SSLCERTPASSWD, download->certpassword); if (download->cacertfile) curl_easy_setopt (curl, CURLOPT_CAINFO, download->cacertfile); } if (download->auth_user && download->auth_password) { gchar *auth = g_strdup_printf ("%s:%s", download->auth_user, download->auth_password); curl_easy_setopt (curl, CURLOPT_USERPWD, auth); g_free (auth); } } curl_easy_setopt (curl, CURLOPT_USERAGENT, user_agent ()); if ((code = curl_easy_perform (curl)) != CURLE_OK) { if (chunk->mm) g_free (chunk->mm); g_free (chunk); curl_easy_cleanup (curl); if (error) *error = g_strdup_printf (_("Download error: %s"), curl_easy_strerror (code)); if (mime_type) curl_slist_free_all (slist); return FALSE; } if (mime_type) curl_slist_free_all (slist); if (curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &retcode) != CURLE_OK || ((retcode < 200 || retcode >= 300) && retcode != 0)) { if (chunk->mm) g_free (chunk->mm); g_free (chunk); curl_easy_cleanup (curl); if (error) *error = g_strdup_printf (_("Download error - code %d%s"), (int) retcode, download_codes ((gint) retcode)); return FALSE; } curl_easy_cleanup (curl); *buffer = chunk->mm; g_free (chunk); return TRUE; } static size_t download_memory (void *ptr, size_t size, size_t nmemb, void *data) { gint realsize = size * nmemb; struct download_mem_t *mem = (struct download_mem_t *) data; if (!mem->mm) mem->mm = g_malloc (realsize + 1); else mem->mm = g_realloc (mem->mm, mem->size + realsize + 1); memcpy (mem->mm + mem->size, ptr, realsize); mem->size += realsize; mem->mm[mem->size] = 0; return realsize; } void download_free (struct download_t *download) { if (!download) return; if (download->auth_user) g_free (download->auth_user); if (download->auth_password) g_free (download->auth_password); if (download->certfile) g_free (download->certfile); if (download->certpassword) g_free (download->certpassword); if (download->cacertfile) g_free (download->cacertfile); g_free (download); } struct download_t * download_copy (struct download_t *download) { struct download_t *new; if (!download) return NULL; new = g_malloc0 (sizeof (struct download_t)); new->verifypeer = download->verifypeer; new->timeout = download->timeout; if (download->auth_user) new->auth_user = g_strdup (download->auth_user); if (download->auth_password) new->auth_password = g_strdup (download->auth_password); if (download->certfile) new->certfile = g_strdup (download->certfile); if (download->certpassword) new->certpassword = g_strdup (download->certpassword); if (download->cacertfile) new->cacertfile = g_strdup (download->cacertfile); return new; } static gchar * download_codes (gint ret) { switch (ret) { case 400: return _(" Bad Request"); case 401: return _(" Unauthorized"); case 402: return _(" Payment Required"); case 403: return _(" Forbidden"); case 404: return _(" Not Found"); case 405: return _(" Method Not Allowed"); case 406: return _(" Not Acceptable"); case 407: return _(" Proxy Authentication Required"); case 408: return _(" Request Timeout"); case 409: return _(" Conflict"); case 500: return _(" Internal Server Error"); case 501: return _(" Not Implemented"); case 502: return _(" Bad Gateway"); case 503: return _(" Service Unavailable"); default: return ""; } } static gchar * download_mimetype (gchar * uri) { return "Accept: application/rdf+xml,application/x-turtle,*/*;q=0.1"; } /* EOF */ morla-0.16.1/src/edit.c000066400000000000000000002041571156343060400146040ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* Lista di struct rdf_t per il copia ed incolla */ static GList *edit_dump = NULL; static void edit_remove (struct editor_data_t *data, GtkWidget * widget); static gboolean check_item (struct rdf_t *rdf, gchar * subject, gint * id); static void check_item_set_auto (GtkWidget * widget, GtkWidget * spin); static gboolean check_list (gchar * str, GtkWindow * parent); static gboolean event_box_popup_show (GtkWidget * w, GdkEventButton * event, GtkWidget * label); /* CUT, COPY, PASTE *********************************************************/ /* Questa funzione cancella le triplette selezionate */ void editor_delete (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); GList *rdf; gint len; gboolean ok = FALSE; struct unredo_t *unredo; /* Ci devono essere i dati */ if (!data || (!data->node_select && !data->node_nsselect)) return; /* Mi salvo la lunghezza del namespace selezionato, altrimenti 0 */ if (data->node_nsselect) len = strlen (data->node_nsselect); else len = 0; /* Creo una istanza di undo: tipologia DEL */ unredo = unredo_new (data, UNREDO_TYPE_DEL); /* Per ogni tripletta di questo documento */ rdf = data->rdf; while (rdf) { /* Se devo cancellare dato una tripletta selezionata */ if ((data->node_select && /* e questa tripletta ha un soggetto che corrisponde */ !strcmp (((struct rdf_t *) rdf->data)->subject, data->node_select)) || /* Oppure se devo cancellare dato ad un namespace selezionato */ (data->node_nsselect && /* e questo soggetto coincide */ !strncmp (((struct rdf_t *) rdf->data)->subject, data->node_nsselect, len))) { /* Cancello ma non libero la memoria perche' devo inserirlo... */ edit_remove (data, ((struct rdf_t *) rdf->data)->subject_widget); /* ...in undo: */ unredo_add (unredo, rdf->data, NULL); /* Ho fatto una modifica: */ ok = TRUE; /* Passo al prossimo */ if (rdf->next) { rdf = rdf->next; data->rdf = g_list_remove (data->rdf, rdf->prev->data); continue; } else { data->rdf = g_list_remove (data->rdf, rdf->data); break; } } /* Lo stesso lo faccio per il predicato... */ else if ((data->node_select && !strcmp (((struct rdf_t *) rdf->data)->predicate, data->node_select)) || (data->node_nsselect && !strncmp (((struct rdf_t *) rdf->data)-> predicate, data-> node_nsselect, len))) { edit_remove (data, ((struct rdf_t *) rdf->data)->predicate_widget); unredo_add (unredo, rdf->data, NULL); ok = TRUE; if (rdf->next) { rdf = rdf->next; data->rdf = g_list_remove (data->rdf, rdf->prev->data); continue; } else { data->rdf = g_list_remove (data->rdf, rdf->data); break; } } /* ... e per il coggetto */ else if ((data->node_select && !strcmp (((struct rdf_t *) rdf->data)->object, data->node_select)) || (data->node_nsselect && !strncmp (((struct rdf_t *) rdf->data)-> object, data-> node_nsselect, len))) { edit_remove (data, ((struct rdf_t *) rdf->data)->object_widget); unredo_add (unredo, rdf->data, NULL); ok = TRUE; if (rdf->next) { rdf = rdf->next; data->rdf = g_list_remove (data->rdf, rdf->prev->data); continue; } else { data->rdf = g_list_remove (data->rdf, rdf->data); break; } } /* Cosi' fino alla fine... */ rdf = rdf->next; } /* Se devo cancellare un namespace lo devo rimuovere dalla lista */ if (data->node_nsselect) { GList *tmp = data->namespace; while (tmp) { /* Se lo trovo, lo cancello e libero la memoria */ if (!strcmp (((struct namespace_t *) tmp->data)->namespace, data->node_nsselect)) { ok = TRUE; namespace_free (tmp->data); data->namespace = g_list_remove (data->namespace, tmp->data); /* Refresho l'interfaccia */ editor_refresh_nslist (data); break; } tmp = tmp->next; } } /* Se ho fatto una modifica lo devo segnalare */ data->changed = ok; } /* Questa funzione cencella solo la tripletta selezionata */ void editor_delete_triple (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); struct unredo_t *unredo; /* Se non ci sono i dati base per compiere questa operazione */ if (!data || !data->rdf_select) return; /* Istanza UNDO: */ unredo = unredo_new (data, UNREDO_TYPE_DEL); unredo_add (unredo, data->rdf_select, NULL); /* Rimuovo: */ data->rdf = g_list_remove (data->rdf, data->rdf_select); edit_remove (data, data->rdf_select->subject_widget); data->rdf_select = NULL; /* Modifica comunicata */ data->changed = TRUE; } /* Il cut e' copy + delete */ void editor_cut (GtkWidget * w, gpointer dummy) { editor_copy (w, dummy); editor_delete (w, dummy); } /* Come sopra */ void editor_cut_triple (GtkWidget * w, gpointer dummy) { editor_copy_triple (w, dummy); editor_delete_triple (w, dummy); } /* Il copy: */ void editor_copy (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); GList *rdf, *new = NULL; gint len; /* Devono esserci gli elementi base */ if (!data || (!data->node_select && !data->node_nsselect)) return; /* Mi salvo la lunghezza: */ if (data->node_nsselect) len = strlen (data->node_nsselect); else len = 0; /* Per ogni tripletta di questo documento... */ rdf = data->rdf; while (rdf) { /* Se devo copiare dato una tripletta... */ if ((data->node_select && /* ... e questo soggetto coincide, */ !strcmp (((struct rdf_t *) rdf->data)->subject, data->node_select)) /* oppure se devo copiare un base ad un namespace... */ || (data->node_nsselect && /* ... e questo soggetto coincide... */ !strncmp (((struct rdf_t *) rdf->data)->subject, data->node_nsselect, len))) { /* Copio nella lista NEW un dump della tripletta: */ new = g_list_append (new, rdf_copy (rdf->data)); } /* Idem per il predicato */ else if ((data->node_select && !strcmp (((struct rdf_t *) rdf->data)->predicate, data->node_select)) || (data->node_nsselect && !strncmp (((struct rdf_t *) rdf->data)-> predicate, data-> node_nsselect, len))) new = g_list_append (new, rdf_copy (rdf->data)); /* Per il c.oggetto */ else if ((data->node_select && !strcmp (((struct rdf_t *) rdf->data)->object, data->node_select)) || (data->node_nsselect && !strncmp (((struct rdf_t *) rdf->data)-> object, data-> node_nsselect, len))) new = g_list_append (new, rdf_copy (rdf->data)); rdf = rdf->next; } /* Se ho una copia precedente, la libero: */ if (edit_dump) { g_list_foreach (edit_dump, (GFunc) rdf_free, NULL); g_list_free (edit_dump); } /* Metto NEW dentro edit_dump: */ edit_dump = new; } /* Questo copia una sola tripletta: */ void editor_copy_triple (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); if (!data || !data->rdf_select) return; /* Libero memoria: */ if (edit_dump) { g_list_foreach (edit_dump, (GFunc) rdf_free, NULL); g_list_free (edit_dump); } /* Dump: */ edit_dump = g_list_append (NULL, rdf_copy (data->rdf_select)); } /* Questa funzione incolla: */ void editor_paste (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); struct unredo_t *unredo; struct rdf_t *rdf; GList *list; /* Devo avere un qualcosa copiato: */ if (!data || !edit_dump) return; /* Istanza di undo: */ unredo = unredo_new (data, UNREDO_TYPE_ADD); /* Per ognuno della lista di dump... */ list = edit_dump; while (list) { /* Dumplico la tripletta */ rdf = rdf_copy (list->data); /* Inserisco in undo come inserimento */ unredo_add (unredo, rdf, NULL); /* Appendo alla lista delle triplette per questo documento */ data->rdf = g_list_prepend (data->rdf, rdf); list = list->next; } /* Libero i namespace precedenti: */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); /* Parso i namespace nuovamente: */ namespace_parse (data->rdf, &data->namespace); /* Comunico il cambiamento: */ data->changed = TRUE; /* Refresh dell'interfaccia: */ editor_refresh (data); } /* LISTS ********************************************************************/ /* Questa funzione data una lista, la restituisce senza doppioni: */ GList * create_no_dup (GList * ret) { gchar *prev; GList *list; /* Ordino per nome: */ ret = list = g_list_sort (ret, (GCompareFunc) strcmp); prev = NULL; /* Per ogni elemento della lista */ while (list) { /* Se non esiste un precedente oppure se quello attuale e' diverso * dal precedente, aggiorno il precedente: */ if (!prev || strcmp (prev, list->data)) prev = (gchar *) list->data; /* Altrimenti rimuovo: */ else { if (list->next) { list = list->next; ret = g_list_remove (ret, list->prev->data); continue; } else { ret = g_list_remove (ret, list->data); break; } } list = list->next; } /* Riconsegno: */ return ret; } /* Questa funzione crea una lista con tutte le risorse esistenti in questo * documento: */ GList * create_resources (struct editor_data_t * data) { GList *list = data->rdf; GList *ret = NULL; struct rdf_t *rdf; /* Per ogni tripletta... */ while (list) { rdf = list->data; /* Il soggetto e' sempre una risorsa: */ ret = g_list_append (ret, rdf->subject); /* ... e a volte anche il c.oggetto: */ if (rdf->object_type != RDF_OBJECT_LITERAL) ret = g_list_append (ret, rdf->object); list = list->next; } /* Tolgo i dublicati e consegno: */ return create_no_dup (ret); } /* Questa funzione crea una lista con tutte le risorse degli RDFS: */ GList * create_resources_by_rdfs (GList * ret) { GList *list, *l; struct rdfs_t *rdfs; struct rdf_t *rdf; /* Per ogni rdfs: */ list = rdfs_list; while (list) { rdfs = list->data; /* per ogni tripletta di questo rdfs: */ l = rdfs->data; while (l) { rdf = l->data; /* il soggetto se non e' un blank node: */ if (!rdf_blank (rdfs->data, rdf->subject)) ret = g_list_append (ret, rdf->subject); /* il complemento oggetto se e' una risorsa: */ if (rdf->object_type == RDF_OBJECT_RESOURCE) ret = g_list_append (ret, rdf->object); l = l->next; } list = list->next; } /* No duplicati: */ return create_no_dup (ret); } /* Questa funzione crea una lista con tutti i blank node: */ GList * create_blank (struct editor_data_t * data) { GList *list = data->rdf; GList *ret = NULL; struct rdf_t *rdf; /* Per ogni tripletta di questo documento: */ while (list) { rdf = list->data; /* Se e' un blank node: */ if (rdf->object_type == RDF_OBJECT_BLANK) ret = g_list_append (ret, rdf->object); list = list->next; } /* no duplicati: */ return create_no_dup (ret); } /* SEARCH ********************************************************************/ static gboolean search_resources_cmp_fragment (const gchar * a, const gchar * b) { gchar *a1, *b1, *c1; a1 = g_utf8_casefold (a, -1); b1 = g_utf8_casefold (b, -1); c1 = g_strrstr (a1, b1); g_free (a1); g_free (b1); return c1 ? TRUE : FALSE; } static gboolean search_resources_cmp (const gchar * a, const gchar * b) { gchar **part, **old; gboolean ret = 1; old = part = g_strsplit (b, " ", 0); if (!part) return 0; while (*part) { if (!(ret = search_resources_cmp_fragment (a, *part))) break; part++; } g_strfreev (old); return ret; } static void search_resources_changed (GtkWidget * entry, GtkListStore * store) { GtkTreeIter iter; const gchar *text; GList *list; while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, NULL, 0)) gtk_list_store_remove (store, &iter); text = gtk_entry_get_text (GTK_ENTRY (entry)); list = g_object_get_data (G_OBJECT (entry), "list"); while (list) { if ((text && text[0] && search_resources_cmp (list->data, text)) || (!text || !text[0])) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, list->data, -1); } list = list->next; } } static void search_resources_clicked (GtkWidget * button, GtkListStore * store) { GtkWidget *entry = g_object_get_data (G_OBJECT (button), "entry"); search_resources_changed (entry, store); } static void search_resources_select (GtkWidget * widget, GtkTreePath * p, GtkTreeViewColumn * c, GtkWidget * dialog) { gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); } void search_resources (GtkWidget * widget, GtkWidget * entry) { GList *list; gchar *text; list = g_object_get_data (G_OBJECT (widget), "list"); if ((text = search_list (list, GTK_WINDOW (gtk_widget_get_toplevel (widget))))) { gtk_entry_set_text (GTK_ENTRY (entry), text); g_free (text); } } gchar * search_list (GList * list, GtkWindow * parent) { GtkWidget *dialog; GtkWidget *e; GtkWidget *box; GtkWidget *sw; GtkWidget *tv; GtkWidget *button; GtkWidget *image; GtkListStore *model; GtkTreeIter iter; GtkTreeSelection *selection; GtkCellRenderer *renderer; gchar s[1024]; gchar *text = NULL; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Search datas...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); gtk_widget_set_size_request (dialog, 500, 300); box = gtk_hbox_new (0, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), box, FALSE, FALSE, 0); sw = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), sw, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); model = gtk_list_store_new (1, G_TYPE_STRING); tv = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (tv), FALSE); gtk_container_add (GTK_CONTAINER (sw), tv); g_signal_connect ((gpointer) tv, "row_activated", G_CALLBACK (search_resources_select), dialog); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (tv), TRUE); renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tv), -1, _("Results"), renderer, "text", 0, NULL); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_NO); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); e = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (box), e, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (e), "list", list); g_signal_connect (G_OBJECT (e), "changed", G_CALLBACK (search_resources_changed), model); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "entry", e); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (search_resources_clicked), model); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); while (list) { gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, 0, list->data, -1); list = list->next; } gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { if (!gtk_tree_selection_count_selected_rows (selection)) { dialog_msg (_("Select a item of the list!")); continue; } if (gtk_tree_selection_get_selected (selection, NULL, &iter)) gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 0, &text, -1); break; } g_object_unref (model); gtk_widget_destroy (dialog); return text; } /* ADD CALLBACK **************************************************************/ /* Aggiunge al GtkListStore delle proprieta' quelle che si rieferiscono * all'rdfs dato l'ID della lista rdfs_list */ static void add_items (GtkListStore * store, gint id) { GList *list; GList *end; GtkTreeIter iter; struct rdf_t *rdf; /* Cerco l'rdfs nella lista rdfs_list */ if (!(list = g_list_nth (rdfs_list, id))) return; /* Rimuovo le proprieta' prevedenti: */ while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, NULL, 0)) gtk_list_store_remove (store, &iter); /* Per ogni tripletta dell'rdfs... */ list = ((struct rdfs_t *) list->data)->data; end = NULL; while (list) { rdf = list->data; /* Se e': oppure, oppure, appendo alla lista: */ if (rdf->object_type == RDF_OBJECT_RESOURCE && !strcmp (rdf->predicate, RDF_TYPE) && (!strcmp (rdf->object, RDF_PROPERTY) || !strcmp (rdf->object, OWL_O_PROPERTY) || !strcmp (rdf->object, OWL_DT_PROPERTY))) { end = g_list_append (end, rdf->subject); } /* Cosi' fino alla fine: */ list = list->next; } list = end = create_no_dup (end); while (list) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, list->data, -1); list = list->next; } g_list_free (end); } /* Quesa funzione aggiorna i campi GtkLabel con i commenti, label, domain, * range della propieta' selezionata: */ static void info_changed (GtkWidget * w, GtkWidget * widget) { GList *comments = NULL, *labels = NULL; /* ID della proprieta' dato il combobox */ gint id_p = gtk_combo_box_get_active (GTK_COMBO_BOX (w)); /* ID del rdfs dato il combo box: */ gint id_n = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* Tutti gli oggetti GtkLabel che devo aggiornare: */ GtkWidget *label = g_object_get_data (G_OBJECT (w), "label"); GtkWidget *comment = g_object_get_data (G_OBJECT (w), "comment"); GtkWidget *domain = g_object_get_data (G_OBJECT (w), "domain"); GtkWidget *range = g_object_get_data (G_OBJECT (w), "range"); GtkTreeModel *model; GtkTreeIter iter; GList *rdfs, *list; gchar *what = NULL; struct info_box_t *info; /* Annullo il contenuto: */ gtk_label_set_text (GTK_LABEL (label), ""); gtk_label_set_text (GTK_LABEL (comment), ""); gtk_label_set_text (GTK_LABEL (domain), ""); gtk_label_set_text (GTK_LABEL (range), ""); /* Cerco il base all'ID l'rdfs: */ if (!(rdfs = g_list_nth (rdfs_list, id_n))) return; /* Cerco la proprieta' in base al GtkTreeModel: */ model = gtk_combo_box_get_model (GTK_COMBO_BOX (w)); if (id_p < 0 || !gtk_tree_model_iter_nth_child (model, &iter, NULL, id_p)) return; gtk_tree_model_get (model, &iter, 0, &what, -1); if (!what) return; /* Cerco in base all'RDFS... */ list = ((struct rdfs_t *) rdfs->data)->data; while (list) { struct rdf_t *rdf = list->data; /* ... in corrispondenza del soggetto: */ if (!strcmp (rdf->subject, what)) { /* ... il commento: */ if (!strcmp (rdf->predicate, RDFS_COMMENT) && rdf->object_type == RDF_OBJECT_LITERAL) { /* I commenti possono essere multilungua, * e quindi ne creo una lista */ info = g_malloc0 (sizeof (struct info_box_t)); info->lang = rdf->lang ? g_strdup (rdf->lang) : NULL; info->value = g_strdup (rdf->object); comments = g_list_append (comments, info); } /* ... la label */ else if (!strcmp (rdf->predicate, RDFS_LABEL) && rdf->object_type == RDF_OBJECT_LITERAL) { /* tratto i label come i commenti */ info = g_malloc0 (sizeof (struct info_box_t)); info->lang = rdf->lang ? g_strdup (rdf->lang) : NULL; info->value = g_strdup (rdf->object); labels = g_list_append (labels, info); } /* ... il dominio */ else if (!strcmp (rdf->predicate, RDFS_DOMAIN)) gtk_label_set_text (GTK_LABEL (domain), rdf->object); /* ... il range */ else if (!strcmp (rdf->predicate, RDFS_RANGE)) gtk_label_set_text (GTK_LABEL (range), rdf->object); } list = list->next; } /* Se c'e' un commento: */ if (comments) { /* Cerco quelli senza lingua: */ list = comments; while (list) { info = list->data; if (!info->lang) { gtk_label_set_text (GTK_LABEL (comment), info->value); break; } list = list->next; } if (!list) { info = comments->data; gtk_label_set_text (GTK_LABEL (comment), info->value); } if ((list = g_object_get_data (G_OBJECT (comment), "data"))) { g_list_foreach (list, (GFunc) info_box_free, NULL); g_list_free (list); } g_object_set_data (G_OBJECT (comment), "data", comments); } /* Idem per i labels: */ if (labels) { list = labels; while (list) { info = list->data; if (!info->lang) { gtk_label_set_text (GTK_LABEL (label), info->value); break; } list = list->next; } if (!list) { info = labels->data; gtk_label_set_text (GTK_LABEL (label), info->value); } if ((list = g_object_get_data (G_OBJECT (label), "data"))) { g_list_foreach (list, (GFunc) info_box_free, NULL); g_list_free (list); } g_object_set_data (G_OBJECT (label), "data", labels); } } /* Questa funzione viene azionata quando viene cambiato il combobox degli * rdfs: */ static void property_changed (GtkWidget * widget, GtkWidget * w) { GtkListStore *store = (GtkListStore *) gtk_combo_box_get_model (GTK_COMBO_BOX (w)); gint id = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); /* Lancio l'aggiornamento delle proprieta': */ add_items (store, id); /* Setto attivo l'item 0: */ gtk_combo_box_set_active (GTK_COMBO_BOX (w), 0); /* Aggiorno le info: */ info_changed (w, widget); } /* Questa funzione e' lanciata quando si distruggono gli oggetti di * suggerimento che contengono delle liste */ static void destroy_list (GtkWidget * w, gpointer dummy) { GList *list = g_object_get_data (G_OBJECT (w), "data"); if (list) { g_list_foreach (list, (GFunc) info_box_free, NULL); g_list_free (list); } } /* Questa funzione viene avviata quando si seleziona il predicato o * il predicato ad item */ static void toggled_predicate (GtkWidget * w, gpointer dummy) { GtkWidget *f_predicate; GtkWidget *f_item; GtkWidget *b_predicate; GtkWidget *b_item; /* I valori che devo gestire */ f_predicate = g_object_get_data (G_OBJECT (w), "frame_predicate"); f_item = g_object_get_data (G_OBJECT (w), "frame_item"); b_predicate = g_object_get_data (G_OBJECT (w), "button_predicate"); b_item = g_object_get_data (G_OBJECT (w), "button_item"); /* Se e' stato selezionato il predicato, rendo sensibili le sue sezioni * e non le altre */ if (b_predicate == w) { gtk_widget_set_sensitive (f_predicate, TRUE); gtk_widget_set_sensitive (f_item, FALSE); } /* il contraio: */ else { gtk_widget_set_sensitive (f_predicate, FALSE); gtk_widget_set_sensitive (f_item, TRUE); } } /* Questa funzione viene azionata dai radiobutton della tipologia coggetto */ static void toggled_object (GtkWidget * w, gpointer dummy) { GtkWidget *t_literal; GtkWidget *t_resource; GtkWidget *t_blanknode; GtkWidget *object; GtkWidget *lang; GtkWidget *datatype; GList *resources; GList *blanks; /* Una serie di valori che mi servono: */ t_literal = (GtkWidget *) g_object_get_data (G_OBJECT (w), "literal"); t_resource = (GtkWidget *) g_object_get_data (G_OBJECT (w), "resource"); t_blanknode = (GtkWidget *) g_object_get_data (G_OBJECT (w), "blanknode"); blanks = (GList *) g_object_get_data (G_OBJECT (w), "blank_list"); resources = (GList *) g_object_get_data (G_OBJECT (w), "resources_list"); object = (GtkWidget *) g_object_get_data (G_OBJECT (w), "object"); lang = (GtkWidget *) g_object_get_data (G_OBJECT (w), "lang"); datatype = (GtkWidget *) g_object_get_data (G_OBJECT (w), "datatype"); /* Se e' stato selezionato un letterale non ci devono essere suggerimenti * e la lungua e' sensibile:*/ if (w == t_literal) { g_object_steal_data (G_OBJECT (object), "list"); gtk_widget_set_sensitive (lang, TRUE); gtk_widget_set_sensitive (datatype, TRUE); } /* Negli altri casi cambia la tipologia di suggerimento: */ else if (w == t_resource) { g_object_set_data (G_OBJECT (object), "list", resources); gtk_widget_set_sensitive (lang, FALSE); gtk_widget_set_sensitive (datatype, FALSE); } else { g_object_set_data (G_OBJECT (object), "list", blanks); gtk_widget_set_sensitive (lang, FALSE); gtk_widget_set_sensitive (datatype, FALSE); } } /* ADD FUNCTIONS *************************************************************/ /* Questa funzione aggiunge una tripletta all documento RDF: */ void editor_add (GtkWidget * w, gpointer dummy) { struct rdf_t *rdf; struct editor_data_t *data = editor_get_data (); struct unredo_t *unredo; if (!data) return; /* Uso editor_triple per la creazione della tripletta */ if (!(rdf = editor_triple (NULL, _("Add RDF triple...")))) return; /* Attivo un undo in modalita' ADD: */ unredo = unredo_new (data, UNREDO_TYPE_ADD); unredo_add (unredo, rdf, NULL); /* Aggiungo la tripletta: */ data->rdf = g_list_append (data->rdf, rdf); /* Refreshio i namespace e li rigenero */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); namespace_parse (data->rdf, &data->namespace); /* Comunico il cambiamento */ data->changed = TRUE; /* Refreshio: */ editor_refresh (data); } /* Questa funzione crea realmente una tripletta. Se gli si da' un prev_rdf * setta dei valori di default: */ struct rdf_t * editor_triple (struct rdf_t *prev_rdf, gchar * title) { GtkWidget *dialog; GtkWidget *box, *vbox, *hbox; GtkWidget *frame; GtkWidget *label; GtkWidget *button; GtkWidget *subject; GtkWidget *namespace; GtkWidget *property; GtkWidget *object; GtkWidget *lang; GtkWidget *datatype; GtkWidget *image; GtkWidget *type_literal; GtkWidget *type_resource; GtkWidget *type_blanknode; GtkWidget *button_predicate, *button_item; GtkWidget *button_subject, *button_subject_this; GtkWidget *frame_predicate, *frame_item; GtkTreeIter iter; GtkListStore *store; GtkCellRenderer *renderer; GtkWidget *item; GtkWidget *event; GtkObject *adj; GList *list; GList *resources; GList *blanks; struct editor_data_t *data = editor_get_data (); GSList *l; struct rdfs_t *rdfs; struct rdf_t *rdf = NULL; gint id = 0; gchar s[1024]; struct datatype_t *datatypes = datatype_list (); /* Se non c'e' il documento: */ if (!data) return NULL; /* Creo le liste: */ resources = create_resources (data); resources = create_resources_by_rdfs (resources); blanks = create_blank (data); /* interfaccia: */ dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, title); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); /* Soggetto risorsa: */ label = gtk_label_new (_("Subject")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 5); vbox = gtk_vbox_new (FALSE, 3); gtk_container_add (GTK_CONTAINER (frame), vbox); box = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); l = NULL; button = gtk_radio_button_new_with_label (NULL, _("Resource: ")); button_subject = button; gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 3); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 5); /* Creazione soggetto con freccia: */ subject = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), subject, TRUE, TRUE, 0); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "list", resources); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), subject); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); box = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); button = gtk_radio_button_new_with_label (NULL, _("This Document")); button_subject_this = button; gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 3); if (prev_rdf && !strcmp (prev_rdf->subject, THIS_DOCUMENT)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_subject_this), TRUE); else { if (prev_rdf) gtk_entry_set_text (GTK_ENTRY (subject), prev_rdf->subject); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_subject), TRUE); } l = NULL; label = gtk_label_new (_("Predicate")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); /* Radio button per il predicato */ button = gtk_radio_button_new (NULL); button_predicate = button; gtk_container_add (GTK_CONTAINER (button), label); gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), button); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 5); vbox = gtk_vbox_new (FALSE, 5); frame_predicate = vbox; gtk_container_add (GTK_CONTAINER (frame), vbox); box = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 5); label = gtk_label_new (_("RDFS: ")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); /* Aggiungo gli RDFs ad un store: */ store = gtk_list_store_new (1, G_TYPE_STRING); list = rdfs_list; while (list) { rdfs = list->data; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, rdfs->resource, -1); list = list->next; } namespace = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_combo_box_set_active (GTK_COMBO_BOX (namespace), 0); gtk_box_pack_start (GTK_BOX (box), namespace, TRUE, TRUE, 5); /* Se esiste un precedente e non e' di una tipologia LISTA... */ if (prev_rdf && strncmp (prev_rdf->predicate, RDF_ITEM, strlen (RDF_ITEM))) { gint len; struct namespace_t *ns; gchar *prev_ns = NULL; /* lo ricerco: */ list = data->namespace; while (list) { ns = (struct namespace_t *) list->data; /* attenzione agli '/' perche' potrebbero esserci namespace * con un uri pressoche' identico ma + breve: */ len = strlen (ns->namespace); if (!strncmp (ns->namespace, prev_rdf->predicate, len) && !strstr (prev_rdf->predicate + len, "/")) { prev_ns = ns->namespace; break; } list = list->next; } /* Se ho trovato il precedente, lo vado a cercare: */ if (prev_ns && gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter) == TRUE) { gchar *tmp; id = 0; do { gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &tmp, -1); /* Se coicide, lo attivo: */ if (!strcmp (prev_ns, tmp)) { gtk_combo_box_set_active (GTK_COMBO_BOX (namespace), id); g_free (tmp); break; } g_free (tmp); id++; } /* Cosi' per ogni elemento dello store */ while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); } } /* Se non l'ho trovato o se non l'ho cercato: id e' 0: */ else id = 0; g_object_unref (store); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (namespace), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (namespace), renderer, "text", 0, NULL); box = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 5); label = gtk_label_new (_("Property: ")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); /* Creo lo store e lo riempo con i valori: */ store = gtk_list_store_new (1, G_TYPE_STRING); add_items (store, prev_rdf ? id : 0); property = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_combo_box_set_active (GTK_COMBO_BOX (property), 0); gtk_box_pack_start (GTK_BOX (box), property, TRUE, TRUE, 5); /* Se c'e' un precedente e' questo non e' una LISTA */ if (prev_rdf && strncmp (prev_rdf->predicate, RDF_ITEM, strlen (RDF_ITEM)) && gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter) == TRUE) { gchar *tmp; id = 0; do { gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &tmp, -1); /* Vado alla ricerca e se lo trovo lo seleziono: */ if (!strcmp (prev_rdf->predicate, tmp)) { gtk_combo_box_set_active (GTK_COMBO_BOX (property), id); g_free (tmp); break; } g_free (tmp); id++; } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); } g_object_unref (store); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (property), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (property), renderer, "text", 0, NULL); /* I campi di informazione: */ frame = gtk_frame_new (_("Information")); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 5); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Label: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); event = gtk_event_box_new (); gtk_widget_set_events (event, GDK_BUTTON_PRESS_MASK); gtk_box_pack_start (GTK_BOX (box), event, TRUE, TRUE, 5); g_signal_connect (G_OBJECT (event), "enter-notify-event", G_CALLBACK (info_box_enter), NULL); g_signal_connect (G_OBJECT (event), "leave-notify-event", G_CALLBACK (info_box_leave), NULL); label = gtk_label_new (""); gtk_container_add (GTK_CONTAINER (event), label); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); g_object_set_data (G_OBJECT (property), "label", label); g_signal_connect (G_OBJECT (label), "destroy", G_CALLBACK (destroy_list), NULL); g_signal_connect (G_OBJECT (event), "button_press_event", G_CALLBACK (event_box_popup_show), label); g_signal_connect (G_OBJECT (event), "button_release_event", G_CALLBACK (info_box_popup_hide), NULL); frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Comment: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); event = gtk_event_box_new (); gtk_widget_set_events (event, GDK_BUTTON_PRESS_MASK); gtk_box_pack_start (GTK_BOX (box), event, TRUE, TRUE, 5); g_signal_connect (G_OBJECT (event), "enter-notify-event", G_CALLBACK (info_box_enter), NULL); g_signal_connect (G_OBJECT (event), "leave-notify-event", G_CALLBACK (info_box_leave), NULL); label = gtk_label_new (""); gtk_container_add (GTK_CONTAINER (event), label); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); g_object_set_data (G_OBJECT (property), "comment", label); g_signal_connect (G_OBJECT (label), "destroy", G_CALLBACK (destroy_list), NULL); g_signal_connect (G_OBJECT (event), "button_press_event", G_CALLBACK (event_box_popup_show), label); g_signal_connect (G_OBJECT (event), "button_release_event", G_CALLBACK (info_box_popup_hide), NULL); frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Domain: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); label = gtk_label_new (""); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 5); g_object_set_data (G_OBJECT (property), "domain", label); frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Range: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); label = gtk_label_new (""); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 5); g_object_set_data (G_OBJECT (property), "range", label); info_changed (property, namespace); g_signal_connect ((gpointer) namespace, "changed", G_CALLBACK (property_changed), property); g_signal_connect ((gpointer) property, "changed", G_CALLBACK (info_changed), namespace); label = gtk_label_new (_("Predicate Item")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); /* Predicate Item radio button */ button = gtk_radio_button_new (NULL); button_item = button; gtk_container_add (GTK_CONTAINER (button), label); gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), button); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 5); box = gtk_hbox_new (FALSE, 5); frame_item = box; gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Number: ")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); adj = gtk_adjustment_new (0, 0, 9999, 1, 10, 100); item = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0); gtk_box_pack_start (GTK_BOX (box), item, TRUE, TRUE, 5); /* Qui c'e' uno spin button settato al valore del precedente: */ if (prev_rdf && !strncmp (prev_rdf->predicate, RDF_ITEM, strlen (RDF_ITEM))) gtk_spin_button_set_value (GTK_SPIN_BUTTON (item), atoi (prev_rdf->predicate + strlen (RDF_ITEM))); button = gtk_button_new_with_label (_("Auto")); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 5); g_object_set_data (G_OBJECT (button), "subject", subject); g_object_set_data (G_OBJECT (button), "subject_this", button_subject_this); g_signal_connect_after ((gpointer) button, "clicked", G_CALLBACK (check_item_set_auto), item); /* Setto tutte le variabili che mi serviranno */ g_object_set_data (G_OBJECT (button_item), "frame_predicate", frame_predicate); g_object_set_data (G_OBJECT (button_item), "frame_item", frame_item); g_object_set_data (G_OBJECT (button_item), "button_predicate", button_predicate); g_object_set_data (G_OBJECT (button_item), "button_item", button_item); g_object_set_data (G_OBJECT (button_predicate), "frame_predicate", frame_predicate); g_object_set_data (G_OBJECT (button_predicate), "frame_item", frame_item); g_object_set_data (G_OBJECT (button_predicate), "button_predicate", button_predicate); g_object_set_data (G_OBJECT (button_predicate), "button_item", button_item); g_signal_connect_after ((gpointer) button_predicate, "toggled", G_CALLBACK (toggled_predicate), NULL); g_signal_connect_after ((gpointer) button_item, "toggled", G_CALLBACK (toggled_predicate), NULL); /* Do una preconfigurazione: */ if (!prev_rdf) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_predicate), TRUE); toggled_predicate (button_predicate, NULL); } else { if (!strncmp (prev_rdf->predicate, RDF_ITEM, strlen (RDF_ITEM))) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_item), TRUE); toggled_predicate (button_item, NULL); } else { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button_predicate), TRUE); toggled_predicate (button_predicate, NULL); } } label = gtk_label_new (_("Object")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 5); vbox = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), vbox); box = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 5); label = gtk_label_new ("Type: "); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); /* Possibilita' delle tipologie per il c.oggettto: */ l = NULL; type_literal = gtk_radio_button_new_with_label (NULL, _("Literal")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (type_literal), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (type_literal)); gtk_box_pack_start (GTK_BOX (box), type_literal, TRUE, TRUE, 3); type_resource = gtk_radio_button_new_with_label (NULL, _("Resource")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (type_resource), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (type_resource)); gtk_box_pack_start (GTK_BOX (box), type_resource, TRUE, TRUE, 3); type_blanknode = gtk_radio_button_new_with_label (NULL, _("Blank node")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (type_blanknode), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (type_blanknode)); gtk_box_pack_start (GTK_BOX (box), type_blanknode, TRUE, TRUE, 3); /* Preconfigurazione: */ if (prev_rdf) { switch (prev_rdf->object_type) { case RDF_OBJECT_LITERAL: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type_literal), TRUE); break; case RDF_OBJECT_RESOURCE: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type_resource), TRUE); break; case RDF_OBJECT_BLANK: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type_blanknode), TRUE); break; } } else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type_literal), TRUE); box = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 5); label = gtk_label_new (_("Language: ")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); lang = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (box), lang, TRUE, TRUE, 5); if (prev_rdf && prev_rdf->lang) gtk_entry_set_text (GTK_ENTRY (lang), prev_rdf->lang); frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 5); box = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), box); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("Datatype: ")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); datatype = gtk_combo_box_entry_new_text (); gtk_box_pack_start (GTK_BOX (hbox), datatype, TRUE, TRUE, 5); label = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER); gtk_combo_box_append_text (GTK_COMBO_BOX (datatype), datatypes[0].uri); gtk_combo_box_set_active (GTK_COMBO_BOX (datatype), 0); for (id = 1; datatypes[id].uri; id++) { gtk_combo_box_append_text (GTK_COMBO_BOX (datatype), datatypes[id].uri); if (prev_rdf && prev_rdf->datatype && !strcmp (prev_rdf->datatype, datatypes[id].uri)) gtk_combo_box_set_active (GTK_COMBO_BOX (datatype), id); } datatype_change (datatype, label); g_signal_connect_after ((gpointer) datatype, "changed", G_CALLBACK (datatype_change), label); box = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 5); label = gtk_label_new (_("Value: ")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 5); object = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), object, TRUE, TRUE, 0); if (prev_rdf) gtk_entry_set_text (GTK_ENTRY (object), prev_rdf->object); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), object); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); /* In base al precedente setto dei flag nella lista di suggerimento: */ if (prev_rdf) { switch (prev_rdf->object_type) { case RDF_OBJECT_BLANK: g_object_set_data (G_OBJECT (button), "list", blanks); break; case RDF_OBJECT_RESOURCE: g_object_set_data (G_OBJECT (button), "list", resources); break; default: break; } } /* Variabili per le funzioni di callback: */ g_object_set_data (G_OBJECT (type_literal), "literal", type_literal); g_object_set_data (G_OBJECT (type_literal), "resource", type_resource); g_object_set_data (G_OBJECT (type_literal), "blanknode", type_blanknode); g_object_set_data (G_OBJECT (type_literal), "blank_list", blanks); g_object_set_data (G_OBJECT (type_literal), "resources_list", resources); g_object_set_data (G_OBJECT (type_literal), "object", button); g_object_set_data (G_OBJECT (type_literal), "lang", lang); g_object_set_data (G_OBJECT (type_literal), "datatype", datatype); g_object_set_data (G_OBJECT (type_resource), "literal", type_literal); g_object_set_data (G_OBJECT (type_resource), "resource", type_resource); g_object_set_data (G_OBJECT (type_resource), "blanknode", type_blanknode); g_object_set_data (G_OBJECT (type_resource), "blank_list", blanks); g_object_set_data (G_OBJECT (type_resource), "resources_list", resources); g_object_set_data (G_OBJECT (type_resource), "object", button); g_object_set_data (G_OBJECT (type_resource), "lang", lang); g_object_set_data (G_OBJECT (type_resource), "datatype", datatype); g_object_set_data (G_OBJECT (type_blanknode), "literal", type_literal); g_object_set_data (G_OBJECT (type_blanknode), "resource", type_resource); g_object_set_data (G_OBJECT (type_blanknode), "blanknode", type_blanknode); g_object_set_data (G_OBJECT (type_blanknode), "blank_list", blanks); g_object_set_data (G_OBJECT (type_blanknode), "resources_list", resources); g_object_set_data (G_OBJECT (type_blanknode), "object", button); g_object_set_data (G_OBJECT (type_blanknode), "lang", lang); g_object_set_data (G_OBJECT (type_blanknode), "datatype", datatype); g_signal_connect_after ((gpointer) type_literal, "toggled", G_CALLBACK (toggled_object), NULL); g_signal_connect_after ((gpointer) type_blanknode, "toggled", G_CALLBACK (toggled_object), NULL); g_signal_connect_after ((gpointer) type_resource, "toggled", G_CALLBACK (toggled_object), NULL); if (prev_rdf) { switch (prev_rdf->object_type) { case RDF_OBJECT_LITERAL: toggled_object (type_literal, NULL); break; case RDF_OBJECT_BLANK: toggled_object (type_blanknode, NULL); break; case RDF_OBJECT_RESOURCE: default: toggled_object (type_resource, NULL); break; } } button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); /* Mostro la finestra: */ while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { gchar *s_text, *p_text, *o_text, *l_text, *d_text; gboolean is_item; /* Prelevo il soggetto: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_subject_this)) == TRUE) s_text = THIS_DOCUMENT; else s_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (subject)); if (!s_text || !*s_text) { dialog_msg (_("Invalid subject!")); continue; } s_text = g_strdup (s_text); /* E' un predicato standard controllo: */ if ((is_item = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_item))) == FALSE) { p_text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (property)); if (!p_text || !*p_text) { if (p_text) g_free (p_text); g_free (s_text); dialog_msg (_("Invalid predicate!")); continue; } } /* Se e' un item: */ else { gint id = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (item)); /* Controlliamo se i valori sono compatibili con i precedenti: */ if (check_item (prev_rdf, s_text, &id)) { g_free (s_text); continue; } /* Creo il vero predicato: */ p_text = g_strdup_printf ("%s%d", RDF_ITEM, id); } /* C.Oggetto: */ o_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (object)); if (!o_text || !*o_text) { g_free (p_text); g_free (s_text); dialog_msg (_("Invalid object!")); continue; } if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_resource))) { if (rdf_blank (data->rdf, o_text) && dialog_ask (_ ("In the document this object is a blank node.\n" "This triple can create some incongruences\n" "You are sure?")) != GTK_RESPONSE_OK) { g_free (p_text); g_free (s_text); continue; } } else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_blanknode))) { if (rdf_resource (data->rdf, o_text) && dialog_ask (_ ("In the document this object is a resource.\n" "This triple can create some incongruences\n" "You are sure?")) != GTK_RESPONSE_OK) { g_free (p_text); g_free (s_text); continue; } } o_text = g_strdup (o_text); /* Controlliamo se e' una lista e se lo e' se i valori sono OK: */ if (is_item == TRUE && check_list (s_text, GTK_WINDOW (dialog))) { g_free (s_text); g_free (p_text); g_free (o_text); continue; } /* Controlliamo i datatype: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_literal))) { gboolean value; if ((d_text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (datatype)))) { value = datatype_check (gtk_combo_box_get_active (GTK_COMBO_BOX (datatype)), o_text, NULL); g_free (d_text); if (!value) { g_free (s_text); g_free (p_text); g_free (o_text); continue; } } } /* A questo punto alloco ed inserisco: */ rdf = g_malloc0 (sizeof (struct rdf_t)); /* Le variabili gia' allocate: */ rdf->subject = s_text; rdf->predicate = p_text; rdf->object = o_text; /* E' un letterale? */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_literal))) { rdf->object_type = RDF_OBJECT_LITERAL; l_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (lang)); if (l_text && *l_text) rdf->lang = g_strdup (l_text); d_text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (datatype)); if (d_text && *d_text) rdf->datatype = d_text; else if (d_text) g_free (d_text); } /* E' una risorsa? */ else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_resource))) rdf->object_type = RDF_OBJECT_RESOURCE; /* E' un blank node? */ else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_blanknode))) rdf->object_type = RDF_OBJECT_BLANK; /* Chiudiamo la finestra: */ break; } gtk_widget_destroy (dialog); /* Libero le liste. Solo cosi' perche' i valori sono solo puntatori: */ if (resources) g_list_free (resources); if (blanks) g_list_free (blanks); /* Ritorno: */ return rdf; } static gboolean event_box_popup_show (GtkWidget * w, GdkEventButton * event, GtkWidget * label) { GList *list = g_object_get_data (G_OBJECT (label), "data"); return info_box_popup_show (w, event, list); } /* REMOVE ******************************************************************/ /* Questa funzione rimuove un elemento dall'interfaccia grafica: */ static void edit_remove (struct editor_data_t *data, GtkWidget * widget) { GList *list, *old; /* Cerco il parente: */ widget = gtk_widget_get_parent (widget); /* Devo rimuovere la riga dopo ogni lista e quindi per ogni elemento * contenuto dal padre: */ if ((list = old = gtk_container_get_children (GTK_CONTAINER (gtk_widget_get_parent (widget))))) { while (list) { /* Se e' questo, ed esiste un successivo, lo rimovo: */ if (list->data == widget && list->next) { gtk_widget_destroy (list->next->data); break; } list = list->next; } g_list_free (old); } /* Rimuovo, infine l'elemento: */ gtk_widget_destroy (widget); } /* CHECK ITEM ****************************************************************/ /* Questa funzione serve per ordinare in base all'ID una serie di elementi * di una lista: */ static gint check_item_compare (struct rdf_t *a, struct rdf_t *b) { gint len, id_a, id_b; len = strlen (RDF_ITEM); id_a = atoi (a->predicate + len); id_b = atoi (b->predicate + len); return (a > b); } /* Questa funzione attiva l'autonumerazione di un soggetto. */ static void check_item_auto (gchar * subject, gint * id) { struct editor_data_t *data = editor_get_data (); gint len = strlen (RDF_ITEM); GList *list, *new; struct rdf_t *rdf; gint tocheck; gint expect = 1; /* Il documento esiste? */ if (!data) return; /* per ogni tripletta... */ list = data->rdf; new = NULL; while (list) { rdf = (struct rdf_t *) list->data; /* Se coicide col soggetto ed e' una tipologia lista, aggiungilo * nella lista temporea */ if (!strcmp (rdf->subject, subject) && !strncmp (rdf->predicate, RDF_ITEM, len)) new = g_list_append (new, rdf); list = list->next; } /* Ordino la lista: */ new = g_list_sort (new, (GCompareFunc) check_item_compare); /* Per ogni elemento della lista temporanea: */ list = new; while (list) { rdf = list->data; /* Prelevo il valore: */ tocheck = atoi (rdf->predicate + len); /* Se non coincide con expect che e' un int che autoincremento, * si e' saltato un valore. Uso questo: */ if (tocheck != expect) { *id = expect; break; } expect++; list = list->next; } /* Se non ho trovato niente, uso l'ultimo valore accettabile: */ if (!list) *id = expect; /* Libero la lista */ g_list_free (new); } /* Questa funzione setta in automatico il valore dentro allo spin button */ static void check_item_set_auto (GtkWidget * widget, GtkWidget * spin) { GtkWidget *subject, *subject_this; gchar *text; gint id; /* Prelevo il soggetto e se non c'e' esco: */ subject_this = g_object_get_data (G_OBJECT (widget), "subject_this"); subject = g_object_get_data (G_OBJECT (widget), "subject"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (subject_this)) == TRUE) text = THIS_DOCUMENT; else text = (gchar *) gtk_entry_get_text (GTK_ENTRY (subject)); if (!text || !*text) { dialog_msg (_("Set a subject!")); return; } /* Prelevo un ID con la funzione check_item_auto e lo inserisco nello * spin button */ check_item_auto (text, &id); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), id); } /* Questa funzione controlla se l'item e' corretto in base ai precedenti: */ static gboolean check_item (struct rdf_t *prev, gchar * subject, gint * id) { gint todo = 0; /* Se l'ID non esiste... gia' c'e' un errore: */ if (*id < 1) todo = -1; else { struct editor_data_t *data = editor_get_data (); gint len = strlen (RDF_ITEM); GList *list, *new; struct rdf_t *rdf; gint tocheck; /* Per ogni tripletta: */ list = data->rdf; new = NULL; while (list) { rdf = (struct rdf_t *) list->data; /* Se e' di tipologia lista e coincide con questo soggetto, * lo inserisco in una lista temporanea */ if (!strcmp (rdf->subject, subject) && !strncmp (rdf->predicate, RDF_ITEM, len)) new = g_list_append (new, rdf); list = list->next; } /* Ordino la lista */ new = g_list_sort (new, (GCompareFunc) check_item_compare); /* Per ogni elemento di questa lista temporanea */ list = new; while (list) { rdf = list->data; tocheck = atoi (rdf->predicate + len); /* Se questo id e' gia' usato e non e' usato da se stesso * (vedi prevedente): */ if (tocheck == *id && (!prev || prev != rdf)) { todo = 1; break; } list = list->next; } g_list_free (new); } /* Se devo comunicare l'errore del ID: */ if (todo) { gchar s[1024]; if (todo > 0) g_snprintf (s, sizeof (s), _("This index is already used for this subject!\n" "Active the auto numeration?")); else g_snprintf (s, sizeof (s), _("The index can be 0!\n" "Active the auto numeration?")); /* Mostro la domanda e in base alla risposta: */ switch (dialog_ask_with_cancel (s)) { case GTK_RESPONSE_NO: return 0; case GTK_RESPONSE_OK: /* Qui uso l'auto numerazione */ check_item_auto (subject, id); return 0; default: return 1; } } /* Di default, tutto bene: */ return 0; } /* Questa funzione fa il controllo se un soggetto e' un ALT, SEQ o BAG: */ static gboolean check_list (gchar * str, GtkWindow * parent) { struct editor_data_t *data = editor_get_data (); GList *list; struct rdf_t *rdf; GtkWidget *dialog; GtkWidget *hbox; GtkWidget *image; GtkWidget *label; GtkWidget *button; gchar s[1024]; gboolean ret; /* Per ogni tripletta di questo documento: */ list = data->rdf; while (list) { rdf = (struct rdf_t *) list->data; if (!strcmp (rdf->subject, str) && !strcmp (rdf->predicate, RDF_TYPE) && rdf->object_type == RDF_OBJECT_RESOURCE) { /* Se lo trovo, ok: */ if (!strcmp (rdf->object, RDF_ALT) || !strcmp (rdf->object, RDF_BAG) || !strcmp (rdf->object, RDF_SEQ)) return 0; } list = list->next; } /* Pongo la domanda di controllo: */ dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Question...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); label = gtk_label_new (_ ("The subject of this triple is not a bag, a sequence or a alternative!\n" "Do you want create it?")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); button = gtk_button_new_with_label (_("Alternative")); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 1); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_with_label (_("Sequence")); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 2); button = gtk_button_new_with_label (_("Bag")); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 3); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 4); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, 5); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); rdf = NULL; /* In base alla risposta del dialog creo o no una nuova tripletta: */ switch (gtk_dialog_run (GTK_DIALOG (dialog))) { case 1: /* ALT */ rdf = g_malloc0 (sizeof (struct rdf_t)); rdf->subject = g_strdup (str); rdf->predicate = g_strdup (RDF_TYPE); rdf->object = g_strdup (RDF_ALT); rdf->object_type = RDF_OBJECT_RESOURCE; ret = 0; break; case 2: /* SEQ */ rdf = g_malloc0 (sizeof (struct rdf_t)); rdf->subject = g_strdup (str); rdf->predicate = g_strdup (RDF_TYPE); rdf->object = g_strdup (RDF_SEQ); rdf->object_type = RDF_OBJECT_RESOURCE; ret = 0; break; case 3: /* BAG */ rdf = g_malloc0 (sizeof (struct rdf_t)); rdf->subject = g_strdup (str); rdf->predicate = g_strdup (RDF_TYPE); rdf->object = g_strdup (RDF_BAG); rdf->object_type = RDF_OBJECT_RESOURCE; ret = 0; break; case 4: /* Niente ma bene */ ret = 0; break; default: /* Cancel o altro */ ret = 1; break; } gtk_widget_destroy (dialog); /* Se ho un nuovo elemento, lo appendo alla lista */ if (rdf) data->rdf = g_list_append (data->rdf, rdf); return ret; } /* Questa funzione merga al documento attuale un file RDF: */ void editor_merge_file (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); gchar *file; GList *list; gchar s[1024]; gchar *uri; GString *error = NULL; if (!data) return; /* Setto lo statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Import a RDF file...")); if (! (file = file_chooser (_("Import a RDF file..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_OPEN, NULL))) { statusbar_set (_("Import a RDF file: aborted")); editor_statusbar_lock = WAIT; return; } /* Creo da file ad uri e attivo le librdf: */ uri = g_filename_to_uri (file, NULL, NULL); /* Mergio: */ if (!uri || !(list = merge (data->rdf, uri, NULL, &error))) { gchar *str; if (error) str = g_string_free (error, FALSE); else str = NULL; g_snprintf (s, sizeof (s), _("Error opening URI %s!"), uri ? uri : file); dialog_msg_with_error (s, str); if (str) g_free (str); if (uri) g_free (uri); g_free (file); return; } g_free (uri); data->rdf = list; /* Libero i namespace e l'altra memoria: */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); namespace_parse (data->rdf, &data->namespace); g_free (file); statusbar_set (_("RDF file merged!")); editor_statusbar_lock = WAIT; editor_refresh (data); } /* Questa funzione merga al documento attuale un uri RDF: */ void editor_merge_uri (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); gchar *uri; gchar s[1024]; GList *list; GString *error = NULL; struct download_t *download; if (!data) return; /* Setto lo statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Import a RDF URI...")); if (!(uri = uri_chooser (_("Import a RDF URI..."), &download))) { statusbar_set (_("Import a RDF URI: aborted")); editor_statusbar_lock = WAIT; return; } /* Mergio: */ if (!(list = merge (data->rdf, uri, download, &error))) { gchar *str; if (error) str = g_string_free (error, FALSE); else str = NULL; g_snprintf (s, sizeof (s), _("Error opening the RDF URI %s!"), uri); dialog_msg_with_error (s, str); if (str) g_free (str); g_free (uri); if (download) download_free (download); return; } if (download) download_free (download); data->rdf = list; /* Libero i namespace e l'altra memoria: */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); namespace_parse (data->rdf, &data->namespace); g_free (uri); statusbar_set (_("RDF URI merged!")); editor_statusbar_lock = WAIT; editor_refresh (data); } /* EOF */ morla-0.16.1/src/editor.h000066400000000000000000000505541156343060400151520ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #include #include #ifdef USE_GTKHTML # include #endif #ifdef ENABLE_NLS # include #else # define _(String) (String) #endif #ifdef G_OS_UNIX # include #endif #ifdef USE_JS # ifdef USE_NGS_JS # include # elif USE_MOZILLA_JS # include # else # error "No javascript engine selected!" # endif #endif #ifdef USE_GCONF # include #endif #include "morla-module.h" struct module_t { GModule *module; MorlaModule *data; }; enum rdf_object_t { RDF_OBJECT_BLANK, RDF_OBJECT_LITERAL, RDF_OBJECT_RESOURCE }; enum order_t { ORDER_SUBJECT, ORDER_SUBJECT_DEC, ORDER_PREDICATE, ORDER_PREDICATE_DEC, ORDER_OBJECT, ORDER_OBJECT_DEC }; enum nsorder_t { NSORDER_NAMESPACE, NSORDER_NAMESPACE_DEC, NSORDER_PREFIX, NSORDER_PREFIX_DEC, NSORDER_VISIBLE, NSORDER_VISIBLE_DEC }; struct namespace_t { gchar *namespace; GtkWidget *namespace_widget; gchar *prefix; GtkWidget *prefix_widget; gboolean visible; GtkWidget *visible_widget; }; enum rdf_format_t { RDF_FORMAT_XML = 0, RDF_FORMAT_NTRIPLES, RDF_FORMAT_TURTLE }; struct rdf_t { gchar *subject; GtkWidget *subject_widget; gchar *predicate; GtkWidget *predicate_widget; gchar *object; GtkWidget *object_widget; enum rdf_object_t object_type; GtkWidget *object_type_widget; gchar *lang; GtkWidget *lang_widget; gchar *datatype; GtkWidget *datatype_widget; }; struct rdfs_t { gchar *resource; gchar *prefix; gchar *path; GList *data; GList *nsdata; }; struct thread_t { GFunc func; gpointer data; gint *flag; }; struct graph_data_t { gchar *color; gchar *fontcolor; gchar *style; gchar *fillcolor; gchar *shape; gchar *fontname; gint fontsize; }; enum unredo_type_t { UNREDO_TYPE_ADD, UNREDO_TYPE_DEL, UNREDO_TYPE_CHANGE }; struct unredo_change_t { struct rdf_t *now; struct rdf_t *prev; }; struct unredo_t { enum unredo_type_t type; GList *list; }; struct info_box_t { gchar *value; gchar *lang; }; struct editor_data_t { struct editor_data_t *next; gchar *file; gchar *uri; struct module_t *module_save; enum rdf_format_t format; GList *rdf; GList *namespace; GList *undo; GList *redo; gboolean changed; GtkWidget *label; GtkWidget *maker; GtkWidget *list; GtkWidget *nslist; GtkWidget *subject_order; GtkWidget *predicate_order; GtkWidget *object_order; enum order_t compare; GtkWidget *namespace_order; GtkWidget *prefix_order; GtkWidget *visible_order; enum nsorder_t nscompare; gchar *node_select; gchar *node_nsselect; struct rdf_t *rdf_select; }; struct template_t { gchar *uri; gchar *name; gchar *version; gchar *category; GList *input; }; enum template_input_typevalue_t { TEMPLATE_INPUT_TYPEVALUE_NONE, TEMPLATE_INPUT_TYPEVALUE_RESOURCE, TEMPLATE_INPUT_TYPEVALUE_LITERAL, TEMPLATE_INPUT_TYPEVALUE_ALT_RESOURCE, TEMPLATE_INPUT_TYPEVALUE_ALT_LITERAL, TEMPLATE_INPUT_TYPEVALUE_OTHER }; struct template_input_t { GList *labels; GList *comments; gchar *rdfs; gboolean lang; gboolean datatype; gint min_cardinality; gint max_cardinality; enum template_input_typevalue_t typevalue; GList *alt_typevalue; gchar *other_typevalue; gboolean visible; gchar *default_value; gchar *default_language; gchar *default_datatype; gchar *function_init; gchar *function_check; gchar *function_destroy; gchar *function_save; gboolean longtext; }; struct template_value_t { gchar *value; gchar *lang; gchar *datatype; enum rdf_object_t type; }; struct update_template_t { gchar *uri; gchar *name; gchar *description; gchar *author; gchar *version; }; struct update_t { gchar *last_version; GList *templates; }; enum parser_char_t { PARSER_CHAR_INIT = '*', PARSER_CHAR_ERROR = '!', PARSER_CHAR_WARNING = '_' }; struct datatype_t { gchar *uri; gchar *name; gchar *description; gboolean (*check)(gchar *, gchar *); }; struct download_t { gint timeout; gboolean verifypeer; gchar *certfile; gchar *certpassword; gchar *cacertfile; gchar *auth_user; gchar *auth_password; }; struct tag_t { gchar *tag; PangoStyle style; PangoVariant variant; PangoWeight weight; PangoStretch stretch; gdouble scale; gchar *foreground; gchar *background; PangoUnderline underline; }; #ifdef USE_JS # define JS_MORLA_OK 0 # define JS_MORLA_FAILURE 1 struct js_t { # ifdef USE_NGS_JS JSInterpPtr interp; # elif USE_MOZILLA_JS JSRuntime *rt; JSContext *cx; JSObject *global; # endif GtkWidget *widget; }; #endif #define LOCK 1 #define WAIT 2 #define UNLOCK 3 #define MORLA_COPYRIGHT "Copyright 2005-2007 - GPL - Andrea Marchesini" #define THIS_DOCUMENT "this:document" #define BLANK_NODE "blank_node:" #define RDF_XSD "http://www.w3.org/2001/XMLSchema#" #define RDF_TYPE "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" #define RDF_ITEM "http://www.w3.org/1999/02/22-rdf-syntax-ns#_" #define RDF_PROPERTY "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property" #define RDFS_LITERAL "http://www.w3.org/2000/01/rdf-schema#Literal" #define RDFS_RESOURCE "http://www.w3.org/2000/01/rdf-schema#Resource" #define RDFS_COMMENT "http://www.w3.org/2000/01/rdf-schema#comment" #define RDFS_LABEL "http://www.w3.org/2000/01/rdf-schema#label" #define RDFS_DOMAIN "http://www.w3.org/2000/01/rdf-schema#domain" #define RDFS_RANGE "http://www.w3.org/2000/01/rdf-schema#range" #define RDF_ALT "http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt" #define RDF_BAG "http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag" #define RDF_SEQ "http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq" #define OWL_O_PROPERTY "http://www.w3.org/2002/07/owl#ObjectProperty" #define OWL_DT_PROPERTY "http://www.w3.org/2002/07/owl#DatatypeProperty" #define RDF_SUBCLASSOF "http://www.w3.org/2000/01/rdf-schema#subClassOf" #define RDF_SUBPROPERTYOF "http://www.w3.org/2000/01/rdf-schema#subPropertyOf" #define MORLA_NS "http://www.morlardf.net/morla#" #define MORLA_TEMPLATE "Template" #define MORLA_INPUT "Input" #define MORLA_HASINPUT "hasInput" #define MORLA_HASVERSION "hasVersion" #define MORLA_CATEGORY "category" #define MORLA_HASRDFS "hasRDFS" #define MORLA_TYPEVALUE "typeValue" #define MORLA_MINCARD "minCardinality" #define MORLA_MAXCARD "maxCardinality" #define MORLA_VISIBLE "visible" #define MORLA_LANGUAGE "language" #define MORLA_DEFAULTLANGUAGE "defaultLanguage" #define MORLA_DATATYPE "datatype" #define MORLA_DEFAULTDATATYPE "defaultDatatype" #define MORLA_DEFAULTVALUE "defaultValue" #define MORLA_LONGTEXT "longText" #define MORLA_FUNCTIONINIT "functionInit" #define MORLA_FUNCTIONCHECK "functionCheck" #define MORLA_FUNCTIONDESTROY "functionDestroy" #define MORLA_FUNCTIONSAVE "functionSave" #define MORLA_ALT_RESOURCE "AltResource" #define MORLA_ALT_LITERAL "AltLiteral" #define MORLA_WEBSITE "http://www.morlardf.net/" #define MORLA_OLD_WEBSITE_1 "http://www.autistici.org/bakunin/morla/" #define MORLA_OLD_WEBSITE_2 "http://autistici.org/bakunin/morla/" #define MORLA_OLD_WEBSITE_3 "http://www2.autistici.org/bakunin/morla/" #define UPDATE_URL "http://www.morlardf.net/update" #define DOAP_URL "http://www.morlardf.net/doap.rdf" #ifdef USE_GTKHTML # define HELP_URL "http://www.morlardf.net/doc/" #else # define HELP_URL "http://morlardf.net/doc.php" #endif #define UNDO_MAX_VALUE 10 #define LAST_DOCUMENT_VALUE 5 extern int editor_statusbar_lock; extern struct editor_data_t *editor_data; extern GtkWidget *notebook; extern gchar *browser_default; extern gchar *viewer_default; extern gint default_width; extern gint default_height; extern GList *thread_child; extern GList *rdfs_list; extern gint last_id; extern struct graph_data_t graph_blank_node; extern struct graph_data_t graph_resource_node; extern struct graph_data_t graph_literal_node; extern struct graph_data_t graph_edge; extern gchar *graph_format; extern gchar *normal_bg_color; extern gchar *prelight_bg_color; extern gchar *normal_fg_color; extern gchar *prelight_fg_color; extern GList *template_list; extern GList *template_menus; extern GtkWidget *template_toolbar; extern GList *last_list; extern GtkWidget *last_menu; extern gint last_document_value; extern GtkWidget *undo_widget[2]; extern GtkWidget *redo_widget[2]; extern gint undo_max_value; extern gint update_show; extern gchar *update_url; extern gchar *blanknode_name; extern gchar *help_url; extern gchar *download_proxy; #ifdef USE_GCONF extern gboolean download_proxy_gconf; #endif extern gint download_proxy_port; extern gchar *download_proxy_user; extern gchar *download_proxy_password; extern gboolean automatic_extensions; extern GList *highlighting_tags; extern gboolean highlighting_active; /* edit.c */ void editor_add (GtkWidget * w, gpointer data); void editor_cut (GtkWidget * w, gpointer data); void editor_copy (GtkWidget * w, gpointer data); void editor_paste (GtkWidget * w, gpointer data); void editor_delete (GtkWidget * w, gpointer data); void editor_cut_triple (GtkWidget * w, gpointer data); void editor_copy_triple (GtkWidget * w, gpointer data); void editor_delete_triple (GtkWidget * w, gpointer data); struct rdf_t * editor_triple (struct rdf_t * prev, gchar * title); void editor_merge_file (GtkWidget * w, gpointer data); void editor_merge_uri (GtkWidget * w, gpointer data); /* file.c */ gboolean editor_open_file (gchar * f, gchar * ff); gboolean editor_open_uri (gchar * f, struct download_t * d); void editor_open (GtkWidget * w, gpointer data); void editor_save_as (GtkWidget * w, gpointer data); void editor_save (GtkWidget * w, gpointer data); void editor_close (GtkWidget * w, gpointer data); void editor_close_selected (GtkWidget * w, struct editor_data_t * data); void editor_new (GtkWidget * w, gpointer data); gchar * editor_tmp_file (void); /* main.c */ int editor_quit (GtkWidget * w, GdkEvent * event, gpointer data); gchar * utf8 (gchar * str); char * markup (gchar * str); void statusbar_set (gchar * what, ...); void fatal (gchar * text, ...); void run (gchar ** a, GChildWatchFunc func, gpointer data); GList * split (gchar * ar); gchar * user_agent (void); gchar * dot_cmd (void); GtkWindow * main_window (void); /* maker.c */ struct editor_data_t * editor_get_data (void); gint editor_timeout (gpointer data); void editor_new_maker (struct editor_data_t * data); void editor_refresh (struct editor_data_t * data); void editor_refresh_nslist (struct editor_data_t * data); gint editor_compare (struct rdf_t * rdf, struct rdf_t * what, struct editor_data_t * data); gint editor_nscompare (struct namespace_t * ns, struct namespace_t * ns2, struct editor_data_t * data); /* edit.c */ void editor_view (GtkWidget * w, gpointer data); void editor_your_view (GtkWidget * w, gpointer data); void editor_preferences (GtkWidget * w, gpointer data); GList * create_no_dup (GList * ret); GList * create_resources (struct editor_data_t * data); GList * create_resources_by_rdfs (GList * ret); GList * create_blank (struct editor_data_t * data); void search_resources (GtkWidget * widget, GtkWidget * entry); gchar * search_list (GList * list, GtkWindow * parent); /* dialog.c */ void dialog_msg (gchar * msg); void dialog_msg_with_error (gchar * msg, gchar * other); int dialog_ask (gchar * msg); int dialog_ask_with_cancel (gchar * msg); GtkWidget * dialog_wait (GCallback callback, gpointer data, GtkWidget ** pb); /* filechooser.c */ void * file_chooser (gchar * str, GtkSelectionMode mode, GtkFileChooserAction action, enum rdf_format_t * rdf); gchar * uri_chooser (gchar * str, struct download_t ** options); /* rdf.c */ librdf_world * rdf_world (void); gboolean rdf_parse (gchar * what, struct download_t * download, gboolean this_document, GList ** list, enum rdf_format_t * format, GString ** string); gboolean rdf_parse_thread (gchar * resource, struct download_t * download, GList ** list, GList ** nslist, gboolean this_document, enum rdf_format_t * format, GString ** string); GList * rdf_parse_stream (librdf_stream * stream); gboolean rdf_parse_format (gchar * resource, gchar * buffer, gboolean this_document, GList ** ret, enum rdf_format_t format, GString ** string); gboolean rdf_save_file (gchar * file, GList * rdf, GList ** ns, enum rdf_format_t format); gboolean rdf_save_buffer (GList * rdf, GList ** ns, enum rdf_format_t format, gchar ** buffer_ret); gboolean rdf_is_no_saved (struct editor_data_t * data); void rdf_free (struct rdf_t * rdf); struct rdf_t * rdf_copy (struct rdf_t * rdf); gboolean rdf_blank (GList * rdf, gchar * t); gboolean rdf_resource (GList * rdf, gchar * t); int rdf_error (void * dummy, const char * msg, va_list va); int rdf_warning (void * dummy, const char * msg, va_list va); gint rdf_log (GString ** error, gchar * str, enum parser_char_t c); /* namespace.c */ gboolean namespace_parse (GList * rdf, GList ** list); void namespace_free (struct namespace_t * ns); gboolean namespace_visible (GList * ns, struct rdf_t * rdf); gchar * namespace_prefix (GList ** ns, gchar * t); gchar * namespace_create (GList * ns, gchar * t); /* browser.c */ void browser (gchar * what); void browser_website (void); /* init.c */ void init (gchar * m_config); GList * init_highlighting (void); void init_save (void); /* rdfs.c */ void rdfs (GtkWidget * w, gpointer dummy); gint rdfs_add (gchar * resource, gchar * prefix); gchar * rdfs_file (void); /* graph.c */ void graph_run (GtkWidget * w, gpointer dummy); void graph (struct editor_data_t * data); void graph_save (GtkWidget * w, gpointer dummy); void graph_graphviz (void); /* about.c */ void about (GtkWidget * w, gpointer dummy); void about_libraries (void); /* template.c */ void template_update (void); void template_import_uri (GtkWidget * w, gpointer dummy); void template_import_file (GtkWidget * w, gpointer dummy); void template (GtkWidget * w, gpointer dummy); gboolean template_import (gchar * uri, struct download_t * download, gboolean b1, gboolean b2); void template_save (void); void template_save_single (GtkWidget * w, struct template_t * t); void template_open (GtkWidget * w, struct template_t * t); void template_edit (GtkWidget * w, struct template_t * t); struct template_value_t * template_value_new (GtkWidget * w); void template_value_set (GtkWidget * w, struct template_value_t * value); void template_value_free (struct template_value_t * value); /* preferences.c */ void preferences (void); /* splash.c */ void splash_show (void); void splash_hide (void); gboolean splash_showed (void); void splash_set_text (char * str, ...); void splash_set_text_with_effect (char * str, ...); void splash_sleep (int sleep); void splash_close_on_click (gboolean value); /* unredo.c */ struct unredo_t * unredo_new (struct editor_data_t * data, enum unredo_type_t type); void unredo_add (struct unredo_t * unredo, struct rdf_t * rdf, struct rdf_t * rdf2); void unredo_destroy (struct editor_data_t * data, struct unredo_t * unredo); void unredo_undo (void); void unredo_redo (void); void unredo_change_value (void); /* update.c */ gint update_timer (void); void update_search (void); gint update_check (void); /* merge.c */ GList * merge (GList * rdf, gchar * what, struct download_t * download, GString ** string); void merge_graph (void); /* navigator.c */ void navigator_run (void); void navigator_open_uri (void); /* search.c */ gboolean search (gchar * uri, GList ** meta, GList ** other, gchar ** error); void search_open (gchar * text, void (*func) (gchar *, gpointer), gpointer data); /* last.c */ void last_update (void); void last_add (gchar * uri); void last_change_value (void); /* help.c */ void help (void); /* info.c */ void info_selected (void); void info_uri (void); void info_this (void); gboolean info_box_popup_show (GtkWidget * w, GdkEventButton * event, GList * list); gboolean info_box_popup_hide (GtkWidget * w, GdkEventButton * event, gpointer data); gboolean info_box_enter (GtkWidget * w, GdkEventCrossing * event, gpointer data); gboolean info_box_leave (GtkWidget * w, GdkEventCrossing * event, gpointer data); void info_box_free (struct info_box_t * info); /* query.c */ void query_sparql (void); void query_rsql (void); /* checks.c */ void check_rasqal (void); void check_redland (void); /* datatype.c */ struct datatype_t * datatype_list (void); gboolean datatype_check (gint id, gchar * what, gchar * check); void datatype_change (GtkWidget * w, GtkWidget * label); gint datatype_id (gchar * what); gboolean datatype_exists (gchar * what); /* download.c */ gboolean download_uri (gchar * uri, gchar ** buffer, struct download_t * download, gchar ** error); void download_free (struct download_t * donwload); struct download_t * download_copy (struct download_t * download); /* ntriples.c */ gchar * ntriples (librdf_node * node); /* blanknode.c */ gboolean blanknode_get (gchar * what, gint * id); gchar * blanknode_create (gint id); /* textview.c */ GtkWidget * textview_new (GCallback change, gpointer data); void textview_add_tag (GtkWidget * text, gchar * tag, PangoStyle style, PangoVariant variant, PangoWeight weight, PangoStretch stretch, gdouble scale, gchar * foreground, gchar * background, PangoUnderline underline); void textview_insert (GtkWidget * widget, GtkTextIter * iter, gchar * text, gint len); void textview_insert_at_cursor (GtkWidget * widget, gchar * text, gint len); void textview_clean_tags (GtkWidget * widget); /* js.c */ struct js_t * js_new (void); void js_destroy (struct js_t * js); void js_current_widget (struct js_t * js, GtkWidget * widget); gboolean js_evaluate (struct js_t * js, gchar * buffer); /* module.c */ void module_init (gchar * config); void module_shutdown (void); void module_menu_open (GtkMenu * menu, GtkWidget * parent); void module_menu_save (GtkMenu * menu, GtkWidget * parent); void module_menu_view (GtkMenu * menu, GtkWidget * parent); void module_run_open (GtkWidget * widget, struct module_t * module); void module_run_save (GtkWidget * widget, struct module_t * module); struct module_t * module_default_open (void); struct module_t * module_default_save (void); /* gconf.c */ void morla_gconf_init (void); gboolean morla_gconf_proxy (gchar ** proxy, gint * port, gchar ** user, gchar ** password, GSList ** list); void morla_gconf_shutdown (void); /* EOF */ morla-0.16.1/src/file.c000066400000000000000000000300161156343060400145650ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static void editor_close_real (struct editor_data_t *data); gboolean automatic_extensions; /* Questa funzione apre un file e comunica il risultato dell'operazione */ gboolean editor_open_file (gchar * file, gchar * prev_uri) { GList *rdf; GList *ns; struct editor_data_t *tmp; struct editor_data_t *data; enum rdf_format_t format; gchar s[1024]; gchar *uri; GString *error = NULL; if (!file) return FALSE; /* Se e' una path assoluta, va bene: */ if (g_path_is_absolute (file)) file = g_strdup (file); /* ... altrimenti la devo creare: */ else { gchar *cwd; cwd = g_get_current_dir (); file = g_strjoin (G_DIR_SEPARATOR_S, cwd, file, NULL); g_free (cwd); } /* Controllo se e' gia' aperto il file: */ tmp = editor_data; while (tmp) { if (tmp->file && !strcmp (tmp->file, file)) { dialog_msg (_("This RDF Document is already opened!")); g_free (file); return FALSE; } tmp = tmp->next; } /* Creo da file ad uri e attivo le librdf: */ uri = g_filename_to_uri (file, NULL, NULL); if (!uri || rdf_parse_thread (uri, NULL, &rdf, &ns, TRUE, &format, &error) == FALSE) { gchar *str; if (error) str = g_string_free (error, FALSE); else str = NULL; g_snprintf (s, sizeof (s), _("Error opening the RDF file %s!"), uri ? uri : file); dialog_msg_with_error (s, str); if (str) g_free (str); if (uri) g_free (uri); g_free (file); return FALSE; } /* Alloco memoria per questo nuovo elemento: */ data = g_malloc0 (sizeof (struct editor_data_t)); data->file = file; data->format = format; /* Setto l'uri a seconda esiste come argomento: */ if (prev_uri) { data->uri = g_strdup (prev_uri); g_free (uri); } else data->uri = uri; data->rdf = rdf; data->namespace = ns; /* Creo l'interfaccia: */ editor_new_maker (data); /* Aggiungo ai documenti aperti: */ last_add (data->uri); return TRUE; } /* Questa funzione fa la stessa cosa di quella precedente, ma con gli uri: */ gboolean editor_open_uri (gchar * resource, struct download_t * download) { GList *list, *nslist; struct editor_data_t *data; enum rdf_format_t format; gchar s[1024]; GString *error = NULL; /* Parso con librdf: */ if (rdf_parse_thread (resource, download, &list, &nslist, TRUE, &format, &error) == FALSE) { gchar *str; if (error) str = g_string_free (error, FALSE); else str = NULL; g_snprintf (s, sizeof (s), _("Error opening the RDF resource '%s'"), resource); dialog_msg_with_error (s, str); if (str) g_free (str); return FALSE; } /* Alloco memoria per questo nuovo elemento: */ data = g_malloc0 (sizeof (struct editor_data_t)); /* Non setto il file! Cosi' al primo salvataggio verra' richiesto * il file sui cui salvare */ data->uri = g_strdup (resource); data->format = format; data->rdf = list; data->namespace = nslist; /* Creo l'interfaccia: */ editor_new_maker (data); /* Aggiungo ai documenti aperti: */ last_add (data->uri); return TRUE; } /* Funzione per l'apertura di un file lato interfaccia: */ void editor_open (GtkWidget * w, gpointer dummy) { gchar *file; gchar s[1024]; /* Setto lo statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Open a new RDF file...")); /* Uso un filechooser: */ if (! (file = file_chooser (_("Open a new RDF file..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_OPEN, NULL))) { statusbar_set (_("Open a new RDF file: aborted")); editor_statusbar_lock = WAIT; return; } /* Apro il file: */ if (!editor_open_file (file, NULL)) { gchar *tmp; tmp = utf8 (file); g_snprintf (s, sizeof (s), _("The RDF file '%s' opened"), tmp); g_free (tmp); statusbar_set (s); } /* Sblocco lo statusbar e libero la memoria: */ editor_statusbar_lock = WAIT; g_free (file); } /* Funzione per il salvataggio con nome: */ void editor_save_as (GtkWidget * w, gpointer dummy) { gchar *file; gchar s[1024]; gchar *uri; struct editor_data_t *data = editor_get_data (); if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } /* Blocco lo statusbar e setto il titolo: */ editor_statusbar_lock = LOCK; statusbar_set (_("Save in a new RDF file...")); /* Uso filechooser in modalita' salvataggio: */ if (! (file = file_chooser (_("Save the RDF file"), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_SAVE, &data->format))) { statusbar_set (_("Save the RDF file: aborted")); editor_statusbar_lock = WAIT; return; } /* Estensione automatica: */ if (automatic_extensions) { gint len; for (len = strlen (file) - 1; len >= 0; len--) if (file[len] == '.') break; if (len <= 0) { gchar *tmp; switch (data->format) { case RDF_FORMAT_NTRIPLES: tmp = g_strdup_printf ("%s.nt", file); break; case RDF_FORMAT_TURTLE: tmp = g_strdup_printf ("%s.turtle", file); break; default: tmp = g_strdup_printf ("%s.rdf", file); break; } g_free (file); file = tmp; } } /* Se esiste chiedo se devo continuare: */ if (g_file_test (file, G_FILE_TEST_EXISTS) == TRUE && dialog_ask (_("The file exists. Overwrite?")) != GTK_RESPONSE_OK) { statusbar_set (_("Save the RDF file: aborted")); editor_statusbar_lock = WAIT; g_free (file); return; } /* Lancio la funzione di salvataggio: */ if (rdf_save_file (file, data->rdf, &data->namespace, data->format) == FALSE) { dialog_msg (_("Error writing on file.")); statusbar_set (_("Save the RDF file: aborted")); editor_statusbar_lock = WAIT; g_free (file); return; } if (!(uri = g_filename_to_uri (file, NULL, NULL))) { g_snprintf (s, sizeof (s), _("Error writing on RDF file '%s'!"), file); dialog_msg (s); statusbar_set (_("Save the RDF file: aborted")); editor_statusbar_lock = WAIT; g_free (file); return; } /* Annullo il cambiamento: */ data->changed = FALSE; /* Libero la memoria del file e dell'URI per risettarli corretti: */ if (data->file) g_free (data->file); data->file = g_strdup (file); if (data->uri) g_free (data->uri); data->uri = uri; /* Aggiorno la label: */ gtk_label_set_text (GTK_LABEL (data->label), uri); /* Refreshio l'editor per eventuali this:document */ editor_refresh (data); /* Aggiungo ai documenti aperti: */ last_add (data->uri); /* Sbocco la statusbar e libero la memoria: */ statusbar_set (_("RDF file saved!")); editor_statusbar_lock = WAIT; g_free (file); } /* Salvataggio standard: */ void editor_save (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } /* Se esiste il salvataggio via modulo, lo eseguo: */ if (data->module_save) { data->module_save->data->save_function (data->module_save->data, data->rdf); return; } /* Se non esiste il nome del file, uso l'altra funzione: */ if (!data->file) { editor_save_as (NULL, NULL); return; } /* Setto la statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("RDF file saving...")); /* Salvo: */ if (rdf_save_file (data->file, data->rdf, &data->namespace, data->format) == FALSE) { dialog_msg (_("Error writing on the RDF file.")); statusbar_set (_("Save the RDF file: aborted")); editor_statusbar_lock = WAIT; return; } /* Annullo il cambiamento: */ data->changed = FALSE; /* Sblocco la statusbar e ritorno */ statusbar_set (_("RDF file saved!")); editor_statusbar_lock = WAIT; } /* Chiusura di un editor: */ void editor_close (GtkWidget * w, gpointer dummy) { editor_close_real (editor_get_data ()); } /* Chiusura di un editor: */ void editor_close_selected (GtkWidget * w, struct editor_data_t *data) { editor_close_real (data); } static void editor_close_real (struct editor_data_t *data) { struct editor_data_t *tmp; if (!data) return; /* Questo documento e' salvato? Chiedo, altrimenti fai: */ if ((rdf_is_no_saved (data) == TRUE && dialog_ask (_("Exit without save?")) == GTK_RESPONSE_OK) || rdf_is_no_saved (data) == FALSE) { /* Statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Closing...")); /* Tolgo dalla lista: */ if (data == editor_data) editor_data = data->next; else { tmp = editor_data; while (tmp->next) { if (tmp->next == data) { tmp->next = data->next; break; } tmp = tmp->next; } } /* Tolgo dal notebook: */ gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), gtk_notebook_page_num (GTK_NOTEBOOK (notebook), data->maker)); /* Libero la memoria di questo documento: */ g_list_foreach (data->rdf, (GFunc) rdf_free, NULL); g_list_free (data->rdf); g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); if (data->file) g_free (data->file); if (data->uri) g_free (data->uri); g_free (data); /* Sblocco la statusbar */ statusbar_set (_("Closed")); editor_statusbar_lock = WAIT; } if (!editor_data) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Do you want exit from %s?"), PACKAGE); if (dialog_ask (s) == GTK_RESPONSE_OK) editor_quit (NULL, NULL, NULL); else editor_new (NULL, NULL); } } /* Funzione per un nuovo editor: */ void editor_new (GtkWidget * w, gpointer dummy) { struct editor_data_t *data; /* Alloco una struttura vuota e lancio new_maker */ data = g_malloc0 (sizeof (struct editor_data_t)); editor_new_maker (data); /* Setto la statusbar: */ statusbar_set (_("new RDF editor created")); editor_statusbar_lock = WAIT; } /* Questa funzione ritorna un nome di un file temporaneo: */ gchar * editor_tmp_file (void) { gint id = 0; gchar s[1024]; gchar i[1024]; /* Provo l'esistenza di 9999 file */ while (++id < 9999) { g_snprintf (s, sizeof (s), "%s%c%d", g_get_tmp_dir (), G_DIR_SEPARATOR, id); g_snprintf (i, sizeof (i), "%s.jpg", s); if (g_file_test (s, G_FILE_TEST_EXISTS) == FALSE) { g_snprintf (i, sizeof (i), "%s.png", s); if (g_file_test (i, G_FILE_TEST_EXISTS) == TRUE) continue; g_snprintf (i, sizeof (i), "%s.jpg", s); if (g_file_test (i, G_FILE_TEST_EXISTS) == TRUE) continue; g_snprintf (i, sizeof (i), "%s.gif", s); if (g_file_test (i, G_FILE_TEST_EXISTS) == TRUE) continue; g_snprintf (i, sizeof (i), "%s.ps", s); if (g_file_test (i, G_FILE_TEST_EXISTS) == TRUE) continue; g_snprintf (i, sizeof (i), "%s.svg", s); if (g_file_test (i, G_FILE_TEST_EXISTS) == TRUE) continue; return g_strdup (s); } } return g_strdup_printf ("%s%cIMPOSSIBLE", g_get_tmp_dir (), G_DIR_SEPARATOR); } /* EOF */ morla-0.16.1/src/filechooser.c000066400000000000000000000270221156343060400161530ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* Preso da somax: */ static void file_chooser_response (GtkWidget * w, gpointer dummy) { gtk_dialog_response (GTK_DIALOG (w), GTK_RESPONSE_ACCEPT); } void * file_chooser (gchar * title, GtkSelectionMode w, GtkFileChooserAction t, enum rdf_format_t *format) { GtkWidget *dialog; GtkWidget *combo = NULL; static gchar *path = NULL; void *l = NULL; dialog = gtk_file_chooser_dialog_new (title, NULL, t, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, t == GTK_FILE_CHOOSER_ACTION_SAVE ? GTK_STOCK_SAVE : GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); g_signal_connect ((gpointer) dialog, "file_activated", G_CALLBACK (file_chooser_response), NULL); if (format) { GtkListStore *store; GtkTreeIter iter; GtkCellRenderer *renderer; store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("RDF/XML format"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("RDF/N-TRIPLES format"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("RDF/TURTLE format"), -1); combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_combo_box_set_active (GTK_COMBO_BOX (combo), *format); gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), combo); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer, "text", 0, NULL); g_object_unref (store); } if (w == GTK_SELECTION_MULTIPLE) gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE); else gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), FALSE); if (!path) gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), g_get_home_dir ()); else gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), path); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { if (w == GTK_SELECTION_MULTIPLE) { l = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (dialog)); if (l) { if (path) g_free (path); path = g_path_get_dirname ((gchar *) ((GSList *) l)->data); } } else { l = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); if (l) { if (path) g_free (path); path = g_path_get_dirname ((gchar *) l); } } } if (format) *format = gtk_combo_box_get_active (GTK_COMBO_BOX (combo)); gtk_widget_destroy (dialog); return l; } /* Chiede un uri: */ gchar * uri_chooser (gchar * title, struct download_t ** retoptions) { GtkWidget *dialog; GtkWidget *frame; GtkWidget *box; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkWidget *entry; GtkWidget *button; GtkWidget *expander; gchar s[1024]; gchar *uri = NULL; static GList *uris = NULL; GList *l; GtkObject *adj; GtkWidget *auth_user; GtkWidget *auth_password; GtkWidget *cert_file; GtkWidget *cert_password; GtkWidget *cacert_file; GtkWidget *cert_verifypeer; GtkWidget *timeout; struct download_t *options = NULL; if (*retoptions) *retoptions = NULL; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, title); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); label = gtk_label_new (_("URI: ")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); entry = gtk_combo_box_entry_new_text (); gtk_widget_set_size_request (entry, 300, -1); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); if (retoptions) { expander = gtk_expander_new_with_mnemonic (_("_Preferences...")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), expander, FALSE, FALSE, 0); box = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (expander), box); frame = gtk_frame_new (_("Authentication")); gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("User:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); auth_user = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), auth_user, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Password:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); auth_password = gtk_entry_new (); gtk_entry_set_visibility (GTK_ENTRY (auth_password), FALSE); gtk_box_pack_start (GTK_BOX (hbox), auth_password, TRUE, TRUE, 0); frame = gtk_frame_new (_("SSL Client Authentication")); gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Certificate File:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); cert_file = gtk_file_chooser_button_new (_("Certificate SSL File"), GTK_FILE_CHOOSER_ACTION_OPEN); gtk_box_pack_start (GTK_BOX (hbox), cert_file, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Password:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); cert_password = gtk_entry_new (); gtk_entry_set_visibility (GTK_ENTRY (cert_password), FALSE); gtk_box_pack_start (GTK_BOX (hbox), cert_password, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("CA Certificate File:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); cacert_file = gtk_file_chooser_button_new (_("CA Certificate SSL File"), GTK_FILE_CHOOSER_ACTION_OPEN); gtk_box_pack_start (GTK_BOX (hbox), cacert_file, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Verify Peer:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); cert_verifypeer = gtk_check_button_new (); gtk_box_pack_start (GTK_BOX (hbox), cert_verifypeer, TRUE, TRUE, 0); frame = gtk_frame_new (_("Timeout")); gtk_box_pack_start (GTK_BOX (box), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Seconds:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); adj = gtk_adjustment_new (undo_max_value, 1, 60, 1, 10, 10); timeout = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0); gtk_box_pack_start (GTK_BOX (hbox), timeout, TRUE, TRUE, 0); } l = uris; while (l) { gtk_combo_box_append_text (GTK_COMBO_BOX (entry), (gchar *) l->data); l = l->next; } if (uris) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), 0); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { gchar *tmp; gint tmpi; uri = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!uri || !*uri) { if (uri) g_free (uri); dialog_msg (_("No compatible URI!")); continue; } l = uris; while (l) { if (!strcmp ((gchar *) l->data, uri)) break; l = l->next; } if (!l) { uris = g_list_prepend (uris, g_strdup (uri)); if (g_list_length (uris) > 10) { l = g_list_last (uris); g_free (l->data); uris = g_list_remove (uris, l->data); } } if (retoptions) { if ((tmp = (gchar *) gtk_entry_get_text (GTK_ENTRY (auth_user))) && *tmp) { if (!options) options = g_malloc0 (sizeof (struct download_t)); options->auth_user = g_strdup (tmp); } if ((tmp = (gchar *) gtk_entry_get_text (GTK_ENTRY (auth_password))) && *tmp) { if (!options) options = g_malloc0 (sizeof (struct download_t)); options->auth_password = g_strdup (tmp); } if ((tmp = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (cert_file)))) { if (!options) options = g_malloc0 (sizeof (struct download_t)); options->certfile = tmp; } if ((tmp = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (cacert_file)))) { if (!options) options = g_malloc0 (sizeof (struct download_t)); options->cacertfile = tmp; } if ((tmp = (gchar *) gtk_entry_get_text (GTK_ENTRY (cert_password))) && *tmp) { if (!options) options = g_malloc0 (sizeof (struct download_t)); options->certpassword = g_strdup (tmp); } if (options && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (cert_verifypeer)) == TRUE) options->verifypeer = TRUE; if ((tmpi = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (timeout)))) { if (!options) options = g_malloc0 (sizeof (struct download_t)); options->timeout = tmpi; } } break; } gtk_widget_destroy (dialog); if (options) { if (retoptions) *retoptions = options; else download_free (options); } return uri; } /* EOF */ morla-0.16.1/src/gconf.c000066400000000000000000000121101156343060400147350ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #ifdef USE_GCONF #define GCONF_PROXY_NS "/system/http_proxy" #define GCONF_PROXY_KEY GCONF_PROXY_NS "/use_http_proxy" #define GCONF_PROXY_SERVER_KEY GCONF_PROXY_NS "/host" #define GCONF_PROXY_PORT_KEY GCONF_PROXY_NS "/port" #define GCONF_PROXY_USER_KEY GCONF_PROXY_NS "/authentication_user" #define GCONF_PROXY_PASSWORD_KEY GCONF_PROXY_NS "/authentication_password" #define GCONF_PROXY_IGNORE_KEY GCONF_PROXY_NS "/ignore_hosts" static GConfClient *morla_gcc = NULL; static gboolean morla_proxy_enable = FALSE; static gchar *morla_proxy = NULL; static gint morla_proxy_port = 0; static gchar *morla_proxy_user = NULL; static gchar *morla_proxy_password = NULL; static GSList *morla_proxy_ignore_list = NULL; static void morla_gconf_refresh (void); static void morla_gconf_refresh_single (GConfClient * client, guint id, GConfEntry * entry, gpointer dummy); static void morla_gconf_free (void); void morla_gconf_init (void) { g_type_init (); morla_gcc = gconf_client_get_default (); morla_gconf_refresh (); gconf_client_notify_add (morla_gcc, GCONF_PROXY_NS, morla_gconf_refresh_single, NULL, NULL, NULL); } static void morla_gconf_free (void) { if (morla_proxy) g_free (morla_proxy); if (morla_proxy_user) g_free (morla_proxy_user); if (morla_proxy_password) g_free (morla_proxy_password); if (morla_proxy_ignore_list) { g_slist_foreach (morla_proxy_ignore_list, (GFunc) g_free, NULL); g_slist_free (morla_proxy_ignore_list); } } static void morla_gconf_refresh (void) { morla_gconf_free (); morla_proxy_enable = gconf_client_get_bool (morla_gcc, GCONF_PROXY_KEY, NULL); morla_proxy = gconf_client_get_string (morla_gcc, GCONF_PROXY_SERVER_KEY, NULL); morla_proxy_port = gconf_client_get_int (morla_gcc, GCONF_PROXY_PORT_KEY, NULL); morla_proxy_user = gconf_client_get_string (morla_gcc, GCONF_PROXY_USER_KEY, NULL); morla_proxy_password = gconf_client_get_string (morla_gcc, GCONF_PROXY_PASSWORD_KEY, NULL); morla_proxy_ignore_list = gconf_client_get_list (morla_gcc, GCONF_PROXY_IGNORE_KEY, GCONF_VALUE_STRING, NULL); } static void morla_gconf_refresh_single (GConfClient * client, guint id, GConfEntry * entry, gpointer dummy) { GConfValue *value; if (!entry || !entry->key) return; value = gconf_entry_get_value (entry); if (!strcmp (entry->key, GCONF_PROXY_KEY)) morla_proxy_enable = gconf_value_get_bool (value); else if (!strcmp (entry->key, GCONF_PROXY_SERVER_KEY)) { if (morla_proxy) g_free (morla_proxy); if ((morla_proxy = (gchar *) gconf_value_get_string (value))) morla_proxy = g_strdup (morla_proxy); } else if (!strcmp (entry->key, GCONF_PROXY_PORT_KEY)) morla_proxy_port = gconf_value_get_int (value); else if (!strcmp (entry->key, GCONF_PROXY_USER_KEY)) { if (morla_proxy_user) g_free (morla_proxy_user); if ((morla_proxy_user = (gchar *) gconf_value_get_string (value))) morla_proxy_user = g_strdup (morla_proxy_user); } else if (!strcmp (entry->key, GCONF_PROXY_PASSWORD_KEY)) { if (morla_proxy_password) g_free (morla_proxy_password); if ((morla_proxy_password = (gchar *) gconf_value_get_string (value))) morla_proxy_password = g_strdup (morla_proxy_password); } else if (!strcmp (entry->key, GCONF_PROXY_IGNORE_KEY)) { if (morla_proxy_ignore_list) { g_slist_foreach (morla_proxy_ignore_list, (GFunc) g_free, NULL); g_slist_free (morla_proxy_ignore_list); } if ((morla_proxy_ignore_list = gconf_value_get_list (value))) { GSList *l; morla_proxy_ignore_list = g_slist_copy (morla_proxy_ignore_list); for (l = morla_proxy_ignore_list; l; l = l->next) l->data = g_strdup (l->data); } } } void morla_gconf_shutdown (void) { g_object_unref (morla_gcc); morla_gconf_free (); } gboolean morla_gconf_proxy (gchar ** proxy, gint * port, gchar ** user, gchar ** password, GSList ** list) { if (morla_proxy_enable == FALSE) return FALSE; *proxy = morla_proxy; *port = morla_proxy_port; *user = morla_proxy_user; *password = morla_proxy_password; *list = morla_proxy_ignore_list; return TRUE; } #endif /* EOF */ morla-0.16.1/src/graph.c000066400000000000000000000304031156343060400147470ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #ifndef G_OS_WIN32 # include #endif static gchar *graph_file (struct editor_data_t *data, gchar * file); static void graph_create_cb (GPid pid, gint status, gint * id); /* Questa funzione escapa i nomi ritornandone altri */ static gchar * graph_escape (gchar * str) { gchar *ret; gint len = strlen (str); gint i, j; i = sizeof (gchar) * (len * 2) + 4; ret = (gchar *) g_malloc0 (i); for (i = j = 0; i < len; i++) { if (str[i] == '\"') { ret[j++] = '\\'; ret[j++] = '\"'; } else if (str[i] == '\n') { ret[j++] = '.'; ret[j++] = '.'; ret[j++] = '.'; break; } else ret[j++] = str[i]; } ret[j] = 0; str = g_strdup (ret); g_free (ret); return str; } /* Questa funzione e' la callback per la chiusura del programma di immagini. * Quando il programma viene chiuso, morla lancia questa funzione per la * rimozione del file immagine temporaneo: */ static void graph_remove (GPid pid, gint status, gchar * file) { if (!file) return; #ifndef ENABLE_MACOSX g_remove (file); #endif g_free (file); } /* Se si preme cancel creo un elemento per attendere la fine del processo: */ static void graph_create_abort (GtkWidget * widget, gint * ret) { *ret = 1; } /* Questa funzione mostra la finestra "Attendere prego" e lancia il processo * dentro uno spawn: */ static gchar * graph_create (struct editor_data_t *data, gchar * file) { GtkWidget *window; GtkWidget *pb; gboolean ret; gchar *tmp; GPid pid; gchar *array[6]; gchar s[1024]; gint flag; /* No grafici vuoti pls: */ if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return NULL; } if (!(tmp = graph_file (data, NULL))) { dialog_msg (_("Creating graph error!")); return NULL; } /* Se non mi hanno dato un nome, lo invento io: */ if (!file) { file = editor_tmp_file (); g_snprintf (s, sizeof (s), "%s.%s", file, graph_format); g_free (file); file = g_strdup (s); } else file = g_strdup (file); /* Creo il comando per dot: */ g_snprintf (s, sizeof (s), "-T%s", graph_format); array[0] = dot_cmd (); array[1] = s; array[2] = "-o"; array[3] = file; array[4] = tmp; array[5] = NULL; if (g_spawn_async (NULL, array, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &pid, NULL) == FALSE) { g_free (file); dialog_msg (_ ("Execution of external software error.\n" "Check the softwares in your preferences!")); return NULL; } g_child_watch_add (pid, (GChildWatchFunc) graph_create_cb, &flag); window = dialog_wait (G_CALLBACK (graph_create_abort), &ret, &pb); /* Mi limito ad aspettare il termine del processo preoccupandomi * solo di aggiornare l'interfaccia: */ flag = ret = 0; while (!flag && !ret) { gtk_progress_bar_pulse (GTK_PROGRESS_BAR (pb)); while (gtk_events_pending () && !flag && !ret) gtk_main_iteration (); g_usleep (50000); } /* Distruggo la finestra di attesa: */ gtk_widget_destroy (window); /* Questo succede se si e' cliccato sul pulsante abort: */ if (ret) { #ifndef G_OS_WIN32 kill (pid, SIGTERM); #endif g_spawn_close_pid (pid); g_free (file); return NULL; } /* Se non c'e' l'immagine comunico errore: */ if (flag < 0) { dialog_msg (_("Creating graph error!")); g_free (file); return NULL; } /* Ritorno il nome dell'immagine: */ return file; } /* Questa funzione viene lanciata al termine del comando dot */ static void graph_create_cb (GPid pid, gint status, gint * id) { if (status == 0) *id = 1; else *id = -1; } /* Questa funzione lancia graph: */ void graph_run (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); if (data) graph (data); } /* Graph genera il grafico e lo mostra con un programma esterno: */ void graph (struct editor_data_t *data) { GList *list, *old; gchar **a; gchar *file; gint id, ok; /* Uso graph_create: */ if (!(file = graph_create (data, NULL))) return; /* Splitto il comando per il viewer, creo l'array, lo riempo: */ list = old = split (viewer_default); a = g_malloc (sizeof (gchar *) * (g_list_length (list) + 2)); ok = id = 0; while (list) { if (!ok && !strcmp ((gchar *) list->data, "%s")) { a[id++] = file; ok++; } else a[id++] = list->data; list = list->next; } if (!ok) a[id++] = file; a[id] = NULL; /* Eseguo il comando passandogli la callback: */ run (a, (GChildWatchFunc) graph_remove, file); /* Libero la memoria ma non il nome del file. Questo sara' liberato * dalla funzione di callback */ g_list_foreach (old, (GFunc) g_free, NULL); g_list_free (old); g_free (a); } /* Salvataggio di un grafo: */ void graph_save (GtkWidget * w, gpointer dummy) { struct editor_data_t *data = editor_get_data (); gchar *file; gchar *t; if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } /* Aggiorno la statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Save the graph in a file...")); /* Chiedo il nome: */ if (! (file = file_chooser (_("Save your graph"), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_SAVE, NULL))) { statusbar_set (_("Save the graph: aborted")); editor_statusbar_lock = WAIT; return; } /* Se esiste chiedo conferma per la sovrascrittura: */ if (g_file_test (file, G_FILE_TEST_EXISTS) == TRUE && dialog_ask (_("The file exists. Overwrite?")) != GTK_RESPONSE_OK) { statusbar_set (_("Save the graph: aborted")); editor_statusbar_lock = WAIT; g_free (file); return; } /* Genero il grafo sul file: */ if (!(t = graph_create (data, file))) { statusbar_set (_("Save the graph: aborted")); editor_statusbar_lock = WAIT; g_free (file); return; } /* Libero memoria, sblocco la statusbar e ritorno: */ statusbar_set (_("Graph saved!")); editor_statusbar_lock = WAIT; g_free (file); g_free (t); } static gchar * graph_file (struct editor_data_t *data, gchar * file) { gchar *tmp; gchar *s, *p; GList *resources; FILE *fl; struct rdf_t *rdf; gchar *str; gint literal = 0; /* Creo l'elenco delle risorse: */ resources = create_resources (data); /* Mi prendo un file temporaneo se non mi viene passato: */ if (!file) tmp = editor_tmp_file (); else tmp = g_strdup (file); if (!(fl = g_fopen (tmp, "wb"))) { g_free (tmp); return NULL; } /* Scrivo il sorgente per dot: */ fprintf (fl, "digraph dotfile {\nrankdir=LR;\n\n"); /* Per ogni risorsa: */ while (resources) { str = graph_escape (resources->data); /* Se e' un blank node... */ if (rdf_blank (data->rdf, resources->data)) fprintf (fl, "\"%s\" [color=\"%s\",fontcolor=\"%s\",style=\"%s\",fillcolor=\"%s\",fontname=\"%s\",fontsize=\"%d\",shape=\"%s\"];\n", (gchar *) str, graph_blank_node.color, graph_blank_node.fontcolor, graph_blank_node.style, graph_blank_node.fillcolor, graph_blank_node.fontname, graph_blank_node.fontsize, graph_blank_node.shape); /* Altrimenti se e' questo documento: */ else if (!strcmp (str, THIS_DOCUMENT)) fprintf (fl, "\"%s\" [color=\"%s\",fontcolor=\"%s\",style=\"%s\",fillcolor=\"%s\",fontname=\"%s\",fontsize=\"%d\",shape=\"%s\"];\n", data->uri ? data->uri : _("This Document"), graph_resource_node.color, graph_resource_node.fontcolor, graph_resource_node.style, graph_resource_node.fillcolor, graph_resource_node.fontname, graph_resource_node.fontsize, graph_resource_node.shape); /* Altrimenti: */ else fprintf (fl, "\"%s\" [color=\"%s\",fontcolor=\"%s\",style=\"%s\",fillcolor=\"%s\",fontname=\"%s\",fontsize=\"%d\",shape=\"%s\"];\n", str, graph_resource_node.color, graph_resource_node.fontcolor, graph_resource_node.style, graph_resource_node.fillcolor, graph_resource_node.fontname, graph_resource_node.fontsize, graph_resource_node.shape); g_free (str); resources = resources->next; } /* Parso le triplette: */ resources = data->rdf; while (resources) { rdf = resources->data; if (!strcmp (rdf->subject, THIS_DOCUMENT)) s = graph_escape (data->uri ? data->uri : _("This Document")); else s = graph_escape (rdf->subject); p = graph_escape (rdf->predicate); /* Se l'oggetto e' un letterale: */ if (rdf->object_type == RDF_OBJECT_LITERAL) { if (strlen (rdf->object) > 40) { gchar s[50]; strncpy (s, rdf->object, 40); s[40] = 0; strcat (s, "..."); str = graph_escape (s); } else str = graph_escape (rdf->object); fprintf (fl, "\"literal_%d\" [label=\"%s\",color=\"%s\",fontcolor=\"%s\",style=\"%s\",fillcolor=\"%s\",fontname=\"%s\",fontsize=\"%d\",shape=\"%s\"];\n", literal, (gchar *) str, graph_literal_node.color, graph_literal_node.fontcolor, graph_literal_node.style, graph_literal_node.fillcolor, graph_literal_node.fontname, graph_literal_node.fontsize, graph_literal_node.shape); fprintf (fl, "\"%s\" -> \"literal_%d\" [label=\"%s\",fontsize=\"%d\",fontname=\"%s\",color=\"%s\",fontcolor=\"%s\",style=\"%s\"];\n", s, literal, p, graph_edge.fontsize, graph_edge.fontname, graph_edge.color, graph_edge.fontcolor, graph_edge.style); g_free (str); literal++; } /* Altrimenti: */ else { str = graph_escape (rdf->object); fprintf (fl, "\"%s\" -> \"%s\" [label=\"%s\",fontsize=\"%d\",fontname=\"%s\",color=\"%s\",fontcolor=\"%s\",style=\"%s\"];\n", s, str, p, graph_edge.fontsize, graph_edge.fontname, graph_edge.color, graph_edge.fontcolor, graph_edge.style); g_free (str); } g_free (s); g_free (p); resources = resources->next; } /* Chiudo il sorgente e il file: */ fprintf (fl, "\n}\n\n"); fclose (fl); return tmp; } void graph_graphviz (void) { struct editor_data_t *data = editor_get_data (); gchar *file; gchar *t; if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } /* Aggiorno la statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Save the graphviz source in a file...")); /* Chiedo il nome: */ if (! (file = file_chooser (_("Save the graphviz source in a file..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_SAVE, NULL))) { statusbar_set (_("Save the graphviz source: aborted")); editor_statusbar_lock = WAIT; return; } /* Se esiste chiedo conferma per la sovrascrittura: */ if (g_file_test (file, G_FILE_TEST_EXISTS) == TRUE && dialog_ask (_("The file exists. Overwrite?")) != GTK_RESPONSE_OK) { statusbar_set (_("Save the graphviz source: aborted")); editor_statusbar_lock = WAIT; g_free (file); return; } /* Genero il sorgente del grafo sul file: */ if (!(t = graph_file (data, file))) { statusbar_set (_("Save the graphviz source: aborted")); editor_statusbar_lock = WAIT; g_free (file); return; } /* Libero memoria, sblocco la statusbar e ritorno: */ statusbar_set (_("The graphviz source saved!")); editor_statusbar_lock = WAIT; g_free (file); g_free (t); } /* EOF */ morla-0.16.1/src/help.c000066400000000000000000000475321156343060400146110ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" gchar *help_url = NULL; #define HELP_MAX_LIST 10 #ifdef USE_GTKHTML struct help_t { gchar *input; gchar *output; gint flag; }; static GList *help_back_list; static GList *help_forward_list; static GtkWidget *help_back_widget; static GtkWidget *help_forward_widget; static GtkWidget *help_index_widget; static GtkWidget *help_pb; static GtkWidget *help_window; static HtmlDocument *help_doc; static gchar *help_uri; static void help_page (gchar * page, gboolean rec); static gchar *help_download_file (gchar * file); /* HELP FUNCTIONS ***********************************************************/ static void help_back_forward (void) { gtk_widget_set_sensitive (help_back_widget, help_back_list ? TRUE : FALSE); gtk_widget_set_sensitive (help_forward_widget, help_forward_list ? TRUE : FALSE); } static void help_back (GtkWidget * w, gpointer dummy) { gchar *uri; if (!help_back_list) return; if (help_uri) { help_forward_list = g_list_prepend (help_forward_list, help_uri); while (g_list_length (help_forward_list) > HELP_MAX_LIST) { GList *list = g_list_last (help_forward_list); g_free (list->data); help_forward_list = g_list_remove (help_forward_list, list->data); } help_uri = NULL; } uri = help_back_list->data; help_back_list = g_list_remove (help_back_list, help_back_list->data); help_page (uri, FALSE); g_free (uri); help_back_forward (); } static void help_forward (GtkWidget * w, gpointer dummy) { gchar *uri; if (!help_forward_list) return; if (help_uri) { help_back_list = g_list_prepend (help_back_list, help_uri); while (g_list_length (help_back_list) > HELP_MAX_LIST) { GList *list = g_list_last (help_back_list); g_free (list->data); help_back_list = g_list_remove (help_back_list, list->data); } help_uri = NULL; } uri = help_forward_list->data; help_forward_list = g_list_remove (help_forward_list, help_forward_list->data); help_page (uri, FALSE); g_free (uri); help_back_forward (); } static void help_link (HtmlDocument * doc, const gchar * uri, gpointer dummy) { if (strncmp (uri, "morla://", 8)) browser ((gchar *) uri); else { gchar *str = NULL; if (help_uri) { help_back_list = g_list_prepend (help_back_list, help_uri); help_uri = NULL; } if (strlen (uri) > 8) str = g_strdup_printf ("%s/%s", help_url, uri + 8); help_page (str, FALSE); g_free (str); } } static void help_null (void *fl, const char *str, ...) { /* void */ } static gchar * help_xslt (gchar * memory) { xsltStylesheetPtr cur = NULL; xmlDocPtr doc, res, ss_doc; xmlChar *ret; int len; gchar *output; gchar *ss; xmlSubstituteEntitiesDefault (1); xmlSetGenericErrorFunc (xmlGenericErrorContext, help_null); if (!strncmp (help_url, "http://", 7)) { gchar *s = g_strdup_printf ("%s/xslt.xslt", help_url); if (download_uri (s, &ss, NULL, NULL) == FALSE) ss = NULL; g_free (s); } else { gchar *s = g_strdup_printf ("%s/xslt.xslt", help_url); ss = help_download_file (s); g_free (s); } if (!ss) return NULL; if (!(doc = xmlParseMemory (memory, strlen (memory)))) { g_free (ss); return NULL; } if (!(ss_doc = xmlParseMemory (ss, strlen (ss)))) { xmlFreeDoc (doc); g_free (ss); return NULL; } g_free (ss); if (!(cur = xsltParseStylesheetDoc (ss_doc))) { xmlFreeDoc (ss_doc); xmlFreeDoc (doc); return NULL; } if (!(res = xsltApplyStylesheet (cur, doc, NULL))) { xsltFreeStylesheet (cur); xmlFreeDoc (ss_doc); xmlFreeDoc (doc); return NULL; } if (xsltSaveResultToString (&ret, &len, res, cur)) { xsltFreeStylesheet (cur); xmlFreeDoc (ss_doc); xmlFreeDoc (doc); xmlFreeDoc (res); return NULL; } xsltFreeStylesheet (cur); xmlFreeDoc (ss_doc); xmlFreeDoc (doc); xmlFreeDoc (res); xsltCleanupGlobals (); xmlCleanupParser (); output = g_malloc (sizeof (gchar) * (len + 1)); strncpy (output, (gchar *) ret, len); output[len] = 0; xmlFree (ret); return output; } static void * thread (void *dummy) { struct help_t *data = (struct help_t *) dummy; gchar *mm; if (!strncmp (data->input, "http://", 7)) { if (download_uri (data->input, &mm, NULL, NULL) == FALSE) mm = NULL; } else mm = help_download_file (data->input); if (!mm) { data->flag = 1; g_thread_exit (NULL); return NULL; } data->output = help_xslt (mm); g_free (mm); data->flag = 1; g_thread_exit (NULL); return NULL; } static void help_page (gchar * page, gboolean rec) { GThread *th; struct help_t data; gtk_widget_set_sensitive (help_index_widget, FALSE); gtk_widget_set_sensitive (help_back_widget, FALSE); gtk_widget_set_sensitive (help_forward_widget, FALSE); if (!page) page = g_strdup_printf ("%s/index.xml", help_url); else page = g_strdup (page); data.input = page; data.output = NULL; data.flag = 0; th = g_thread_create ((GThreadFunc) thread, &data, FALSE, NULL); while (!data.flag) { gtk_progress_bar_pulse (GTK_PROGRESS_BAR (help_pb)); while (gtk_events_pending () && !data.flag) gtk_main_iteration (); g_usleep (50000); } gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (help_pb), 0); html_document_clear (help_doc); html_document_open_stream (help_doc, "text/html"); if (!data.output) { if (rec == FALSE) { gchar *s = g_strdup_printf ("%s/error.xml", help_url); help_page (s, TRUE); g_free (s); } else { gchar *tmp; tmp = g_strdup_printf ("\n" " \n" " %s\n" " \n" " \n" " \n" " \n" " \n" " \n" "

    %s

    \n" "
    %s
    \n" " \n" " \n", _ ("Error!"), _ ("Error!"), _ ("The error file does not exist, or your computer has some problem with the network!")); html_document_write_stream (help_doc, tmp, strlen (tmp)); g_free (tmp); } } else { html_document_write_stream (help_doc, data.output, strlen (data.output)); g_free (data.output); if (help_uri) g_free (help_uri); help_uri = g_strdup (page); } gtk_widget_set_sensitive (help_index_widget, TRUE); help_back_forward (); g_free (data.input); } static void help_index (GtkWidget * w, gpointer dummy) { help_page (NULL, FALSE); } static void help_destroy (GtkWidget * w, gpointer dummy) { if (help_back_list) { g_list_foreach (help_back_list, (GFunc) g_free, NULL); g_list_free (help_back_list); help_back_list = NULL; } if (help_forward_list) { g_list_foreach (help_forward_list, (GFunc) g_free, NULL); g_list_free (help_forward_list); help_forward_list = NULL; } if (help_uri) { g_free (help_uri); help_uri = NULL; } help_doc = NULL; } void help (void) { GtkWidget *window; GtkWidget *frame; GtkWidget *sw; GtkWidget *vbox, *box, *bbox; GtkWidget *button; GtkWidget *label; GtkWidget *image; GtkWidget *html; gchar s[1024]; gint x, y; if (help_doc) { gtk_window_present (GTK_WINDOW (help_window)); return; } g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Help")); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), s); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (help_destroy), NULL); help_window = window; x = gdk_screen_width () * 1 / 4; if (x < 250) x = 250; y = gdk_screen_width () * 1 / 2; if (y < 400) y = 400; gtk_window_resize (GTK_WINDOW (window), x, y); vbox = gtk_vbox_new (0, 0); gtk_container_add (GTK_CONTAINER (window), vbox); box = gtk_hbox_new (0, 0); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); help_back_widget = button; gtk_widget_set_sensitive (button, FALSE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (help_back), NULL); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); bbox = gtk_vbox_new (0, 0); gtk_container_add (GTK_CONTAINER (button), bbox); image = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (bbox), image, FALSE, FALSE, 0); label = gtk_label_new (_("Back")); gtk_box_pack_start (GTK_BOX (bbox), label, TRUE, TRUE, 0); button = gtk_vseparator_new (); gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0); button = gtk_button_new (); help_index_widget = button; gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (help_index), NULL); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); bbox = gtk_vbox_new (0, 0); gtk_container_add (GTK_CONTAINER (button), bbox); image = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (bbox), image, FALSE, FALSE, 0); label = gtk_label_new (_("Index")); gtk_box_pack_start (GTK_BOX (bbox), label, TRUE, TRUE, 0); button = gtk_vseparator_new (); gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0); button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); help_forward_widget = button; gtk_widget_set_sensitive (button, FALSE); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (help_forward), NULL); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); bbox = gtk_vbox_new (0, 0); gtk_container_add (GTK_CONTAINER (button), bbox); image = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (bbox), image, FALSE, FALSE, 0); label = gtk_label_new (_("Forward")); gtk_box_pack_start (GTK_BOX (bbox), label, TRUE, TRUE, 0); frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); sw = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), sw); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); help_doc = html_document_new (); g_signal_connect (G_OBJECT (help_doc), "link_clicked", G_CALLBACK (help_link), NULL); html_document_open_stream (help_doc, "text/html"); html = html_view_new (); gtk_container_add (GTK_CONTAINER (sw), html); html_view_set_document (HTML_VIEW (html), help_doc); help_pb = gtk_progress_bar_new (); gtk_box_pack_start (GTK_BOX (vbox), help_pb, FALSE, FALSE, 0); gtk_widget_show_all (window); help_page (NULL, FALSE); } static gchar * help_download_file (gchar * file) { gchar *buffer; if (g_file_get_contents (file, &buffer, NULL, NULL) == TRUE) return buffer; return NULL; } #else void help (void) { gchar *page = g_strdup_printf ("%s/index.xml", help_url); browser (page); free (page); } #endif /* * Giuseppe Varaldo * 11 luglio 1982 * * Ai lati, a esordir, dama e re, Pertini trepida, tira lieti moccoli, * dialoga - vocina, pipa… -, ricorre alle battute. È durata!… ne patì Trap: * allena - mèritasi lodi testé - Juvitalia, mai amata. Il boato n’eruppe su * filato, mero atto d’ira: assorga da gai palati, ingoi l’arena! Si rise, * noi: gara azzurra - felicità, reti - e ricca! Né tacerò pose, ire, rapidi * miti; citerò paure… però meritan oro. Ci sono rari tiri? Sia! ma i latini * eroi goderono di rigore - c’è fallo -; “Fatale far tale rete”: lassa * prosopopea nei peani dona aìre facile. Ma “fatale” malessere globi dilata, * rene, vene ci necrotizza: ratto, vago, da finir al còre (l’oblierà? * Dall’idea - l’Erinni! - trepiderà: tic e tac…)… Lapsus saliente (idra! * sillabo!): non amai Cabrini; flusso acre - pus era? sudore? -, bile * d’ittero ci assalì: risa brutali, amaro icore… Fiore italo, cari miei, * secca, alidirà vizzito là, se sol - a foci nuove diretti, fisi - a metà * recedete: l’itala idea di vis (i redivivi, noti, ilari miti!) trapasserà, * inerte e vana, in italianità lisa, banal. Attutite relativa ira, correte: * eterni onori n’avrete! Sibili - tre “fi” - di arbitro: finita lì metà * partita; reca loro l’animo di lotta, fidata ripresa! mira, birra rida’! * attuta ire, bile! La si disse “eterea”, la Catalogna: alla pari terrò * cotali favolose ore… Notte molle, da re! Poeti m’illusero (”Va’!”, “Fa’!”, * “Osa!”) colla fusione - esile, serica, viva -, rime lepide, tra anelito * d’età d’oro e rudezze d’orpello; così cederò all’eros, ai sensi rei; amai * -l’amavo… - una grata città, la gag, la vita; nutro famosa cara sete, * relativa a Lalo, Varese, De Falla, Petrassi, e Ravel, e Adam, e Nono… * Sor… bene, totale opaca arte; né pago fui per attori, dive, divi (lo * sarò?)… Là ogni avuto, mai sopito piacere s’evaporò, leggera falena era: se * con amor, lì, alla cara - cotale! - virile sera - coi gaudi sereni, grevi * da dare angine, beati - lo paragono, decàde a ludo, mollica, vile cineseria, * onere. Sì! Taccola barocca allora rimane, meno mi tange: solo apatia * apporterà, goffa noia… Paride, Ettore e soci trovarono sì dure sorti - * riverberare di pira desueta! - coi gelosi re dei Dori (trono era d’ira, * Era, Muse); a Ilio nati e no, di elato tono, di rango, là tacitati - re… * mogi -, videro Elleni libare, simil a Titani, su al Pergamo: idem i Renani * e noi… “… caparbi”, vaticinò - tono trepido -, ed ora tange là tale causale * trofeo (coppa di rito è la meta della partita), trainer fisso; mìralo come * l’anemone: fisso, raro, da elogi… D’animo nobile, divo mai, mai tetro, * fatale varò la tattica. Cito Gay, ognor abile devo dir: da Maracanà sono * tacco, battuta… Ai lati issò vela l’ala latina Bruno: cerca la rete, si * batte assai, opera lì, fora, rimargina… Bergomi, nauta ragazzo, riserra * giù sì care fila: è l’età… Coi gradi vedo - troppa la soavità… - capitano * Dino, razza ladina. Rete vigila! dilàtati…!: la turba, l’arena, ti venera. * Ad ogni rado, torpido e no, tirabile tiro, trapelò rapidità sua: parò (la * tivù, lì, diè nitidi casi). Di tutto - fiero, mai di fatica, vivace - * raccatta: e, se tarpate, le ali loro - è la verità - paion logore. Zoff * (ùtinam !) è dei.. Parà: para… Piede, mani, tuffo: zero gol, noi a patire. * Vale oro: lì, là… è l’età… “Pratese, attacca! reca vivacità!”, “Fidiamo!”, * “Rei fottuti disaciditi!”… Nei diluvi, talora pausati, di parole partorite * lì, baritone o di proto, da ring o da arene (”Vita nera là, brutalità tali * da ligi veterani, da… lazzaroni!”, “Dònati! pàcati! va’! osa!: l’apporto * devi dar!”, “Giocate leali, feraci!”, “Su i garresi!”, “Rozza gara!”, “Tu, * animo!”, “Grèbani! Grami!”, “Raro filare!”; poi: “Assaetta!”, “Bis!” e * “Ter!”), alacre, con urbanità, l’alalà levossi: “Italia!”, a tutta bocca, * tonò. Sana cara Madrid, ove delibaron Goya… gotica città talora velata: * forte ti amiamo! Vi delibo nomina di goleador a Rossi - fenomenale! -: * mo’, colà, rimossi freni artati (tra palle date male o tiri dappoco è forte * la sua celata legnata), rode, o d’ipertono, tonicità, vibra. Pacione inane, * rimediò magre, plausi - nati tali - miserabili nelle ore di Vigo * (meritàti!); Catalogna ridonò totale idoneità - noi lì a esumare, a ridare * onor -, tiro diede, riso; le giocate use - da ripide, rare, brevi, ritrose, * rudi - son ora vorticose e rotte, e d’ira paion affogare (troppa?). Aìta, * Paolo!: segna, timone mena, mira, rolla, accora, balòccati sereno, aìre - * se Nice lì vacillò - modula e da’ (cedono…): gara polita e benigna - e rada, * di vergine residua… - gioca. Re s’è lì rivelato (Caracalla? Il romano * Cesare!): anela, fa, regge loro, pavese reca…: ipotiposi amo. Tu va’ in * goal, ora! Sol, ivi, devi dirottare più foga: penetra a capo elato - * tenebroso non è… -, ma da elevare, issar te, palla, fede, sera (vola, là) a * vitale rete! Sarà caso… Ma Fortuna ti valga galattica targa, nuova malìa: * mai Eris ne sia sorella! Or è deciso; colle prodezze, dure o rodate doti - * lena, arte di Pelé, mira -, vivaci rese lì sé e noi: su fallo (caso a favore * sul limite, opera dell’ometto nero) è solo, va filato, corre, tira, palla * angolata cala… è rete! Essi di sale, l’Iberia tutta a dir “Arriba!”, rimaser. * Pirata? Di fatto li domina… Loro lacerati tra patemi; Latini forti, braidi, * fertili: bis e ter van, ìrono in rete… E terrò cari a vita: le reti; tutta * l’anabasi latina; i Latini, a nave e treni, a ressa partiti (mìrali!); i * toni vivi, derisivi, d’aedi alati; le tede cerate (”Mai sì fitte” ridevo: * unico falò s’esalò, tizzi vari di là accesi); e i miracolati eroi, feroci… * Oramai la turba si rilassa: i coretti deliberò d’usare. Supercaos sul finir! * Baciamano? No: balli sardi, etnei lassù (spalcate!); citaredi per tinnire, * là, ed il “la” dare; il Bolero, clarini, fado, gavotta, razzi, torce (Nice * n’è venerata) lì. Di bolge, resse, la melata famelica “feria” anodina è * piena, e po’ po’ sorpassa l’etere la trafelata folla. Fecero giri d’onore: * dogi o re, in Italia, mai si ritirarono sì coronati. Remore, Perù, aporetici * timidi pareri… e sopore, catenacci reiterati, Cile, far ruzza: a ragione si * risanerà lì ogni itala piaga; da grossa a ridotta, o remota, lì fu, seppure * nota, obliata. Mai amai la tivù: jet-set, idoli, satire…; ma nella partita * - penata, rude e tutta bella: erro? - ci rapì: panico vago, lai di locco, * mite ilarità di Pertini… tre pere a Madrid, rosea Italia! */ /* EOF */ morla-0.16.1/src/info.c000066400000000000000000000304411156343060400146030ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* INFO BOX *****************************************************************/ /* Questa funzione viene eseguita quando si clicca su label o comment: */ gboolean info_box_popup_show (GtkWidget * w, GdkEventButton * event, GList * list) { GtkWidget *window; GtkWidget *frame; GtkWidget *vbox; GtkWidget *l; gint x, y; gchar *s; gboolean bold; /* Se c'era una finestra prima... la rimuovo: */ if ((window = g_object_get_data (G_OBJECT (w), "window"))) gtk_widget_destroy (window); bold = g_object_get_data (G_OBJECT (w), "bold") ? TRUE : FALSE; /* Creo la finestra con i suggerimenti: */ window = gtk_window_new (GTK_WINDOW_POPUP); gtk_window_set_title (GTK_WINDOW (window), PACKAGE); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_decorated (GTK_WINDOW (window), FALSE); frame = gtk_frame_new (NULL); gtk_container_add (GTK_CONTAINER (window), frame); vbox = gtk_vbox_new (0, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); while (list) { struct info_box_t *d = list->data; if (bold == TRUE) { gchar *value = markup (d->value); if (d->lang) { gchar *lang = markup (d->lang); s = g_strdup_printf ("(%s) %s", lang, value); g_free (lang); } else s = g_strdup_printf ("%s", value); g_free (value); } else { if (d->lang) s = g_strdup_printf ("(%s) %s", d->lang, d->value); else s = g_strdup_printf ("%s", d->value); } l = gtk_label_new (s); if (bold == TRUE) gtk_label_set_use_markup (GTK_LABEL (l), TRUE); gtk_label_set_line_wrap (GTK_LABEL (l), TRUE); g_free (s); gtk_box_pack_start (GTK_BOX (vbox), l, FALSE, FALSE, 5); list = list->next; } /* La realizzo ocn le giuste dimensioni: */ gtk_widget_show_all (frame); gtk_window_set_default_size (GTK_WINDOW (window), w->allocation.width, -1); gtk_widget_realize (window); /* Calcolo il centro del padre: */ gdk_window_get_origin (w->window, &x, &y); x += (w->allocation.width / 2); y += (w->allocation.height / 2); /* Muovo la finestra nell'identico centro: */ gtk_window_move (GTK_WINDOW (window), x - (window->allocation.width / 2), y - (window->allocation.height / 2)); gtk_widget_show_all (window); /* Salvo la finestra dentro al label: */ g_object_set_data (G_OBJECT (w), "window", window); return TRUE; } /* Quando si molla il pulsante distruggo la finestra: */ gboolean info_box_popup_hide (GtkWidget * w, GdkEventButton * event, gpointer dummy) { GtkWidget *window = g_object_get_data (G_OBJECT (w), "window"); if (window) gtk_widget_destroy (window); g_object_steal_data (G_OBJECT (w), "window"); return TRUE; } /* Quando si entra nel box di suggerimento: */ gboolean info_box_enter (GtkWidget * box, GdkEventCrossing * event, gpointer dummy) { static GdkCursor *cursor = NULL; if (!cursor) cursor = gdk_cursor_new (GDK_HAND2); gdk_window_set_cursor (box->window, cursor); return TRUE; } /* Quando si esce dal box di suggerimento: */ gboolean info_box_leave (GtkWidget * box, GdkEventCrossing * event, gpointer dummy) { gdk_window_set_cursor (box->window, NULL); return TRUE; } void info_box_free (struct info_box_t *i) { if (!i) return; if (i->lang) g_free (i->lang); if (i->value) g_free (i->value); g_free (i); } /* INFO **********************************************************************/ static void info_run (gchar * uri, gboolean); static void info_run_rec (gchar * uri, gboolean, GList **, GList **); /* Questa funzione lancia info_run su un item selezionato: */ void info_selected (void) { struct editor_data_t *data = editor_get_data (); if (!data || !data->node_select) { dialog_msg (_("No selected item!")); return; } /* Se e' come l'URI di questo documento: */ if (data->uri && !strcmp (data->node_select, data->uri)) info_run (THIS_DOCUMENT, FALSE); else info_run (data->node_select, rdf_blank (data->rdf, data->node_select)); } /* Questa funzione lancia info_run su un item selezionato: */ void info_this (void) { struct editor_data_t *data = editor_get_data (); if (!data || !data->rdf) { dialog_msg (_("This RDF document is empty!")); return; } info_run (THIS_DOCUMENT, FALSE); } /* Questa funzione lancia info_run con un URI inserito dall'utente: */ void info_uri (void) { gchar *uri; if ((uri = uri_chooser (_("Info about an URI"), NULL))) { info_run (uri, FALSE); g_free (uri); } } static gboolean info_dialog_rdfs (GList * list) { GtkWidget *window, *scrolledwindow, *treeview; GtkWidget *button, *frame, *label; GtkListStore *model; GtkTreeIter iter; GtkCellRenderer *renderer; GtkTreeSelection *selection; GtkTreeViewColumn *column; gchar s[1024]; gboolean ret; g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Import other RDFS...")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_widget_set_size_request (window, 400, 200); label = gtk_label_new (_ ("Some property/class is unknown. Do you want import them?")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), label, FALSE, FALSE, 0); frame = gtk_frame_new (_("Ignored properties")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (1, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Property"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default (button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_OK); gtk_widget_set_can_default (button, TRUE); while (list) { gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, 0, list->data, -1); list = list->next; } gtk_widget_show_all (window); ret = gtk_dialog_run (GTK_DIALOG (window)); g_object_unref (model); gtk_widget_destroy (window); return ret; } /* Mostra informazioni su un elemento passato come argomento: */ static void info_run (gchar * uri, gboolean blank) { GList *list = NULL, *ignore = NULL; struct editor_data_t *data; info_run_rec (uri, blank, &list, &ignore); /* Ci sono item ignorati: */ if (ignore) { /* Chiedo di importarli: */ if (info_dialog_rdfs (ignore) == GTK_RESPONSE_OK) { GList *l, *ll, *ns = NULL; for (l = ignore; l; l = l->next) { gchar *tmp = g_strdup (l->data); gint len = strlen (tmp); while (len--) if (tmp[len] == '/' || tmp[len] == '#') break; tmp[len + 1] = 0; for (ll = ns; ll; ll = ll->next) if (!strcmp (ll->data, tmp)) break; if (ll) g_free (tmp); else ns = g_list_append (ns, tmp); } /* Chiedo per l'import: */ for (l = ns; l; l = l->next) { rdfs_add (l->data, NULL); g_free (l->data); } /* Libero memoria: */ g_list_free (ns); /* Analizzo nuovamente gli uri ignorati: */ for (l = ignore; l; l = l->next) info_run_rec (l->data, FALSE, &list, NULL); } /* Libero memoria: */ g_list_free (ignore); } /* Creo una struttura nuova e la aggiungo ai documenti aperti: */ if (list) { data = g_malloc0 (sizeof (struct editor_data_t)); data->rdf = list; namespace_parse (list, &data->namespace); editor_new_maker (data); } else dialog_msg (_("No info for this URI")); } /* Define capace di effettuare un check su un URI e una PROPRIETA': */ #define INFO_CHECK( x , y ) \ /* Se e' il soggetto giusto: */ \ if (!strcmp (uri, rdf->subject)) \ { \ if (!strcmp (rdf->predicate, x) \ && (rdf->object_type == RDF_OBJECT_RESOURCE || \ (rdf->object_type == RDF_OBJECT_BLANK))) \ { \ GList *l; \ \ /* Se non c'e' gia' nella lista. */ \ for (l = *global; l; l = l->next) \ { \ struct rdf_t *info = l->data; \ if (!strcmp (info->subject, uri) \ && !strcmp (info->predicate, x) \ && !strcmp (info->object, rdf->object)) \ break; \ } \ \ if (!l) \ { \ /* Inserisco: */ \ *global = g_list_append (*global, rdf_copy(rdf)); \ ok= TRUE; \ \ /* Se non c'e' gia' l'oggetto nella lista: */ \ for (l = *global; l; l = l->next) \ if (!strcmp \ (((struct rdf_t *) l->data)->subject, rdf->object)) \ break; \ \ if (!l && ignore) \ info_run_rec (rdf->object, rdf_blank(y, rdf->object), \ global, ignore); \ } \ } \ } /* Funzione ricorsiva per la raccolta di informazioni: */ static void info_run_rec (gchar * uri, gboolean blank, GList ** global, GList ** ignore) { struct editor_data_t *data = editor_get_data (); GList *list, *ns; gboolean ok = FALSE; /* Ricerco informazioni nel documento attuale: */ for (list = data->rdf; list; list = list->next) { struct rdf_t *rdf = list->data; /* Controllo diverse proprieta': */ INFO_CHECK (RDF_TYPE, data->rdf); INFO_CHECK (RDF_SUBCLASSOF, data->rdf); INFO_CHECK (RDF_SUBPROPERTYOF, data->rdf); } /* Se non devo ricercare il THIS_DOCUMENT: */ if (blank == FALSE && strcmp (uri, THIS_DOCUMENT)) { /* Ricerco info in ogni documento namespace conosciuto: */ for (ns = rdfs_list; ns; ns = ns->next) { struct rdfs_t *rdfs = ns->data; /* Per ogni tripletta di questo namespace: */ for (list = rdfs->data; list; list = list->next) { struct rdf_t *rdf = list->data; /* Controllo diverse proprieta': */ INFO_CHECK (RDF_TYPE, rdfs->data); INFO_CHECK (RDF_SUBCLASSOF, rdfs->data); INFO_CHECK (RDF_SUBPROPERTYOF, rdfs->data); } } } /* Se non ho trovato informazioni: */ if (ok == FALSE && ignore && strcmp (THIS_DOCUMENT, uri)) { GList *l; for (l = *ignore; l; l = l->next) if (!strcmp ((gchar *) l->data, uri)) break; if (!l) *ignore = g_list_append (*ignore, uri); } } /* EOF */ morla-0.16.1/src/init.c000066400000000000000000001300061156343060400146110ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #include "morla.h" static void init_read_config (gchar * file, gboolean cp); static void init_create (void); static void init_graph (struct graph_data_t *graph, nxml_data_t * data, gchar * file); static void init_graph_reset (void); static void init_color_reset (void); static gchar *init_browser (void); static gchar *init_viewer (void); static void init_morla_save (void); static void init_template (void); static gchar *init_highlighting_style2str (PangoStyle); static gchar *init_highlighting_variant2str (PangoVariant); static gchar *init_highlighting_weight2str (PangoWeight); static gchar *init_highlighting_stretch2str (PangoStretch); static gchar *init_highlighting_scale2str (gdouble); static gchar *init_highlighting_underline2str (PangoUnderline); static PangoStyle init_highlighting_str2style (gchar *); static PangoVariant init_highlighting_str2variant (gchar *); static PangoWeight init_highlighting_str2weight (gchar *); static PangoStretch init_highlighting_str2stretch (gchar *); static gdouble init_highlighting_str2scale (gchar *); static PangoUnderline init_highlighting_str2underline (gchar *); static void website_update (gchar ** str); #ifndef G_OS_WIN32 static gboolean init_stat (gchar * sw); #else # include #endif static gboolean init_retrocompatibility (void); /* Funzione di inizializzazione di morla: */ void init (gchar * m_config) { gchar *file; gboolean change_path; /* Mostro lo splash: */ splash_show (); splash_set_text_with_effect (PACKAGE " " VERSION); splash_sleep (1); /* Carico moduli: */ module_init (m_config); /* Setto i valori di default: */ init_graph_reset (); init_color_reset (); /* Retro compatibility: */ change_path = init_retrocompatibility (); /* Cerco il file di configurazione: */ file = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "config.xml", NULL); /* Se il file non esiste, allora e' la prima volta che morla viene * avviato e lancio la procedura di creazione config: */ if (g_file_test (file, G_FILE_TEST_EXISTS) == FALSE) init_create (); /* Altrimenti leggo la config: */ else { /* Inizializzo i template: */ init_template (); /* Leggo la configurazione: */ init_read_config (file, change_path); } /* Libero memoria e chiudo lo splash: */ g_free (file); splash_hide (); } /* Questa funzione legge il file di configurazione passato come argomento: */ static void init_read_config (gchar * file, gboolean cp) { nxml_t *nxml; nxml_data_t *data; nxml_attr_t *attr; struct rdfs_t *rdfs; gchar *last; gchar *uri; gboolean highlighting_found = FALSE; /* Setto il titolo nello splash */ splash_set_text (_("Reading the config file")); /* Uso le libnxml che ho fatto io e funzionano tanto bene: */ if (nxml_new (&nxml) != NXML_OK) fatal (_("Error memory!")); if (nxml_parse_file (nxml, file) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (nxml_root_element (nxml, &data) != NXML_OK || !data) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (strcmp (data->value, PACKAGE)) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } /* Per ogni elemento del file di configurazione: */ data = data->children; while (data) { /* Se e' last_id lo aggiorno: */ if (!strcmp (data->value, "last_id")) { nxml_get_string (data, &last); if (!last) last_id = 0; else { last_id = atoi (last); g_free (last); } } /* Browser: */ else if (!strcmp (data->value, "browser") && !browser_default) nxml_get_string (data, &browser_default); /* Viewer: */ else if (!strcmp (data->value, "viewer") && !viewer_default) nxml_get_string (data, &viewer_default); /* Normal_bg: */ else if (!strcmp (data->value, "normal_bg") && !normal_bg_color) nxml_get_string (data, &normal_bg_color); /* Prelight_bg: */ else if (!strcmp (data->value, "prelight_bg") && !prelight_bg_color) nxml_get_string (data, &prelight_bg_color); /* Normal_fg: */ else if (!strcmp (data->value, "normal_fg") && !normal_fg_color) nxml_get_string (data, &normal_fg_color); /* Prelight_fg: */ else if (!strcmp (data->value, "prelight_fg") && !prelight_fg_color) nxml_get_string (data, &prelight_fg_color); /* I vari RDFS importati: */ else if (!strcmp (data->value, "rdfs")) { GList *list = NULL, *nslist = NULL; gchar *rp; /* Alloco un nuovo elemento: */ rdfs = (struct rdfs_t *) g_malloc0 (sizeof (struct rdfs_t)); /* Cerco l'attributo "resource": */ if (nxml_find_attribute (data, "resource", &attr) != NXML_OK || !attr) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } rdfs->resource = g_strdup (attr->value); /* Cerco l'attributo "prefix": */ if (nxml_find_attribute (data, "prefix", &attr) != NXML_OK || !attr) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } rdfs->prefix = g_strdup (attr->value); /* Prendo la path: */ if (nxml_get_string (data, &rdfs->path) != NXML_OK || !rdfs->path) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } /* Retro compatibility: */ if (cp == TRUE) { gchar *path = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), "." PACKAGE, "rdfs", NULL); gint len = strlen (path); if (!strncmp (rdfs->path, path, len)) { gchar *new = rdfs->path + len; while (new[0] && new[0] == G_DIR_SEPARATOR) new++; new = g_strdup (new); g_free (rdfs->path); rdfs->path = new; } g_free (path); } /* Setto la path corretta: */ rp = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "rdfs", rdfs->path, NULL); g_free (rdfs->path); rdfs->path = rp; /* Aggiorno lo splash e parso questo rdfs: */ splash_set_text (_("Parsing local dump of '%s'"), rdfs->resource); uri = g_filename_to_uri (rdfs->path, NULL, NULL); if (!uri || rdf_parse (uri, NULL, FALSE, &list, NULL, NULL) == FALSE) { g_remove (rdfs->path); g_remove (file); if (uri) g_free (uri); fatal (_("Syntax error in file '%s'"), rdfs->path); } g_free (uri); /* Parso il namespace: */ if (namespace_parse (list, &nslist) == FALSE) { g_remove (rdfs->path); g_remove (file); fatal (_("Syntax error in file '%s'"), rdfs->path); } /* Aggiungo i dati e inserisco in lista rdfs_list */ rdfs->data = list; rdfs->nsdata = nslist; rdfs_list = g_list_append (rdfs_list, rdfs); } /* Parso i colori dei blank_node nei grafo: */ else if (!strcmp (data->value, "graph_blank_node")) init_graph (&graph_blank_node, data, file); /* Parso i colori delle risorse nei grafo: */ else if (!strcmp (data->value, "graph_resource_node")) init_graph (&graph_resource_node, data, file); /* Parso i colori dei letterali nei grafo: */ else if (!strcmp (data->value, "graph_literal_node")) init_graph (&graph_literal_node, data, file); /* Parso i colori degli archi nei grafo: */ else if (!strcmp (data->value, "graph_edge")) init_graph (&graph_edge, data, file); /* Il formato dei grafi: */ else if (!strcmp (data->value, "graph_format")) { nxml_get_string (data, &graph_format); if (!graph_format) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } } /* Il livello di undo */ else if (!strcmp (data->value, "undo_max_value")) { gchar *t; nxml_get_string (data, &t); undo_max_value = atoi (t); g_free (t); } /* Il livello di history */ else if (!strcmp (data->value, "last_document_value")) { gchar *t; nxml_get_string (data, &t); last_document_value = atoi (t); g_free (t); } /* il nome del blanknode: */ else if (!strcmp (data->value, "blanknode_name")) nxml_get_string (data, &blanknode_name); /* l'URI per gli aggiornamenti: */ else if (!strcmp (data->value, "update_url")) nxml_get_string (data, &update_url); /* l'URI per la documentazione: */ else if (!strcmp (data->value, "help_url")) nxml_get_string (data, &help_url); /* Devo mostrare il popup per gli aggiornamenti: */ else if (!strcmp (data->value, "update_show")) { gchar *t; nxml_get_string (data, &t); update_show = atoi (t); g_free (t); } /* Devo inserire l'estensione di defualt: */ else if (!strcmp (data->value, "automatic_extensions")) { gchar *t; nxml_get_string (data, &t); automatic_extensions = atoi (t) == 1 ? TRUE : FALSE; g_free (t); } /* Dimensione della finestra: */ else if (!strcmp (data->value, "size")) { nxml_attr_t *attr; if (nxml_find_attribute (data, "height", &attr) == NXML_OK && attr) default_height = atoi (attr->value); if (nxml_find_attribute (data, "width", &attr) == NXML_OK && attr) default_width = atoi (attr->value); } /* Proxy: */ else if (!strcmp (data->value, "proxy")) { nxml_attr_t *attr; #ifdef USE_GCONF if (nxml_find_attribute (data, "gconf", &attr) == NXML_OK && attr && !strcmp (attr->value, "true")) download_proxy_gconf = TRUE; else download_proxy_gconf = FALSE; #endif if (nxml_find_attribute (data, "server", &attr) == NXML_OK && attr) download_proxy = g_strdup (attr->value); if (nxml_find_attribute (data, "port", &attr) == NXML_OK && attr) download_proxy_port = atoi (attr->value); if (nxml_find_attribute (data, "user", &attr) == NXML_OK && attr) download_proxy_user = g_strdup (attr->value); if (nxml_find_attribute (data, "password", &attr) == NXML_OK && attr) download_proxy_password = g_strdup (attr->value); } /* Highlighting: */ else if (!strcmp (data->value, "highlighting")) { nxml_attr_t *attr; nxml_data_t *child; highlighting_found = TRUE; if (nxml_find_attribute (data, "active", &attr) == NXML_OK && attr && !strcmp (attr->value, "true")) highlighting_active = TRUE; else highlighting_active = FALSE; for (highlighting_tags = NULL, child = data->children; child; child = child->next) { if (!strcmp (child->value, "tag")) { struct tag_t *tag; tag = g_malloc0 (sizeof (struct tag_t)); highlighting_tags = g_list_append (highlighting_tags, tag); nxml_get_string (child, &tag->tag); for (attr = child->attributes; attr; attr = attr->next) { if (!strcmp (attr->name, "style")) tag->style = init_highlighting_str2style (attr->value); else if (!strcmp (attr->name, "variant")) tag->variant = init_highlighting_str2variant (attr->value); else if (!strcmp (attr->name, "weight")) tag->weight = init_highlighting_str2weight (attr->value); else if (!strcmp (attr->name, "stretch")) tag->stretch = init_highlighting_str2stretch (attr->value); else if (!strcmp (attr->name, "scale")) tag->scale = init_highlighting_str2scale (attr->value); else if (!strcmp (attr->name, "foreground")) tag->foreground = g_strdup (attr->value); else if (!strcmp (attr->name, "background")) tag->background = g_strdup (attr->value); else if (!strcmp (attr->name, "underline")) tag->underline = init_highlighting_str2underline (attr->value); } } } } /* Cosi' per ogni nodo dell'XML: */ data = data->next; } /* Gli ultimi controlli: */ if (!browser_default) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (!viewer_default) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (!update_url) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (!help_url) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } /* Non presenti nel file di config, quindi versione di morla antecedente * il supporto dell'highlighting */ if (highlighting_found == FALSE) { highlighting_active = TRUE; highlighting_tags = init_highlighting (); } /* Certi li setto io di default: */ if (!undo_max_value) undo_max_value = UNDO_MAX_VALUE; if (!last_document_value) last_document_value = LAST_DOCUMENT_VALUE; if (!update_show) update_show = 1; if (!blanknode_name) blanknode_name = g_strdup (BLANK_NODE); /* Set the morlardf.net uri: */ website_update (&update_url); website_update (&help_url); /* Libero libnxml */ nxml_free (nxml); /* Salvataggio per retrocompatibility: */ if (cp == TRUE) init_save (); } /* Questa funzione crea i file di configurazione: */ static void init_create (void) { gchar *file = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, NULL); /* Splash: */ splash_set_text (_("Creating the config file")); /* Creo la directory: */ if (g_mkdir_with_parents (file, 0755) && g_file_test (file, G_FILE_TEST_IS_DIR) == FALSE) fatal (_("Error creating the directory '%s'!"), file); g_free (file); /* Creo la directory per gli rdfs importati: */ file = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "rdfs", NULL); if (g_mkdir_with_parents (file, 0755) && g_file_test (file, G_FILE_TEST_IS_DIR) == FALSE) fatal (_("Error creating the directory '%s'!"), file); g_free (file); /* Cerco il programmi presenti sul sistema */ browser_default = init_browser (); viewer_default = init_viewer (); /* Setto alcuni valori noti: */ undo_max_value = UNDO_MAX_VALUE; last_document_value = LAST_DOCUMENT_VALUE; update_url = g_strdup (UPDATE_URL); blanknode_name = g_strdup (BLANK_NODE); help_url = g_strdup (HELP_URL); automatic_extensions = TRUE; highlighting_active = TRUE; highlighting_tags = init_highlighting (); /* Salvo rdfs di morla di default come importato: */ init_morla_save (); /* Salvo la configurazione appena creata: */ splash_set_text (_("Saving the config file")); init_save (); } /* Questa funzione salva la configurazione: */ void init_save (void) { gchar *str; gchar *file; FILE *fl; GList *list; /* Apro il file: */ file = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "config.xml", NULL); if (!(fl = g_fopen (file, "wb"))) fatal (_("Error creating the file '%s'!"), file); g_free (file); /* Scrivo dentro l'XML: */ fprintf (fl, "\n"); fprintf (fl, "<%s>\n\n", PACKAGE); /* Uso markup che e' una funzione per escepare caratteri strani: */ str = markup (browser_default); fprintf (fl, " %s\n", str); g_free (str); str = markup (viewer_default); fprintf (fl, " %s\n\n", str); g_free (str); fprintf (fl, " %d\n\n", undo_max_value); fprintf (fl, " %d\n\n", last_document_value); fprintf (fl, " %d\n", update_show >= 0 ? 1 : -1); fprintf (fl, " %d\n", automatic_extensions == TRUE ? 1 : 0); str = markup (blanknode_name); fprintf (fl, " %s\n\n", str); g_free (str); str = markup (update_url); fprintf (fl, " %s\n\n", str); g_free (str); str = markup (help_url); fprintf (fl, " %s\n\n", str); g_free (str); fprintf (fl, " %d\n\n", last_id); fprintf (fl, " %s\n", normal_bg_color); fprintf (fl, " %s\n", prelight_bg_color); fprintf (fl, " %s\n", normal_fg_color); fprintf (fl, " %s\n\n", prelight_fg_color); fprintf (fl, " \n", graph_blank_node.color, graph_blank_node.fontcolor, graph_blank_node.style, graph_blank_node.fillcolor, graph_blank_node.fontname, graph_blank_node.fontsize, graph_blank_node.shape); fprintf (fl, " \n", graph_resource_node.color, graph_resource_node.fontcolor, graph_resource_node.style, graph_resource_node.fillcolor, graph_resource_node.fontname, graph_resource_node.fontsize, graph_resource_node.shape); fprintf (fl, " \n", graph_literal_node.color, graph_literal_node.fontcolor, graph_literal_node.style, graph_literal_node.fillcolor, graph_literal_node.fontname, graph_literal_node.fontsize, graph_literal_node.shape); fprintf (fl, " \n", graph_edge.color, graph_edge.fontcolor, graph_edge.style, graph_edge.fillcolor, graph_edge.fontname, graph_edge.fontsize, graph_edge.shape); fprintf (fl, " %s\n\n", graph_format); fprintf (fl, " \n\n", default_height, default_width); fprintf (fl, " \n\n"); fprintf (fl, " \n", highlighting_active == TRUE ? "true" : "false"); for (list = highlighting_tags; list; list = list->next) { struct tag_t *tag = list->data; fprintf (fl, " style)); fprintf (fl, " variant=\"%s\"", init_highlighting_variant2str (tag->variant)); fprintf (fl, " weight=\"%s\"", init_highlighting_weight2str (tag->weight)); fprintf (fl, " stretch=\"%s\"", init_highlighting_stretch2str (tag->stretch)); fprintf (fl, " scale=\"%s\"", init_highlighting_scale2str (tag->scale)); if (tag->foreground) fprintf (fl, " foreground=\"%s\"", tag->foreground); if (tag->background) fprintf (fl, " background=\"%s\"", tag->background); fprintf (fl, " underline=\"%s\"", init_highlighting_underline2str (tag->underline)); fprintf (fl, ">%s\n", tag->tag); } fprintf (fl, " \n\n"); /* Scrivo tutti gli Rdfs importati: */ for (list = rdfs_list; list; list = list->next) { struct rdfs_t *rdfs = list->data; fprintf (fl, " resource) { str = markup (rdfs->resource); fprintf (fl, " resource=\"%s\"", str); g_free (str); } if (rdfs->prefix) { str = markup (rdfs->prefix); fprintf (fl, " prefix=\"%s\"", str); g_free (str); } if (rdfs->path) { gchar *path, *real; path = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "rdfs", NULL); real = rdfs->path + strlen (path); g_free (path); while (real[0] && real[0] == G_DIR_SEPARATOR) real++; str = markup (real); fprintf (fl, ">%s\n", str); g_free (str); } else fprintf (fl, " />\n"); } fprintf (fl, "\n", PACKAGE); /* Chiudo e salvo: */ fclose (fl); } /* Questa funzione parsa gli argomenti di un punto colori del config file * cercando tutti gli argomenti essenziali: */ static void init_graph (struct graph_data_t *graph, nxml_data_t * data, gchar * file) { nxml_attr_t *attr; if (nxml_find_attribute (data, "color", &attr) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (attr) { if (graph->color) g_free (graph->color); graph->color = g_strdup (attr->value); } if (nxml_find_attribute (data, "fontcolor", &attr) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (attr) { if (graph->fontcolor) g_free (graph->fontcolor); graph->fontcolor = g_strdup (attr->value); } if (nxml_find_attribute (data, "style", &attr) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (attr) { if (graph->style) g_free (graph->style); graph->style = g_strdup (attr->value); } if (nxml_find_attribute (data, "fillcolor", &attr) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (attr) { if (graph->fillcolor) g_free (graph->fillcolor); graph->fillcolor = g_strdup (attr->value); } if (nxml_find_attribute (data, "shape", &attr) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (attr) { if (graph->shape) g_free (graph->shape); graph->shape = g_strdup (attr->value); } if (nxml_find_attribute (data, "fontname", &attr) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (attr) { if (graph->fontname) g_free (graph->fontname); graph->fontname = g_strdup (attr->value); } if (nxml_find_attribute (data, "fontsize", &attr) != NXML_OK) { g_remove (file); fatal (_("Syntax error in file '%s'"), file); } if (attr) graph->fontsize = atoi (attr->value); } /* Questa funzione setta i valori di default per i colori del grafo: */ static void init_graph_reset (void) { graph_blank_node.color = g_strdup ("red"); graph_blank_node.fontcolor = g_strdup ("black"); graph_blank_node.style = g_strdup ("filled"); graph_blank_node.fillcolor = g_strdup ("#2266ff"); #ifndef G_OS_WIN32 graph_blank_node.fontname = g_strdup ("Sans"); #else graph_blank_node.fontname = g_strdup ("Arial"); #endif graph_blank_node.shape = g_strdup ("ellipse"); graph_blank_node.fontsize = 10; graph_resource_node.color = g_strdup ("red"); graph_resource_node.fontcolor = g_strdup ("black"); graph_resource_node.style = g_strdup ("filled"); graph_resource_node.fillcolor = g_strdup ("#aabbcc"); #ifndef G_OS_WIN32 graph_resource_node.fontname = g_strdup ("Sans"); #else graph_resource_node.fontname = g_strdup ("Arial"); #endif graph_resource_node.shape = g_strdup ("ellipse"); graph_resource_node.fontsize = 10; graph_literal_node.color = g_strdup ("#ff22aa"); graph_literal_node.fontcolor = g_strdup ("black"); graph_literal_node.style = g_strdup ("filled"); graph_literal_node.fillcolor = g_strdup ("#ccbbaa"); #ifndef G_OS_WIN32 graph_literal_node.fontname = g_strdup ("Sans"); #else graph_literal_node.fontname = g_strdup ("Arial"); #endif graph_literal_node.fontsize = 10; graph_literal_node.shape = g_strdup ("box"); graph_edge.color = g_strdup ("black"); graph_edge.fontcolor = g_strdup ("black"); graph_edge.style = g_strdup ("solid"); graph_edge.fillcolor = g_strdup ("#ccbbaa"); #ifndef G_OS_WIN32 graph_edge.fontname = g_strdup ("Sans"); #else graph_edge.fontname = g_strdup ("Arial"); #endif graph_edge.fontsize = 10; graph_edge.shape = g_strdup ("box"); graph_format = g_strdup ("png"); } /* Questa funzione setta i colori dei default per morla: */ static void init_color_reset (void) { normal_bg_color = g_strdup ("#ffffff"); prelight_bg_color = g_strdup ("#00ffff"); normal_fg_color = g_strdup ("#10297c"); prelight_fg_color = g_strdup ("#8c0498"); } #ifndef G_OS_WIN32 /* Questa funzione cerca un programma 'sw' usando la variabile di ambiente * PATH. Se lo trova, comunica ok: */ static gboolean init_stat (gchar * sw) { gchar *path; if ((path = g_find_program_in_path (sw))) { g_free (path); return 0; } return 1; } #endif /* Questa funzione cerca i programmi di default per morla win32 version */ static gchar * init_browser (void) { #ifdef G_OS_WIN32 GList *list, *tmp; GString *ret; char szDefault[MAX_PATH]; DWORD ccDefault = MAX_PATH; HRESULT rc = AssocQueryString (0, ASSOCSTR_EXECUTABLE, "http", "open", szDefault, &ccDefault); if (!SUCCEEDED (rc) || !(tmp = list = split (szDefault))) return g_strdup ("firefox %s"); ret = g_string_new (NULL); g_string_append_printf (ret, "\"%s\"", (gchar *) tmp->data); tmp = tmp->next; while (tmp) { if (!strcmp ((gchar *) tmp->data, "%1")) g_string_append_printf (ret, " %%s"); else g_string_append_printf (ret, " \"%s\"", (gchar *) tmp->data); tmp = tmp->next; } g_list_foreach (list, (GFunc) g_free, NULL); g_list_free (list); return g_string_free (ret, FALSE); #else #ifdef ENABLE_MACOSX return g_strdup ("open %s"); #endif if (!init_stat ("x-www-browser")) return g_strdup ("x-www-browser %s"); if (!init_stat ("firefox")) return g_strdup ("firefox %s"); if (!init_stat ("mozilla")) return g_strdup ("mozilla %s"); if (!init_stat ("dillo")) return g_strdup ("dillo %s"); if (!init_stat ("epiphany")) return g_strdup ("epiphany %s"); if (!init_stat ("konqueror")) return g_strdup ("konqueror %s"); if (!init_stat ("galeon")) return g_strdup ("galeon %s"); return g_strdup ("firefox %s"); #endif } /* Questa funzione cerca il viewer: */ static gchar * init_viewer (void) { #ifdef G_OS_WIN32 GList *tmp, *list; GString *ret; char szDefault[MAX_PATH]; DWORD ccDefault = MAX_PATH; HRESULT rc = AssocQueryString (0, ASSOCSTR_EXECUTABLE, ".png", "open", szDefault, &ccDefault); if (!SUCCEEDED (rc) || !(tmp = list = split (szDefault))) return g_strdup ("firefox %s"); ret = g_string_new (NULL); g_string_append_printf (ret, "\"%s\"", (gchar *) tmp->data); tmp = tmp->next; while (tmp) { if (!strcmp ((gchar *) tmp->data, "%1")) g_string_append_printf (ret, " %%s"); else g_string_append_printf (ret, " \"%s\"", (gchar *) tmp->data); tmp = tmp->next; } g_list_foreach (list, (GFunc) g_free, NULL); g_list_free (list); return g_string_free (ret, FALSE); #else #ifdef ENABLE_MACOSX return g_strdup ("open %s"); #endif if (!init_stat ("gqview")) return g_strdup ("gqview -f %s"); if (!init_stat ("gimp")) return g_strdup ("gimp -d -s -f %s"); if (!init_stat ("kview")) return g_strdup ("kview %s"); return g_strdup ("gqview -f %s"); #endif } /* Questa funzione salva l'RDFS di morla: */ static void init_morla_save (void) { gchar *file; int fd; int len, done, ret; gchar *uri; struct rdfs_t *rdfs; GList *list; splash_set_text (_("Creating the RDFS morla file")); /* Cancello il precedente: */ file = rdfs_file (); g_remove (file); /* Apro, scrivo, chiudo: */ if ((fd = open (file, O_WRONLY | O_CREAT, 0644)) < 0) return; len = strlen (morla_rdfs); done = 0; while (done < len) { if ((ret = write (fd, morla_rdfs + done, len - done)) < 1) fatal (_("Error writing file '%s'!"), file); done += ret; } close (fd); /* Parso il nuovo file: */ uri = g_filename_to_uri (file, NULL, NULL); if (!uri || rdf_parse (uri, NULL, FALSE, &list, NULL, NULL) == FALSE) { if (uri) g_free (uri); g_remove (file); return; } /* Creo la struttura e inserisco: */ rdfs = (struct rdfs_t *) g_malloc0 (sizeof (struct rdfs_t)); rdfs->resource = g_strdup (MORLA_NS); rdfs->prefix = g_strdup ("morla"); /* Si questo di default... */ rdfs->data = list; namespace_parse (list, &rdfs->nsdata); rdfs->path = file; rdfs_list = g_list_append (rdfs_list, rdfs); /* Fatto questo importo i template presenti nell'RDFS di morla: */ template_import (uri, NULL, FALSE, FALSE); template_save (); g_free (uri); } /* Parsa il file di template e lo gestisce: */ static void init_template (void) { gchar *path; gchar *uri; splash_set_text (_("Reading the template file")); /* Se non esiste esco: */ path = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "template.rdf", NULL); if (g_file_test (path, G_FILE_TEST_EXISTS) == FALSE) { g_free (path); return; } /* Importo questo uri: */ uri = g_filename_to_uri (path, NULL, NULL); if (!uri || template_import (uri, NULL, FALSE, FALSE) == FALSE) { splash_hide (); dialog_msg (_("Import template error!")); g_remove (path); } if (uri) g_free (uri); g_free (path); } /* Tags per l'highlighting: */ GList * init_highlighting (void) { GList *list = NULL; struct tag_t *tag; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("SELECT"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#CC33CC"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("CONSTRUCT"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#CC33CC"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("DESCRIBE"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#CC33CC"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("ASK"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#CC33CC"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("PREFIX"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#337733"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("WHERE"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#559911"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("FILTER"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#1199FF"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("OPTIONAL"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#1199FF"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("FROM"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#FF2222"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("NAMED"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#FF2222"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("GRAPH"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#22FF22"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("ORDER"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#2222FF"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("BY"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#2222FF"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("DESC"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#9999FF"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("DISTINCT"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#99FF99"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("REDUCED"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#FF9999"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("LIMIT"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#1199FF"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; tag = g_malloc0 (sizeof (struct tag_t)); list = g_list_append (list, tag); tag->tag = g_strdup ("OFFSET"); tag->style = PANGO_STYLE_NORMAL; tag->variant = PANGO_VARIANT_NORMAL; tag->weight = PANGO_WEIGHT_BOLD; tag->stretch = PANGO_STRETCH_NORMAL; tag->scale = PANGO_SCALE_MEDIUM; tag->foreground = g_strdup ("#1199FF"); tag->background = NULL; tag->underline = PANGO_UNDERLINE_NONE; return list; } static gchar * init_highlighting_style2str (PangoStyle style) { switch (style) { case PANGO_STYLE_OBLIQUE: return "STYLE_OBLIQUE"; case PANGO_STYLE_ITALIC: return "STYLE_ITALIC"; default: return "STYLE_NORMAL"; } } static gchar * init_highlighting_variant2str (PangoVariant variant) { switch (variant) { case PANGO_VARIANT_SMALL_CAPS: return "VARIANT_SMALL_CAPS"; default: return "VARIANT_NORMAL"; } } static gchar * init_highlighting_weight2str (PangoWeight weight) { switch (weight) { case PANGO_WEIGHT_ULTRALIGHT: return "WEIGHT_ULTRALIGHT"; case PANGO_WEIGHT_LIGHT: return "WEIGHT_LIGHT"; case PANGO_WEIGHT_SEMIBOLD: return "WEIGHT_SEMIBOLD"; case PANGO_WEIGHT_BOLD: return "WEIGHT_BOLD"; case PANGO_WEIGHT_ULTRABOLD: return "WEIGHT_ULTRABOLD"; case PANGO_WEIGHT_HEAVY: return "WEIGHT_HEAVY"; default: return "WEIGHT_NORMAL"; } } static gchar * init_highlighting_stretch2str (PangoStretch stretch) { switch (stretch) { case PANGO_STRETCH_ULTRA_CONDENSED: return "STRETCH_ULTRA_CONDENSED"; case PANGO_STRETCH_EXTRA_CONDENSED: return "STRETCH_EXTRA_CONDENSED"; case PANGO_STRETCH_CONDENSED: return "STRETCH_CONDENSED"; case PANGO_STRETCH_SEMI_CONDENSED: return "STRETCH_SEMI_CONDENSED"; case PANGO_STRETCH_SEMI_EXPANDED: return "STRETCH_SEMI_EXPANDED"; case PANGO_STRETCH_EXPANDED: return "STRETCH_EXPANDED"; case PANGO_STRETCH_EXTRA_EXPANDED: return "STRETCH_EXTRA_EXPANDED"; case PANGO_STRETCH_ULTRA_EXPANDED: return "STRETCH_ULTRA_EXPANDED"; default: return "STRETCH_NORMAL"; } } static gchar * init_highlighting_scale2str (gdouble scale) { if (scale == PANGO_SCALE_XX_SMALL) return "SCALE_XX_SMALL"; if (scale == PANGO_SCALE_X_SMALL) return "SCALE_X_SMALL"; if (scale == PANGO_SCALE_SMALL) return "SCALE_SMALL"; if (scale == PANGO_SCALE_LARGE) return "SCALE_LARGE"; if (scale == PANGO_SCALE_X_LARGE) return "SCALE_X_LARGE"; if (scale == PANGO_SCALE_XX_LARGE) return "SCALE_XX_LARGE"; return "SCALE_MEDIUM"; } static gchar * init_highlighting_underline2str (PangoUnderline underline) { switch (underline) { case PANGO_UNDERLINE_SINGLE: return "UNDERLINE_SINGLE"; case PANGO_UNDERLINE_DOUBLE: return "UNDERLINE_DOUBLE"; default: return "UNDERLINE_NONE"; } } static PangoStyle init_highlighting_str2style (gchar * str) { if (!strcmp (str, "STYLE_OBLIQUE")) return PANGO_STYLE_OBLIQUE; if (!strcmp (str, "STYLE_ITALIC")) return PANGO_STYLE_ITALIC; return PANGO_STYLE_NORMAL; } static PangoVariant init_highlighting_str2variant (gchar * str) { if (!strcmp (str, "VARIANT_SMALL_CAPS")) return PANGO_VARIANT_SMALL_CAPS; return PANGO_VARIANT_NORMAL; } static PangoWeight init_highlighting_str2weight (gchar * str) { if (!strcmp (str, "WEIGHT_ULTRALIGHT")) return PANGO_WEIGHT_ULTRALIGHT; if (!strcmp (str, "WEIGHT_LIGHT")) return PANGO_WEIGHT_LIGHT; if (!strcmp (str, "WEIGHT_SEMIBOLD")) return PANGO_WEIGHT_SEMIBOLD; if (!strcmp (str, "WEIGHT_BOLD")) return PANGO_WEIGHT_BOLD; if (!strcmp (str, "WEIGHT_ULTRABOLD")) return PANGO_WEIGHT_ULTRABOLD; if (!strcmp (str, "WEIGHT_HEAVY")) return PANGO_WEIGHT_HEAVY; return PANGO_WEIGHT_NORMAL; } static PangoStretch init_highlighting_str2stretch (gchar * str) { if (!strcmp (str, "STRETCH_ULTRA_CONDENSED")) return PANGO_STRETCH_ULTRA_CONDENSED; if (!strcmp (str, "STRETCH_EXTRA_CONDENSED")) return PANGO_STRETCH_EXTRA_CONDENSED; if (!strcmp (str, "STRETCH_CONDENSED")) return PANGO_STRETCH_CONDENSED; if (!strcmp (str, "STRETCH_SEMI_CONDENSED")) return PANGO_STRETCH_SEMI_CONDENSED; if (!strcmp (str, "STRETCH_SEMI_EXPANDED")) return PANGO_STRETCH_SEMI_EXPANDED; if (!strcmp (str, "STRETCH_EXPANDED")) return PANGO_STRETCH_EXPANDED; if (!strcmp (str, "STRETCH_EXTRA_EXPANDED")) return PANGO_STRETCH_EXTRA_EXPANDED; if (!strcmp (str, "STRETCH_ULTRA_EXPANDED")) return PANGO_STRETCH_ULTRA_EXPANDED; return PANGO_STRETCH_NORMAL; } static gdouble init_highlighting_str2scale (gchar * str) { if (!strcmp (str, "SCALE_XX_SMALL")) return PANGO_SCALE_XX_SMALL; if (!strcmp (str, "SCALE_X_SMALL")) return PANGO_SCALE_X_SMALL; if (!strcmp (str, "SCALE_SMALL")) return PANGO_SCALE_SMALL; if (!strcmp (str, "SCALE_LARGE")) return PANGO_SCALE_LARGE; if (!strcmp (str, "SCALE_X_LARGE")) return PANGO_SCALE_X_LARGE; if (!strcmp (str, "SCALE_XX_LARGE")) return PANGO_SCALE_XX_LARGE; return PANGO_SCALE_MEDIUM; } static PangoUnderline init_highlighting_str2underline (gchar * str) { if (!strcmp (str, "UNDERLINE_SINGLE")) return PANGO_UNDERLINE_SINGLE; if (!strcmp (str, "UNDERLINE_DOUBLE")) return PANGO_UNDERLINE_DOUBLE; return PANGO_UNDERLINE_NONE; } /* This function change to the new website the URL: */ static void website_update (gchar ** str) { if (!str || !*str) return; if (!strncmp (*str, MORLA_OLD_WEBSITE_1, strlen (MORLA_OLD_WEBSITE_1))) { gchar *new = g_strdup_printf ("%s%s", MORLA_WEBSITE, (*str) + strlen (MORLA_OLD_WEBSITE_1)); g_free (*str); *str = new; return; } if (!strncmp (*str, MORLA_OLD_WEBSITE_2, strlen (MORLA_OLD_WEBSITE_2))) { gchar *new = g_strdup_printf ("%s%s", MORLA_WEBSITE, (*str) + strlen (MORLA_OLD_WEBSITE_2)); g_free (*str); *str = new; return; } if (!strncmp (*str, MORLA_OLD_WEBSITE_3, strlen (MORLA_OLD_WEBSITE_3))) { gchar *new = g_strdup_printf ("%s%s", MORLA_WEBSITE, (*str) + strlen (MORLA_OLD_WEBSITE_3)); g_free (*str); *str = new; return; } } static gboolean init_retrocompatibility (void) { gchar *path, *new; GDir *dir; gboolean ret = FALSE; if (!strcmp (g_get_user_config_dir (), g_get_home_dir ())) return FALSE; path = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), "." PACKAGE, NULL); if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) == FALSE) { g_free (path); return FALSE; } new = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, NULL); if (g_file_test (new, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) == FALSE) { if (g_mkdir_with_parents (new, 0755) < 0) { g_free (new); g_free (path); return FALSE; } } if ((dir = g_dir_open (path, 0, NULL))) { const gchar *file; gchar *ofile, *nfile; while ((file = g_dir_read_name (dir))) { ofile = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), "." PACKAGE, file, NULL); nfile = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, file, NULL); g_rename (ofile, nfile); g_free (nfile); g_free (ofile); } g_dir_close (dir); ret = TRUE; g_rmdir (path); } g_free (new); g_free (path); return ret; } /* EOF */ morla-0.16.1/src/js.c000066400000000000000000000407631156343060400142740ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #ifdef USE_JS #ifdef USE_NGS_JS static int js_stderr (void *context, unsigned char *buffer, unsigned int amount); static JSMethodResult js_alert (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return); static JSMethodResult js_confirm (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return); static JSMethodResult js_get_value (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return); static JSMethodResult js_set_value (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return); static gchar *js_set_value_real (JSType * var); static JSMethodResult js_morla_version (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return); #elif USE_MOZILLA_JS static void js_stderr (JSContext * context, const char *message, JSErrorReport * report); static JSBool js_alert (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval); static JSBool js_confirm (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval); static JSBool js_get_value (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval); static JSBool js_set_value (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval); static JSBool js_version (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval); static JSClass globalClass = { "Global", 0, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub }; static JSFunctionSpec functions[] = { {"morla_alert", js_alert, 0}, {"morla_confirm", js_confirm, 0}, {"morla_get_value", js_get_value, 0}, {"morla_set_value", js_set_value, 0}, {"morla_version", js_version, 0}, {0} }; #endif /* Javascript engine init: */ struct js_t * js_new (void) { struct js_t *js; #ifdef USE_NGS_JS JSInterpPtr interp; JSInterpOptions options; JSType var; js_init_default_options (&options); options.s_stderr = js_stderr; options.s_context = NULL; interp = js_create_interp (&options); js = g_malloc0 (sizeof (struct js_t)); js->interp = interp; /* Variables: */ var.type = JS_TYPE_BOOLEAN; var.u.i = JS_MORLA_OK; js_set_var (interp, "MORLA_OK", &var); var.type = JS_TYPE_BOOLEAN; var.u.i = JS_MORLA_FAILURE; js_set_var (interp, "MORLA_FAILURE", &var); var.type = JS_TYPE_INTEGER; var.u.i = 0; js_set_var (interp, "MORLA_VALUE", &var); var.type = JS_TYPE_INTEGER; var.u.i = 1; js_set_var (interp, "MORLA_LANGUAGE", &var); var.type = JS_TYPE_INTEGER; var.u.i = 2; js_set_var (interp, "MORLA_DATATYPE", &var); var.type = JS_TYPE_INTEGER; var.u.i = 3; js_set_var (interp, "MORLA_TYPE", &var); var.type = JS_TYPE_INTEGER; var.u.i = RDF_OBJECT_BLANK; js_set_var (interp, "MORLA_RDF_BLANKNODE", &var); var.type = JS_TYPE_INTEGER; var.u.i = RDF_OBJECT_LITERAL; js_set_var (interp, "MORLA_RDF_LITERAL", &var); var.type = JS_TYPE_INTEGER; var.u.i = RDF_OBJECT_RESOURCE; js_set_var (interp, "MORLA_RDF_RESOURCE", &var); /* Functions: */ js_create_global_method (interp, "morla_alert", js_alert, js, NULL); js_create_global_method (interp, "morla_confirm", js_confirm, js, NULL); js_create_global_method (interp, "morla_get_value", js_get_value, js, NULL); js_create_global_method (interp, "morla_set_value", js_set_value, js, NULL); js_create_global_method (interp, "morla_version", js_morla_version, js, NULL); #elif USE_MOZILLA_JS JSRuntime *rt; JSContext *cx; JSObject *global; GString *str; gchar *buffer; jsval rval; rt = JS_NewRuntime (0x400000L); cx = JS_NewContext (rt, 0x1000); global = JS_NewObject (cx, &globalClass, NULL, NULL); JS_InitStandardClasses (cx, global); JS_DefineFunctions (cx, global, functions); str = g_string_new (NULL); g_string_append_printf (str, "var MORLA_OK=%d;\n", JS_MORLA_OK); g_string_append_printf (str, "var MORLA_FAILURE=%d;\n", JS_MORLA_FAILURE); g_string_append_printf (str, "var MORLA_VALUE=0;\n"); g_string_append_printf (str, "var MORLA_LANGUAGE=1;\n"); g_string_append_printf (str, "var MORLA_DATATYPE=2;\n"); g_string_append_printf (str, "var MORLA_TYPE=3;\n"); g_string_append_printf (str, "var MORLA_RDF_BLANKNODE=%d;\n", RDF_OBJECT_BLANK); g_string_append_printf (str, "var MORLA_RDF_LITERAL=%d;\n", RDF_OBJECT_LITERAL); g_string_append_printf (str, "var MORLA_RDF_RESOURCE=%d;\n", RDF_OBJECT_RESOURCE); g_string_append_printf (str, "var morla_status=0;\n"); buffer = g_string_free (str, FALSE); JS_EvaluateScript (cx, global, buffer, strlen (buffer), "script", 0, &rval); g_free (buffer); JS_SetErrorReporter (cx, js_stderr); js = g_malloc0 (sizeof (struct js_t)); js->rt = rt; js->cx = cx; js->global = global; JS_SetContextPrivate (cx, js); #endif return js; } /* Destroy everything: */ void js_destroy (struct js_t *js) { if (!js) return; #ifdef USE_NGS_JS js_destroy_interp (js->interp); #elif USE_MOZILLA_JS JS_DestroyContext (js->cx); JS_DestroyRuntime (js->rt); #endif g_free (js); } /* Change the current widget: */ void js_current_widget (struct js_t *js, GtkWidget * widget) { if (js && widget) js->widget = widget; } /* Evaluate a js script. The script is ok if the morla_status variabile will be * setted to: MORLA_OK: */ gboolean js_evaluate (struct js_t *js, gchar * buffer) { #ifdef USE_NGS_JS JSType type; type.type = JS_TYPE_BOOLEAN; type.u.i = 0; js_set_var (js->interp, "morla_status", &type); js_eval (js->interp, buffer); js_get_var (js->interp, "morla_status", &type); if (type.type == JS_TYPE_BOOLEAN || type.type == JS_TYPE_INTEGER) return type.u.i == JS_MORLA_OK ? JS_MORLA_OK : JS_MORLA_FAILURE; return JS_MORLA_FAILURE; #elif USE_MOZILLA_JS jsval rval; gchar *str; str = "morla_status=0;\n"; if (JS_EvaluateScript (js->cx, js->global, str, strlen (str), "script", 0, &rval) == JS_FALSE) return JS_MORLA_FAILURE; if (JS_EvaluateScript (js->cx, js->global, buffer, strlen (buffer), NULL, 0, &rval) == JS_FALSE) return JS_MORLA_FAILURE; str = "morla_status;\n"; if (JS_EvaluateScript (js->cx, js->global, str, strlen (str), "script", 0, &rval) == JS_FALSE) return JS_MORLA_FAILURE; return !JSVAL_TO_DOUBLE (rval) ? JS_MORLA_OK : JS_MORLA_FAILURE; #endif } #ifdef USE_NGS_JS static int js_stderr (void *context, unsigned char *buffer, unsigned int amount) { return fwrite (buffer, 1, amount, stderr); } #elif USE_MOZILLA_JS static void js_stderr (JSContext * context, const char *message, JSErrorReport * report) { if (!report) { g_fprintf (stderr, "%s", message); return; } g_fprintf (stderr, "Line %d: %s\n", report->lineno, message); } #endif /* FUNCTIONS ********************************************************************/ #ifdef USE_NGS_JS /* Alert: */ static gchar * js_alert_real (int argc, JSType * argv) { GString *str = g_string_new (NULL); gint i; for (i = 0; i < argc; i++) { JSType *arg = &argv[i]; switch (arg->type) { case JS_TYPE_STRING: if (i > 0) str = g_string_append (str, " "); if (arg->u.s && arg->u.s->data) str = g_string_append_len (str, (const gchar *) arg->u.s->data, arg->u.s->len); break; case JS_TYPE_INTEGER: case JS_TYPE_BOOLEAN: if (i > 0) str = g_string_append (str, " "); g_string_append_printf (str, "%ld", arg->u.i); break; case JS_TYPE_DOUBLE: if (i > 0) str = g_string_append (str, " "); g_string_append_printf (str, "%f", arg->u.d); break; case JS_TYPE_ARRAY: if (i > 0) str = g_string_append (str, " "); g_string_append_printf (str, "Array"); break; default: return NULL; break; } } return g_string_free (str, FALSE); } static JSMethodResult js_alert (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return) { gchar *buffer; if (!(buffer = js_alert_real (argc, argv))) { sprintf (error_return, "morla_alert: illegal argument"); return JS_ERROR; } dialog_msg (buffer); g_free (buffer); result_return->type = JS_TYPE_NULL; return JS_OK; } /* Confirm: */ static JSMethodResult js_confirm (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return) { gchar *buffer; if (!(buffer = js_alert_real (argc, argv))) { sprintf (error_return, "morla_confirm: illegal argument"); return JS_ERROR; } if (dialog_ask (buffer) == GTK_RESPONSE_OK) result_return->u.i = 1; else result_return->u.i = 0; g_free (buffer); result_return->type = JS_TYPE_BOOLEAN; return JS_OK; } static JSMethodResult js_get_value (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return) { struct js_t *js = context; struct template_value_t *value; value = template_value_new (js->widget); js_type_make_array (js->interp, result_return, 4); if (value->value) js_type_make_string (js->interp, &result_return->u.array->data[0], (unsigned char *) value->value, strlen (value->value)); else js_type_make_string (js->interp, &result_return->u.array->data[0], (unsigned char *) "", 0); if (value->lang) js_type_make_string (js->interp, &result_return->u.array->data[1], (unsigned char *) value->lang, strlen (value->lang)); else js_type_make_string (js->interp, &result_return->u.array->data[1], (unsigned char *) "", 0); if (value->datatype) js_type_make_string (js->interp, &result_return->u.array->data[2], (unsigned char *) value->datatype, strlen (value->datatype)); else js_type_make_string (js->interp, &result_return->u.array->data[2], (unsigned char *) "", 0); result_return->u.array->data[3].type = JS_TYPE_INTEGER; result_return->u.array->data[3].u.i = value->type; template_value_free (value); return JS_OK; } static JSMethodResult js_set_value (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return) { struct template_value_t *value; struct js_t *js = context; if (argc != 1) { sprintf (error_return, "morla_set_value: too many argument"); return JS_ERROR; } if (argv[0].type != JS_TYPE_ARRAY || !argv[0].u.array) { sprintf (error_return, "morla_set_value: the argument is not an array"); return JS_ERROR; } value = g_malloc0 (sizeof (struct template_value_t)); #define JS_SET_VALUE( x , y ) \ if (argv[0].u.array->length >= y + 1) \ value->x = js_set_value_real (argv[0].u.array->data + y); \ else \ value->x = NULL; \ JS_SET_VALUE (value, 0); JS_SET_VALUE (lang, 1); JS_SET_VALUE (datatype, 2); if (argv[0].u.array->length >= 3 && argv[0].u.array->data + 3) { JSType *var = argv[0].u.array->data + 3; if (var->type == JS_TYPE_INTEGER && var->u.i >= 0 && var->u.i <= 3) value->type = var->u.i; else value->type = RDF_OBJECT_RESOURCE; } template_value_set (js->widget, value); template_value_free (value); result_return->type = JS_TYPE_NULL; return JS_OK; } static gchar * js_set_value_real (JSType * var) { if (var->type == JS_TYPE_INTEGER || var->type == JS_TYPE_BOOLEAN) return g_strdup_printf ("%ld", var->u.i); else if (var->type == JS_TYPE_STRING && var->u.s->len) return g_strndup ((const gchar *) var->u.s->data, var->u.s->len); else if (var->type == JS_TYPE_DOUBLE) return g_strdup_printf ("%f", var->u.d); return NULL; } static JSMethodResult js_morla_version (void *context, JSInterpPtr interp, int argc, JSType * argv, JSType * result_return, char *error_return) { struct js_t *js = context; js_type_make_string (js->interp, result_return, (unsigned char *) VERSION, strlen (VERSION)); return JS_OK; } #elif USE_MOZILLA_JS static JSBool js_alert (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) { JSString *str; if ((!JSVAL_IS_STRING (argv[0]) && !JSVAL_IS_NUMBER (argv[0])) || !(str = JS_ValueToString (cx, argv[0]))) return JS_FALSE; dialog_msg (JS_GetStringBytes (str)); return JS_TRUE; } static JSBool js_confirm (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) { JSString *str; if ((!JSVAL_IS_STRING (argv[0]) && !JSVAL_IS_NUMBER (argv[0])) || !(str = JS_ValueToString (cx, argv[0]))) return JS_FALSE; if (dialog_ask (JS_GetStringBytes (str)) == GTK_RESPONSE_OK) *rval = JSVAL_TRUE; else *rval = JSVAL_FALSE; return JS_TRUE; } static JSBool js_version (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) { JSString *version = JS_NewStringCopyN (cx, VERSION, strlen (VERSION)); *rval = STRING_TO_JSVAL (version); return JS_TRUE; } static JSBool js_get_value (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) { struct template_value_t *value; struct js_t *js = JS_GetContextPrivate (cx); JSObject *array = JS_NewArrayObject (cx, 0, NULL); JSString *str; jsval val; value = template_value_new (js->widget); if (value->value) { str = JS_NewStringCopyN (cx, value->value, strlen (value->value)); val = STRING_TO_JSVAL (str); JS_SetElement (cx, array, 0, &val); } else { str = JS_NewStringCopyN (cx, "", 0); val = STRING_TO_JSVAL (str); JS_SetElement (cx, array, 0, &val); } if (value->lang) { str = JS_NewStringCopyN (cx, value->lang, strlen (value->lang)); val = STRING_TO_JSVAL (str); JS_SetElement (cx, array, 1, &val); } else { str = JS_NewStringCopyN (cx, "", 0); val = STRING_TO_JSVAL (str); JS_SetElement (cx, array, 1, &val); } if (value->datatype) { str = JS_NewStringCopyN (cx, value->datatype, strlen (value->datatype)); val = STRING_TO_JSVAL (str); JS_SetElement (cx, array, 2, &val); } else { str = JS_NewStringCopyN (cx, "", 0); val = STRING_TO_JSVAL (str); JS_SetElement (cx, array, 2, &val); } val = DOUBLE_TO_JSVAL (value->type); JS_SetElement (cx, array, 3, &val); template_value_free (value); *rval = OBJECT_TO_JSVAL (array); return JS_TRUE; } static JSBool js_set_value (JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval) { struct template_value_t *value; struct js_t *js = JS_GetContextPrivate (cx); JSObject *array; JSString *str; JSBool found; jsval val; if (!JS_IsArrayObject (cx, JSVAL_TO_OBJECT (argv[0]))) { JS_ReportError (cx, "morla_set_value: the argument is not an array"); return JS_FALSE; } array = JSVAL_TO_OBJECT (argv[0]); value = g_malloc0 (sizeof (struct template_value_t)); #define JS_SET_VALUE( x , y ) \ if (JS_HasElement(cx, array, y, &found) == JS_TRUE && \ found == JS_TRUE && \ JS_GetElement (cx, array, y, &val) && \ (JSVAL_IS_STRING (val) || JSVAL_IS_NUMBER (val)) && \ (str = JS_ValueToString (cx, val))) \ value->x = g_strdup (JS_GetStringBytes (str)); \ else \ value->x = NULL; JS_SET_VALUE (value, 0); JS_SET_VALUE (lang, 1); JS_SET_VALUE (datatype, 2); if (JS_HasElement (cx, array, 3, &found) == JS_TRUE && found == JS_TRUE && JS_GetElement (cx, array, 3, &val) && JSVAL_IS_NUMBER (val)) value->type = (gint) JSVAL_TO_DOUBLE (val); template_value_set (js->widget, value); template_value_free (value); return JS_TRUE; } #endif #endif /* EOF */ morla-0.16.1/src/last.c000066400000000000000000000074041156343060400146160ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" gint last_document_value; GList *last_list; GtkWidget *last_menu; static void last_read (void) { static int done = 0; gchar *path; int ch, i; gchar buffer[1024]; FILE *fl; if (done) return; done++; last_list = NULL; path = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "last_documents", NULL); if (!(fl = g_fopen (path, "rb"))) { g_free (path); return; } g_free (path); i = 0; while ((ch = fgetc (fl)) != EOF) { if (ch == '\n') { if (i) { buffer[i] = 0; last_list = g_list_append (last_list, g_strdup (buffer)); i = 0; } } else if (i < sizeof (buffer) - 1) buffer[i++] = ch; } fclose (fl); } static void last_open (GtkWidget * w, gchar * uri) { editor_open_uri (uri, NULL); } void last_update (void) { GtkWidget *menuitem; last_read (); gtk_container_foreach (GTK_CONTAINER (last_menu), (GtkCallback) gtk_widget_destroy, NULL); if (last_list) { GList *list; list = last_list; while (list) { menuitem = gtk_menu_item_new_with_label (list->data); gtk_container_add (GTK_CONTAINER (last_menu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (last_open), list->data); list = list->next; } } else { menuitem = gtk_menu_item_new_with_label (_("")); gtk_container_add (GTK_CONTAINER (last_menu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); } gtk_widget_show_all (last_menu); } static void last_save (void) { GList *list; gchar *path; FILE *fl; path = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "last_documents", NULL); if (!(fl = g_fopen (path, "wb"))) { g_free (path); return; } list = last_list; while (list) { fprintf (fl, "%s\n", (gchar *) list->data); list = list->next; } g_free (path); fclose (fl); } void last_add (gchar * uri) { GList *list = last_list; while (list) { if (!strcmp ((gchar *) list->data, uri)) { last_list = g_list_remove (last_list, list->data); break; } list = list->next; } last_list = g_list_prepend (last_list, g_strdup (uri)); while (g_list_length (last_list) > last_document_value) last_list = g_list_remove (last_list, g_list_last (last_list)->data); last_update (); last_save (); } /* Quando si cambia il livello di history dalle preferences devo * rimuovere gli eccessi: */ void last_change_value (void) { gint len = g_list_length (last_list); if (len > last_document_value) { len -= last_document_value; while (len) { GList *tmp = g_list_last (last_list); g_free (tmp->data); last_list = g_list_remove (last_list, tmp->data); len--; } } last_update (); last_save (); } /* EOF */ morla-0.16.1/src/main.c000066400000000000000000001337461156343060400146100ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static GtkWidget *window; gint statusbar_id; GtkWidget *statusbar; gchar *browser_default = NULL; gchar *viewer_default = NULL; GList *fork_child = NULL; GList *thread_child = NULL; GList *rdfs_list = NULL; gint last_id = 0; gint default_width = 0; gint default_height = 0; gint editor_statusbar_lock; gint global_argc; gchar **global_argv; struct editor_data_t *editor_data = NULL; GtkWidget *notebook; struct graph_data_t graph_blank_node; struct graph_data_t graph_resource_node; struct graph_data_t graph_literal_node; struct graph_data_t graph_edge; gchar *graph_format; gchar *normal_bg_color; gchar *prelight_bg_color; gchar *normal_fg_color; gchar *prelight_fg_color; GtkWidget *undo_widget[2]; GtkWidget *redo_widget[2]; static gint editor_id = 0; static gint update_id = 0; /* Prototipi: */ static void window_resize (GtkWidget *, GtkRequisition *, gpointer); static gchar *user_agent_search (void); static gboolean template_starter_open (struct template_t *t); static gboolean template_starter_edit (struct template_t *t); static const gchar *main_path_icon (void); /* Questa funzione viene avviata ogni volta che si passa da un documento * all'altro usando le label del notebook. Aggiorna undo e redo: */ static void switch_page (GtkWidget * widget, gint arg1, gpointer udata) { struct editor_data_t *data = editor_get_data (); if (!data) { gtk_widget_set_sensitive (undo_widget[0], FALSE); gtk_widget_set_sensitive (undo_widget[1], FALSE); gtk_widget_set_sensitive (redo_widget[0], FALSE); gtk_widget_set_sensitive (redo_widget[1], FALSE); return; } gtk_widget_set_sensitive (undo_widget[0], data->undo ? TRUE : FALSE); gtk_widget_set_sensitive (undo_widget[1], data->undo ? TRUE : FALSE); gtk_widget_set_sensitive (redo_widget[0], data->redo ? TRUE : FALSE); gtk_widget_set_sensitive (redo_widget[1], data->redo ? TRUE : FALSE); } /* Urla qualcosa ed esce: */ void fatal (gchar * text, ...) { va_list va; gchar s[1024]; gint i; gchar **a; a = (gchar **) g_malloc (sizeof (gchar *) * (global_argc + 1)); va_start (va, text); g_vsnprintf (s, sizeof (s), text, va); va_end (va); splash_hide (); dialog_msg (s); for (i = 0; i < global_argc; i++) a[i] = global_argv[i]; a[i] = NULL; g_spawn_async (NULL, a, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, NULL, NULL); g_free (a); exit (1); } /* Questa funzione viene richiamata quando si chiede di uscire: */ gint editor_quit (GtkWidget * w, GdkEvent * event, gpointer dummy) { struct editor_data_t *tmp; GList *list = NULL; GList *l; gchar s[1024]; tmp = editor_data; /* Guardo quali file non sono ancora salvati e creo una lista: */ while (tmp) { if (rdf_is_no_saved (tmp) == TRUE) { if (tmp->file) list = g_list_append (list, g_strdup (tmp->file)); else list = g_list_append (list, g_strdup (_("New RDF Document"))); } tmp = tmp->next; } /* Se non c'e' la lista, non oppongo resistenza: */ if (!list) { g_source_remove (editor_id); g_source_remove (update_id); gtk_main_quit (); return FALSE; } /* Creo la scritta per il popup: */ g_snprintf (s, sizeof (s), _("Exit without save?\nCheck: ")); l = list; while (l) { strncat (s, (gchar *) l->data, strlen (s)); if (l->next) strncat (s, ", ", strlen (s)); g_free (l->data); l = l->next; } /* Rimuovo la lista: */ g_list_free (list); /* E chiedo conferma: */ if (dialog_ask (s) == GTK_RESPONSE_OK) { g_source_remove (editor_id); g_source_remove (update_id); gtk_main_quit (); return FALSE; } return TRUE; } /* Se dal menu qualcuno chiede di aggiungere un rdfs: */ static void menu_rdfs_add (GtkWidget * w, gpointer dummy) { rdfs_add (NULL, NULL); } /* Se dal menu qualcuno chiede di aprire un RDF remoto */ void menu_open_remote (GtkWidget * w, gpointer dummy) { gchar *uri; struct download_t *download; if ((uri = uri_chooser (_("Open a RDF URI"), &download))) { editor_open_uri (uri, download); g_free (uri); } if (download) download_free (download); } /* Funzione di callback rispetto alla search open */ void menu_search_cb (gchar * uri, gpointer dummy) { editor_open_uri (uri, dummy); g_free (uri); } /* Se dal menu qualcuno chiede di cercare RDFs in un URI remoto */ void menu_search_remote (GtkWidget * w, gpointer dummy) { gchar *uri; struct download_t *download; if ((uri = uri_chooser (_("Open a RDF URI"), &download))) { search_open (uri, menu_search_cb, download); g_free (uri); } if (download) download_free (download); } /* Si parte: */ int main (int argc, gchar ** argv, gchar ** e) { GtkWidget *vbox; GtkWidget *toolbar; GtkWidget *sep; GtkWidget *button; GtkWidget *image; GtkAccelGroup *accel; GtkWidget *menubar; GtkWidget *menuitem; GtkWidget *menumenu; GtkWidget *t_menu; GtkWidget *o_menu; GtkWidget *import_menu; gchar s[1024]; gint y, x; guint t_timer = 0; global_argv = argv; global_argc = argc; gchar **items = NULL; gchar *t_selected = NULL; gchar **t_import = NULL; gchar *m_config = NULL; GOptionEntry entries[] = { {"template", 't', 0, G_OPTION_ARG_STRING, &t_selected, "Open a template by the name or the uri", "NAMEorURI"}, {"import", 'i', 0, G_OPTION_ARG_STRING_ARRAY, &t_import, "Import a template from the uri", "URI"}, {"moduleconfig", 'm', 0, G_OPTION_ARG_STRING, &m_config, "Use a particular config file for modules", "FILE"}, {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &items, NULL, NULL}, {NULL} }; GOptionContext *context; GError *error = NULL; #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif g_thread_init (NULL); gtk_init (NULL, NULL); g_set_prgname (PACKAGE); context = g_option_context_new ("URIs...files"); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); g_option_context_add_group (context, gtk_get_option_group (TRUE)); if (g_option_context_parse (context, &argc, &argv, &error) == FALSE) { fprintf (stderr, PACKAGE " " VERSION ": %s\n", error->message); g_error_free (error); g_option_context_free (context); return 1; } g_option_context_free (context); gtk_window_set_default_icon_from_file (main_path_icon (), NULL); #ifdef USE_GCONF morla_gconf_init (); #endif init (m_config); if (m_config) g_free (m_config); accel = gtk_accel_group_new (); g_snprintf (s, sizeof (s), "%s %s", PACKAGE, VERSION); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), s); /* Funzione per il cambio di dimensione: */ g_signal_connect_after ((gpointer) window, "size-request", G_CALLBACK (window_resize), NULL); /* Setto le dimensioni: */ if (!default_width || !default_height) { y = gdk_screen_height () * 2 / 3; if (y < 480) y = 480; x = gdk_screen_width () * 2 / 3; if (x < 640) x = 640; } else { x = default_width; y = default_height; } gtk_window_resize (GTK_WINDOW (window), x, y); g_signal_connect ((gpointer) window, "delete_event", G_CALLBACK (editor_quit), NULL); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); menubar = gtk_menu_bar_new (); gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0); /* MENU FILE */ menuitem = gtk_menu_item_new_with_mnemonic (_("_File")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_from_stock ("gtk-new", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_new), NULL); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); if (module_default_open ()) { menuitem = gtk_image_menu_item_new_from_stock ("gtk-open", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (module_run_open), module_default_open ()); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Open a RDF file")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_open), NULL); } else { menuitem = gtk_image_menu_item_new_from_stock ("gtk-open", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_open), NULL); } menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Open a RDF URI")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (menu_open_remote), NULL); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Search RDF in an URI")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (menu_search_remote), NULL); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Special Opening procedure")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); o_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), o_menu); module_menu_open (GTK_MENU (o_menu), menuitem); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Last Documents")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); last_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), last_menu); last_update (); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); if (module_default_save ()) { menuitem = gtk_image_menu_item_new_from_stock ("gtk-save", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (module_run_save), module_default_save ()); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Save file")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_save), NULL); } else { menuitem = gtk_image_menu_item_new_from_stock ("gtk-save", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_save), NULL); } menuitem = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_save_as), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Special Saving procedure")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); o_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), o_menu); module_menu_save (GTK_MENU (o_menu), menuitem); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-preferences", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (preferences), NULL); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-close", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_close), NULL); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-quit", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_quit), NULL); /* MENU EDIT */ menuitem = gtk_menu_item_new_with_mnemonic (_("_Edit")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_from_stock ("gtk-undo", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (unredo_undo), NULL); gtk_widget_set_sensitive (menuitem, FALSE); undo_widget[0] = menuitem; menuitem = gtk_image_menu_item_new_from_stock ("gtk-redo", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (unredo_redo), NULL); gtk_widget_set_sensitive (menuitem, FALSE); redo_widget[0] = menuitem; menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-add", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_add), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Add from templates")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); t_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), t_menu); g_object_set_data (G_OBJECT (t_menu), "func", template_open); template_menus = g_list_append (template_menus, t_menu); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Modify with templates")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-edit", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); t_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), t_menu); g_object_set_data (G_OBJECT (t_menu), "func", template_edit); template_menus = g_list_append (template_menus, t_menu); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Import a RDF Document")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); import_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), import_menu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("... from a file")); gtk_container_add (GTK_CONTAINER (import_menu), menuitem); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_merge_file), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic (_("... from an uri")); gtk_container_add (GTK_CONTAINER (import_menu), menuitem); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_merge_uri), NULL); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-cut", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_cut), NULL); menuitem = gtk_image_menu_item_new_from_stock ("gtk-copy", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_copy), NULL); menuitem = gtk_image_menu_item_new_from_stock ("gtk-paste", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_paste), NULL); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-delete", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (editor_delete), NULL); /* INFO */ menuitem = gtk_menu_item_new_with_mnemonic (_("_Information")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Info about this RDF Document")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ( #ifdef GTK_STOCK_INFO "gtk-info", #else "gtk-dialog-info", #endif GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (info_this), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic (_ ("Info about the selected element")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ( #ifdef GTK_STOCK_INFO "gtk-info", #else "gtk-dialog-info", #endif GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (info_selected), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Info about an URI...")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ( #ifdef GTK_STOCK_INFO "gtk-info", #else "gtk-dialog-info", #endif GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (info_uri), NULL); /* TEMPLATE */ menuitem = gtk_menu_item_new_with_mnemonic (_("_Template")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Import from a _file...")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (template_import_file), NULL); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Import from an _URI...")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (template_import_uri), NULL); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Export a template")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); t_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), t_menu); g_object_set_data (G_OBJECT (t_menu), "func", template_save_single); template_menus = g_list_append (template_menus, t_menu); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Show templates")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (template), NULL); image = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); /* MENU RDFS */ menuitem = gtk_menu_item_new_with_mnemonic (_("_RDFS")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Add RDFS")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (menu_rdfs_add), NULL); image = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Show RDFS")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (rdfs), NULL); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); /* MENU VIEW */ menuitem = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); module_menu_view (GTK_MENU (menumenu), menuitem); /* MENU GRAPH */ menuitem = gtk_menu_item_new_with_mnemonic (_("_Graph")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Create _Graph")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (graph_run), NULL); image = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Save Graph As")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (graph_save), NULL); image = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Save Graph_viz Source As")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (graph_graphviz), NULL); image = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_ ("_Merge more RDF Document in a Graph")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (merge_graph), NULL); image = gtk_image_new_from_stock ("gtk-connect", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); /* MENU NAVIGATOR */ menuitem = gtk_menu_item_new_with_mnemonic (_("_Navigator")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("Open _navigator")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (navigator_run), NULL); image = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_ ("Open a RDF URI with the navigator")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (navigator_open_uri), NULL); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); /* MENU QUERY */ menuitem = gtk_menu_item_new_with_mnemonic (_("_Query")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("SPARQL")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_sparql), NULL); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_image_menu_item_new_with_mnemonic (_ ("RDQL (RDF Data Query Language)")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_rsql), NULL); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); /* HELP */ menuitem = gtk_menu_item_new_with_mnemonic (_("_Help")); gtk_menu_item_set_right_justified (GTK_MENU_ITEM (menuitem), TRUE); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_from_stock ("gtk-help", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (help), NULL); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Find updates")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-cdrom", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (update_search), NULL); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Open the Web Page of Morla Project")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); image = gtk_image_new_from_stock ("gtk-network", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (browser_website), NULL); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Show used Libraries")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (about_libraries), NULL); image = gtk_image_new_from_stock ( #ifdef GTK_STOCK_INFO "gtk-info", #else "gtk-dialog-info", #endif GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-about", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (about), NULL); /* TOOLBAR */ toolbar = gtk_toolbar_new (); gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0); gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-new"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_new), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("New RDF Document")); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-open"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_open), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Open a RDF Document")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-save"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_save), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Save this RDF Document")); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-save-as"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_save_as), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Save this RDF Document as a new file")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-undo"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (unredo_undo), NULL); gtk_widget_set_sensitive (button, FALSE); undo_widget[1] = button; gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Undo editing")); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-redo"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (unredo_redo), NULL); gtk_widget_set_sensitive (button, FALSE); redo_widget[1] = button; gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Redo editing")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-close"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_close), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Close this RDF Document")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_menu_tool_button_new_from_stock ("gtk-add"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_add), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Add a new RDF triple")); menumenu = gtk_menu_new (); gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (button), menumenu); g_object_set_data (G_OBJECT (menumenu), "func", template_open); template_menus = g_list_append (template_menus, menumenu); template_update (); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-cut"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_cut), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Cut")); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-copy"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_copy), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Copy")); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-paste"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_paste), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Paste")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-delete"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (editor_delete), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Delete")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_LARGE_TOOLBAR); button = (GtkWidget *) gtk_tool_button_new (image, _("rdfs")); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (rdfs), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Show the RDFS")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); image = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_LARGE_TOOLBAR); button = (GtkWidget *) gtk_tool_button_new (image, _("graph")); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (graph_run), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Show the graph of this RDF Document")); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); image = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_LARGE_TOOLBAR); button = (GtkWidget *) gtk_tool_button_new (image, _("navigator")); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_run), NULL); gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (button), _("Open navigator with this RDF Document")); notebook = gtk_notebook_new (); gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0); gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE); g_signal_connect ((gpointer) notebook, "change-current-page", G_CALLBACK (switch_page), NULL); statusbar = gtk_statusbar_new (); gtk_box_pack_start (GTK_BOX (vbox), statusbar, FALSE, FALSE, 0); if (items) { gchar **list; for (list = items; list && *list; list++) { if (g_file_test (*list, G_FILE_TEST_EXISTS) == FALSE) editor_open_uri (*list, NULL); else editor_open_file (*list, NULL); } g_strfreev (items); } if (!editor_data) editor_new (NULL, NULL); if (t_import) { struct template_t *t; gchar **ti; GList *list; gboolean save = FALSE, found = FALSE; for (ti = t_import; ti && *ti; ti++) { found = FALSE; list = template_list; while (list) { t = list->data; if (!strcmp (t->uri, *ti)) { found = TRUE; break; } list = list->next; } if (found == FALSE && template_import (*ti, NULL, TRUE, TRUE) == TRUE) save = TRUE; } if (save == TRUE); template_save (); g_strfreev (t_import); } if (t_selected) { struct template_t *t; GList *list; list = template_list; while (list) { t = list->data; if (!strcmp (t->uri, t_selected) || !strcmp (t->name, t_selected)) { if (!items) t_timer = g_timeout_add (1, (GSourceFunc) template_starter_open, t); else t_timer = g_timeout_add (1, (GSourceFunc) template_starter_edit, t); break; } list = list->next; } g_free (t_selected); } statusbar_set (_("Welcome to RDF editor!")); editor_statusbar_lock = WAIT; /* Setto un timer generico: */ editor_id = g_timeout_add (2000, editor_timeout, NULL); gtk_window_add_accel_group (GTK_WINDOW (window), accel); if (!t_timer) gtk_widget_show_all (window); /* Check the redland version: */ check_redland (); /* Ed uno per gli aggiormanti ogni 20 minuti: */ update_timer (); update_id = g_timeout_add (20 * 60 * 1000, (GSourceFunc) update_timer, NULL); gtk_main (); #ifdef USE_GCONF morla_gconf_shutdown (); #endif module_shutdown (); return 0; } /* Funzione di ridimensione: */ static void window_resize (GtkWidget * widget, GtkRequisition * req, gpointer dummy) { if (widget->allocation.width != default_width || widget->allocation.height != default_height) { default_width = widget->allocation.width; default_height = widget->allocation.height; init_save (); } } /* * From GLIB * Authors: Havoc Pennington , Owen Taylor */ static gchar * make_valid_utf8 (const gchar * name) { GString *string; const gchar *remainder, *invalid; gint remaining_bytes, valid_bytes; string = NULL; remainder = name; remaining_bytes = strlen (name); while (remaining_bytes != 0) { if (g_utf8_validate (remainder, remaining_bytes, &invalid)) break; valid_bytes = invalid - remainder; if (string == NULL) string = g_string_sized_new (remaining_bytes); g_string_append_len (string, remainder, valid_bytes); g_string_append_c (string, '?'); remaining_bytes -= valid_bytes + 1; remainder = invalid + 1; } if (string == NULL) return g_strdup (name); g_string_append (string, remainder); return g_string_free (string, FALSE); } /* UTF8: */ gchar * utf8 (gchar * str) { gchar *tmp; if (!str) return g_strdup (""); if (!(tmp = g_locale_to_utf8 (str, -1, NULL, NULL, NULL))) tmp = make_valid_utf8 (str); return tmp; } /* Funzione che si occupa di sostituire caratteri strani di una stringa: */ gchar * markup (gchar * text) { GString *ret; gunichar unichr; if (!text) return g_strdup (""); ret = g_string_new (NULL); while ((unichr = g_utf8_get_char (text))) { text = g_utf8_next_char (text); switch (unichr) { case '<': g_string_append (ret, "<"); break; case '>': g_string_append (ret, ">"); break; case '&': g_string_append (ret, "&"); break; case '\'': g_string_append (ret, "'"); break; case '\"': g_string_append (ret, """); break; default: g_string_append_unichar (ret, unichr); break; } } return g_string_free (ret, FALSE); } /* Aggiornamento della statusbar */ void statusbar_set (gchar * what, ...) { va_list va; gchar s[1024]; gint ret; va_start (va, what); ret = g_vsnprintf (s, sizeof (s), what, va); while (s[ret] == '\n' || s[ret] == '\r') ret--; s[ret] = 0; gtk_statusbar_pop (GTK_STATUSBAR (statusbar), statusbar_id); statusbar_id = gtk_statusbar_push (GTK_STATUSBAR (statusbar), statusbar_id, s); va_end (va); } /* Esecuzione di un comando e gestione della callback: */ void run (gchar ** a, GChildWatchFunc func, gpointer point) { GPid pid; if (g_spawn_async (NULL, a, NULL, (func ? G_SPAWN_DO_NOT_REAP_CHILD : 0) | G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &pid, NULL) == FALSE) { dialog_msg (_ ("Execution of external software error.\n" "Check the softwares in your preferences!")); return; } if (func) g_child_watch_add (pid, func, point); } /* Funzione atta a splittare una stringa in tanti blocchi */ GList * split (gchar * ar) { gint q1 = 0; gint q2 = 0; GList *ret = NULL; gunichar unichr; GString *opt; opt = g_string_new (NULL); while ((unichr = g_utf8_get_char (ar))) { ar = g_utf8_next_char (ar); if (unichr == '\"' && !q2) q1 = !q1; else if (unichr == '\'' && !q1) q2 = !q2; else if ((unichr == ' ' || unichr == '\t') && !q1 && !q2) { if (opt->len) { ret = g_list_append (ret, g_string_free (opt, FALSE)); opt = g_string_new (NULL); } } else g_string_append_unichar (opt, unichr); } if (opt->len) ret = g_list_append (ret, g_string_free (opt, FALSE)); else g_string_free (opt, TRUE); return ret; } /* User Agent for HTTP (this code is only for my stats :) */ gchar * user_agent (void) { static gchar *s = NULL; if (!s) s = user_agent_search (); return s; } static gchar * user_agent_search (void) { #ifdef G_OS_WIN32 OSVERSIONINFOEX osvi; SYSTEM_INFO si; BOOL bOsVersionInfoEx; memset (&si, 0, sizeof (SYSTEM_INFO)); memset (&osvi, 0, sizeof (OSVERSIONINFOEX)); osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX); if (!(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) & osvi))) { osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); if (!GetVersionEx ((OSVERSIONINFO *) & osvi)) return PACKAGE " " VERSION " (Win32)"; } GetSystemInfo (&si); switch (osvi.dwPlatformId) { case VER_PLATFORM_WIN32_NT: if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0) { if (osvi.wProductType == VER_NT_WORKSTATION) return PACKAGE " " VERSION " (Microsoft Windows Vista)"; else return PACKAGE " " VERSION " (Windows Server \"Longhorn\")"; } if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) { if (osvi.wProductType == VER_NT_WORKSTATION && si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) return PACKAGE " " VERSION " (Microsoft Windows XP Professional x64 Edition)"; else return PACKAGE " " VERSION " (Microsoft Windows Server 2003)"; } if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1) return PACKAGE " " VERSION " (Microsoft Windows XP)"; if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0) return PACKAGE " " VERSION " (Microsoft Windows 2000)"; if (osvi.dwMajorVersion <= 4) return PACKAGE " " VERSION " (Microsoft Windows NT)"; return PACKAGE " " VERSION " (Win32)"; case VER_PLATFORM_WIN32_WINDOWS: if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0) return PACKAGE " " VERSION " (Microsoft Windows 95)"; if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10) { if (osvi.szCSDVersion[1] == 'A' || osvi.szCSDVersion[1] == 'B') return PACKAGE " " VERSION " (Microsoft Windows 98 SE)"; else return PACKAGE " " VERSION " (Microsoft Windows 98)"; } if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90) return PACKAGE " " VERSION " (Microsoft Windows Millennium Edition)"; return PACKAGE " " VERSION " (Win32)"; break; case VER_PLATFORM_WIN32s: return PACKAGE " " VERSION " (Win32s)"; default: return PACKAGE " " VERSION " (Win32s)"; } #endif #ifdef G_OS_BEOS return PACKAGE " " VERSION " (BeOS)"; #endif #ifdef G_OS_UNIX struct utsname u; static gchar s[1024]; if (uname (&u)) return PACKAGE " " VERSION " (Unix)"; snprintf (s, sizeof (s), PACKAGE " " VERSION " (%s)", u.sysname); return s; #endif return PACKAGE " " VERSION; } static gboolean template_starter_open (struct template_t *t) { template_open (NULL, t); gtk_widget_show_all (window); return FALSE; } static gboolean template_starter_edit (struct template_t *t) { template_edit (NULL, t); gtk_widget_show_all (window); return FALSE; } gchar * dot_cmd (void) { gchar *cmd = (gchar *) g_getenv ("MORLA_DOT_CMD"); if (cmd) return cmd; return DOT_CMD; } GtkWindow * main_window (void) { return GTK_WINDOW (window); } static const gchar * main_path_icon (void) { #ifndef ENABLE_MACOSX return PATH_ICON; #endif static const gchar *path; static gboolean done = FALSE; if (done == FALSE) { path = g_getenv ("MORLA_PATH_ICON"); done = TRUE; } if (!path) return PATH_ICON; return path; } /* EOF */ morla-0.16.1/src/maker.c000066400000000000000000001624101156343060400147510ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static GtkWidget *create_list (struct editor_data_t *data); static GtkWidget *create_nslist (struct editor_data_t *data); static GtkWidget *my_label (struct rdf_t *rdf, const gchar * text, GCallback callback, gpointer user_data, GCallback callback_press); static void callback_select (GtkWidget * w, gpointer dummy); static void callback_nsselect (GtkWidget * w, gpointer dummy); static void on_order_by_namespace (GtkWidget * w, struct editor_data_t *data); static void on_order_by_prefix (GtkWidget * w, struct editor_data_t *data); static void on_order_by_visible (GtkWidget * w, struct editor_data_t *data); static void on_order_by_subject (GtkWidget *, struct editor_data_t *data); static void on_order_by_predicate (GtkWidget *, struct editor_data_t *data); static void on_order_by_object (GtkWidget *, struct editor_data_t *data); static void create_arrow (GtkWidget ** w, gchar * text, gboolean show, GtkArrowType type); static void toggled_ns (GtkWidget * w, struct editor_data_t *data); static gint button_press_callback (GtkWidget * w, GdkEventButton * e, gpointer dummy); static gint button_press_nscallback (GtkWidget * w, GdkEventButton * e, gpointer dummy); static void set_color (struct editor_data_t *data); static void change_prefix (GtkWidget * w, struct editor_data_t *data); static void change_triple (GtkWidget * w, struct editor_data_t *data); static void change_resources (GtkWidget * w, struct editor_data_t *data); static void change_nsresource (GtkWidget * w, struct editor_data_t *data); static void open_resource (GtkWidget * w, struct editor_data_t *data); static void import_resource (GtkWidget * w, struct editor_data_t *data); static void open_browser (GtkWidget * w, struct editor_data_t *data); static GtkStyle *style_normal (void); static GtkStyle *style_selected (void); static void set_style (GtkWidget * w, GtkStyle * s); /* Ritorna l'elemento attualmente visualizzato dall'utente fra tutti i * documenti aperti: */ struct editor_data_t * editor_get_data (void) { struct editor_data_t *data; gint page; /* E' il notebook che mi dice la pagina */ page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); data = editor_data; while (data) { if (!page) return data; page--; data = data->next; } return NULL; } /* Timer generico */ gint editor_timeout (gpointer dummy) { struct editor_data_t *data; struct thread_t *t; GList *l; /* Se c'e' stato un aggiornamento e devo comunicarlo, lo faccio e poi * basta: */ if (update_show == 1 && update_check ()) update_show = 0; /* Controllo tutti i thread abortiti se controllo se qualcuno e' stato * chiuso: */ l = thread_child; while (l) { t = l->data; /* Se e' stato chiuso me lo dice un flag > 0: */ if (*t->flag > 0) { /* Se devo lanciare la callback al termine del processo, questo * e' il momento: */ if (t->func) t->func (t->data, NULL); /* Rimuovo dalla lista e libero la memoria: */ thread_child = g_list_remove (thread_child, (gpointer) t); g_free (t); break; } l = l->next; } /* Guardo lo status della statusbar: */ switch (editor_statusbar_lock) { /* E' locckata non devo fare niente: */ case LOCK: return TRUE; /* Attesa... sblocco e al prossimo giro la risetto: */ case WAIT: editor_statusbar_lock = UNLOCK; return TRUE; } /* Becco il documento attuale e aggiorno lo statusbar: */ data = editor_get_data (); if (!data || rdf_is_no_saved (data) == FALSE) statusbar_set (_("Editing...")); return TRUE; } /* Questa funzione crea un nuovo marker cioe' un nuovo spazio di lavoro: */ void editor_new_maker (struct editor_data_t *data) { gint page; struct editor_data_t *tmp; GtkWidget *vbox, *sw, *paned, *button, *image; /* Inserisco nella lista degli spazi di lavoro: */ if (editor_data) { tmp = editor_data; while (tmp->next) tmp = tmp->next; tmp->next = data; tmp = tmp->next; } else editor_data = data; /* Creo interfaccia: */ vbox = gtk_vbox_new (FALSE, 5); data->maker = vbox; paned = gtk_vpaned_new (); gtk_box_pack_start (GTK_BOX (vbox), paned, TRUE, TRUE, 0); sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_paned_pack1 (GTK_PANED (paned), sw, TRUE, FALSE); data->list = create_list (data); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), data->list); sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_paned_pack2 (GTK_PANED (paned), sw, FALSE, TRUE); data->nslist = create_nslist (data); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), data->nslist); gtk_widget_show_all (data->maker); /* Setto il titolo: */ if (data->uri) data->label = gtk_label_new (data->uri); else data->label = gtk_label_new (_("New RDF Document")); vbox = gtk_hbox_new (FALSE, FALSE); gtk_box_pack_start (GTK_BOX (vbox), data->label, FALSE, FALSE, 0); button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); gtk_container_set_border_width (GTK_CONTAINER (button), 0); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (editor_close_selected), data); gtk_widget_show_all (vbox); /* Attacco al notebook e metto in primo piano: */ page = gtk_notebook_append_page (GTK_NOTEBOOK (notebook), data->maker, vbox); gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), page); /* Setto la statusbar: */ editor_statusbar_lock = WAIT; statusbar_set (_("New RDF Document")); } /* Refresh della finestra e un bel casino: dividi ed impera */ void editor_refresh (struct editor_data_t *data) { GtkWidget *parent; /* Distruggo tutto: */ parent = gtk_widget_get_parent (data->list); gtk_container_remove (GTK_CONTAINER (parent), data->list); /* Ordino le triplette: */ data->rdf = g_list_sort_with_data (data->rdf, (GCompareDataFunc) editor_compare, data); /* Creo la lista: */ data->list = create_list (data); gtk_container_add (GTK_CONTAINER (parent), data->list); gtk_widget_show_all (data->list); /* Refreshio lo spazio di namespace: */ editor_refresh_nslist (data); } /* Spazio namespace refresh: */ void editor_refresh_nslist (struct editor_data_t *data) { GtkWidget *parent; /* Distruggo tutto: */ parent = gtk_widget_get_parent (data->nslist); gtk_container_remove (GTK_CONTAINER (parent), data->nslist); /* Creo e mostro: */ data->nslist = create_nslist (data); gtk_container_add (GTK_CONTAINER (parent), data->nslist); gtk_widget_show_all (data->nslist); } /* ORDERS *******************************************************************/ /* Questa funzione serve per ordinare le triplette. Viene usata da g_list_sort * e si basa sulla colonna di ordine scelta dall'utente: */ gint editor_compare (struct rdf_t *a, struct rdf_t *b, struct editor_data_t *data) { switch (data->compare) { case ORDER_SUBJECT: return strcmp (a->subject, b->subject); case ORDER_SUBJECT_DEC: return strcmp (b->subject, a->subject); case ORDER_PREDICATE: return strcmp (a->predicate, b->predicate); case ORDER_PREDICATE_DEC: return strcmp (b->predicate, a->predicate); case ORDER_OBJECT: return strcmp (a->object, b->object); case ORDER_OBJECT_DEC: return strcmp (b->object, a->object); default: return 0; } } /* Questa ordina i namespace e funziona come sopra */ gint editor_nscompare (struct namespace_t * a, struct namespace_t * b, struct editor_data_t * data) { switch (data->nscompare) { case NSORDER_NAMESPACE: return strcmp (a->namespace, b->namespace); case NSORDER_NAMESPACE_DEC: return strcmp (b->namespace, a->namespace); case NSORDER_PREFIX: return strcmp (a->prefix, b->prefix); case NSORDER_PREFIX_DEC: return strcmp (b->prefix, a->prefix); case NSORDER_VISIBLE: return a->visible == b->visible; case NSORDER_VISIBLE_DEC: return a->visible != b->visible; default: return 0; } } /* Quando si clicca per ordinare in base al namespace: */ static void on_order_by_namespace (GtkWidget * w, struct editor_data_t *data) { if (data->nscompare == NSORDER_NAMESPACE) data->nscompare = NSORDER_NAMESPACE_DEC; else data->nscompare = NSORDER_NAMESPACE; if (data->namespace) data->namespace = g_list_sort_with_data (data->namespace, (GCompareDataFunc) editor_nscompare, data); /* Refresh: */ editor_refresh_nslist (data); } /* Lo stesso vare per i prefix: */ static void on_order_by_prefix (GtkWidget * w, struct editor_data_t *data) { if (data->nscompare == NSORDER_PREFIX) data->nscompare = NSORDER_PREFIX_DEC; else data->nscompare = NSORDER_PREFIX; if (data->namespace) data->namespace = g_list_sort_with_data (data->namespace, (GCompareDataFunc) editor_nscompare, data); editor_refresh_nslist (data); } /* Ordina in base all'essere visibile: */ static void on_order_by_visible (GtkWidget * w, struct editor_data_t *data) { if (data->nscompare == NSORDER_VISIBLE) data->nscompare = NSORDER_VISIBLE_DEC; else data->nscompare = NSORDER_VISIBLE; if (data->namespace) data->namespace = g_list_sort_with_data (data->namespace, (GCompareDataFunc) editor_nscompare, data); editor_refresh_nslist (data); } /* Le triplette si ordinano in base al soggetto: */ static void on_order_by_subject (GtkWidget * w, struct editor_data_t *data) { if (data->compare == ORDER_SUBJECT) data->compare = ORDER_SUBJECT_DEC; else data->compare = ORDER_SUBJECT; if (data->rdf) data->rdf = g_list_sort_with_data (data->rdf, (GCompareDataFunc) editor_compare, data); editor_refresh (data); } /* Le triplette si ordinano in base al predicato: */ static void on_order_by_predicate (GtkWidget * w, struct editor_data_t *data) { if (data->compare == ORDER_PREDICATE) data->compare = ORDER_PREDICATE_DEC; else data->compare = ORDER_PREDICATE; if (data->rdf) data->rdf = g_list_sort_with_data (data->rdf, (GCompareDataFunc) editor_compare, data); editor_refresh (data); } /* Le triplette si ordinano in base all'oggetto: */ static void on_order_by_object (GtkWidget * w, struct editor_data_t *data) { if (data->compare == ORDER_OBJECT) data->compare = ORDER_OBJECT_DEC; else data->compare = ORDER_OBJECT; if (data->rdf) data->rdf = g_list_sort_with_data (data->rdf, (GCompareDataFunc) editor_compare, data); editor_refresh (data); } /* Questa funzione viene lanciata quando si chicca su un namespace per * renderlo visible: */ static void toggled_ns (GtkWidget * w, struct editor_data_t *data) { struct namespace_t *ns = g_object_get_data (G_OBJECT (w), "namespace"); if (!ns || !GTK_IS_WIDGET (data->list)) return; /* Invero la sua visibilita': */ ns->visible = !ns->visible; /* Refreshio: */ editor_refresh (data); } /* MODE LIST *****************************************************************/ /* Questa funzione crea le frecce e il titolo di ogni colonna: */ static void create_arrow (GtkWidget ** w, gchar * text, gboolean show, GtkArrowType type) { GtkWidget *parent; GtkWidget *new, *box, *arrow, *label; /* Creo un pulsante nuovo: */ new = gtk_button_new (); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (new), box); gtk_box_pack_start (GTK_BOX (box), gtk_hbox_new (0, 0), TRUE, TRUE, 0); /* Devo proprio metterle? */ if (show) { arrow = gtk_arrow_new (type, GTK_SHADOW_NONE); gtk_box_pack_start (GTK_BOX (box), arrow, FALSE, FALSE, 0); } label = gtk_label_new (text); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0); /* Come sopra: */ if (show) { arrow = gtk_arrow_new (type, GTK_SHADOW_NONE); gtk_box_pack_start (GTK_BOX (box), arrow, FALSE, FALSE, 0); } /* Sostituisco al bottone precedente: */ if (GTK_IS_WIDGET (*w) && (parent = gtk_widget_get_parent (*w))) { gtk_container_remove (GTK_CONTAINER (parent), *w); gtk_container_add (GTK_CONTAINER (parent), new); } gtk_box_pack_start (GTK_BOX (box), gtk_hbox_new (0, 0), TRUE, TRUE, 0); gtk_widget_show_all (new); *w = new; } /* La creazione di un elemento grafico avviene in questa funzione: */ static GtkWidget * create_item (struct rdf_t *rdf, gchar * text, GCallback callback, gpointer dummy, GtkStyle * style, GCallback button_callback) { GtkWidget *event, *t, *label; event = gtk_event_box_new (); gtk_widget_set_style (event, style); t = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (event), t); /* Uso la funzione my_label. Essenziale e' la callback da lanciare quando * si clicca sopra:*/ label = my_label (rdf, text, G_CALLBACK (callback), dummy, G_CALLBACK (button_callback)); gtk_widget_set_style (label, style); gtk_box_pack_start (GTK_BOX (t), label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (t), gtk_hbox_new (0, 0), FALSE, FALSE, 0); return event; } /* Questa funzione crea l'oggetto grafico lista per una serie di triplette: */ static GtkWidget * create_list (struct editor_data_t *data) { GtkWidget *box, *list; GtkStyle *style; GtkWidget *event, *e; GtkWidget *label, *t; GList *l; /* Genero gli style: */ style = style_normal (); e = gtk_event_box_new (); gtk_widget_set_style (e, style); box = gtk_vbox_new (FALSE, 3); gtk_container_add (GTK_CONTAINER (e), box); list = gtk_hbox_new (TRUE, 0); /* Creo i titoli colonna */ data->subject_order = NULL; create_arrow (&data->subject_order, _("Subject"), (data->compare == ORDER_SUBJECT || data->compare == ORDER_SUBJECT_DEC), (data->compare == ORDER_SUBJECT_DEC)); gtk_box_pack_start (GTK_BOX (list), data->subject_order, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (data->subject_order), "clicked", G_CALLBACK (on_order_by_subject), data); data->predicate_order = NULL; create_arrow (&data->predicate_order, _("Predicate"), (data->compare == ORDER_PREDICATE || data->compare == ORDER_PREDICATE_DEC), (data->compare == ORDER_PREDICATE_DEC)); gtk_box_pack_start (GTK_BOX (list), data->predicate_order, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (data->predicate_order), "clicked", G_CALLBACK (on_order_by_predicate), data); data->object_order = NULL; create_arrow (&data->object_order, _("Object"), (data->compare == ORDER_OBJECT || data->compare == ORDER_OBJECT_DEC), (data->compare == ORDER_OBJECT_DEC)); gtk_box_pack_start (GTK_BOX (list), data->object_order, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (data->object_order), "clicked", G_CALLBACK (on_order_by_object), data); gtk_box_pack_start (GTK_BOX (box), list, FALSE, FALSE, 0); /* Per ogni tripletta: */ l = data->rdf; while (l) { struct rdf_t *rdf = l->data; /* Se questo elemento e' invisibile: */ if (!namespace_visible (data->namespace, rdf)) { rdf->subject_widget = NULL; rdf->predicate_widget = NULL; rdf->object_widget = NULL; l = l->next; continue; } /* Creo un item per soggetto, predicato e coggetto: */ list = gtk_hbox_new (TRUE, 0); if (!strcmp (rdf->subject, THIS_DOCUMENT)) event = create_item (rdf, data->uri ? data->uri : _("This Document"), G_CALLBACK (callback_select), data, style, G_CALLBACK (button_press_callback)); else event = create_item (rdf, rdf->subject, G_CALLBACK (callback_select), data, style, G_CALLBACK (button_press_callback)); gtk_box_pack_start (GTK_BOX (list), event, TRUE, TRUE, 0); rdf->subject_widget = event; event = create_item (rdf, rdf->predicate, G_CALLBACK (callback_select), data, style, G_CALLBACK (button_press_callback)); gtk_box_pack_start (GTK_BOX (list), event, TRUE, TRUE, 0); rdf->predicate_widget = event; event = gtk_event_box_new (); gtk_widget_set_style (event, style); t = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (event), t); /* Per l'oggetto devo comunicare se e' risorsa, letterale o * blank node: */ switch (rdf->object_type) { case RDF_OBJECT_RESOURCE: label = gtk_label_new (_("(R) ")); break; case RDF_OBJECT_LITERAL: label = gtk_label_new (_("(L) ")); break; case RDF_OBJECT_BLANK: label = gtk_label_new (_("(B) ")); break; default: label = NULL; } gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_widget_set_style (label, style); gtk_box_pack_start (GTK_BOX (t), label, FALSE, FALSE, 0); /* setto la lingua: */ if (rdf->lang) { gchar *s; s = g_strdup_printf ("[%s] ", rdf->lang); label = gtk_label_new (s); g_free (s); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_widget_set_style (label, style); gtk_box_pack_start (GTK_BOX (t), label, FALSE, FALSE, 0); } /* setto il datatype: */ if (rdf->datatype) { gchar *s; s = g_strdup_printf ("<%s> ", rdf->datatype); label = gtk_label_new (s); g_free (s); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_widget_set_style (label, style); gtk_box_pack_start (GTK_BOX (t), label, FALSE, FALSE, 0); } /* Infine l'oggetto: */ label = my_label (rdf, rdf->object, G_CALLBACK (callback_select), data, G_CALLBACK (button_press_callback)); gtk_widget_set_style (label, style); gtk_box_pack_start (GTK_BOX (t), label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (t), gtk_hbox_new (0, 0), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (list), event, TRUE, TRUE, 0); rdf->object_widget = event; gtk_box_pack_start (GTK_BOX (box), list, FALSE, FALSE, 0); l = l->next; /* Tra un elemento e l'altro metto una linea di separazione: */ if (l) gtk_box_pack_start (GTK_BOX (box), gtk_hseparator_new (), FALSE, FALSE, 0); } g_object_unref (G_OBJECT (style)); set_color (data); return e; } /* Creazione dell'oggetto lista per i namespace: */ static GtkWidget * create_nslist (struct editor_data_t *data) { GtkWidget *box, *list; GtkStyle *style; GtkWidget *event, *e, *label, *tbox; gchar *s; GList *l; /* Style: */ style = style_normal (); e = gtk_event_box_new (); gtk_widget_set_style (e, style); box = gtk_vbox_new (FALSE, 3); gtk_container_add (GTK_CONTAINER (e), box); list = gtk_hbox_new (TRUE, 0); /* titoli: */ data->namespace_order = NULL; create_arrow (&data->namespace_order, _("Namespace"), (data->nscompare == NSORDER_NAMESPACE || data->nscompare == NSORDER_NAMESPACE_DEC), (data->nscompare == NSORDER_NAMESPACE_DEC)); gtk_box_pack_start (GTK_BOX (list), data->namespace_order, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (data->namespace_order), "clicked", G_CALLBACK (on_order_by_namespace), data); data->prefix_order = NULL; create_arrow (&data->prefix_order, _("Prefix"), (data->nscompare == NSORDER_PREFIX || data->nscompare == NSORDER_PREFIX_DEC), (data->nscompare == NSORDER_PREFIX_DEC)); gtk_box_pack_start (GTK_BOX (list), data->prefix_order, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (data->prefix_order), "clicked", G_CALLBACK (on_order_by_prefix), data); data->visible_order = NULL; create_arrow (&data->visible_order, _("Visible"), (data->nscompare == NSORDER_VISIBLE || data->nscompare == NSORDER_VISIBLE_DEC), (data->nscompare == NSORDER_VISIBLE_DEC)); gtk_box_pack_start (GTK_BOX (list), data->visible_order, TRUE, TRUE, 0); g_signal_connect (G_OBJECT (data->visible_order), "clicked", G_CALLBACK (on_order_by_visible), data); gtk_box_pack_start (GTK_BOX (box), list, FALSE, FALSE, 0); /* Per ogni namespace: */ l = data->namespace; while (l) { list = gtk_hbox_new (TRUE, 0); /* il namespace */ event = create_item (NULL, ((struct namespace_t *) l->data)->namespace, G_CALLBACK (callback_nsselect), data, style, G_CALLBACK (button_press_nscallback)); gtk_box_pack_start (GTK_BOX (list), event, TRUE, TRUE, 0); ((struct namespace_t *) l->data)->namespace_widget = event; /* preference */ event = gtk_event_box_new (); gtk_box_pack_start (GTK_BOX (list), event, TRUE, TRUE, 0); gtk_widget_set_style (event, style); tbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (event), tbox); s = g_strdup_printf ("%s", ((struct namespace_t *) l->data)->prefix); label = gtk_label_new (s); g_free (s); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_widget_set_style (label, style); ((struct namespace_t *) l->data)->prefix_widget = label; gtk_box_pack_start (GTK_BOX (tbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (tbox), gtk_hbox_new (0, 0), TRUE, TRUE, 0); /* visibile */ event = gtk_event_box_new (); gtk_box_pack_start (GTK_BOX (list), event, TRUE, TRUE, 0); gtk_widget_set_style (event, style); tbox = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (event), tbox); label = gtk_check_button_new (); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (label), ((struct namespace_t *) l->data)-> visible); g_object_set_data (G_OBJECT (label), "namespace", l->data); g_signal_connect (G_OBJECT (label), "toggled", G_CALLBACK (toggled_ns), data); gtk_widget_set_style (label, style); ((struct namespace_t *) l->data)->visible_widget = label; gtk_box_pack_start (GTK_BOX (tbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (tbox), gtk_hbox_new (0, 0), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), list, FALSE, FALSE, 0); l = l->next; /* Anche que una linea di separazione: */ if (l) gtk_box_pack_start (GTK_BOX (box), gtk_hseparator_new (), FALSE, FALSE, 0); } g_object_unref (G_OBJECT (style)); set_color (data); return e; } /* Questa funzione viene lanciata dalle GTK quando un elemento my_label * viene distrutto. Serve per liberare memoria: */ static void on_clear_label (GtkWidget * widget) { gchar *label = g_object_get_data (G_OBJECT (widget), "label"); g_free (label); } /* Se il mouse entra nel campo di analisi di una label: */ static gboolean on_ebox_enter (GtkWidget * box, GdkEventCrossing * event, GtkLabel * label) { static GdkCursor *cursor = NULL; /* Cambio cursore e stato: */ gtk_widget_set_state (GTK_WIDGET (label), GTK_STATE_PRELIGHT); if (!cursor) cursor = gdk_cursor_new (GDK_HAND2); gdk_window_set_cursor (box->window, cursor); return TRUE; } /* Quando si esce da un label: */ static gboolean on_ebox_leave (GtkWidget * box, GdkEventCrossing * event, GtkLabel * label) { /* Setto lo stato normale e metto il cursore di prima */ gtk_widget_set_state (GTK_WIDGET (label), GTK_STATE_NORMAL); gdk_window_set_cursor (box->window, NULL); return TRUE; } /* Questa funzione crea un my_label object che e' una label gtk + evoluta: */ static GtkWidget * my_label (struct rdf_t *rdf, const gchar * text, GCallback callback, gpointer user_data, GCallback callback_press) { GtkWidget *ebox; GtkWidget *label; gchar *temp; GtkStyle *style; gchar *s; /* Style */ style = style_normal (); /* Un event box che wrappa certi segnali: */ ebox = gtk_event_box_new (); gtk_widget_set_tooltip_text (ebox, text); gtk_widget_set_events (ebox, GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); gtk_widget_set_can_focus(ebox, TRUE); gtk_widget_show (ebox); /* la label: */ temp = markup ((gchar *) text); s = g_strdup_printf ("%s", temp); g_free (temp); label = gtk_label_new (s); g_free (s); gtk_widget_set_style (label, style); g_object_unref (G_OBJECT (style)); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); temp = g_strdup (text); g_object_set_data (G_OBJECT (label), "label", temp); g_object_set_data (G_OBJECT (label), "rdf", rdf); g_signal_connect (G_OBJECT (label), "destroy", G_CALLBACK (on_clear_label), NULL); g_signal_connect (G_OBJECT (ebox), "enter-notify-event", G_CALLBACK (on_ebox_enter), label); g_signal_connect (G_OBJECT (ebox), "leave-notify-event", G_CALLBACK (on_ebox_leave), label); gtk_widget_show (label); gtk_container_add (GTK_CONTAINER (ebox), label); g_object_set_data (G_OBJECT (ebox), "callback", callback); g_signal_connect (G_OBJECT (ebox), "button-press-event", G_CALLBACK (callback_press), user_data); return ebox; } /* MENUS ********************************************************************/ /* Creazione del menu per le triplette: */ static GtkMenu * create_menu (struct editor_data_t *data) { GtkWidget *menu; GtkWidget *item; GtkWidget *image; menu = gtk_menu_new (); item = gtk_image_menu_item_new_with_label (_("Open with this editor")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (open_resource), data); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Open in a browser")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (open_browser), data); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Modify this RDF triple")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-edit", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (change_triple), data); item = gtk_image_menu_item_new_with_label (_ ("Modify all nodes/archs like this")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-edit", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (change_resources), data); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Cut all nodes/archs like this")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_cut), NULL); item = gtk_image_menu_item_new_with_label (_("Copy all nodes/archs like this")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_copy), NULL); item = gtk_image_menu_item_new_with_label (_ ("Delete all nodes/archs like this")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_delete), NULL); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Cut this RDF triple")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_cut_triple), NULL); item = gtk_image_menu_item_new_with_label (_("Copy this RDF triple")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_copy_triple), NULL); item = gtk_image_menu_item_new_with_label (_("Delete this RDF triple")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_delete_triple), NULL); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Show info about this element")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ( #ifdef GTK_STOCK_INFO "gtk-info", #else "gtk-dialog-info", #endif GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (info_selected), NULL); return GTK_MENU (menu); } /* menu per i namespace: */ static GtkMenu * create_nsmenu (struct editor_data_t *data) { GtkWidget *menu; GtkWidget *item; GtkWidget *image; menu = gtk_menu_new (); item = gtk_image_menu_item_new_with_label (_("Import this RDFS")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (import_resource), data); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Open with this editor")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (open_resource), data); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Open in a browser")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (open_browser), data); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Modify the RDF resource")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-edit", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (change_nsresource), data); item = gtk_image_menu_item_new_with_label (_("Modify the prefix")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-edit", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (change_prefix), data); item = gtk_menu_item_new (); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); item = gtk_image_menu_item_new_with_label (_("Cut this RDFS")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_cut), NULL); item = gtk_image_menu_item_new_with_label (_("Copy this RDFS")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_copy), NULL); item = gtk_image_menu_item_new_with_label (_("Delete this RDFS")); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (menu), item); image = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (editor_delete), NULL); return GTK_MENU (menu); } /* Questa funzione setta il menu in un punto preciso dello schermo. Esattamente * sotto la label o subito sopra: */ static void popup_position (GtkMenu * menu, gint * xp, gint * yp, gboolean * p, gpointer data) { GtkRequisition req; GdkScreen *screen; gint x, y, px, py, monitor_n; GdkRectangle monitor; static gint menu_size = 0; /* Il padre: */ data = (gpointer) gtk_widget_get_parent (GTK_WIDGET (data)); /* Se non so la grandezza, relizzo il menu e salvo: */ if (!menu_size) { gtk_widget_realize (GTK_WIDGET (menu)); menu_size = GTK_WIDGET (menu)->allocation.width; } /* Se le dimensioni sono diverse dal padre, metto a posto: */ if (menu_size != GTK_WIDGET (data)->allocation.width) gtk_widget_set_size_request (GTK_WIDGET (menu), GTK_WIDGET (data)->allocation.width, -1); else gtk_widget_set_size_request (GTK_WIDGET (menu), menu_size, -1); /* Prendo x e y del padre: */ gdk_window_get_origin (GTK_WIDGET (data)->window, &px, &py); gtk_widget_size_request (gtk_widget_get_toplevel (GTK_WIDGET (data)), &req); /* Calcolo le nuove x e y */ y = py + GTK_WIDGET (data)->allocation.y + GTK_WIDGET (data)->allocation.height + 1; x = px + GTK_WIDGET (data)->allocation.x; /* Prendo lo screen per sapere la geometria: */ screen = gtk_widget_get_screen (gtk_widget_get_toplevel (GTK_WIDGET (data))); monitor_n = gdk_screen_get_monitor_at_point (screen, px, py); gdk_screen_get_monitor_geometry (screen, monitor_n, &monitor); gtk_widget_size_request (GTK_WIDGET (menu), &req); /* Se il menu starebbe fuori lo rimetto dentro: */ if ((x + req.width) > monitor.x + monitor.width) x -= (x + req.width) - (monitor.x + monitor.width); else if (x < monitor.x) x = monitor.x; if ((y + req.height) > monitor.y + monitor.height) y -= GTK_WIDGET (data)->allocation.height + req.height + 1; else if (y < monitor.y) y = monitor.y; /* Questi sono i valori di x e y: */ *xp = x; *yp = y; } /* Funzione attivata dal click su una my_label delle triplette: */ static gint button_press_callback (GtkWidget * w, GdkEventButton * e, gpointer dummy) { void *(*callback) (GtkWidget *, gpointer) = g_object_get_data (G_OBJECT (w), "callback"); if (!callback) return FALSE; /* Se e' un doppio click oppure e' un tasto destro: */ if (e->type == GDK_2BUTTON_PRESS || e->button == 3) { if (e->button == 3) callback (w, dummy); gtk_menu_popup (create_menu (dummy), NULL, NULL, popup_position, w, e->button, e->time); return TRUE; } /* Altrimenti lancio la funzione salvata dentro l'oggetto */ else if (e->type == GDK_BUTTON_PRESS) { callback (w, dummy); return TRUE; } return FALSE; } /* Idem per i namespace: */ static gint button_press_nscallback (GtkWidget * w, GdkEventButton * e, gpointer dummy) { void *(*callback) (GtkWidget *, gpointer) = g_object_get_data (G_OBJECT (w), "callback"); if (!callback) return FALSE; if (e->type == GDK_2BUTTON_PRESS || e->button == 3) { if (e->button == 3) callback (w, dummy); gtk_menu_popup (create_nsmenu (dummy), NULL, NULL, popup_position, w, e->button, e->time); return TRUE; } else if (e->type == GDK_BUTTON_PRESS) { callback (w, dummy); return TRUE; } return FALSE; } /* MENU CALLBACKS ***********************************************************/ /* Questa funzione permette di cambiare prefix: */ static void change_prefix (GtkWidget * w, struct editor_data_t *data) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *entry; GtkWidget *label; GtkWidget *button; struct namespace_t *ns; GList *list; gchar *s; if (!data || !data->node_nsselect) return; list = data->namespace; while (list) { ns = list->data; if (!strcmp (ns->namespace, data->node_nsselect)) break; list = list->next; } if (!list) return; dialog = gtk_dialog_new (); s = g_strdup_printf ("%s %s - %s", PACKAGE, VERSION, _("Change Prefix for...")); gtk_window_set_title (GTK_WINDOW (dialog), s); g_free (s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); s = g_strdup_printf (_("RDFS: %s"), data->node_nsselect); label = gtk_label_new (s); g_free (s); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); label = gtk_label_new (_("Prefix: ")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); entry = gtk_entry_new (); gtk_entry_set_text (GTK_ENTRY (entry), ns->prefix); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { gchar *text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!text || !*text) { dialog_msg (_("No a valid prefix!")); continue; } /* Libero memoria e aggiorno: */ if (ns->prefix) g_free (ns->prefix); ns->prefix = g_strdup (text); editor_refresh_nslist (data); data->changed = TRUE; break; } gtk_widget_destroy (dialog); } /* Questa funzione rinomina tutte le risorse di un certo tipo: */ static void change_resources (GtkWidget * w, struct editor_data_t *data) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *entry; GtkWidget *label; GtkWidget *button; GList *list; struct rdf_t *rdf; gchar s[1024]; struct unredo_t *unredo; int ok; if (!data || !data->node_select) return; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Modify all URIs like this...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); label = gtk_label_new (_("New URI: ")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); entry = gtk_entry_new (); gtk_entry_set_text (GTK_ENTRY (entry), data->node_select); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { gchar *text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!text || !*text) { dialog_msg (_("No a valid URI!")); continue; } /* Qui attivo un undo: */ unredo = unredo_new (data, UNREDO_TYPE_CHANGE); /* Per ogni tripletta: */ list = data->rdf; while (list) { rdf = (struct rdf_t *) list->data; ok = 0; /* Se coincide aggiorno l'undo copiando la tripletta e poi * sostituisco, sia per il soggetto: */ if (!strcmp (rdf->subject, data->node_select)) { unredo_add (unredo, rdf, rdf_copy (rdf)); ok++; g_free (rdf->subject); rdf->subject = g_strdup (text); } /* Sia per il predicato */ if (!strcmp (rdf->predicate, data->node_select)) { if (!ok) { unredo_add (unredo, rdf, rdf_copy (rdf)); ok++; } g_free (rdf->predicate); rdf->predicate = g_strdup (text); } /* Sia per il complemento oggetto: */ if (!strcmp (rdf->object, data->node_select)) { if (!ok) { unredo_add (unredo, rdf, rdf_copy (rdf)); ok++; } g_free (rdf->object); rdf->object = g_strdup (text); } list = list->next; } /* Libero memoria e dico che ora ad essere selezionato e' il * valore nuovo: */ free (data->node_select); data->node_select = g_strdup (text); /* Aggiorno i namespace: */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); namespace_parse (data->rdf, &data->namespace); /* Refreshio: */ editor_refresh (data); data->changed = TRUE; break; } gtk_widget_destroy (dialog); } /* Cambiare una tripletta e' molto piu' semplice: */ static void change_triple (GtkWidget * w, struct editor_data_t *data) { struct rdf_t *new; struct unredo_t *unredo; if (!data || !data->rdf_select) return; /* Uso editor_triple: */ if (! (new = editor_triple (data->rdf_select, _("Modify this RDF triple...")))) return; /* Attivo un sistema di undo: */ unredo = unredo_new (data, UNREDO_TYPE_CHANGE); unredo_add (unredo, data->rdf_select, rdf_copy (data->rdf_select)); /* Rimetto i valori nuovi: */ if (data->rdf_select->subject) g_free (data->rdf_select->subject); data->rdf_select->subject = new->subject; if (data->rdf_select->predicate) g_free (data->rdf_select->predicate); data->rdf_select->predicate = new->predicate; if (data->rdf_select->object) g_free (data->rdf_select->object); data->rdf_select->object = new->object; if (data->rdf_select->lang) g_free (data->rdf_select->lang); data->rdf_select->lang = new->lang; if (data->rdf_select->datatype) g_free (data->rdf_select->datatype); data->rdf_select->datatype = new->datatype; data->rdf_select->object_type = new->object_type; g_free (new); /* Ricreo i namespace: */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); namespace_parse (data->rdf, &data->namespace); /* Refresh: */ data->changed = TRUE; editor_refresh (data); } /* Quando voglio cambiare una risorsa rdfs uso questa funzione: */ static void change_nsresource (GtkWidget * w, struct editor_data_t *data) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *entry; GtkWidget *label; GtkWidget *button; gchar s[1024]; if (!data || !data->node_nsselect) return; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Modify this RDF URI...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); label = gtk_label_new (_("New URI: ")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); entry = gtk_entry_new (); gtk_entry_set_text (GTK_ENTRY (entry), data->node_nsselect); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { GList *list; gint len; gchar *tmp, *text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); struct unredo_t *unredo; int ok; if (!text || !*text) { dialog_msg (_("No a valid URI!")); continue; } /* Per ogni namespace sostituisco: */ list = data->namespace; while (list) { if (!strcmp (((struct namespace_t *) list->data)->namespace, data->node_nsselect)) { g_free (((struct namespace_t *) list->data)->namespace); ((struct namespace_t *) list->data)->namespace = g_strdup (text); } list = list->next; } /* Attivo un undo: */ unredo = unredo_new (data, UNREDO_TYPE_CHANGE); /* Cerco ora tra tutte le triplette: */ len = strlen (data->node_nsselect); list = data->rdf; while (list) { ok = 0; /* Se coincide, aggiungo all'undo, libero la memoria e * sostituisco, sia per soggetto: */ if (!strncmp (((struct rdf_t *) list->data)->subject, data->node_nsselect, len)) { unredo_add (unredo, (struct rdf_t *) list->data, rdf_copy ((struct rdf_t *) list->data)); ok++; tmp = g_strdup_printf ("%s%s", text, ((struct rdf_t *) list->data)->subject + len); g_free (((struct rdf_t *) list->data)->subject); ((struct rdf_t *) list->data)->subject = tmp; } /* sia per predicato: */ if (!strncmp (((struct rdf_t *) list->data)->predicate, data->node_nsselect, len)) { if (!ok) { unredo_add (unredo, (struct rdf_t *) list->data, rdf_copy ((struct rdf_t *) list->data)); ok++; } tmp = g_strdup_printf ("%s%s", text, ((struct rdf_t *) list->data)->predicate + len); g_free (((struct rdf_t *) list->data)->predicate); ((struct rdf_t *) list->data)->predicate = tmp; } /* sia per c.oggetto: */ if (((struct rdf_t *) list->data)->object_type == RDF_OBJECT_RESOURCE && !strncmp (((struct rdf_t *) list->data)->object, data->node_nsselect, len)) { if (!ok) { unredo_add (unredo, (struct rdf_t *) list->data, rdf_copy ((struct rdf_t *) list->data)); ok++; } tmp = g_strdup_printf ("%s%s", text, ((struct rdf_t *) list->data)->object + len); g_free (((struct rdf_t *) list->data)->object); ((struct rdf_t *) list->data)->object = tmp; } list = list->next; } /* Cambio la selezione: */ g_free (data->node_nsselect); data->node_nsselect = g_strdup (text); /* Modifica e Refresh: */ data->changed = TRUE; editor_refresh (data); break; } gtk_widget_destroy (dialog); } /* Quando si chiede di aprire una risorsa dal submenu uso questa funzione: */ static void open_resource (GtkWidget * w, struct editor_data_t *data) { if (!data) return; /* Uso editor_open_uri: */ if (editor_open_uri (data->node_select ? data->node_select : data->node_nsselect, NULL) == FALSE) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Error opening '%s' resource!"), data->node_select ? data->node_select : data-> node_nsselect); dialog_msg (s); } } /* Se devo importare un rdfs dalla lista dei namespace faccio: */ static void import_resource (GtkWidget * w, struct editor_data_t *data) { GList *list; struct namespace_t *ns; if (!data || !data->node_nsselect) return; /* Cerco l'elemento: */ list = data->namespace; while (list) { ns = list->data; if (!strcmp (ns->namespace, data->node_nsselect)) break; list = list->next; } if (!list) return; /* se l'ho trovato uso rdfs_add */ rdfs_add (ns->namespace, ns->prefix); } /* Apertura in un browser: */ static void open_browser (GtkWidget * w, struct editor_data_t *data) { if (data->node_select) browser (data->node_select); else browser (data->node_nsselect); } /* SELECTIONS ***************************************************************/ /* E' stato selezionato un nodo: */ static void editor_select_node (struct editor_data_t *data, GtkWidget * w) { GtkWidget *label; gchar *text; GList *list; struct rdf_t *rdf; if (!(list = gtk_container_get_children (GTK_CONTAINER (w)))) return; label = list->data; g_list_free (list); /* Prendo il testo dalla my_label e l'rdf associato: */ text = g_object_get_data (G_OBJECT (label), "label"); rdf = (struct rdf_t *) g_object_get_data (G_OBJECT (label), "rdf"); /* Libero memoria e setto il nuovo elemento: */ if (data->node_nsselect) { g_free (data->node_nsselect); data->node_nsselect = NULL; } if (data->node_select) g_free (data->node_select); data->node_select = g_strdup (text); data->rdf_select = rdf; /* Setto i colori: */ set_color (data); } /* Item per la selezione dei namespace */ static void editor_select_nsnode (struct editor_data_t *data, GtkWidget * w) { GtkWidget *label; gchar *text; GList *list; if (!(list = gtk_container_get_children (GTK_CONTAINER (w)))) return; label = list->data; g_list_free (list); text = g_object_get_data (G_OBJECT (label), "label"); if (data->node_select) { g_free (data->node_select); data->node_select = NULL; } if (data->node_nsselect) g_free (data->node_nsselect); data->node_nsselect = g_strdup (text); data->rdf_select = NULL; set_color (data); } /* Callback della selezione nodo */ static void callback_select (GtkWidget * w, gpointer dummy) { editor_select_node ((struct editor_data_t *) dummy, w); } /* Callback della selezione namesapce */ static void callback_nsselect (GtkWidget * w, gpointer dummy) { editor_select_nsnode ((struct editor_data_t *) dummy, w); } /* COLORS *******************************************************************/ /* Settare i colori in base a cio' che e' stato selezionato: */ static void set_color (struct editor_data_t *data) { GtkStyle *style1, *style2; GList *l; gint len; /* Mi calcolo la lunghezza del namespace nel caso e' questo selezionato: */ if (data->node_nsselect) { if (!(len = strlen (data->node_nsselect))) len = -1; } else if (data->node_select) len = 0; else len = -1; style1 = style_normal (); style2 = style_selected (); /* Per ogni tripletta: */ l = data->rdf; while (l) { struct rdf_t *rdf = l->data; if (rdf->subject_widget) { /* Se e' selezionato una risorsa e questa coincide */ if ((!len && !strcmp (rdf->subject, data->node_select)) || /* Oppure se e' selezionato un rdfs e questo coincide: */ (len > 0 && !strncmp (rdf->subject, data->node_nsselect, len)) || /* Oppure se e' selezionato una risorsa e quest coincide con * l'uri del documento, e questo soggetto e' settato a * this:document */ (!len && !strcmp (rdf->subject, THIS_DOCUMENT) && !strcmp (data->node_select, data->uri ? data->uri : _("This Document")))) /* ... coloro: */ set_style (rdf->subject_widget, style2); else /* ... altrimenti no: */ set_style (rdf->subject_widget, style1); } /* Item per i predicati: */ if (rdf->predicate_widget) { if ((!len && !strcmp (rdf->predicate, data->node_select)) || (len > 0 && !strncmp (rdf->predicate, data->node_nsselect, len))) set_style (rdf->predicate_widget, style2); else set_style (rdf->predicate_widget, style1); } /* E per i c.oggetti */ if (rdf->object_widget) { if (((!len && !strcmp (rdf->object, data->node_select)) || (len > 0 && !strncmp (rdf->object, data->node_nsselect, len)))) set_style (rdf->object_widget, style2); else set_style (rdf->object_widget, style1); } l = l->next; } /* Per ogni namespace: */ l = data->namespace; while (l) { /* Seleziono anche qui: */ if (((struct namespace_t *) l->data)->namespace_widget) { if (len > 0 && !strncmp (((struct namespace_t *) l->data)->namespace, data->node_nsselect, len)) set_style (((struct namespace_t *) l->data)->namespace_widget, style2); else set_style (((struct namespace_t *) l->data)->namespace_widget, style1); } l = l->next; } /* Libero memoria: */ g_object_unref (G_OBJECT (style1)); g_object_unref (G_OBJECT (style2)); } /* Questa funzione genera uno stile normale in base ai colori della * configurazione: */ static GtkStyle * style_normal (void) { GtkStyle *style; GdkColor color; style = gtk_style_copy (gtk_widget_get_default_style ()); gdk_color_parse (normal_bg_color, &color); style->bg[GTK_STATE_NORMAL] = color; gdk_color_parse (normal_fg_color, &color); style->fg[GTK_STATE_NORMAL] = color; gdk_color_parse (prelight_fg_color, &color); style->fg[GTK_STATE_PRELIGHT] = color; return style; } /* Questa funzione genera uno stile selezionato in base ai colori della * configurazione: */ static GtkStyle * style_selected (void) { GtkStyle *style; GdkColor color; style = gtk_style_copy (gtk_widget_get_default_style ()); gdk_color_parse (prelight_bg_color, &color); style->bg[GTK_STATE_NORMAL] = color; gdk_color_parse (normal_fg_color, &color); style->fg[GTK_STATE_NORMAL] = color; gdk_color_parse (prelight_fg_color, &color); style->fg[GTK_STATE_PRELIGHT] = color; return style; } /* Questa funzione setta lo style ad ogni oggetto contenuto da un widget * ricorsivamente: */ static void set_style (GtkWidget * w, GtkStyle * s) { GList *list, *old; gtk_widget_set_style (GTK_WIDGET (w), s); if (!GTK_IS_CONTAINER (w)) return; if (!(list = old = gtk_container_get_children (GTK_CONTAINER (w)))) return; while (list) { set_style (GTK_WIDGET (list->data), s); list = list->next; } g_list_free (old); } /* EOF */ morla-0.16.1/src/merge.c000066400000000000000000000256761156343060400147650ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static void merge_file (GtkWidget * widget, GtkWidget * treeview); static void merge_uri (GtkWidget * widget, GtkWidget * treeview); static void merge_remove (GtkWidget * widget, GtkWidget * treeview); /* Questa funzione disegna un widget per aggiungere ad un elenco degli URI * e poi avviare la procedura per mergiarli in un grafo */ void merge_graph (void) { GtkWidget *window, *hbox, *scrolledwindow, *treeview; GtkWidget *box, *button, *frame, *vbox, *image, *label; GtkListStore *model; GtkCellRenderer *renderer; GtkTreeSelection *selection; GtkTreeViewColumn *column; GtkTreeIter iter; gchar s[1024]; GString *error_msg; g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Merge more one RDF in a graph...")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_widget_set_size_request (window, 400, 200); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), hbox, TRUE, TRUE, 0); frame = gtk_frame_new (_("List of RDFs")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("RDF"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (merge_file), treeview); box = gtk_hbox_new (FALSE, 2); gtk_container_add (GTK_CONTAINER (button), box); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0); label = gtk_label_new_with_mnemonic (_("_Open a RDF file")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (merge_uri), treeview); box = gtk_hbox_new (FALSE, 2); gtk_container_add (GTK_CONTAINER (button), box); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0); label = gtk_label_new_with_mnemonic (_("Open a RDF _URI")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0); button = gtk_button_new_from_stock ("gtk-remove"); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (merge_remove), treeview); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (window); while ((gtk_dialog_run (GTK_DIALOG (window))) == GTK_RESPONSE_OK) { GList *rdf, *list; gboolean error = FALSE; /* Se devo generare il grafo devono esserci dati */ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter) == FALSE) { dialog_msg (_("No RDF Document present!")); continue; } rdf = NULL; gtk_tree_selection_select_all (selection); /* Per ogni dato: */ do { gchar s[1024]; gchar *file; gchar *uri; struct download_t *download; gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 0, &file, 1, &download, -1); /* Ricreo un uri nel caso di un file: */ if (g_file_test (file, G_FILE_TEST_EXISTS) == FALSE) uri = g_strdup (file); else uri = g_filename_to_uri (file, NULL, NULL); /* Parso: */ error_msg = NULL; if (!uri || !(list = merge (rdf, uri, download, &error_msg))) { gchar *str; if (error_msg) str = g_string_free (error_msg, FALSE); else str = NULL; g_snprintf (s, sizeof (s), _("Error parsing URI '%s'!"), uri ? uri : file); dialog_msg_with_error (s, str); if (str) g_free (str); error = TRUE; /* Deleseziono tutto tranne lui: */ gtk_tree_selection_unselect_all (selection); gtk_tree_selection_select_iter (selection, &iter); if (uri) g_free (uri); g_free (file); break; } rdf = list; g_free (uri); g_free (file); /* Deseleziono quello fatto: */ gtk_tree_selection_unselect_iter (selection, &iter); } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter)); /* Se non ci sono errori: */ if (error == FALSE && rdf) { struct editor_data_t *data; /* Grafi vuole una struttura editor_data_t e quindi simulo * di averla: */ data = (struct editor_data_t *) g_malloc0 (sizeof (struct editor_data_t)); /* Parso i namespace */ data->rdf = rdf; namespace_parse (rdf, &data->namespace); /* Graph... */ graph (data); /* Libero memoria: */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); g_free (data); } /* Libero memoria: */ if (rdf) { g_list_foreach (rdf, (GFunc) rdf_free, NULL); g_list_free (rdf); } } /* Distruggo l'oggetto: */ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter) == TRUE) { do { struct download_t *download; gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 1, &download, -1); if (download) download_free (download); } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter)); } g_object_unref (model); gtk_widget_destroy (window); } /* Se mi si chiede di rimuovere un URI: */ static void merge_remove (GtkWidget * widget, GtkWidget * treeview) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); GList *list; /* Se non si e' selezionato qualcosa: */ if (!(list = gtk_tree_selection_get_selected_rows (selection, &model))) { dialog_msg (_("No RDF Document selected!")); return; } /* Chiedo conferma: */ if (dialog_ask (_("Sure to remove these RDFs?")) == GTK_RESPONSE_OK) { gint i = 0, j = 0; GList *l = list; /* Rimuovo: */ while (l) { struct download_t *download; for (j = 0; j < i; j++) gtk_tree_path_prev (l->data); gtk_tree_model_get_iter (model, &iter, l->data); gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 1, &download, -1); if (download) download_free (download); gtk_list_store_remove (GTK_LIST_STORE (model), &iter); i++; l = l->next; } } /* Libero memoria: */ g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL); g_list_free (list); } /* Se devo aggiungere un file: */ static void merge_file (GtkWidget * widget, GtkWidget * treeview) { GSList *list; GtkListStore *store; GtkTreeIter iter; store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); /* filechooser: */ if ((list = file_chooser (_("Open a new RDF file..."), GTK_SELECTION_MULTIPLE, GTK_FILE_CHOOSER_ACTION_OPEN, NULL))) { GSList *l = list; /* Appendo alla lista: */ while (l) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, l->data, 1, NULL, -1); g_free (l->data); l = l->next; } g_slist_free (list); } } /* Uguale per gli URI */ static void merge_uri (GtkWidget * widget, GtkWidget * treeview) { gchar *uri; GtkListStore *store; GtkTreeIter iter; struct download_t *download; if ((uri = uri_chooser (_("Open a RDF URI"), &download))) { store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, uri, 1, download, -1); g_free (uri); } } GList * merge (GList * list, gchar * what, struct download_t *download, GString ** error) { GList *rdf, *ns; struct rdf_t *r; gint last = 0, i; if (rdf_parse_thread (what, download, &rdf, &ns, FALSE, NULL, error) == FALSE) return NULL; g_list_foreach (ns, (GFunc) namespace_free, NULL); g_list_free (ns); ns = list; while (ns) { r = ns->data; if (blanknode_get (r->subject, &i) == TRUE && i > last) last = i; if (blanknode_get (r->object, &i) == TRUE && i > last) last = i; ns = ns->next; } last++; ns = rdf; while (ns) { r = ns->data; if (blanknode_get (r->subject, &i) == TRUE) { g_free (r->subject); r->subject = blanknode_create (i + last); } if (blanknode_get (r->object, &i) == TRUE) { g_free (r->object); r->object = blanknode_create (i + last); } list = g_list_append (list, r); ns = ns->next; } g_list_free (rdf); return list; } /* EOF ?!? */ /* Guy Debord:In girum imus nocte ecce et consumimur igni */ /* EOF */ morla-0.16.1/src/module.c000066400000000000000000000322771156343060400151460ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static GList *modules_list = NULL; static struct module_t *module_default_open_p = NULL; static struct module_t *module_default_save_p = NULL; static struct module_t *module_load (gchar * module); static void module_run_view (GtkWidget * widget, struct module_t *module); static GList *module_list_module_create (GList *); static GList *module_list_morla_create (GList *); static void module_list_free (GList * list); static const gchar *module_path (void); void module_init (gchar * config) { gchar *index; gchar *buffer; gsize len; nxml_t *nxml; nxml_data_t *cur; nxml_attr_t *attr; struct module_t *module; gchar *str; if (!g_module_supported () == FALSE) return; if (config) { if (g_file_test (module_path (), G_FILE_TEST_EXISTS) == FALSE) { g_message (_("The config file '%s' doesn't exist!"), config); return; } return; } else if (g_file_test (module_path (), G_FILE_TEST_IS_DIR) == FALSE) return; if (config) index = g_strdup (config); else if (! (index = g_build_path (G_DIR_SEPARATOR_S, module_path (), "index.xml", NULL))) return; if (g_file_get_contents (index, &buffer, &len, NULL) == FALSE) { g_free (index); return; } g_free (index); if (nxml_new (&nxml) != NXML_OK) { g_free (buffer); return; } if (nxml_parse_buffer (nxml, buffer, len) != NXML_OK || nxml_root_element (nxml, &cur) != NXML_OK || !cur || strcmp (cur->value, "morla_modules")) { nxml_free (nxml); g_free (buffer); return; } for (cur = cur->children; cur; cur = cur->next) { if (cur->type == NXML_TYPE_ELEMENT && !strcmp (cur->value, "module") && nxml_get_string (cur, &str) == NXML_OK && str) { splash_set_text (_("Loading module '%s'"), str); module = module_load (str); free (str); if (module && nxml_find_attribute (cur, "default_open", &attr) == NXML_OK && attr && !strcmp (attr->value, "yes")) { if (module_default_open_p) g_message ("A default open module already exists!"); else module_default_open_p = module; } if (module && nxml_find_attribute (cur, "default_save", &attr) == NXML_OK && attr && !strcmp (attr->value, "yes")) { if (module_default_save_p) g_message ("A default save module already exists!"); else module_default_save_p = module; } } } nxml_free (nxml); g_free (buffer); } void module_shutdown (void) { GList *list; gpointer pointer; MorlaModuleShutdown morla_module_shutdown; struct module_t *data; for (list = modules_list; list; list = list->next) { data = list->data; if (g_module_symbol (data->module, "morla_module_shutdown", (gpointer *) & pointer) == TRUE) { morla_module_shutdown = pointer; morla_module_shutdown (data->data); } g_module_close (data->module); g_free (data); } g_list_free (modules_list); } static struct module_t * module_load (gchar * name) { MorlaModuleInit morla_module_init; struct module_t *data = NULL; gpointer pointer; GModule *module; gchar *file; if (!(file = g_module_build_path (module_path (), name))) return NULL; if ((module = g_module_open (file, G_MODULE_BIND_MASK))) { if (g_module_symbol (module, "morla_module_init", (gpointer *) & pointer) == FALSE) { g_message ("No 'morla_module_init' for the module '%s'. This module is disabled.", name); g_module_close (module); } else { morla_module_init = pointer; if (!(pointer = morla_module_init ())) { g_message ("morla_module_init function returns NULL for the module '%s'. This module is disabled.", name); g_module_close (module); } else { data = g_malloc0 (sizeof (struct module_t)); data->module = module; data->data = pointer; modules_list = g_list_append (modules_list, data); } } } else g_message ("Error loading the module '%s': %s", name, g_module_error ()); g_free (file); return data; } void module_menu_open (GtkMenu * menu, GtkWidget * parent) { GtkWidget *menuitem; struct module_t *module; GList *list; gboolean empty = TRUE; for (list = modules_list; list; list = list->next) { module = list->data; if (module->data->open_function) { if (module->data->open_label) menuitem = gtk_menu_item_new_with_label (module->data->open_label); else { gchar *s = g_strdup_printf ("Open with the module '%s'", module->data->module_name ? module-> data-> module_name : g_module_name (module->module)); menuitem = gtk_menu_item_new_with_label (s); g_free (s); } gtk_container_add (GTK_CONTAINER (menu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (module_run_open), module); empty = FALSE; } } if (empty == TRUE) gtk_widget_set_sensitive (parent, FALSE); } void module_menu_save (GtkMenu * menu, GtkWidget * parent) { GtkWidget *menuitem; struct module_t *module; GList *list; gboolean empty = TRUE; for (list = modules_list; list; list = list->next) { module = list->data; if (module->data->save_function) { if (module->data->save_label) menuitem = gtk_menu_item_new_with_label (module->data->save_label); else { gchar *s = g_strdup_printf ("Save with the module '%s'", module->data->module_name ? module-> data-> module_name : g_module_name (module->module)); menuitem = gtk_menu_item_new_with_label (s); g_free (s); } gtk_container_add (GTK_CONTAINER (menu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (module_run_save), module); empty = FALSE; } } if (empty == TRUE) gtk_widget_set_sensitive (parent, FALSE); } void module_menu_view (GtkMenu * menu, GtkWidget * parent) { GtkWidget *menuitem; struct module_t *module; GList *list; gboolean empty = TRUE; for (list = modules_list; list; list = list->next) { module = list->data; if (module->data->view_function) { if (module->data->view_label) menuitem = gtk_menu_item_new_with_label (module->data->view_label); else { gchar *s = g_strdup_printf ("View with the module '%s'", module->data->module_name ? module-> data-> module_name : g_module_name (module->module)); menuitem = gtk_menu_item_new_with_label (s); g_free (s); } gtk_container_add (GTK_CONTAINER (menu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (module_run_view), module); empty = FALSE; } } if (empty == TRUE) gtk_widget_set_sensitive (parent, FALSE); } void module_run_open (GtkWidget * widget, struct module_t *module) { GList *list = NULL; gchar *uri = NULL; struct editor_data_t *data; if (module->data->open_function (module->data, &list, &uri) == TRUE) { if (uri) { GList *real = module_list_morla_create (list); module_list_free (list); data = g_malloc0 (sizeof (struct editor_data_t)); data->format = RDF_FORMAT_XML; data->uri = uri; if (namespace_parse (real, &data->namespace) == FALSE) data->namespace = NULL; data->rdf = real; editor_new_maker (data); } else g_message ("The module '%s' returns a NULL uri!", g_module_name (module->module)); } } void module_run_save (GtkWidget * widget, struct module_t *module) { struct editor_data_t *data = editor_get_data (); GList *list; if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } list = module_list_module_create (data->rdf); if (module->data->save_function (module->data, list) == TRUE) data->module_save = module; module_list_free (list); } static void module_run_view (GtkWidget * widget, struct module_t *module) { struct editor_data_t *data = editor_get_data (); GList *list; if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } list = module_list_module_create (data->rdf); module->data->view_function (module->data, list); module_list_free (list); } struct module_t * module_default_open (void) { return module_default_open_p; } struct module_t * module_default_save (void) { return module_default_save_p; } static GList * module_list_module_create (GList * l) { GList *list; for (list = NULL; l; l = l->next) { struct rdf_t *rdf = l->data; MorlaRdf *new = g_malloc0 (sizeof (MorlaRdf)); new->subject = rdf->subject ? g_strdup (rdf->subject) : NULL; new->predicate = rdf->predicate ? g_strdup (rdf->predicate) : NULL; new->object = rdf->object ? g_strdup (rdf->object) : NULL;; new->object_type = rdf->object_type; new->lang = rdf->lang ? g_strdup (rdf->lang) : NULL;; new->datatype = rdf->datatype ? g_strdup (rdf->datatype) : NULL;; list = g_list_append (list, new); } return list; } static GList * module_list_morla_create (GList * l) { GList *real; for (real = NULL; l; l = l->next) { MorlaRdf *rdf = l->data; struct rdf_t *new = g_malloc0 (sizeof (struct rdf_t)); if (rdf->subject) new->subject = g_strdup (rdf->subject); if (rdf->predicate) new->predicate = g_strdup (rdf->predicate); if (rdf->object) new->object = g_strdup (rdf->object); new->object_type = rdf->object_type; if (rdf->lang) new->lang = g_strdup (rdf->lang); if (rdf->datatype) new->datatype = g_strdup (rdf->datatype); real = g_list_append (real, new); } return real; } static void module_list_free (GList * list) { GList *l; for (l = list; l; l = l->next) { MorlaRdf *rdf = l->data; if (rdf->subject) g_free (rdf->subject); if (rdf->predicate) g_free (rdf->predicate); if (rdf->object) g_free (rdf->object); if (rdf->lang) g_free (rdf->lang); if (rdf->datatype) g_free (rdf->datatype); g_free (rdf); } g_list_free (list); } /* Public Functions */ void morla_dialog_msg (gchar * message) { g_return_if_fail (message != NULL); dialog_msg (message); } gboolean morla_dialog_ask (gchar * message) { g_return_val_if_fail (message != NULL, FALSE); if (dialog_ask (message) == GTK_RESPONSE_OK) return TRUE; return FALSE; } gboolean morla_rdf_parse (gchar * buffer, gchar * uri, GList ** ret) { GList *list; g_return_val_if_fail (buffer != NULL, FALSE); g_return_val_if_fail (ret != NULL, FALSE); list = *ret = NULL; if (rdf_parse_format (uri, buffer, FALSE, &list, RDF_FORMAT_XML, NULL) == FALSE && rdf_parse_format (uri, buffer, FALSE, &list, RDF_FORMAT_NTRIPLES, NULL) == FALSE && rdf_parse_format (uri, buffer, FALSE, &list, RDF_FORMAT_TURTLE, NULL) == FALSE) return FALSE; *ret = module_list_module_create (list); g_list_foreach (list, (GFunc) rdf_free, NULL); g_list_free (list); return TRUE; } void morla_rdf_free (GList * list) { g_return_if_fail (list != NULL); module_list_free (list); } static gboolean morla_rdf_write (GList * list, gchar ** buffer_ret, enum rdf_format_t format) { GList *rdf; gboolean ret; GList *namespace = NULL; if (!(rdf = module_list_morla_create (list))) return FALSE; if (namespace_parse (rdf, &namespace) == FALSE) namespace = NULL; ret = rdf_save_buffer (rdf, &namespace, format, buffer_ret); g_list_foreach (rdf, (GFunc) rdf_free, NULL); g_list_free (rdf); g_list_foreach (namespace, (GFunc) namespace_free, NULL); g_list_free (namespace); return ret; } gboolean morla_rdf_write_xml (GList * list, gchar ** buffer_ret) { return morla_rdf_write (list, buffer_ret, RDF_FORMAT_XML); } gboolean morla_rdf_write_ntriples (GList * list, gchar ** buffer_ret) { return morla_rdf_write (list, buffer_ret, RDF_FORMAT_NTRIPLES); } gboolean morla_rdf_write_turtle (GList * list, gchar ** buffer_ret) { return morla_rdf_write (list, buffer_ret, RDF_FORMAT_TURTLE); } static const gchar * module_path (void) { static const gchar *path; static gboolean done = FALSE; #ifndef ENABLE_MACOSX return PATH_MODULE; #endif if (done == FALSE) { path = g_getenv ("MORLA_PATH_MODULE"); done = TRUE; } if (!path) return PATH_MODULE; return path; } /* EOF */ morla-0.16.1/src/morla-module.h000066400000000000000000000051041156343060400162500ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include typedef struct morla_module_t MorlaModule; /* Every GList must contain MorlaRdf data structs */ typedef struct morla_rdf_t MorlaRdf; typedef enum morla_rdf_object_t MorlaRdfObject; typedef MorlaModule * (*MorlaModuleInit) (void); typedef void (*MorlaModuleShutdown) (MorlaModule * data); typedef gboolean (*MorlaOpen) (MorlaModule * data, GList ** rdf, gchar ** uri); typedef gboolean (*MorlaSave) (MorlaModule * data, GList * rdf); typedef gboolean (*MorlaView) (MorlaModule * data, GList * rdf); struct morla_module_t { gchar * module_name; MorlaOpen open_function; gchar * open_label; MorlaSave save_function; gchar * save_label; MorlaView view_function; gchar * view_label; /* This pointer is usable as you want: */ gpointer data; }; enum morla_rdf_object_t { MORLA_RDF_OBJECT_BLANK, MORLA_RDF_OBJECT_LITERAL, MORLA_RDF_OBJECT_RESOURCE }; struct morla_rdf_t { gchar * subject; gchar * predicate; gchar * object; MorlaRdfObject object_type; gchar * lang; gchar * datatype; }; /** * This function will be executed when the module is loaded: */ MorlaModule * morla_module_init (void); /** * This function will be executed when the module is unloaded: */ void morla_module_shutdown (MorlaModule * data); /* Public Functions */ void morla_dialog_msg (gchar * message); gboolean morla_dialog_ask (gchar * message); gboolean morla_rdf_parse (gchar * buffer, gchar * uri, GList ** ret); void morla_rdf_free (GList * list); gboolean morla_rdf_write_xml (GList * list, gchar ** buffer_ret); gboolean morla_rdf_write_ntriples (GList * list, gchar ** buffer_ret); gboolean morla_rdf_write_turtle (GList * list, gchar ** buffer_ret); /* EOF */ morla-0.16.1/src/morla.h000066400000000000000000000623731156343060400150000ustar00rootroot00000000000000gchar morla_rdfs[] ="\n" "\n" "\n" " \n" " \n" " \n" " \n" " \n" "]>\n" "\n" "\n" "\n" " \n" " Andrea Marchesini\n" " \n" " \n" " \n" "\n" " \n" " Category\n" " Set the category for this subject.\n" " \n" " \n" " yes\n" " \n" " \n" "\n" " \n" " Input\n" " Set the inputs for this subject.\n" " \n" " \n" " yes\n" " \n" " 1\n" " 0\n" " \n" "\n" " \n" " yes\n" " \n" " \n" " yes\n" " no\n" " \n" " set a comment a this subject\n" " yes\n" " Comment\n" " \n" "\n" " \n" " \n" " Default value\n" " Set a default value for this input\n" " \n" " \n" " \n" "\n" " \n" " \n" " no\n" " \n" " \n" " 1\n" " \n" " empty_type\n" " \n" "\n" " \n" " yes\n" " \n" " \n" " no\n" " no\n" " 1\n" " \n" " Has Version\n" " Set the version of this template\n" " \n" "\n" " \n" " \n" " Visible\n" " Is this input visible?\n" " \n" " \n" " yes\n" " \n" "\n" " \n" " \n" " Language\n" " Does this input need of a language value?\n" " \n" " \n" " yes\n" " \n" "\n" " \n" " \n" " Long Text\n" " Does this input have a long text?\n" " \n" " \n" " yes\n" " \n" "\n" " \n" " \n" " Default Language\n" " Insert a default language value\n" " \n" " \n" " no\n" " no\n" " \n" "\n" " \n" " \n" " Datatype\n" " Does this input need of a datatype value?\n" " \n" " \n" " yes\n" " \n" "\n" " \n" " \n" " Default Language\n" " Insert a default datatype value\n" " \n" " \n" " no\n" " no\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " RDFS\n" " The RDFS for this input\n" " \n" " \n" " 1\n" " \n" "\n" " \n" " \n" " Type Value\n" " The type of values for this input\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Minimum Cardinality\n" " 0\n" " Minimum Cardinality value for this subject\n" " \n" " no\n" " no\n" " \n" " 1\n" " \n" "\n" " \n" " \n" " Maximum Cardinality\n" " Maximum Cardinality value for this subject (0 for infinite)\n" " 1\n" " \n" " no\n" " no\n" " \n" " 1\n" " \n" "\n" " \n" " yes\n" " \n" " \n" " yes\n" " no\n" " 1\n" " \n" " Label\n" " Set the label for this subject.\n" " \n" "\n" " \n" " \n" " yes\n" " \n" " \n" " no\n" " no\n" " Function Init\n" " The javascript code for the initialize procedure.\n" " yes\n" " \n" "\n" " \n" " \n" " yes\n" " \n" " \n" " no\n" " no\n" " Function Check\n" " The javascript code for the checking procedure.\n" " yes\n" " \n" "\n" " \n" " \n" " yes\n" " \n" " \n" " no\n" " no\n" " Function Destroy\n" " The javascript code for the destroy procedure.\n" " yes\n" " \n" "\n" " \n" " \n" " yes\n" " \n" " \n" " no\n" " no\n" " Function Save\n" " The javascript code for the saving procedure.\n" " yes\n" " \n" "\n" " \n" " Name\n" " Name of this template\n" " 1\n" " \n" " no\n" " no\n" " \n" " \n" " \n" "\n" " \n" " \n" " yes\n" " no\n" " \n" "\n" " \n" " \n" " yes\n" " no\n" " \n" "\n" " \n" " \n" " yes\n" " no\n" " \n" "\n" " \n" " \n" " yes\n" " no\n" " \n" "\n" " \n" " \n" " Empty widget for rdf:type\n" " \n" " \n" " \n" " no\n" " 1\n" " \n" "\n" " \n" " Andrea Marchesini\n" " Copyright © 2005-2007 Andrea Marchesini\n" " Model for template of morla\n" " application/dc+xml\n" " \n" " \n" " \n" "\n" " \n" " A list of alternative literals\n" " List of Alternative Literals.\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " A list of alternative resources\n" " List of Alternative Resources.\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The category of this template\n" " Category\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " Default value for this property\n" " Default Value\n" " \n" " \n" "\n" " \n" " Has Input\n" " Set a input for this template.\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " Set this RDFS for the subject resource.\n" " Has RDFS\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The version of this template\n" " Has Version\n" " \n" " \n" " \n" " \n" "\n" " \n" " An input for the subject resource.\n" " Input\n" " \n" " \n" " \n" " \n" "\n" " \n" " Minimum Cardinality value for this subject resource?\n" " Minimum Cardinality\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " Maximum Cardinality value for this subject resource?\n" " Maximum Cardinality\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " Template\n" " The template.\n" " \n" " \n" " \n" " \n" "\n" " \n" " Type Value\n" " Type of this input.\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Is this resource visible? (yes or no)\n" " Visible\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Does this literal input need a language? (yes or no)\n" " Language\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Does this literal input need a datatype? (yes or no)\n" " Datatype\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The default datatype for this input\n" " Default Datatype\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The default language for this input\n" " Default Language\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The javascript code for the init procedure\n" " Function Init\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The javascript code for the checking procedure\n" " Function Check\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The javascript code for the destroy procedure\n" " Function Destroy\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " The javascript code for the saving procedure\n" " Function Save\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Template for inputs\n" " 0.7\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Template for templates\n" " \n" " 0.7\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" "\n" "\n" ; morla-0.16.1/src/namespace.c000066400000000000000000000130701156343060400156030ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static gchar *namespace_check_prefix (gchar * ns); /* Funzione per ordinare namespace */ static gint namespace_compare (struct namespace_t *a, struct namespace_t *b) { return strcmp (a->namespace, b->namespace); } /* Controlla l'esistenza di un namespace in elenco e lo comunica */ static gboolean namespace_check (GList * list, gchar * ns) { while (list) { if (!strcmp (ns, ((struct namespace_t *) list->data)->namespace)) return TRUE; list = list->next; } return FALSE; } /* Libera la memoria di un namespace: */ void namespace_free (struct namespace_t *namespace) { if (!namespace) return; if (namespace->namespace) g_free (namespace->namespace); if (namespace->prefix) g_free (namespace->prefix); g_free (namespace); } /* Parsa una lista rdf generando una lista di namespace: */ gboolean namespace_parse (GList * rdf, GList ** ret_list) { GList *ret = NULL; struct rdf_t *data; gint i = 0; /* Per ogni tripletta: */ while (rdf) { data = (struct rdf_t *) rdf->data; /* Guardo solo il predicato: */ if (data && data->predicate) { gint len = strlen (data->predicate); struct namespace_t *ns; gchar *t; /* Cerco caratteri particolari: */ while (len--) if (data->predicate[len] == '/' || data->predicate[len] == '#' || data->predicate[len] == ':') break; /* Se ho trovato qualcosa... */ if (len) { t = g_strdup (data->predicate); t[len + 1] = 0; /* ... controllo se ce l'ho gia' ed inserisco: */ if (namespace_check (ret, t) == FALSE) { ns = (struct namespace_t *) g_malloc0 (sizeof (struct namespace_t)); ns->namespace = g_strdup (t); if (!(ns->prefix = namespace_check_prefix (t))) ns->prefix = g_strdup_printf ("_%d", ++i); ns->visible = TRUE; ret = g_list_append (ret, ns); } g_free (t); } } rdf = rdf->next; } /* Ordino: */ *ret_list = g_list_sort (ret, (GCompareFunc) namespace_compare); return TRUE; } /* Chiede se e' visibile un determinato rdf_t in base ad una lista * di namespace: */ gboolean namespace_visible (GList * list, struct rdf_t * rdf) { struct namespace_t *ns; gint len; while (list) { ns = (struct namespace_t *) list->data; /* Se non e' visibile... */ if (!ns->visible) { len = strlen (ns->namespace); /* Ed e' nel soggetto, predicato o coggetto */ if (!strncmp (ns->namespace, rdf->subject, len)) return FALSE; if (!strncmp (ns->namespace, rdf->predicate, len)) return FALSE; if (rdf->object_type == RDF_OBJECT_RESOURCE && !strncmp (ns->namespace, rdf->object, len)) return FALSE; } list = list->next; } return TRUE; } /* Ritorna il prefisso associato ad una tripletta cercandolo nella lista dei * namespace. Se non lo trova, inserisce: */ gchar * namespace_prefix (GList ** namespace, gchar * t) { struct namespace_t *ns; gint max, i; GList *list = *namespace; max = -1; while (list) { ns = list->data; if (!strcmp (ns->namespace, t)) return ns->prefix; /* Anche se non l'ho trovato mi segno il max valore trovato * nel sistema di autonumerazione: */ if (ns->prefix[0] == '_' && (i = atoi (ns->prefix + 1)) && max < i) max = i; list = list->next; } /* Non l'ho trovato, alloco: */ ns = (struct namespace_t *) g_malloc0 (sizeof (struct namespace_t)); ns->namespace = g_strdup (t); if (!(ns->prefix = namespace_check_prefix (t))) ns->prefix = g_strdup_printf ("_%d", ++max); ns->visible = TRUE; /* appendo alla lista e comunico: */ (*namespace) = g_list_append (*namespace, ns); return ns->prefix; } /* Dato una stringa cerca un possibile namespace e ritorna una stringa * da scrivere dentro ad un file rdf: */ gchar * namespace_create (GList * l, gchar * t) { struct namespace_t *r; gint len; while (l) { r = (struct namespace_t *) l->data; /* Se l'hai trovato: */ len = strlen (r->namespace); if (!strncmp (r->namespace, t, len) && !strstr (t + len, "/") && !strstr (t + len, "#") && !strstr (t + len, ":")) return g_strdup_printf ("%s:%s", r->prefix, t + len); l = l->next; } /* errore: */ return g_strdup_printf ("_:%s", t); } /* Controlla se esiste un prefisso di un determinato namepsace nella lista * degli RDFS importati */ static gchar * namespace_check_prefix (gchar * ns) { GList *list; struct rdfs_t *r; list = rdfs_list; while (list) { r = (struct rdfs_t *) list->data; if (r->prefix && !strcmp (ns, r->resource)) return g_strdup (r->prefix); list = list->next; } return NULL; } /* EOF */ morla-0.16.1/src/navigator.c000066400000000000000000001465121156343060400156510ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #define HISTORY_MAX 10 #define BACK_FORWARD_MAX 10 struct navigator_history_t { GList *rdf; gchar *uri; gdouble adj; }; struct navigator_t { GList *back; GList *forward; gchar *uri; GList *rdf; GtkWidget *sw; GtkWidget *label; GtkWidget *widget; GtkWidget *notebook; }; static void navigator (GList * rdf); static void navigator_back (GtkWidget * button, GtkWidget * notebook); static void navigator_forward (GtkWidget * button, GtkWidget * notebook); static void navigator_quit (GtkWidget * button, GtkWidget * notebook); static void navigator_close (GtkWidget * button, GtkWidget * notebook); static void navigator_switch_page (GtkWidget * widget, gpointer * page, guint page_num); static void navigator_destroy (GtkWidget * notebook); static void navigator_free (struct navigator_t *navigator); static void navigator_refresh (struct navigator_t *, gdouble adj); static void notebook_position (GtkMenu * menu, gint * xp, gint * yp, gboolean * p, GtkWidget *); static gint navigator_open (GtkWidget *, GdkEventButton *, struct navigator_t *); static GtkWidget *notebook_menu (GtkWidget * notebook); static void navigator_browser (GtkWidget * button, GtkWidget * notebook); static void navigator_show (GtkWidget * button, GtkWidget * notebook); static void navigator_show_tab (GtkWidget * button, GtkWidget * notebook); static void navigator_import (GtkWidget * button, GtkWidget * notebook); static void navigator_import_new (GtkWidget * button, GtkWidget * notebook); static void navigator_clicked (GtkWidget * button, struct navigator_t *navigator); static void navigator_start (struct navigator_t *navigator, gchar * value, GList * rdf); static void navigator_history_free (struct navigator_history_t *n); static gboolean navigator_uri_match (GtkEntryCompletion * completion, const gchar * key, GtkTreeIter * iter, GtkWidget * notebook); static void navigator_pages (GtkWidget * notebook, GList * rdf); static void navigator_go (GtkWidget * button, GtkWidget * notebook); static void navigator_try (gchar * uri, gpointer notebook); static void navigator_info (GtkWidget * widget, gchar * predicate); /* Questa funzione esegue il navigatore sul documento in primo piano */ void navigator_run (void) { struct editor_data_t *data = editor_get_data (); GList *ret, *tmp; struct rdf_t *rdf; if (!data || !data->rdf) { dialog_msg (_("This RDF document is empty!")); return; } tmp = data->rdf; ret = NULL; while (tmp) { rdf = rdf_copy (tmp->data); if (!strcmp (rdf->subject, THIS_DOCUMENT)) { g_free (rdf->subject); rdf->subject = g_strdup (data->uri ? data->uri : _("This Document")); } ret = g_list_append (ret, rdf); tmp = tmp->next; } /* Lancia navigator */ navigator (ret); g_list_foreach (ret, (GFunc) rdf_free, NULL); g_list_free (ret); } /* Questa funzione e' il navigatore: */ static void navigator (GList * rdf) { GtkWidget *window; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *sep; GtkWidget *entry; GtkWidget *button; GtkWidget *notebook; gchar s[1024]; GtkEntryCompletion *completion; gint x, y; g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Navigator")); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), s); y = gdk_screen_height () * 2 / 3; if (y < 480) y = 480; x = gdk_screen_width () * 2 / 3; if (x < 640) x = 640; gtk_window_resize (GTK_WINDOW (window), x, y); notebook = gtk_notebook_new (); g_object_set_data (G_OBJECT (notebook), "menu", notebook_menu (notebook)); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); hbox = gtk_hbox_new (0, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); button = gtk_button_new_from_stock ("gtk-go-back"); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); g_object_set_data (G_OBJECT (notebook), "back_widget", button); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_back), notebook); button = gtk_button_new_from_stock ("gtk-go-forward"); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); g_object_set_data (G_OBJECT (notebook), "forward_widget", button); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_forward), notebook); sep = gtk_vseparator_new (); gtk_box_pack_start (GTK_BOX (hbox), sep, FALSE, FALSE, 0); entry = gtk_entry_new (); g_signal_connect (entry, "activate", G_CALLBACK (navigator_go), notebook); g_object_set_data (G_OBJECT (notebook), "entry", entry); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); button = gtk_button_new_from_stock ("gtk-execute"); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_go), notebook); completion = gtk_entry_completion_new (); gtk_entry_completion_set_match_func (completion, (GtkEntryCompletionMatchFunc) navigator_uri_match, notebook, NULL); gtk_entry_set_completion (GTK_ENTRY (entry), completion); gtk_entry_completion_set_text_column (completion, 0); g_object_unref (completion); sep = gtk_vseparator_new (); gtk_box_pack_start (GTK_BOX (hbox), sep, FALSE, FALSE, 0); button = gtk_button_new_from_stock ("gtk-close"); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_close), notebook); sep = gtk_vseparator_new (); gtk_box_pack_start (GTK_BOX (hbox), sep, FALSE, FALSE, 0); button = gtk_button_new_from_stock ("gtk-quit"); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_quit), notebook); gtk_widget_show (notebook); gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0); gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE); g_signal_connect ((gpointer) notebook, "switch_page", G_CALLBACK (navigator_switch_page), NULL); g_signal_connect ((gpointer) notebook, "destroy", G_CALLBACK (navigator_destroy), NULL); /* Questa funzione crea le pagine data la lista di RDF */ navigator_pages (notebook, rdf); gtk_widget_show_all (window); } /* Questa funzione viene attivata quando avviene lo switch tra una page * e l'altra del notebook: */ static void navigator_switch_page (GtkWidget * widget, gpointer * page, guint page_num) { GtkWidget *back_widget = g_object_get_data (G_OBJECT (widget), "back_widget"); GtkWidget *forward_widget = g_object_get_data (G_OBJECT (widget), "forward_widget"); GtkWidget *entry = g_object_get_data (G_OBJECT (widget), "entry"); GList *data = g_object_get_data (G_OBJECT (widget), "data"); struct navigator_t *navigator; if (!data) return; /* Cerco il navigatore in primo piano: */ data = g_list_nth (data, page_num); navigator = data->data; /* Setto il testo nell'entry di navigazione: */ gtk_entry_set_text (GTK_ENTRY (entry), navigator->uri); /* Attivo i pulsanti back e forward */ gtk_widget_set_sensitive (back_widget, navigator->back ? TRUE : FALSE); gtk_widget_set_sensitive (forward_widget, navigator->forward ? TRUE : FALSE); } /* Funzione che chiude il navigatore: */ static void navigator_quit (GtkWidget * button, GtkWidget * notebook) { gtk_widget_destroy (gtk_widget_get_toplevel (button)); } /* Questa funzione viene lanciata quando avviene la distruzione del * navigatore: */ static void navigator_destroy (GtkWidget * notebook) { GList *data; /* Se trovo la lista dei navigatori aperti, la libero: */ if ((data = g_object_get_data (G_OBJECT (notebook), "data"))) { g_list_foreach (data, (GFunc) navigator_free, NULL); g_list_free (data); } /* Rimuovo la history del navigatore: */ if ((data = g_object_get_data (G_OBJECT (notebook), "entry_history"))) { g_list_foreach (data, (GFunc) g_free, NULL); g_list_free (data); } } /* Libero una struttura di navigazione: */ static void navigator_free (struct navigator_t *navigator) { if (!navigator) return; /* Tutti i back: */ if (navigator->back) { g_list_foreach (navigator->back, (GFunc) navigator_history_free, NULL); g_list_free (navigator->back); } /* Tutti i forward: */ if (navigator->forward) { g_list_foreach (navigator->forward, (GFunc) navigator_history_free, NULL); g_list_free (navigator->forward); } /* Tutti gli rdf: */ if (navigator->rdf) { g_list_foreach (navigator->rdf, (GFunc) rdf_free, NULL); g_list_free (navigator->rdf); } /* L'uri: */ if (navigator->uri) g_free (navigator->uri); free (navigator); } /* Rimozione di una history: */ static void navigator_history_free (struct navigator_history_t *n) { if (!n) return; /* Se c'e' rdf: */ if (n->rdf) { g_list_foreach (n->rdf, (GFunc) rdf_free, NULL); g_list_free (n->rdf); } if (n->uri) g_free (n->uri); g_free (n); } /* Quando si clicca back: */ static void navigator_back (GtkWidget * button, GtkWidget * notebook) { gint page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); GtkWidget *entry = g_object_get_data (G_OBJECT (notebook), "entry"); GList *list; struct navigator_t *navigator; struct navigator_history_t *history, *new; /* Cerco la lista dei navigatori e il navigatore in primo piano: */ list = g_object_get_data (G_OBJECT (notebook), "data"); list = g_list_nth (list, page); if (!list) return; navigator = list->data; /* Se non c'e' history back */ if (!navigator->back) return; /* Rimuovo l'elemento history back: */ history = navigator->back->data; navigator->back = g_list_remove (navigator->back, history); /* Creo l'elemento per il forward: */ new = (struct navigator_history_t *) g_malloc0 (sizeof (struct navigator_history_t)); /* Se c'e' un elenco diverso di rdf nell'history, allora lo sostituisco * con quelli presenti nel documento attuale: */ if (history->rdf) { new->rdf = navigator->rdf; navigator->rdf = history->rdf; } /* Cambio uri: */ new->uri = navigator->uri; navigator->uri = history->uri; /* Setto nella entry del navigatori l'uri: */ gtk_entry_set_text (GTK_ENTRY (entry), navigator->uri); navigator->forward = g_list_prepend (navigator->forward, new); /* Se la history e' troppo alta devo rimuovere un elemento nel forward: */ if (g_list_length (navigator->forward) > BACK_FORWARD_MAX) { list = g_list_last (navigator->forward); navigator_history_free ((struct navigator_history_t *) list->data); navigator->forward = g_list_remove (navigator->forward, list->data); } /* Aggiorno il navigatore: */ navigator_refresh (navigator, history->adj); g_free (history); } /* Uguale ma invertito, la funzione di forward: */ static void navigator_forward (GtkWidget * button, GtkWidget * notebook) { gint page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); GtkWidget *entry = g_object_get_data (G_OBJECT (notebook), "entry"); GList *list; struct navigator_t *navigator; struct navigator_history_t *history, *new; list = g_object_get_data (G_OBJECT (notebook), "data"); list = g_list_nth (list, page); if (!list) return; navigator = list->data; if (!navigator->forward) return; history = navigator->forward->data; navigator->forward = g_list_remove (navigator->forward, history); new = (struct navigator_history_t *) g_malloc0 (sizeof (struct navigator_history_t)); if (history->rdf) { new->rdf = navigator->rdf; navigator->rdf = history->rdf; } new->uri = navigator->uri; navigator->uri = history->uri; gtk_entry_set_text (GTK_ENTRY (entry), navigator->uri); navigator->back = g_list_prepend (navigator->back, new); if (g_list_length (navigator->back) > BACK_FORWARD_MAX) { list = g_list_last (navigator->back); navigator_history_free ((struct navigator_history_t *) list->data); navigator->back = g_list_remove (navigator->back, list->data); } navigator_refresh (navigator, history->adj); g_free (history); } /* Quando si chiede di chiudere un navigatore: */ static void navigator_close (GtkWidget * button, GtkWidget * notebook) { gint page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); GList *list, *item; /* Rimozione della pagina: */ gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), page); /* Libero la memoria: */ list = g_object_get_data (G_OBJECT (notebook), "data"); item = g_list_nth (list, page); navigator_free (item->data); list = g_list_remove (list, item->data); g_object_set_data (G_OBJECT (notebook), "data", list); /* Se non c'e' piu' nessun navigatore, distruggo la finestra: */ if (!list) gtk_widget_destroy (gtk_widget_get_toplevel (button)); } /* Funzione per ordinare in base alla proprieta' una lista di triplette: */ static gint navigator_order (struct rdf_t *a, struct rdf_t *b) { if (a && b) return strcmp (a->predicate, b->predicate); return 0; } /* Refresh del navigatore: */ static void navigator_refresh (struct navigator_t *navigator, gdouble adj_value) { GtkWidget *back_widget, *forward_widget, *entry; GtkWidget *label, *button, *image; GtkAdjustment *adj; GList *list, *ret; struct rdf_t *rdf; /* Rimuovo tutto cio' che c'e' visualizzato ora: */ gtk_container_foreach (GTK_CONTAINER (navigator->widget), (GtkCallback) gtk_widget_destroy, NULL); /* Setto nuovamente la label: */ gtk_label_set_text (GTK_LABEL (navigator->label), navigator->uri); /* Per ogni tripletta: */ list = navigator->rdf; ret = NULL; while (list) { rdf = list->data; /* Se e' del giusto soggetto, la inserisco in una lista temporanea */ if (!strcmp (rdf->subject, navigator->uri)) ret = g_list_append (ret, rdf); list = list->next; } /* Se questa esiste: */ if (ret) { gint row = 0; ret = g_list_sort (ret, (GCompareFunc) navigator_order); /* Per ognuna di questi elementi, creo una voce in piu' nella finestra: */ list = ret; while (list) { rdf = list->data; button = gtk_button_new (); gtk_table_attach (GTK_TABLE (navigator->widget), button, 0, 1, row, row + 1, GTK_FILL, 0, 3, 3); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_info), rdf->predicate); image = gtk_image_new_from_stock ( #ifdef GTK_STOCK_INFO "gtk-info", #else "gtk-dialog-info", #endif GTK_ICON_SIZE_BUTTON); gtk_container_add (GTK_CONTAINER (button), image); label = gtk_label_new (rdf->predicate); gtk_label_set_selectable (GTK_LABEL (label), TRUE); gtk_table_attach (GTK_TABLE (navigator->widget), label, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3); /* Se l'oggetto e' letterale: */ if (rdf->object_type == RDF_OBJECT_LITERAL) { gchar s[1024]; if (rdf->lang && rdf->datatype) g_snprintf (s, sizeof (s), "[%s] <%s> %s", rdf->lang, rdf->datatype, rdf->object); else if (rdf->datatype) g_snprintf (s, sizeof (s), "<%s> %s", rdf->datatype, rdf->object); else if (rdf->lang) g_snprintf (s, sizeof (s), "[%s] %s", rdf->lang, rdf->object); else g_snprintf (s, sizeof (s), "%s", rdf->object); label = gtk_label_new (s); gtk_label_set_selectable (GTK_LABEL (label), TRUE); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_table_attach (GTK_TABLE (navigator->widget), label, 2, 3, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3); } /* Se invece e' una risorsa devo fare il sistema a menu: */ else { GtkWidget *box; GtkWidget *button; GtkWidget *label; GtkWidget *arrow; box = gtk_hbox_new (0, 0); button = gtk_button_new (); label = gtk_label_new (rdf->object); gtk_container_add (GTK_CONTAINER (button), label); gtk_widget_set_size_request (label, 200, -1); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); g_object_set_data (G_OBJECT (button), "value", rdf->object); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (navigator_clicked), navigator); button = gtk_button_new (); g_object_set_data (G_OBJECT (button), "value", rdf->object); gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "button_press_event", G_CALLBACK (navigator_open), navigator); arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); gtk_container_add (GTK_CONTAINER (button), arrow); gtk_table_attach (GTK_TABLE (navigator->widget), box, 2, 3, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3); } row++; /* Se c'e' un successivo creo una linea vuota: */ if (list->next) { gtk_table_attach (GTK_TABLE (navigator->widget), gtk_hseparator_new (), 0, 3, row, row + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 3, 3); row++; } list = list->next; } g_list_free (ret); } /* Se non c'e' elemento legato al soggettom scrivo no data: */ else { gtk_table_attach (GTK_TABLE (navigator->widget), gtk_label_new (_("No data found!")), 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 3, 3); } /* Setto lo scroll come l'avevamo lasciato (vale solo per il back e forward */ adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (navigator->sw)); gtk_adjustment_set_value (GTK_ADJUSTMENT (adj), adj_value); /* Aggiorno back, forward e la barra di navigazione */ back_widget = g_object_get_data (G_OBJECT (navigator->notebook), "back_widget"); forward_widget = g_object_get_data (G_OBJECT (navigator->notebook), "forward_widget"); entry = g_object_get_data (G_OBJECT (navigator->notebook), "entry"); gtk_entry_set_text (GTK_ENTRY (entry), navigator->uri); gtk_widget_set_sensitive (back_widget, navigator->back ? TRUE : FALSE); gtk_widget_set_sensitive (forward_widget, navigator->forward ? TRUE : FALSE); /* Cerco nell'history questo uri: */ list = ret = g_object_get_data (G_OBJECT (navigator->notebook), "entry_history"); while (list) { if (!strcmp (list->data, navigator->uri)) break; list = list->next; } /* Se non c'e' lo inserisco: */ if (!list) { GtkListStore *store; GtkTreeIter iter; GtkEntryCompletion *completion; store = gtk_list_store_new (1, G_TYPE_STRING); ret = g_list_prepend (ret, g_strdup (navigator->uri)); list = ret; while (list) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, list->data, -1); list = list->next; } /* Se supero' il numero max di elementi rimuovo l'ultimo: */ if (g_list_length (ret) > HISTORY_MAX) { list = g_list_last (ret); free (list->data); ret = g_list_remove (ret, list->data); } g_object_set_data (G_OBJECT (navigator->notebook), "entry_history", ret); /* Attivo il sistema di complemento */ completion = gtk_entry_get_completion (GTK_ENTRY (entry)); gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (store)); g_object_unref (store); } /* Mostro tutto: */ gtk_widget_show_all (navigator->widget); } /* Mostro il menu data una risorsa: */ static gint navigator_open (GtkWidget * button, GdkEventButton * event, struct navigator_t *navigator) { if (event->type == GDK_BUTTON_PRESS) { GtkWidget *menu = g_object_get_data (G_OBJECT (navigator->notebook), "menu"); gchar *value = g_object_get_data (G_OBJECT (button), "value"); g_object_set_data (G_OBJECT (menu), "value", value); gtk_menu_popup (GTK_MENU (menu), NULL, NULL, (GtkMenuPositionFunc) notebook_position, button, event->button, event->time); return TRUE; } return FALSE; } /* Calcolo la posizione del menu (vedi quella in maker.c): */ static void notebook_position (GtkMenu * menu, gint * xp, gint * yp, gboolean * p, GtkWidget * widget) { GtkRequisition req; GdkScreen *screen; gint x, y, px, py, monitor_n; GdkRectangle monitor; static gint menu_size = 0; if (!menu_size) { gtk_widget_realize (GTK_WIDGET (menu)); menu_size = GTK_WIDGET (menu)->allocation.width; } widget = gtk_widget_get_parent (widget); if (menu_size < widget->allocation.width) gtk_widget_set_size_request (GTK_WIDGET (menu), widget->allocation.width, -1); else gtk_widget_set_size_request (GTK_WIDGET (menu), menu_size, -1); gdk_window_get_origin (widget->window, &px, &py); gtk_widget_size_request (gtk_widget_get_toplevel (widget), &req); y = py + widget->allocation.y + widget->allocation.height + 1; x = px + widget->allocation.x; screen = gtk_widget_get_screen (gtk_widget_get_toplevel (widget)); monitor_n = gdk_screen_get_monitor_at_point (screen, px, py); gdk_screen_get_monitor_geometry (screen, monitor_n, &monitor); gtk_widget_size_request (GTK_WIDGET (menu), &req); if ((x + req.width) > monitor.x + monitor.width) x -= (x + req.width) - (monitor.x + monitor.width); else if (x < monitor.x) x = monitor.x; if ((y + req.height) > monitor.y + monitor.height) y -= widget->allocation.height + req.height + 1; else if (y < monitor.y) y = monitor.y; *xp = x; *yp = y; } /* Questa funzione crea il menu per una risorsa: */ static GtkWidget * notebook_menu (GtkWidget * notebook) { GtkWidget *menu, *item, *image; menu = gtk_menu_new (); item = gtk_image_menu_item_new_with_mnemonic (_("Open")); gtk_container_add (GTK_CONTAINER (menu), item); g_signal_connect ((gpointer) item, "activate", G_CALLBACK (navigator_show), notebook); image = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); item = gtk_image_menu_item_new_with_mnemonic (_("Open in a new tab")); gtk_container_add (GTK_CONTAINER (menu), item); g_signal_connect ((gpointer) item, "activate", G_CALLBACK (navigator_show_tab), notebook); image = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); item = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menu), item); gtk_widget_set_sensitive (item, FALSE); item = gtk_image_menu_item_new_with_mnemonic (_("Import as RDF")); gtk_container_add (GTK_CONTAINER (menu), item); g_signal_connect ((gpointer) item, "activate", G_CALLBACK (navigator_import), notebook); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); item = gtk_image_menu_item_new_with_mnemonic (_ ("Import as RDF in a new window")); gtk_container_add (GTK_CONTAINER (menu), item); g_signal_connect ((gpointer) item, "activate", G_CALLBACK (navigator_import_new), notebook); image = gtk_image_new_from_stock ("gtk-convert", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); item = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menu), item); gtk_widget_set_sensitive (item, FALSE); item = gtk_image_menu_item_new_with_mnemonic (_("Open in a browser")); gtk_container_add (GTK_CONTAINER (menu), item); g_signal_connect ((gpointer) item, "activate", G_CALLBACK (navigator_browser), notebook); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); gtk_widget_show_all (menu); return menu; } /* Questa funzione apre il navigatore ad una uri leggendo questo uri * dall'oggetto grafico */ static void navigator_clicked (GtkWidget * button, struct navigator_t *navigator) { gchar *value; value = g_object_get_data (G_OBJECT (button), "value"); navigator_start (navigator, value, NULL); } /* Apertura di un URI: */ static void navigator_start (struct navigator_t *navigator, gchar * value, GList * rdf) { /* Se c'era gia' un URI aperto aggiorno il back: */ if (navigator->uri) { struct navigator_history_t *history; GtkAdjustment *adj; history = (struct navigator_history_t *) g_malloc0 (sizeof (struct navigator_t)); history->uri = navigator->uri; /* Salvo il valore della scrollbar: */ adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (navigator->sw)); history->adj = gtk_adjustment_get_value (adj); /* Se mi passano una lista rdf vuol dire che il documento nuovo non * ha lo stessa base dati. Quindi il back deve avere salvata quella * vecchia: */ if (rdf) history->rdf = navigator->rdf; navigator->back = g_list_prepend (navigator->back, history); if (g_list_length (navigator->back) > BACK_FORWARD_MAX) { GList *list; list = g_list_last (navigator->back); navigator_history_free ((struct navigator_history_t *) list->data); navigator->back = g_list_remove (navigator->back, list->data); } } /* Aggiorno l'uri e lancio la refresh: */ navigator->uri = g_strdup (value); if (rdf) navigator->rdf = rdf; navigator_refresh (navigator, 0); } /* Questa funzione lancia un browser: */ static void navigator_browser (GtkWidget * button, GtkWidget * notebook) { GtkWidget *menu = gtk_widget_get_parent (button); gchar *value; value = g_object_get_data (G_OBJECT (menu), "value"); browser (value); } /* Questa funzione lancia la navigator start da un click sul menu popup: */ static void navigator_show (GtkWidget * button, GtkWidget * notebook) { GtkWidget *menu = gtk_widget_get_parent (button); gint page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); gchar *value; GList *list; struct navigator_t *navigator; value = g_object_get_data (G_OBJECT (menu), "value"); list = g_object_get_data (G_OBJECT (notebook), "data"); list = g_list_nth (list, page); if (!list) return; navigator = list->data; navigator_start (navigator, value, NULL); } /* Uguale a quella sopra ma in una nuova tab: */ static void navigator_show_tab (GtkWidget * button, GtkWidget * notebook) { GtkWidget *menu = gtk_widget_get_parent (button); gint page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); struct navigator_t *navigator; GList *data, *tmp, *list; gchar *value; GtkWidget *sw; value = g_object_get_data (G_OBJECT (menu), "value"); data = g_object_get_data (G_OBJECT (notebook), "data"); list = g_list_nth (data, page); if (!list) return; /* Creo una nuova struttura: */ navigator = (struct navigator_t *) g_malloc0 (sizeof (struct navigator_t)); navigator->uri = g_strdup (value); data = g_list_append (data, navigator); g_object_set_data (G_OBJECT (notebook), "data", data); /* Duplico tutte le triplette: */ tmp = ((struct navigator_t *) list->data)->rdf; while (tmp) { navigator->rdf = g_list_append (navigator->rdf, rdf_copy (tmp->data)); tmp = tmp->next; } /* Creo la grafica: */ navigator->label = gtk_label_new (value); gtk_widget_set_size_request (navigator->label, 200, -1); gtk_label_set_ellipsize (GTK_LABEL (navigator->label), PANGO_ELLIPSIZE_END); navigator->widget = gtk_table_new (0, 0, 0); sw = gtk_scrolled_window_new (NULL, NULL); navigator->sw = sw; gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), navigator->widget); /* Lancio la refresh: */ navigator->notebook = notebook; navigator_refresh (navigator, 0); /* Setto in primo piano: */ page = gtk_notebook_append_page (GTK_NOTEBOOK (notebook), sw, navigator->label); gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), page); gtk_widget_show_all (notebook); } /* Questa funzione importa un documento rdf: */ static void navigator_import (GtkWidget * button, GtkWidget * notebook) { GtkWidget *menu = gtk_widget_get_parent (button); gint page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); gchar *value; GList *list; GList *rdf, *ns; value = g_object_get_data (G_OBJECT (menu), "value"); list = g_object_get_data (G_OBJECT (notebook), "data"); list = g_list_nth (list, page); if (!list) return; /* Se non riesco a parsarlo, chiedo se voglio provare a ricercare * documenti RDF nell'URI */ if (rdf_parse_thread (value, NULL, &rdf, &ns, FALSE, NULL, NULL) == FALSE) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Error opening resource '%s'\n" "Try to search some RDFs in this URI?"), value); /* Se si' lancio la funzione navigator try */ if (dialog_ask (s) == GTK_RESPONSE_OK) search_open (value, navigator_try, notebook); return; } /* Libero memoria: */ g_list_foreach (ns, (GFunc) namespace_free, NULL); g_list_free (ns); /* Richieamo navigator_pages per creare tutte le tab necessarie: */ navigator_pages (notebook, rdf); /* Libero memoria: */ g_list_foreach (rdf, (GFunc) rdf_free, NULL); g_list_free (rdf); } /* Questa funzione importa in una nuova finestra. Cambia il finale, ma e' * uguale a quella sopra:*/ static void navigator_import_new (GtkWidget * button, GtkWidget * notebook) { GtkWidget *menu = gtk_widget_get_parent (button); gint page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); gchar *value; GList *list; GList *rdf, *ns; value = g_object_get_data (G_OBJECT (menu), "value"); list = g_object_get_data (G_OBJECT (notebook), "data"); list = g_list_nth (list, page); if (!list) return; if (rdf_parse_thread (value, NULL, &rdf, &ns, FALSE, NULL, NULL) == FALSE) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Error opening resource '%s'\n" "Try to search some RDFs in this URI?"), value); if (dialog_ask (s) == GTK_RESPONSE_OK) search_open (value, navigator_try, NULL); return; } g_list_foreach (ns, (GFunc) namespace_free, NULL); g_list_free (ns); /* Lancio un navigatore: */ navigator (rdf); g_list_foreach (rdf, (GFunc) rdf_free, NULL); g_list_free (rdf); } /* Questa funzione serve per l'autocompletmaento nella barra di navigazione: */ static gboolean navigator_uri_match (GtkEntryCompletion * completion, const gchar * key, GtkTreeIter * iter, GtkWidget * notebook) { GtkTreeModel *model; char *uri = NULL; gboolean ret = FALSE; GValue val = { 0, }; model = gtk_entry_completion_get_model (completion); gtk_tree_model_get_value (model, iter, 0, &val); uri = (gchar *) g_value_get_string (&val); if (g_str_has_prefix (uri, key) || (g_str_has_prefix (uri, "ftp://") && g_str_has_prefix (uri + 6, key)) || (g_str_has_prefix (uri, "http://") && g_str_has_prefix (uri + 7, key)) || (g_str_has_prefix (uri, "https://") && g_str_has_prefix (uri + 8, key))) ret = TRUE; g_free (uri); return ret; } /* Questa funzione crea tante pagine quanti i soggetti di una serie di * triplette: */ static void navigator_pages (GtkWidget * notebook, GList * rdf) { struct navigator_t *navigator; struct rdf_t *data; GList *t; gint page; GtkWidget *sw; GList *list = g_object_get_data (G_OBJECT (notebook), "data"); /* Per ogni tripletta: */ t = rdf; while (t) { data = t->data; /* Se non e' un nodo blank... */ if (rdf_blank (rdf, data->subject) == FALSE) { GList *tmp; /* ... e non e' gia' in elenco: */ tmp = list; while (tmp) { navigator = tmp->data; if (!strcmp (data->subject, navigator->uri)) break; tmp = tmp->next; } /* Alloco: */ if (!tmp) { navigator = (struct navigator_t *) g_malloc0 (sizeof (struct navigator_t)); navigator->uri = g_strdup (data->subject); list = g_list_append (list, navigator); tmp = rdf; while (tmp) { navigator->rdf = g_list_append (navigator->rdf, rdf_copy (tmp->data)); tmp = tmp->next; } navigator->label = gtk_label_new (data->subject); gtk_widget_set_size_request (navigator->label, 200, -1); gtk_label_set_ellipsize (GTK_LABEL (navigator->label), PANGO_ELLIPSIZE_END); navigator->widget = gtk_table_new (0, 0, 0); sw = gtk_scrolled_window_new (NULL, NULL); navigator->sw = sw; gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), navigator->widget); navigator->notebook = notebook; /* Refreshio: */ navigator_refresh (navigator, 0); /* Metto in primo piano: */ page = gtk_notebook_append_page (GTK_NOTEBOOK (notebook), sw, navigator->label); gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), page); } } t = t->next; } /* Aggiorno nel widget la lista */ g_object_set_data (G_OBJECT (notebook), "data", list); gtk_widget_show_all (notebook); } /* Quando si attiva la barra di navigazione: */ static void navigator_go (GtkWidget * button, GtkWidget * notebook) { GtkWidget *entry = g_object_get_data (G_OBJECT (notebook), "entry"); gchar *text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); GList *rdf, *ns; /* Parso l'uri o faccio ricerca: */ if (rdf_parse_thread (text, NULL, &rdf, &ns, FALSE, NULL, NULL) == FALSE) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Error opening resource '%s'\n" "Try to search some RDFs in this URI?"), text); if (dialog_ask (s) == GTK_RESPONSE_OK) search_open (text, navigator_try, notebook); return; } /* Libero memoria, apro le pagine, ed esco */ g_list_foreach (ns, (GFunc) namespace_free, NULL); g_list_free (ns); navigator_pages (notebook, rdf); g_list_foreach (rdf, (GFunc) rdf_free, NULL); g_list_free (rdf); } /* Questa funzione chiede un URI da aprire e poi lancia il navigatore: */ void navigator_open_uri (void) { gchar *uri; GList *rdf, *ns; struct download_t *download; if (! (uri = uri_chooser (_("Open RDF URI for the navigator..."), &download))) return; if (rdf_parse_thread (uri, download, &rdf, &ns, FALSE, NULL, NULL) == FALSE) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Error opening resource '%s'\n" "Try to search some RDFs in this URI?"), uri); if (dialog_ask (s) == GTK_RESPONSE_OK) search_open (uri, navigator_try, NULL); g_free (uri); if (download) download_free (download); return; } if (download) download_free (download); g_list_foreach (ns, (GFunc) namespace_free, NULL); g_list_free (ns); navigator (rdf); g_list_foreach (rdf, (GFunc) rdf_free, NULL); g_list_free (rdf); g_free (uri); } /* Questa funzione e' di callback rispetto a search open */ static void navigator_try (gchar * text, gpointer notebook) { GList *rdf, *ns; if (rdf_parse_thread (text, NULL, &rdf, &ns, FALSE, NULL, NULL) == FALSE) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Error opening resource '%s'!"), text); dialog_msg (s); return; } if (notebook) navigator_pages (notebook, rdf); else navigator (rdf); /* Libero memoria, apro pagine ed esco */ g_list_foreach (ns, (GFunc) namespace_free, NULL); g_list_free (ns); g_list_foreach (rdf, (GFunc) rdf_free, NULL); g_list_free (rdf); } static void navigator_info (GtkWidget * widget, gchar * predicate) { GtkWidget *dialog; GtkWidget *frame; GtkWidget *vbox; GtkWidget *box; GtkWidget *label; GtkWidget *event; GtkWidget *button; gchar s[1024]; GList *labels = NULL; GList *comments = NULL; gchar *range = NULL; gchar *domain = NULL; GList *list; list = rdfs_list; while (list) { GList *l; struct rdfs_t *rdfs; rdfs = (struct rdfs_t *) list->data; l = rdfs->data; while (l) { struct rdf_t *rdf = l->data; if (!strcmp (rdf->subject, predicate)) { if (!strcmp (rdf->predicate, RDFS_COMMENT) && rdf->object_type == RDF_OBJECT_LITERAL) { struct info_box_t *info = g_malloc0 (sizeof (struct info_box_t)); info->lang = rdf->lang; info->value = rdf->object; comments = g_list_append (comments, info); } else if (!strcmp (rdf->predicate, RDFS_LABEL) && rdf->object_type == RDF_OBJECT_LITERAL) { struct info_box_t *info = g_malloc0 (sizeof (struct info_box_t)); info->lang = rdf->lang; info->value = rdf->object; labels = g_list_append (labels, info); } else if (!strcmp (rdf->predicate, RDFS_DOMAIN)) domain = rdf->object; else if (!strcmp (rdf->predicate, RDFS_RANGE)) range = rdf->object; } l = l->next; } list = list->next; } if (!comments && !labels && !range && !domain) { dialog_msg (_("No info for this URI")); return; } dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s -%s", PACKAGE, VERSION, _("Information...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); frame = gtk_frame_new (predicate); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 0); vbox = gtk_vbox_new (FALSE, 8); gtk_container_add (GTK_CONTAINER (frame), vbox); button = gtk_button_new_from_stock ("gtk-close"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Label: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); event = gtk_event_box_new (); gtk_widget_set_events (event, GDK_BUTTON_PRESS_MASK); gtk_box_pack_start (GTK_BOX (box), event, TRUE, TRUE, 5); g_signal_connect (G_OBJECT (event), "enter-notify-event", G_CALLBACK (info_box_enter), NULL); g_signal_connect (G_OBJECT (event), "leave-notify-event", G_CALLBACK (info_box_leave), NULL); label = gtk_label_new (""); gtk_container_add (GTK_CONTAINER (event), label); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); if (labels) { list = labels; while (list) { struct info_box_t *info = list->data; if (!info->lang) { gtk_label_set_text (GTK_LABEL (label), info->value); break; } list = list->next; } if (!list) gtk_label_set_text (GTK_LABEL (label), ((struct info_box_t *) labels->data)->value); } g_signal_connect (G_OBJECT (event), "button_press_event", G_CALLBACK (info_box_popup_show), labels); g_signal_connect (G_OBJECT (event), "button_release_event", G_CALLBACK (info_box_popup_hide), NULL); frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Comment: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); event = gtk_event_box_new (); gtk_widget_set_events (event, GDK_BUTTON_PRESS_MASK); gtk_box_pack_start (GTK_BOX (box), event, TRUE, TRUE, 5); g_signal_connect (G_OBJECT (event), "enter-notify-event", G_CALLBACK (info_box_enter), NULL); g_signal_connect (G_OBJECT (event), "leave-notify-event", G_CALLBACK (info_box_leave), NULL); label = gtk_label_new (""); gtk_container_add (GTK_CONTAINER (event), label); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); g_signal_connect (G_OBJECT (event), "button_press_event", G_CALLBACK (info_box_popup_show), comments); g_signal_connect (G_OBJECT (event), "button_release_event", G_CALLBACK (info_box_popup_hide), NULL); if (comments) { list = comments; while (list) { struct info_box_t *info = list->data; if (!info->lang) { gtk_label_set_text (GTK_LABEL (label), info->value); break; } list = list->next; } if (!list) gtk_label_set_text (GTK_LABEL (label), ((struct info_box_t *) comments->data)->value); } frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Domain: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); label = gtk_label_new (domain); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 5); frame = gtk_frame_new (NULL); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Range: ")); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); label = gtk_label_new (range); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 5); gtk_widget_show_all (dialog); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (labels) { g_list_foreach (labels, (GFunc) g_free, NULL); g_list_free (labels); } if (comments) { g_list_foreach (comments, (GFunc) g_free, NULL); g_list_free (comments); } } /* EOF ?!? */ /* Le grand palindrome - George Perec Trace l'inégal palindrome. Neige. Bagatelle, dira Hercule. Le brut repentir, cet écrit né Perec. L'arc lu pèse trop, lis à vice-versa. Perte. Cerise d'une vérité banale, le Malstrom, Alep, mort édulcoré, crêpe porté de ce désir brisé d'un iota. Livre si aboli, tes sacres ont éreinté, cor cruel, nos albatros. Etre las, autel bâti, miette vice-versa du jeu que fit, nacré, médical, le sélénite relaps, ellipsoïdal. Ivre il bat, la turbine bat, l'isolé me ravale: le verre si obéi du Pernod -- eh, port su! -- obsédante sonate teintée d'ivresse. Ce rêve se mit -- peste! -- à blaguer. Beh! L'art sec n'a si peu qu'algèbre s'élabore de l'or évalué. Idiome étiré, hésite, bâtard replié, l'os nu. Si, à la gêne sècrete-- verbe nul à l'instar de cinq occis--, rets amincis, drailles inégales, il, avatar espacé, caresse ce noir Belzebuth, il offensé, tire! L'écho fit (à désert): Salut, sang, robe et été. Fièvres. Adam, rauque; il écrit: Abrupt ogre, eh, cercueil, l'avenir tu, effilé, génial à la rue (murmure sud eu ne tire vaseline séparée; l'épeire gelée rode: Hep, mortel ?) lia ta balafre native. Litige. Regagner (et ne m'...). Ressac. Il frémit, se sape, na! Eh, cavale! Timide, il nia ce sursaut. Hasard repu, tel, le magicien à morte me lit. Un ignare le rapsode, lacs ému, mixa, mêla: Hep, Oceano Nox, ô, béchamel azur! éjaculer! Topaze! Le cèdre, malabar faible, Arsinoë le macule, mante ivre, glauque, pis, l'air atone (sic). Art sournois: si, médicinale, l'autre glace (Melba ?) l'un ? N'alertai ni pollen (retêter: gercé, repu, denté...) ni tobacco. Tu, désir, brio rimé, eh, prolixe nécrophore, tu ferres l'avenir velu, ocre, cromant-né? Rage, l'ara. Veuglaire. Sedan, tes elzévirs t'obsèdent. Romain? Exact. Et Nemrod selle ses Samson! Et nier téocalli ? Cave canem (car ce nu trop minois -- rembuscade d'éruptives à babil -- admonesta, fil accru, Têtebleu! qu'Ariane évitât net. Attention, ébénier factice, ressorti du réel. Ci-git. Alpaga, gnôme, le héros se lamente, trompé, chocolat: ce laid totem, ord, nil aplati, rituel biscornu; ce sacré bédeau (quel bât ce Jésus!). Palace piégé, Torpédo drue si à fellah tôt ne peut ni le Big à ruer bezef. L'eugéniste en rut consuma d'art son épi d'éolienne ici rot (eh... rut ?). Toi, d'idem gin, élèvera, élu, bifocal, l'ithos et notre pathos à la hauteur de sec salamalec? élucider. Ion éclaté: Elle? Tenu. Etna but (item mal famé), degré vide, julep: macédoine d'axiomes, sac semé d'école, véniel, ah, le verbe enivré (ne sucer ni arreter, eh ça jamais!) lu n'abolira le hasard? Nu, ottoman à écho, l'art su, oh, tara zéro, belle Deborah, ô, sacre! Pute, vertubleu, qualité si vertu à la part tarifé (décalitres ?) et nul n'a lu trop s'il séria de ce basilic Iseut. Il a prié bonzes, Samaritain, Tora, vilains monstres (idolâtre DNA en sus) rêvés, évaporés: Arbalète (bètes) en noce du Tell ivre-mort, émeri tu: O, trapu à elfe, il lie l'os, il lia jérémiade lucide. Petard! Rate ta reinette, bigleur cruel, non à ce lot! Si, farcis-toi dito le coeur! Lied à monstre velu, ange ni bête, sec à pseudo délire: Tsarine (sellée, là), Cid, Arétin, abruti de Ninive, Déjanire. . . Le Phenix, eve de sables, écarté, ne peut égarer racines radiales en mana: l'Oubli, fétiche en argile. Foudre. Prix: Ile de la Gorgone en roc, et, ô, Licorne écartelée, Sirène, rumb à bannir à ma (Red n'osa) niére de mimosa: Paysage d'Ourcq ocre sous ive d'écale; Volcan. Roc: tarot célé du Père. Livres. Silène bavard, replié sur sa nullité (nu à je) belge: ipséité banale. L' (eh, ça!) hydromel à ri, psaltérion. Errée Lorelei... Fi! Marmelade déviré d'Aladine. D'or, Noël: crèche (l'an ici taverne gelée dès bol...) à santon givré, fi!, culé de l'âne vairon. Lapalisse élu, gnoses sans orgueil (écru, sale, sec). Saluts: angiome. T'es si crâneur! . . . Rue. Narcisse! Témoignas-tu ! l'ascèse, là, sur ce lieu gros, nasses ongulées... S'il a pal, noria vénale de Lucifer, vignot nasal (obsédée, le genre vaticinal), eh, Cercle, on rode, nid à la dérive, Dèdale (M. . . !) ramifié? Le rôle erre, noir, et la spirale mord, y hache l'élan abêti: Espiègle (béjaune) Till: un as rusé. Il perdra. Va bene. Lis, servile repu d'électorat, cornac, Lovelace. De visu, oser ? Coq cru, ô, Degas, y'a pas, ô mime, de rein à sonder: à marin nabab, murène risée. Le trace en roc, ilote cornéen. O, grog, ale d'elixir perdu, ô, feligrane! Eh, cité, fil bu! ô ! l'anamnèse, lai d'arsenic, arrérage tué, pénétra ce sel-base de Vexin. Eh, pèlerin à (Je: devin inédit) urbanité radicale (elle s'en ira...), stérile, dodu. Espaces (été biné ? gnaule ?) verts. Nomade, il rue, ocelot. Idiot-sic rafistolé: canon! Leur cruel gibet te niera, têtard raté, pédicule d'aimé rejailli. Soleil lie, fléau, partout ire (Métro, Mer, Ville...) tu déconnes. été: bètel à brasero. Pavese versus Neandertal! O, diserts noms ni à Livarot ni à Tir! Amassez. N'obéir. Pali, tu es ici: lis abécédaires, lis portulan: l'un te sert-il? à ce défi rattrapa l'autre? Vise-t-il auquel but rêvé tu perças? Oh, arobe d'ellébore, Zarathoustra! L'ohcéan à mot (Toundra? Sahel?) à ri: Lob à nul si à ma jachère, terrain récusé, nervi, née brève l'haleine véloce de mes casse-moix à (Déni, ô!) décampé. Lu, je diverge de ma flamme titubante: une telle (étal, ce noir édicule cela mal) ascèse drue tua, ha, l'As. Oh, taper ! Tontes ! Oh, tillac, ô, fibule à reve l'énigme (d'idiot tu) rhétoricienne. Il, ‘dipe, Nostradamus nocturne et, si né Guelfe, zébreur à Gibelin tué (pentothal?), le faiseur d'ode protège. Ipéca...: lapsus. Eject à bleu qu'aède berça sec. Un roc si bleu! Tir. ital.: palindrome tôt dialectal. Oc ? Oh, cep mort et né, mal essoré, hélé. Mon gag aplati gicle. érudit rossérecit, ça freine, benoit, net. Ta tentative en air auquel bète, turc, califat se (nom d'Ali-Baba!) sévit, pure de -- d'ac? -- submersion importune, crac, menace, vacilla, co-étreinte... Nos masses, elles dorment ? Etc... Axé ni à mort-né des bots. Rivez! Les Etna de Serial-Guevara l'égarent. N'amorcer coulevrine. Valser. Refuter. Oh, porc en exil (Orphée), miroir brisé du toc cabotin et né du Perec: Regret éternel. L'opiniâtre. L'annu- lable. Mec, Alger tua l'élan ici démission. Ru ostracisé, notarial, si peu qu'Alger, Viet-Nam (élu caméléon!), Israël, Biafra, bal à merde: celez, apôtre Luc à Jéruzalem, ah ce boxon! On à écopé, ha, le maximum Escale d'os, pare le rang inutile. Métromane ici gamelle, tu perdras. Ah, tu as rusé! Cain! Lied imité la vache (à ne pas estimer) (flic assermenté, rengagé) régit. Il évita, nerf à la bataille trompé. Hé, dorée, l'égérie pelée rape, sénile, sa vérité nue du sérum: rumeur à la laine, gel, if, feutrine, val, lieu-créche, ergot, pur, Bâtir ce lieu qu'Armada serve: if étété, éborgnas-tu l'astre sédatif? Oh, célérités ! Nef! Folie! Oh, tubez ! Le brio ne cessera, ce cap sera ta valise; l'âge: ni sel-liard (sic) ni master-(sic)-coq, ni cédrats, ni la lune brève. Tercé, sénégalais, un soleil perdra ta bétise héritée (Moi-Dieu, la vérole!) Déroba le serbe glauque, pis, ancestral, hébreu (Galba et Septime-Sévère). Cesser, vidé et nié. Tetanos. Etna dès boustrophédon répudié. Boiser. Révèle l'avare mélo, s'il t'a béni, brutal tablier vil. Adios. Pilles, pale rétine, e sel, l'acide mercanti. Feu que Judas rêve, civette imitable, tu as alerté, sort à blason, leur croc. Et nier et n'oser. Casse-t-il, ô, baiser vil ? à toi, nu désir brisé, décédé, trope percé, roc lu. Détrompe la. Morts: l'Ame, l'élan abêti, revenu. Désire ce trépas rêvé: Ci va! S'il porte, sépulcral, ce repentir, cet écrit ne perturbe le lucre: Haridelle, ta gabegie ne mord ni la plage ni l'écart. */ /* EOF */ morla-0.16.1/src/ntriples.c000066400000000000000000000073001156343060400155060ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" /* Prototypes: */ static gchar *ntriples_markup_blank (gchar * ptr); static gchar *ntriples_markup (gchar * ptr); gchar * ntriples (librdf_node * node) { librdf_uri *uri; GString *str; gchar *tmp; if (!node) return NULL; str = g_string_new (NULL); switch (librdf_node_get_type (node)) { case LIBRDF_NODE_TYPE_RESOURCE: uri = librdf_node_get_uri (node); tmp = ntriples_markup ((gchar *) librdf_uri_as_string (uri)); g_string_append_printf (str, " <%s>", tmp); g_free (tmp); break; case LIBRDF_NODE_TYPE_BLANK: tmp = ntriples_markup_blank ((gchar *) librdf_node_get_blank_identifier (node)); g_string_append_printf (str, " _:%s", tmp); g_free (tmp); break; case LIBRDF_NODE_TYPE_LITERAL: tmp = ntriples_markup ((gchar *) librdf_node_get_literal_value (node)); g_string_append_printf (str, " \"%s\"", tmp); g_free (tmp); if ((tmp = (gchar *) librdf_node_get_literal_value_language (node))) { tmp = ntriples_markup (tmp); g_string_append_printf (str, "@%s", tmp); g_free (tmp); } if ((uri = librdf_node_get_literal_value_datatype_uri (node))) { tmp = ntriples_markup ((gchar *) librdf_uri_as_string (uri)); g_string_append_printf (str, "^^%s", tmp); g_free (tmp); } break; default: break; } return g_string_free (str, FALSE); } static gchar * ntriples_markup (gchar * ptr) { gunichar unichr; GString *ret; ret = g_string_new (NULL); while ((unichr = g_utf8_get_char (ptr))) { ptr = g_utf8_next_char (ptr); if (unichr >= 0x20 && unichr <= 0x7E) { switch (unichr) { case '\\': g_string_append_printf (ret, "\\\\"); break; case '\"': g_string_append_printf (ret, "\\\""); break; case '\n': g_string_append_printf (ret, "\\\n"); break; case '\r': g_string_append_printf (ret, "\\\r"); break; case '\t': g_string_append_printf (ret, "\\\t"); break; default: g_string_append_printf (ret, "%c", unichr); break; } } else if (unichr < 0x10000) g_string_append_printf (ret, "\\u%.4X", unichr); else g_string_append_printf (ret, "\\U%.8X", unichr); } return g_string_free (ret, FALSE); } static gchar * ntriples_markup_blank (gchar * ptr) { gunichar unichr; gboolean first = TRUE; gchar *ret; gint j = 0; ret = g_malloc (strlen (ptr) + 1); while ((unichr = g_utf8_get_char (ptr))) { ptr = g_utf8_next_char (ptr); if ((unichr >= 'A' && unichr <= 'Z') || (unichr >= 'a' && unichr <= 'z') || (first == FALSE ? (unichr >= '0' && unichr <= '9') : 0)) ret[j++] = unichr; first = FALSE; } ret[j] = 0; return ret; } /* EOF */ morla-0.16.1/src/preferences.c000066400000000000000000003201341156343060400161520ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" struct preferences_node_t { GtkWidget *image; GtkWidget *color; GtkWidget *fontcolor; GtkWidget *style; GtkWidget *fillcolor; GtkWidget *shape; GtkWidget *font; void (*renderer) (struct preferences_node_t *, GtkWidget * pb); }; static void create_node (struct preferences_node_t *, GtkWidget * pb); static void create_edge (struct preferences_node_t *, GtkWidget * pb); static void create_object (struct preferences_node_t *); static void conf_refresh (GtkWidget * w, struct preferences_node_t *); static void color_refresh (GtkWidget * w, gpointer dummy); static void preferences_renderer (struct preferences_node_t *, GtkWidget * pb); static gboolean on_ebox_enter (GtkWidget * box, GdkEventCrossing * event, GtkLabel * label); static gboolean on_ebox_leave (GtkWidget * box, GdkEventCrossing * event, GtkLabel * label); static void on_ebox_press (GtkWidget * box); static void set_style (GtkWidget * w, GtkStyle * s); static gboolean preferences_wait (gchar ** array, GtkWidget * pb); static void preferences_switch (GtkWidget * w, GtkWidget * box); static void preferences_highlighting_free (void); static void preferences_highlighting_free_single (struct tag_t *); static void preferences_highlighting_add (GtkWidget * button, GtkWidget * treeview); static void preferences_highlighting_rename (GtkWidget * button, GtkWidget * treeview); static void preferences_highlighting_remove (GtkWidget * button, GtkWidget * treeview); static void preferences_highlighting_selection (GtkTreeSelection * selection, GtkWidget * frame); static void preferences_highlighting_refresh (GtkWidget * treeview); static void preferences_highlighting_save (GtkWidget * button, GtkTreeView * treeview); static void preferences_highlighting_demo (GtkWidget *, struct tag_t *tag); static void preferences_highlighting_reset (GtkWidget * w, GtkWidget * treeview); #ifdef USE_GCONF static void preferences_proxy (GtkWidget * w, GtkWidget * hbox); static void preferences_proxy_gconf (GtkWidget * w, GtkWidget * proxy); #endif /* Questa funzione configura le preferenze */ void preferences (void) { GtkWidget *dialog; GtkWidget *notebook; GtkWidget *frame; GtkWidget *box; GtkWidget *gbox; GtkWidget *vbox; GtkWidget *hbox; GtkWidget *label; GtkWidget *browser; GtkWidget *viewer; GtkWidget *update; GtkWidget *blanknode; GtkWidget *help; GtkWidget *updated; GtkWidget *extensions; GtkWidget *undo; GtkWidget *last_document; GtkWidget *button; GtkWidget *format; GtkWidget *nbg_color; GtkWidget *nfg_color; GtkWidget *pbg_color; GtkWidget *pfg_color; GtkListStore *store; GtkTreeIter iter; GtkCellRenderer *renderer; GtkObject *adj; GdkColor color; gchar s[1024]; GtkWidget *proxy; #ifdef USE_GCONF GtkWidget *proxy_gconf; #endif GtkWidget *proxy_server; GtkWidget *proxy_port; GtkWidget *proxy_user; GtkWidget *proxy_password; GtkWidget *scrolledwindow; GtkWidget *treeview; GtkTreeSelection *selection; GtkTreeViewColumn *column; GList *list; GtkWidget *highlighting; GtkWidget *highlighting_demo; GtkWidget *wait; GtkWidget *pb; struct preferences_node_t edge; struct preferences_node_t node_r; struct preferences_node_t node_l; struct preferences_node_t node_b; memset (&edge, 0, sizeof (struct preferences_node_t)); memset (&node_r, 0, sizeof (struct preferences_node_t)); memset (&node_l, 0, sizeof (struct preferences_node_t)); memset (&node_b, 0, sizeof (struct preferences_node_t)); dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Preferences...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); notebook = gtk_notebook_new (); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, TRUE, TRUE, 0); /* GENERAL */ gbox = gtk_vbox_new (FALSE, 8); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), gbox, gtk_label_new (_("General"))); frame = gtk_frame_new (_("Softwares")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("Select your web browser:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); browser = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), browser, TRUE, TRUE, 5); gtk_entry_set_text (GTK_ENTRY (browser), browser_default); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("Select your image viewer:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); viewer = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), viewer, TRUE, TRUE, 5); gtk_entry_set_text (GTK_ENTRY (viewer), viewer_default); label = gtk_label_new (_("'%s' = url or image")); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 5); frame = gtk_frame_new (_("Undo and Redo")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_container_add (GTK_CONTAINER (frame), hbox); label = gtk_label_new (_("Select your undo level:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); adj = gtk_adjustment_new (undo_max_value, 1, 60, 1, 10, 10); undo = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0); gtk_box_pack_start (GTK_BOX (hbox), undo, TRUE, TRUE, 5); frame = gtk_frame_new (_("Last Documents")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_container_add (GTK_CONTAINER (frame), hbox); label = gtk_label_new (_("Select your last documents history:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); adj = gtk_adjustment_new (last_document_value, 1, 60, 1, 10, 10); last_document = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0); gtk_box_pack_start (GTK_BOX (hbox), last_document, TRUE, TRUE, 5); frame = gtk_frame_new (_("Show update")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_container_add (GTK_CONTAINER (frame), hbox); label = gtk_label_new (_("Show with popup:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); updated = gtk_check_button_new (); gtk_box_pack_start (GTK_BOX (hbox), updated, TRUE, TRUE, 5); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (updated), update_show >= 0 ? TRUE : FALSE); frame = gtk_frame_new (_("Update Server")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_container_add (GTK_CONTAINER (frame), hbox); label = gtk_label_new (_("Set the update server:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); update = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), update, TRUE, TRUE, 5); gtk_entry_set_text (GTK_ENTRY (update), update_url); frame = gtk_frame_new (_("Documentation Server")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("Set the documentation server:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); help = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), help, TRUE, TRUE, 5); gtk_entry_set_text (GTK_ENTRY (help), help_url); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("(This input can be a directory of a remote server)")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); frame = gtk_frame_new (_("Blank node name")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("Set the blank node name:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); blanknode = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), blanknode, TRUE, TRUE, 5); gtk_entry_set_text (GTK_ENTRY (blanknode), blanknode_name); hbox = gtk_hbox_new (TRUE, 8); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 5); label = gtk_label_new (_ ("(You can use '%d' if you want specify where the number should be: the_%d_blank_node)")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); frame = gtk_frame_new (_("Automatic Extensions")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); hbox = gtk_hbox_new (TRUE, 8); gtk_container_add (GTK_CONTAINER (frame), hbox); label = gtk_label_new (_("Set automatic extensions:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); extensions = gtk_check_button_new (); gtk_box_pack_start (GTK_BOX (hbox), extensions, TRUE, TRUE, 5); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (extensions), automatic_extensions); /* INTERFACE */ gbox = gtk_vbox_new (FALSE, 8); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), gbox, gtk_label_new (_("Interface"))); frame = gtk_frame_new (_("Colors")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), vbox); hbox = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Normal Background:")); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); nbg_color = gtk_color_button_new (); gdk_color_parse (normal_bg_color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (nbg_color), &color); gtk_box_pack_start (GTK_BOX (hbox), nbg_color, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Normal Foreground:")); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); nfg_color = gtk_color_button_new (); gdk_color_parse (normal_fg_color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (nfg_color), &color); gtk_box_pack_start (GTK_BOX (hbox), nfg_color, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Prelight Background:")); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); pbg_color = gtk_color_button_new (); gdk_color_parse (prelight_bg_color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (pbg_color), &color); gtk_box_pack_start (GTK_BOX (hbox), pbg_color, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); label = gtk_label_new (_("Prelight Foreground:")); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); pfg_color = gtk_color_button_new (); gdk_color_parse (prelight_fg_color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (pfg_color), &color); gtk_box_pack_start (GTK_BOX (hbox), pfg_color, TRUE, TRUE, 0); frame = gtk_frame_new (_("Preview")); gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (nbg_color), "nbg_color", nbg_color); g_object_set_data (G_OBJECT (nbg_color), "nfg_color", nfg_color); g_object_set_data (G_OBJECT (nbg_color), "pbg_color", pbg_color); g_object_set_data (G_OBJECT (nbg_color), "pfg_color", pfg_color); g_object_set_data (G_OBJECT (nbg_color), "frame", frame); g_object_set_data (G_OBJECT (nfg_color), "nbg_color", nbg_color); g_object_set_data (G_OBJECT (nfg_color), "nfg_color", nfg_color); g_object_set_data (G_OBJECT (nfg_color), "pbg_color", pbg_color); g_object_set_data (G_OBJECT (nfg_color), "pfg_color", pfg_color); g_object_set_data (G_OBJECT (nfg_color), "frame", frame); g_object_set_data (G_OBJECT (pbg_color), "nbg_color", nbg_color); g_object_set_data (G_OBJECT (pbg_color), "nfg_color", nfg_color); g_object_set_data (G_OBJECT (pbg_color), "pbg_color", pbg_color); g_object_set_data (G_OBJECT (pbg_color), "pfg_color", pfg_color); g_object_set_data (G_OBJECT (pbg_color), "frame", frame); g_object_set_data (G_OBJECT (pfg_color), "nbg_color", nbg_color); g_object_set_data (G_OBJECT (pfg_color), "nfg_color", nfg_color); g_object_set_data (G_OBJECT (pfg_color), "pbg_color", pbg_color); g_object_set_data (G_OBJECT (pfg_color), "pfg_color", pfg_color); g_object_set_data (G_OBJECT (pfg_color), "frame", frame); g_signal_connect ((gpointer) nbg_color, "color_set", G_CALLBACK (color_refresh), NULL); g_signal_connect ((gpointer) nfg_color, "color_set", G_CALLBACK (color_refresh), NULL); g_signal_connect ((gpointer) pbg_color, "color_set", G_CALLBACK (color_refresh), NULL); g_signal_connect ((gpointer) pfg_color, "color_set", G_CALLBACK (color_refresh), NULL); color_refresh (pfg_color, NULL); /* GRAPH */ gbox = gtk_vbox_new (FALSE, 8); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), gbox, gtk_label_new (_("Graphs"))); frame = gtk_frame_new (_("Resource nodes")); gtk_box_pack_start (GTK_BOX (gbox), frame, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), hbox); vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_r.color = gtk_color_button_new (); gdk_color_parse (graph_resource_node.color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_r.color), &color); gtk_box_pack_start (GTK_BOX (box), node_r.color, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_r.fontcolor = gtk_color_button_new (); gdk_color_parse (graph_resource_node.fontcolor, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_r.fontcolor), &color); gtk_box_pack_start (GTK_BOX (box), node_r.fontcolor, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Style:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("filled"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("solid"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dashed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dotted"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("bold"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("invis"), -1); node_r.style = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); if (!strcmp (graph_resource_node.style, "filled")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.style), 0); else if (!strcmp (graph_resource_node.style, "solid")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.style), 1); else if (!strcmp (graph_resource_node.style, "dashed")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.style), 2); else if (!strcmp (graph_resource_node.style, "dotted")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.style), 3); else if (!strcmp (graph_resource_node.style, "bold")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.style), 4); else if (!strcmp (graph_resource_node.style, "invis")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.style), 5); gtk_box_pack_start (GTK_BOX (box), node_r.style, TRUE, TRUE, 0); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (node_r.style), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (node_r.style), renderer, "text", 0, NULL); g_object_unref (store); vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Fill Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_r.fillcolor = gtk_color_button_new (); gdk_color_parse (graph_resource_node.fillcolor, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_r.fillcolor), &color); gtk_box_pack_start (GTK_BOX (box), node_r.fillcolor, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Shape:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("plaintext"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("ellipse"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("circle"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("egg"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("triangle"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("box"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("diamond"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("trapezium"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("parallelogram"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("house"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("hexagon"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("octagon"), -1); node_r.shape = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 0); gtk_box_pack_start (GTK_BOX (box), node_r.shape, TRUE, TRUE, 0); if (!strcmp (graph_resource_node.shape, "plaintext")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 0); else if (!strcmp (graph_resource_node.shape, "ellipse")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 1); else if (!strcmp (graph_resource_node.shape, "circle")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 2); else if (!strcmp (graph_resource_node.shape, "egg")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 3); else if (!strcmp (graph_resource_node.shape, "triangle")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 4); else if (!strcmp (graph_resource_node.shape, "box")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 5); else if (!strcmp (graph_resource_node.shape, "diamond")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 6); else if (!strcmp (graph_resource_node.shape, "trapezium")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 7); else if (!strcmp (graph_resource_node.shape, "parallelogram")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 8); else if (!strcmp (graph_resource_node.shape, "house")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 9); else if (!strcmp (graph_resource_node.shape, "hexagon")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 10); else if (!strcmp (graph_resource_node.shape, "octagon")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_r.shape), 11); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (node_r.shape), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (node_r.shape), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_r.font = gtk_font_button_new (); g_snprintf (s, sizeof (s), "%s %d", graph_resource_node.fontname, graph_resource_node.fontsize); gtk_font_button_set_font_name (GTK_FONT_BUTTON (node_r.font), s); gtk_box_pack_start (GTK_BOX (box), node_r.font, TRUE, TRUE, 0); frame = gtk_frame_new (_("Preview")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); node_r.image = gtk_image_new (); g_object_set_data (G_OBJECT (node_r.image), "label", _("Resource")); gtk_container_add (GTK_CONTAINER (frame), node_r.image); /* BLANK NODE */ frame = gtk_frame_new (_("Blank nodes")); gtk_box_pack_start (GTK_BOX (gbox), frame, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), hbox); vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_b.color = gtk_color_button_new (); gdk_color_parse (graph_blank_node.color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_b.color), &color); gtk_box_pack_start (GTK_BOX (box), node_b.color, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_b.fontcolor = gtk_color_button_new (); gdk_color_parse (graph_blank_node.fontcolor, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_b.fontcolor), &color); gtk_box_pack_start (GTK_BOX (box), node_b.fontcolor, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Style:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("filled"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("solid"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dashed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dotted"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("bold"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("invis"), -1); node_b.style = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); if (!strcmp (graph_blank_node.style, "filled")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.style), 0); else if (!strcmp (graph_blank_node.style, "solid")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.style), 1); else if (!strcmp (graph_blank_node.style, "dashed")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.style), 2); else if (!strcmp (graph_blank_node.style, "dotted")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.style), 3); else if (!strcmp (graph_blank_node.style, "bold")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.style), 4); else if (!strcmp (graph_blank_node.style, "invis")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.style), 5); gtk_box_pack_start (GTK_BOX (box), node_b.style, TRUE, TRUE, 0); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (node_b.style), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (node_b.style), renderer, "text", 0, NULL); g_object_unref (store); vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Fill Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_b.fillcolor = gtk_color_button_new (); gdk_color_parse (graph_blank_node.fillcolor, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_b.fillcolor), &color); gtk_box_pack_start (GTK_BOX (box), node_b.fillcolor, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Shape:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("plaintext"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("ellipse"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("circle"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("egg"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("triangle"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("box"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("diamond"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("trapezium"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("parallelogram"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("house"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("hexagon"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("octagon"), -1); node_b.shape = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 0); gtk_box_pack_start (GTK_BOX (box), node_b.shape, TRUE, TRUE, 0); if (!strcmp (graph_blank_node.shape, "plaintext")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 0); else if (!strcmp (graph_blank_node.shape, "ellipse")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 1); else if (!strcmp (graph_blank_node.shape, "circle")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 2); else if (!strcmp (graph_blank_node.shape, "egg")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 3); else if (!strcmp (graph_blank_node.shape, "triangle")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 4); else if (!strcmp (graph_blank_node.shape, "box")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 5); else if (!strcmp (graph_blank_node.shape, "diamond")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 6); else if (!strcmp (graph_blank_node.shape, "trapezium")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 7); else if (!strcmp (graph_blank_node.shape, "parallelogram")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 8); else if (!strcmp (graph_blank_node.shape, "house")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 9); else if (!strcmp (graph_blank_node.shape, "hexagon")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 10); else if (!strcmp (graph_blank_node.shape, "octagon")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_b.shape), 11); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (node_b.shape), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (node_b.shape), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_b.font = gtk_font_button_new (); g_snprintf (s, sizeof (s), "%s %d", graph_blank_node.fontname, graph_blank_node.fontsize); gtk_font_button_set_font_name (GTK_FONT_BUTTON (node_b.font), s); gtk_box_pack_start (GTK_BOX (box), node_b.font, TRUE, TRUE, 0); frame = gtk_frame_new (_("Preview")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); node_b.image = gtk_image_new (); g_object_set_data (G_OBJECT (node_b.image), "label", _("Blank node")); gtk_container_add (GTK_CONTAINER (frame), node_b.image); /* LITERAL */ frame = gtk_frame_new (_("Literal nodes")); gtk_box_pack_start (GTK_BOX (gbox), frame, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), hbox); vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_l.color = gtk_color_button_new (); gdk_color_parse (graph_literal_node.color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_l.color), &color); gtk_box_pack_start (GTK_BOX (box), node_l.color, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_l.fontcolor = gtk_color_button_new (); gdk_color_parse (graph_literal_node.fontcolor, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_l.fontcolor), &color); gtk_box_pack_start (GTK_BOX (box), node_l.fontcolor, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Style:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("filled"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("solid"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dashed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dotted"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("bold"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("invis"), -1); node_l.style = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); if (!strcmp (graph_literal_node.style, "filled")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.style), 0); else if (!strcmp (graph_literal_node.style, "solid")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.style), 1); else if (!strcmp (graph_literal_node.style, "dashed")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.style), 2); else if (!strcmp (graph_literal_node.style, "dotted")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.style), 3); else if (!strcmp (graph_literal_node.style, "bold")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.style), 4); else if (!strcmp (graph_literal_node.style, "invis")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.style), 5); gtk_box_pack_start (GTK_BOX (box), node_l.style, TRUE, TRUE, 0); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (node_l.style), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (node_l.style), renderer, "text", 0, NULL); g_object_unref (store); vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Fill Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_l.fillcolor = gtk_color_button_new (); gdk_color_parse (graph_literal_node.fillcolor, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (node_l.fillcolor), &color); gtk_box_pack_start (GTK_BOX (box), node_l.fillcolor, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Shape:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("plaintext"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("ellipse"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("circle"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("egg"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("triangle"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("box"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("diamond"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("trapezium"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("parallelogram"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("house"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("hexagon"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("octagon"), -1); node_l.shape = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 0); gtk_box_pack_start (GTK_BOX (box), node_l.shape, TRUE, TRUE, 0); if (!strcmp (graph_literal_node.shape, "plaintext")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 0); else if (!strcmp (graph_literal_node.shape, "ellipse")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 1); else if (!strcmp (graph_literal_node.shape, "circle")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 2); else if (!strcmp (graph_literal_node.shape, "egg")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 3); else if (!strcmp (graph_literal_node.shape, "triangle")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 4); else if (!strcmp (graph_literal_node.shape, "box")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 5); else if (!strcmp (graph_literal_node.shape, "diamond")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 6); else if (!strcmp (graph_literal_node.shape, "trapezium")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 7); else if (!strcmp (graph_literal_node.shape, "parallelogram")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 8); else if (!strcmp (graph_literal_node.shape, "house")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 9); else if (!strcmp (graph_literal_node.shape, "hexagon")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 10); else if (!strcmp (graph_literal_node.shape, "octagon")) gtk_combo_box_set_active (GTK_COMBO_BOX (node_l.shape), 11); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (node_l.shape), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (node_l.shape), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); node_l.font = gtk_font_button_new (); g_snprintf (s, sizeof (s), "%s %d", graph_literal_node.fontname, graph_literal_node.fontsize); gtk_font_button_set_font_name (GTK_FONT_BUTTON (node_l.font), s); gtk_box_pack_start (GTK_BOX (box), node_l.font, TRUE, TRUE, 0); frame = gtk_frame_new (_("Preview")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); node_l.image = gtk_image_new (); g_object_set_data (G_OBJECT (node_l.image), "label", _("Literal")); gtk_container_add (GTK_CONTAINER (frame), node_l.image); /* EDGE */ frame = gtk_frame_new (_("Edge")); gtk_box_pack_start (GTK_BOX (gbox), frame, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), hbox); vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); edge.color = gtk_color_button_new (); gdk_color_parse (graph_edge.color, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (edge.color), &color); gtk_box_pack_start (GTK_BOX (box), edge.color, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font Color:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); edge.fontcolor = gtk_color_button_new (); gdk_color_parse (graph_edge.fontcolor, &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (edge.fontcolor), &color); gtk_box_pack_start (GTK_BOX (box), edge.fontcolor, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Font:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); edge.font = gtk_font_button_new (); g_snprintf (s, sizeof (s), "%s %d", graph_edge.fontname, graph_edge.fontsize); gtk_font_button_set_font_name (GTK_FONT_BUTTON (edge.font), s); gtk_box_pack_start (GTK_BOX (box), edge.font, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Style:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("solid"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dashed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("dotted"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("bold"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("invis"), -1); edge.style = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); if (!strcmp (graph_edge.style, "solid")) gtk_combo_box_set_active (GTK_COMBO_BOX (edge.style), 0); else if (!strcmp (graph_edge.style, "dashed")) gtk_combo_box_set_active (GTK_COMBO_BOX (edge.style), 1); else if (!strcmp (graph_edge.style, "dotted")) gtk_combo_box_set_active (GTK_COMBO_BOX (edge.style), 2); else if (!strcmp (graph_edge.style, "bold")) gtk_combo_box_set_active (GTK_COMBO_BOX (edge.style), 3); else if (!strcmp (graph_edge.style, "invis")) gtk_combo_box_set_active (GTK_COMBO_BOX (edge.style), 4); gtk_box_pack_start (GTK_BOX (box), edge.style, TRUE, TRUE, 0); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (edge.style), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (edge.style), renderer, "text", 0, NULL); g_object_unref (store); frame = gtk_frame_new (_("Preview")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); edge.image = gtk_image_new (); gtk_container_add (GTK_CONTAINER (frame), edge.image); node_r.renderer = create_node; node_b.renderer = create_node; node_l.renderer = create_node; edge.renderer = create_edge; wait = dialog_wait (NULL, NULL, &pb); preferences_renderer (&node_r, pb); preferences_renderer (&node_b, pb); preferences_renderer (&node_l, pb); preferences_renderer (&edge, pb); gtk_widget_destroy (wait); create_object (&node_r); create_object (&node_b); create_object (&node_l); create_object (&edge); /* FORMAT */ frame = gtk_frame_new (_("Output format")); gtk_box_pack_start (GTK_BOX (gbox), frame, TRUE, TRUE, 0); hbox = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), hbox); label = gtk_label_new (_("Format:")); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("png"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("jpg"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("gif"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("ps"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("svg"), -1); format = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); if (!strcmp (graph_format, "png")) gtk_combo_box_set_active (GTK_COMBO_BOX (format), 0); else if (!strcmp (graph_format, "jpg")) gtk_combo_box_set_active (GTK_COMBO_BOX (format), 1); else if (!strcmp (graph_format, "gif")) gtk_combo_box_set_active (GTK_COMBO_BOX (format), 2); else if (!strcmp (graph_format, "ps")) gtk_combo_box_set_active (GTK_COMBO_BOX (format), 3); else if (!strcmp (graph_format, "svg")) gtk_combo_box_set_active (GTK_COMBO_BOX (format), 4); gtk_box_pack_start (GTK_BOX (hbox), format, TRUE, TRUE, 0); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (format), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (format), renderer, "text", 0, NULL); g_object_unref (store); /* NETWORK */ gbox = gtk_vbox_new (FALSE, 8); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), gbox, gtk_label_new (_("Network"))); frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); proxy = gtk_check_button_new_with_label (_("Proxy")); gtk_frame_set_label_widget (GTK_FRAME (frame), proxy); hbox = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), hbox); #ifdef USE_GCONF proxy_gconf = gtk_check_button_new (); g_object_set_data (G_OBJECT (proxy), "gconf", proxy_gconf); g_signal_connect_after ((gpointer) proxy, "toggled", G_CALLBACK (preferences_proxy), hbox); #else g_signal_connect_after ((gpointer) proxy, "toggled", G_CALLBACK (preferences_switch), hbox); #endif if (!download_proxy) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (proxy), FALSE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (proxy), TRUE); #ifdef USE_GCONF preferences_proxy (proxy, hbox); #else preferences_switch (proxy, hbox); #endif vbox = gtk_vbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Proxy Server:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); proxy_server = gtk_entry_new (); if (download_proxy) gtk_entry_set_text (GTK_ENTRY (proxy_server), download_proxy); gtk_box_pack_start (GTK_BOX (box), proxy_server, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Proxy Port:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); adj = gtk_adjustment_new (download_proxy_port ? download_proxy_port : 8080, 1, 65536, 1, 10, 100); proxy_port = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0); gtk_box_pack_start (GTK_BOX (box), proxy_port, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Proxy User:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); proxy_user = gtk_entry_new (); if (download_proxy_user) gtk_entry_set_text (GTK_ENTRY (proxy_user), download_proxy_user); gtk_box_pack_start (GTK_BOX (box), proxy_user, TRUE, TRUE, 0); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0); label = gtk_label_new (_("Proxy Password:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); proxy_password = gtk_entry_new (); gtk_entry_set_visibility (GTK_ENTRY (proxy_password), FALSE); if (download_proxy_password) gtk_entry_set_text (GTK_ENTRY (proxy_password), download_proxy_password); gtk_box_pack_start (GTK_BOX (box), proxy_password, TRUE, TRUE, 0); #ifdef USE_GCONF frame = gtk_frame_new (_("Gnome")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); box = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), box); label = gtk_label_new (_("Use Gnome Setting:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), proxy_gconf, TRUE, TRUE, 0); g_signal_connect_after ((gpointer) proxy_gconf, "toggled", G_CALLBACK (preferences_proxy_gconf), proxy); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (proxy_gconf), download_proxy_gconf); #endif /* HIGHLIGHTING */ gbox = gtk_vbox_new (FALSE, 8); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), gbox, gtk_label_new (_("Highlighting"))); frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (gbox), frame, TRUE, TRUE, 0); highlighting = gtk_check_button_new_with_label (_("Highlighting")); gtk_frame_set_label_widget (GTK_FRAME (frame), highlighting); hbox = gtk_hbox_new (TRUE, 5); gtk_container_add (GTK_CONTAINER (frame), hbox); g_signal_connect_after ((gpointer) highlighting, "toggled", G_CALLBACK (preferences_switch), hbox); if (!highlighting_active) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (highlighting), FALSE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (highlighting), TRUE); preferences_switch (highlighting, hbox); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start (GTK_BOX (vbox), scrolledwindow, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); store = gtk_list_store_new (9, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_DOUBLE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Tags"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, FALSE); for (list = highlighting_tags; list; list = list->next) { GtkTreeIter iter; struct tag_t *tag = list->data; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, tag->tag, 1, tag->style, 2, tag->variant, 3, tag->weight, 4, tag->stretch, 5, tag->scale, 6, tag->foreground, 7, tag->background, 8, tag->underline, -1); } g_object_unref (store); button = gtk_button_new_from_stock ("gtk-add"); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (preferences_highlighting_add), treeview); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (preferences_highlighting_rename), treeview); box = gtk_hbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (button), box); gtk_box_pack_start (GTK_BOX (box), gtk_event_box_new (), TRUE, TRUE, 0); label = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0); label = gtk_label_new (_("Rename")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), gtk_event_box_new (), TRUE, TRUE, 0); button = gtk_button_new_from_stock ("gtk-remove"); gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (preferences_highlighting_remove), treeview); gbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), gbox, TRUE, TRUE, 0); frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (gbox), frame, TRUE, TRUE, 0); g_signal_connect ((gpointer) selection, "changed", G_CALLBACK (preferences_highlighting_selection), gbox); if (highlighting_tags) gtk_widget_set_sensitive (frame, TRUE); else gtk_widget_set_sensitive (frame, FALSE); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Style:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Normal"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Oblique"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Italic"), -1); button = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "style", button); g_signal_connect ((gpointer) button, "changed", G_CALLBACK (preferences_highlighting_save), treeview); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (button), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (button), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Variant:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Normal"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Small Caps"), -1); button = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "variant", button); g_signal_connect ((gpointer) button, "changed", G_CALLBACK (preferences_highlighting_save), treeview); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (button), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (button), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Weight:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Ultralight"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Light"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Normal"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Semibold"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Bold"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Ultrabold"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Heavy"), -1); button = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "weight", button); g_signal_connect ((gpointer) button, "changed", G_CALLBACK (preferences_highlighting_save), treeview); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (button), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (button), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Stretch:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Ultra Condensed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Extra Condensed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Condensed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Semi Condensed"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Normal"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Semi Expanded"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Expanded"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Extra Expanded"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Ultra Expanded"), -1); button = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "stretch", button); g_signal_connect ((gpointer) button, "changed", G_CALLBACK (preferences_highlighting_save), treeview); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (button), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (button), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Scale:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("XX Small"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("X Small"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Small"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Normal"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("X Large"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("XX Large"), -1); button = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "scale", button); g_signal_connect ((gpointer) button, "changed", G_CALLBACK (preferences_highlighting_save), treeview); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (button), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (button), renderer, "text", 0, NULL); g_object_unref (store); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Foreground:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); button = gtk_color_button_new (); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "foreground", button); g_signal_connect ((gpointer) button, "color-set", G_CALLBACK (preferences_highlighting_save), treeview); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Background:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); button = gtk_color_button_new (); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "background", button); g_signal_connect ((gpointer) button, "color-set", G_CALLBACK (preferences_highlighting_save), treeview); box = gtk_hbox_new (TRUE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 0); label = gtk_label_new (_("Underline:")); gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); store = gtk_list_store_new (1, G_TYPE_STRING); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("None"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Single"), -1); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("Double"), -1); button = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (treeview), "underline", button); g_signal_connect ((gpointer) button, "changed", G_CALLBACK (preferences_highlighting_save), treeview); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (button), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (button), renderer, "text", 0, NULL); g_object_unref (store); button = gtk_button_new_with_label (_("Reset the default tags")); gtk_box_pack_start (GTK_BOX (gbox), button, FALSE, FALSE, 0); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (preferences_highlighting_reset), treeview); frame = gtk_frame_new (_("Demo")); gtk_box_pack_start (GTK_BOX (gbox), frame, FALSE, FALSE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); highlighting_demo = textview_new (NULL, NULL); g_object_set_data (G_OBJECT (treeview), "demo", highlighting_demo); gtk_container_add (GTK_CONTAINER (scrolledwindow), highlighting_demo); gtk_text_view_set_editable (GTK_TEXT_VIEW (highlighting_demo), FALSE); gtk_widget_set_size_request (highlighting_demo, -1, 150); store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter) == TRUE) { gtk_tree_selection_select_iter (selection, &iter); preferences_highlighting_selection (selection, gbox); } else { gtk_tree_selection_unselect_all (selection); preferences_highlighting_selection (selection, gbox); } /* OTHER */ button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { gboolean need_refresh = 0; gchar *b_text, *v_text, *u_text, *h_text, *bn_text; gchar *tmp; GdkColor c; gchar *fontname; gchar *c_text; gint i; /* SOFTWARES */ b_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (browser)); v_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (viewer)); u_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (update)); bn_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (blanknode)); h_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (help)); if (!b_text || !*b_text) { dialog_msg (_("No a compatible web browser!")); continue; } if (!v_text || !*v_text) { dialog_msg (_("No a compatible image viewer!")); continue; } if (!u_text || !*u_text) { dialog_msg (_("No a compatible update server!")); continue; } if (!h_text || !*h_text) { dialog_msg (_("No a compatible documentation server!")); continue; } if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (proxy)) == TRUE && (!(tmp = (gchar *) gtk_entry_get_text (GTK_ENTRY (proxy_server))) || !*tmp)) { dialog_msg (_("No a valid proxy value!")); continue; } g_free (browser_default); browser_default = g_strdup (b_text); g_free (viewer_default); viewer_default = g_strdup (v_text); undo_max_value = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (undo)); unredo_change_value (); last_document_value = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (last_document)); last_change_value (); g_free (update_url); update_url = g_strdup (u_text); g_free (help_url); help_url = g_strdup (h_text); g_free (blanknode_name); if (!bn_text || !*bn_text) blanknode_name = g_strdup (BLANK_NODE); else blanknode_name = g_strdup (bn_text); i = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (updated)); if (i == FALSE) update_show = -1; else if (update_show != 0) update_show = 1; automatic_extensions = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (extensions)); /* COLOR */ gtk_color_button_get_color (GTK_COLOR_BUTTON (nbg_color), &c); c_text = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); if (strcmp (normal_bg_color, c_text)) { g_free (normal_bg_color); normal_bg_color = c_text; need_refresh = 1; } else g_free (c_text); gtk_color_button_get_color (GTK_COLOR_BUTTON (nfg_color), &c); c_text = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); if (strcmp (normal_fg_color, c_text)) { g_free (normal_fg_color); normal_fg_color = c_text; need_refresh = 1; } else g_free (c_text); gtk_color_button_get_color (GTK_COLOR_BUTTON (pbg_color), &c); c_text = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); if (strcmp (prelight_bg_color, c_text)) { g_free (prelight_bg_color); prelight_bg_color = c_text; need_refresh = 1; } else g_free (c_text); gtk_color_button_get_color (GTK_COLOR_BUTTON (pfg_color), &c); c_text = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); if (strcmp (prelight_fg_color, c_text)) { g_free (prelight_fg_color); prelight_fg_color = c_text; need_refresh = 1; } else g_free (c_text); /* RESOURCE */ g_free (graph_resource_node.color); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_r.color), &c); graph_resource_node.color = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_resource_node.fontcolor); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_r.fontcolor), &c); graph_resource_node.fontcolor = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_resource_node.style); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node_r.style))) { case 0: graph_resource_node.style = g_strdup ("filled"); break; case 1: graph_resource_node.style = g_strdup ("solid"); break; case 2: graph_resource_node.style = g_strdup ("dashed"); break; case 3: graph_resource_node.style = g_strdup ("dotted"); break; case 4: graph_resource_node.style = g_strdup ("bold"); break; default: graph_resource_node.style = g_strdup ("invis"); break; } g_free (graph_resource_node.fillcolor); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_r.fillcolor), &c); graph_resource_node.fillcolor = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_resource_node.shape); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node_r.shape))) { case 0: graph_resource_node.shape = g_strdup ("plaintext"); break; case 1: graph_resource_node.shape = g_strdup ("ellipse"); break; case 2: graph_resource_node.shape = g_strdup ("circle"); break; case 3: graph_resource_node.shape = g_strdup ("egg"); break; case 4: graph_resource_node.shape = g_strdup ("triangle"); break; case 5: graph_resource_node.shape = g_strdup ("box"); break; case 6: graph_resource_node.shape = g_strdup ("diamond"); break; case 7: graph_resource_node.shape = g_strdup ("trapezium"); break; case 8: graph_resource_node.shape = g_strdup ("parallelogram"); break; case 9: graph_resource_node.shape = g_strdup ("house"); break; case 10: graph_resource_node.shape = g_strdup ("hexagon"); break; default: graph_resource_node.shape = g_strdup ("octagon"); break; } fontname = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (node_r.font))); for (i = strlen (fontname); i != 0; i--) if (fontname[i] == ' ') break; if (i) { graph_resource_node.fontsize = atoi (fontname + i + 1); fontname[i] = 0; } g_free (graph_resource_node.fontname); graph_resource_node.fontname = g_strdup (fontname); g_free (fontname); /* BLANK */ g_free (graph_blank_node.color); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_b.color), &c); graph_blank_node.color = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_blank_node.fontcolor); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_b.fontcolor), &c); graph_blank_node.fontcolor = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_blank_node.style); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node_b.style))) { case 0: graph_blank_node.style = g_strdup ("filled"); break; case 1: graph_blank_node.style = g_strdup ("solid"); break; case 2: graph_blank_node.style = g_strdup ("dashed"); break; case 3: graph_blank_node.style = g_strdup ("dotted"); break; case 4: graph_blank_node.style = g_strdup ("bold"); break; default: graph_blank_node.style = g_strdup ("invis"); break; } g_free (graph_blank_node.fillcolor); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_b.fillcolor), &c); graph_blank_node.fillcolor = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_blank_node.shape); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node_b.shape))) { case 0: graph_blank_node.shape = g_strdup ("plaintext"); break; case 1: graph_blank_node.shape = g_strdup ("ellipse"); break; case 2: graph_blank_node.shape = g_strdup ("circle"); break; case 3: graph_blank_node.shape = g_strdup ("egg"); break; case 4: graph_blank_node.shape = g_strdup ("triangle"); break; case 5: graph_blank_node.shape = g_strdup ("box"); break; case 6: graph_blank_node.shape = g_strdup ("diamond"); break; case 7: graph_blank_node.shape = g_strdup ("trapezium"); break; case 8: graph_blank_node.shape = g_strdup ("parallelogram"); break; case 9: graph_blank_node.shape = g_strdup ("house"); break; case 10: graph_blank_node.shape = g_strdup ("hexagon"); break; default: graph_blank_node.shape = g_strdup ("octagon"); break; } fontname = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (node_b.font))); for (i = strlen (fontname); i != 0; i--) if (fontname[i] == ' ') break; if (i) { graph_blank_node.fontsize = atoi (fontname + i + 1); fontname[i] = 0; } g_free (graph_blank_node.fontname); graph_blank_node.fontname = g_strdup (fontname); g_free (fontname); /* LITERAL */ g_free (graph_literal_node.color); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_l.color), &c); graph_literal_node.color = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_literal_node.fontcolor); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_l.fontcolor), &c); graph_literal_node.fontcolor = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_literal_node.style); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node_l.style))) { case 0: graph_literal_node.style = g_strdup ("filled"); break; case 1: graph_literal_node.style = g_strdup ("solid"); break; case 2: graph_literal_node.style = g_strdup ("dashed"); break; case 3: graph_literal_node.style = g_strdup ("dotted"); break; case 4: graph_literal_node.style = g_strdup ("bold"); break; default: graph_literal_node.style = g_strdup ("invis"); break; } g_free (graph_literal_node.fillcolor); gtk_color_button_get_color (GTK_COLOR_BUTTON (node_l.fillcolor), &c); graph_literal_node.fillcolor = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_literal_node.shape); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node_l.shape))) { case 0: graph_literal_node.shape = g_strdup ("plaintext"); break; case 1: graph_literal_node.shape = g_strdup ("ellipse"); break; case 2: graph_literal_node.shape = g_strdup ("circle"); break; case 3: graph_literal_node.shape = g_strdup ("egg"); break; case 4: graph_literal_node.shape = g_strdup ("triangle"); break; case 5: graph_literal_node.shape = g_strdup ("box"); break; case 6: graph_literal_node.shape = g_strdup ("diamond"); break; case 7: graph_literal_node.shape = g_strdup ("trapezium"); break; case 8: graph_literal_node.shape = g_strdup ("parallelogram"); break; case 9: graph_literal_node.shape = g_strdup ("house"); break; case 10: graph_literal_node.shape = g_strdup ("hexagon"); break; default: graph_literal_node.shape = g_strdup ("octagon"); break; } fontname = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (node_l.font))); for (i = strlen (fontname); i != 0; i--) if (fontname[i] == ' ') break; if (i) { graph_literal_node.fontsize = atoi (fontname + i + 1); fontname[i] = 0; } g_free (graph_literal_node.fontname); graph_literal_node.fontname = g_strdup (fontname); g_free (fontname); /* EDGE */ g_free (graph_edge.color); gtk_color_button_get_color (GTK_COLOR_BUTTON (edge.color), &c); graph_edge.color = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_edge.fontcolor); gtk_color_button_get_color (GTK_COLOR_BUTTON (edge.fontcolor), &c); graph_edge.fontcolor = g_strdup_printf ("#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); g_free (graph_edge.style); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (edge.style))) { case 0: graph_edge.style = g_strdup ("solid"); break; case 1: graph_edge.style = g_strdup ("dashed"); break; case 2: graph_edge.style = g_strdup ("dotted"); break; case 3: graph_edge.style = g_strdup ("bold"); break; default: graph_edge.style = g_strdup ("invis"); break; } fontname = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (edge.font))); for (i = strlen (fontname); i != 0; i--) if (fontname[i] == ' ') break; if (i) { graph_edge.fontsize = atoi (fontname + i + 1); fontname[i] = 0; } g_free (graph_edge.fontname); graph_edge.fontname = g_strdup (fontname); g_free (fontname); /* FORMAT */ g_free (graph_format); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (format))) { case 0: graph_format = g_strdup ("png"); break; case 1: graph_format = g_strdup ("jpg"); break; case 2: graph_format = g_strdup ("gif"); break; case 3: graph_format = g_strdup ("ps"); break; default: graph_format = g_strdup ("svg"); break; } if (need_refresh) { struct editor_data_t *data; data = editor_data; while (data) { editor_refresh (data); data = data->next; } } /* NETWORK */ #ifdef USE_GCONF download_proxy_gconf = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (proxy_gconf)); #endif if (!(tmp = (gchar *) gtk_entry_get_text (GTK_ENTRY (proxy_server))) || !*tmp) { if (download_proxy) { g_free (download_proxy); download_proxy = NULL; } } else { if (download_proxy) g_free (download_proxy); download_proxy = g_strdup (tmp); } download_proxy_port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (proxy_port)); if (!(tmp = (gchar *) gtk_entry_get_text (GTK_ENTRY (proxy_user))) || !*tmp) { if (download_proxy_user) { g_free (download_proxy_user); download_proxy_user = NULL; } } else { if (download_proxy_user) g_free (download_proxy_user); download_proxy_user = g_strdup (tmp); } if (!(tmp = (gchar *) gtk_entry_get_text (GTK_ENTRY (proxy_password))) || !*tmp) { if (download_proxy_password) { g_free (download_proxy_password); download_proxy_password = NULL; } } else { if (download_proxy_password) g_free (download_proxy_password); download_proxy_password = g_strdup (tmp); } /* HIGHLIGHTING */ highlighting_active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (highlighting)); if ((store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)))) { GtkTreeIter iter; preferences_highlighting_free (); if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter) == TRUE) { struct tag_t *tag; do { tag = g_malloc0 (sizeof (struct tag_t)); highlighting_tags = g_list_append (highlighting_tags, tag); gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &tag->tag, 1, &tag->style, 2, &tag->variant, 3, &tag->weight, 4, &tag->stretch, 5, &tag->scale, 6, &tag->foreground, 7, &tag->background, 8, &tag->underline, -1); } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter) == TRUE); } } init_save (); break; } gtk_widget_destroy (dialog); } /* Crea un nodo di preview date tutti una serie di parametri: */ static void create_node (struct preferences_node_t *node, GtkWidget * pb) { gchar *tmp, *file; GdkColor c; gchar *label = g_object_get_data (G_OBJECT (node->image), "label"); gchar *fontname; gint i; FILE *fl; gchar buf[1024]; gchar *array[6]; /* Scrivo il sorgente per dot: */ tmp = editor_tmp_file (); if (!(fl = g_fopen (tmp, "wb"))) { g_free (tmp); return; } fprintf (fl, "digraph dotfile {\nrankdir=LR;\n\n"); fprintf (fl, "\"%s\" [", label); gtk_color_button_get_color (GTK_COLOR_BUTTON (node->color), &c); fprintf (fl, "color=\"#%.2X%.2X%.2X\",", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); gtk_color_button_get_color (GTK_COLOR_BUTTON (node->fontcolor), &c); fprintf (fl, "fontcolor=\"#%.2X%.2X%.2X\",", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); gtk_color_button_get_color (GTK_COLOR_BUTTON (node->fillcolor), &c); fprintf (fl, "fillcolor=\"#%.2X%.2X%.2X\",", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node->style))) { case 0: fprintf (fl, "style=\"filled\","); break; case 1: fprintf (fl, "style=\"solid\","); break; case 2: fprintf (fl, "style=\"dashed\","); break; case 3: fprintf (fl, "style=\"dotted\","); break; case 4: fprintf (fl, "style=\"bold\","); break; case 5: fprintf (fl, "style=\"invis\","); break; } switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node->shape))) { case 0: fprintf (fl, "shape=\"plaintext\","); break; case 1: fprintf (fl, "shape=\"ellipse\","); break; case 2: fprintf (fl, "shape=\"circle\","); break; case 3: fprintf (fl, "shape=\"egg\","); break; case 4: fprintf (fl, "shape=\"triangle\","); break; case 5: fprintf (fl, "shape=\"box\","); break; case 6: fprintf (fl, "shape=\"diamond\","); break; case 7: fprintf (fl, "shape=\"trapezium\","); break; case 8: fprintf (fl, "shape=\"parallelogram\","); break; case 9: fprintf (fl, "shape=\"house\","); break; case 10: fprintf (fl, "shape=\"hexagon\","); break; case 11: fprintf (fl, "shape=\"octagon\","); break; } fontname = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (node->font))); for (i = strlen (fontname); i != 0; i--) if (fontname[i] == ' ') break; if (i) { fprintf (fl, "fontsize=\"%d\",", atoi (fontname + i + 1)); fontname[i] = 0; } fprintf (fl, "fontname=\"%s\"];\n", fontname); g_free (fontname); fprintf (fl, "\n}\n\n"); fclose (fl); file = editor_tmp_file (); g_snprintf (buf, sizeof (buf), "%s.png", file); g_free (file); file = g_strdup (buf); /* Eseguo il comando: */ array[0] = dot_cmd (); array[1] = "-Tpng"; array[2] = "-o"; array[3] = file; array[4] = tmp; array[5] = NULL; if (preferences_wait (array, pb)) { g_free (file); file = NULL; } /* Rimuovo il file: */ g_remove (tmp); g_free (tmp); /* Mostro l'immagine e libero la memoria: */ if (file) { gtk_image_set_from_file (GTK_IMAGE (node->image), file); g_remove (file); g_free (file); } } /* Setta tutte le variabili all'interno dei vari oggetti: */ static void create_object (struct preferences_node_t *node) { g_signal_connect ((gpointer) node->color, "color_set", G_CALLBACK (conf_refresh), node); g_signal_connect ((gpointer) node->fontcolor, "color_set", G_CALLBACK (conf_refresh), node); g_signal_connect ((gpointer) node->style, "changed", G_CALLBACK (conf_refresh), node); if (node->fillcolor) g_signal_connect ((gpointer) node->fillcolor, "color_set", G_CALLBACK (conf_refresh), node); if (node->shape) g_signal_connect ((gpointer) node->shape, "changed", G_CALLBACK (conf_refresh), node); g_signal_connect ((gpointer) node->font, "font_set", G_CALLBACK (conf_refresh), node); } /* Questa funzione usa dot per creare un esempio di arco: */ static void create_edge (struct preferences_node_t *node, GtkWidget * pb) { gchar *tmp, *file; GdkColor c; gchar *fontname; gint i; FILE *fl; gchar buf[1024]; gchar *array[6]; tmp = editor_tmp_file (); if (!(fl = g_fopen (tmp, "wb"))) { g_free (tmp); return; } fprintf (fl, "digraph dotfile {\nrankdir=LR;\n\n"); fprintf (fl, "\"A\" -> \"B\" [label=\"edge\""); gtk_color_button_get_color (GTK_COLOR_BUTTON (node->color), &c); fprintf (fl, "color=\"#%.2X%.2X%.2X\",", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); gtk_color_button_get_color (GTK_COLOR_BUTTON (node->fontcolor), &c); fprintf (fl, "fontcolor=\"#%.2X%.2X%.2X\",", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (node->style))) { case 0: fprintf (fl, "style=\"solid\","); break; case 1: fprintf (fl, "style=\"dashed\","); break; case 2: fprintf (fl, "style=\"dotted\","); break; case 3: fprintf (fl, "style=\"bold\","); break; case 4: fprintf (fl, "style=\"invis\","); break; } fontname = g_strdup (gtk_font_button_get_font_name (GTK_FONT_BUTTON (node->font))); for (i = strlen (fontname); i != 0; i--) if (fontname[i] == ' ') break; if (i) { fprintf (fl, "fontsize=\"%d\",", atoi (fontname + i + 1)); fontname[i] = 0; } fprintf (fl, "fontname=\"%s\"];\n", fontname); g_free (fontname); fprintf (fl, "\n}\n\n"); fclose (fl); file = editor_tmp_file (); g_snprintf (buf, sizeof (buf), "%s.png", file); g_free (file); file = g_strdup (buf); array[0] = dot_cmd (); array[1] = "-Tpng"; array[2] = "-o"; array[3] = file; array[4] = tmp; array[5] = NULL; if (preferences_wait (array, pb)) { g_free (file); file = NULL; } g_remove (tmp); g_free (tmp); if (file) { gtk_image_set_from_file (GTK_IMAGE (node->image), file); g_remove (file); g_free (file); } } /* Questa funzione preleva i dati che servono per poi lanciare la funzione * che genera la preview di colori */ static void conf_refresh (GtkWidget * w, struct preferences_node_t *node) { preferences_renderer (node, NULL); } /* Questa funzione genera la preview dei colori */ static void color_refresh (GtkWidget * w, gpointer dummy) { GtkWidget *ebox; GtkWidget *label; GtkWidget *tmp; /* Prima creo: */ ebox = gtk_event_box_new (); g_object_set_data (G_OBJECT (ebox), "nbg_color", g_object_get_data (G_OBJECT (w), "nbg_color")); g_object_set_data (G_OBJECT (ebox), "nfg_color", g_object_get_data (G_OBJECT (w), "nfg_color")); g_object_set_data (G_OBJECT (ebox), "pbg_color", g_object_get_data (G_OBJECT (w), "pbg_color")); g_object_set_data (G_OBJECT (ebox), "pfg_color", g_object_get_data (G_OBJECT (w), "pfg_color")); gtk_widget_set_events (ebox, GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); gtk_widget_set_can_focus(ebox, TRUE); gtk_widget_show (ebox); label = gtk_label_new (_("Preview for these colors")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); g_signal_connect (G_OBJECT (ebox), "enter-notify-event", G_CALLBACK (on_ebox_enter), label); g_signal_connect (G_OBJECT (ebox), "leave-notify-event", G_CALLBACK (on_ebox_leave), label); gtk_widget_show (label); gtk_container_add (GTK_CONTAINER (ebox), label); g_signal_connect (G_OBJECT (ebox), "button-press-event", G_CALLBACK (on_ebox_press), NULL); tmp = g_object_get_data (G_OBJECT (w), "frame"); /* Rimovo il precedente: */ gtk_container_foreach (GTK_CONTAINER (tmp), (GtkCallback) gtk_widget_destroy, NULL); g_object_set_data (G_OBJECT (ebox), "selected", ebox); on_ebox_press (ebox); /* Inserisco: */ gtk_container_add (GTK_CONTAINER (tmp), ebox); } /* Come in maker.c */ static gboolean on_ebox_enter (GtkWidget * box, GdkEventCrossing * event, GtkLabel * label) { static GdkCursor *Cursor = NULL; (void) event; gtk_widget_set_state (GTK_WIDGET (label), GTK_STATE_PRELIGHT); if (!Cursor) Cursor = gdk_cursor_new (GDK_HAND2); gdk_window_set_cursor (box->window, Cursor); return TRUE; } /* Come in maker.c */ static gboolean on_ebox_leave (GtkWidget * box, GdkEventCrossing * event, GtkLabel * label) { (void) event; gtk_widget_set_state (GTK_WIDGET (label), GTK_STATE_NORMAL); gdk_window_set_cursor (box->window, NULL); return TRUE; } /* Questa fa switchare i colori: */ static void on_ebox_press (GtkWidget * box) { GtkStyle *style; GdkColor color; GtkWidget *tmp; style = gtk_style_copy (gtk_widget_get_default_style ()); if (g_object_get_data (G_OBJECT (box), "selected")) { tmp = g_object_get_data (G_OBJECT (box), "nbg_color"); gtk_color_button_get_color (GTK_COLOR_BUTTON (tmp), &color); style->bg[GTK_STATE_NORMAL] = color; tmp = g_object_get_data (G_OBJECT (box), "nfg_color"); gtk_color_button_get_color (GTK_COLOR_BUTTON (tmp), &color); style->fg[GTK_STATE_NORMAL] = color; tmp = g_object_get_data (G_OBJECT (box), "pfg_color"); gtk_color_button_get_color (GTK_COLOR_BUTTON (tmp), &color); style->fg[GTK_STATE_PRELIGHT] = color; g_object_steal_data (G_OBJECT (box), "selected"); } else { tmp = g_object_get_data (G_OBJECT (box), "pbg_color"); gtk_color_button_get_color (GTK_COLOR_BUTTON (tmp), &color); style->bg[GTK_STATE_NORMAL] = color; tmp = g_object_get_data (G_OBJECT (box), "nfg_color"); gtk_color_button_get_color (GTK_COLOR_BUTTON (tmp), &color); style->fg[GTK_STATE_NORMAL] = color; tmp = g_object_get_data (G_OBJECT (box), "pfg_color"); gtk_color_button_get_color (GTK_COLOR_BUTTON (tmp), &color); style->fg[GTK_STATE_PRELIGHT] = color; g_object_set_data (G_OBJECT (box), "selected", box); } set_style (box, style); g_object_unref (G_OBJECT (style)); } /* Come in maker.c */ static void set_style (GtkWidget * w, GtkStyle * s) { GList *list, *old; gtk_widget_set_style (GTK_WIDGET (w), s); if (!GTK_IS_CONTAINER (w)) return; if (!(list = old = gtk_container_get_children (GTK_CONTAINER (w)))) return; while (list) { set_style (GTK_WIDGET (list->data), s); list = list->next; } g_list_free (old); } /* Questa funzione viene lanciata al termine del comando dot */ static void preferences_wait_cb (GPid pid, gint status, gint * id) { if (status == 0) *id = 1; else *id = -1; } static gboolean preferences_wait (gchar ** array, GtkWidget * pb) { GtkWidget *window = NULL; GPid pid; gint end; gboolean done; done = pb ? FALSE : TRUE; if (done) window = dialog_wait (NULL, NULL, &pb); if (g_spawn_async (NULL, array, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &pid, NULL) == FALSE) { return 1; } end = 0; g_child_watch_add (pid, (GChildWatchFunc) preferences_wait_cb, &end); /* Mi limito ad aspettare il termine dell'altro processo preoccupandomi * solo di aggiornare l'interfaccia: */ while (!end) { gtk_progress_bar_pulse (GTK_PROGRESS_BAR (pb)); while (gtk_events_pending ()) gtk_main_iteration (); g_usleep (50000); } /* Distruggo la finestra di attesa: */ if (done) gtk_widget_destroy (window); return end > 0 ? 0 : 1; } static void preferences_renderer (struct preferences_node_t *node, GtkWidget * pb) { node->renderer (node, pb); } static void preferences_switch (GtkWidget * w, GtkWidget * box) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)) == TRUE) gtk_widget_set_sensitive (box, TRUE); else gtk_widget_set_sensitive (box, FALSE); } static void preferences_highlighting_free (void) { g_list_foreach (highlighting_tags, (GFunc) preferences_highlighting_free_single, NULL); g_list_free (highlighting_tags); highlighting_tags = NULL; } static void preferences_highlighting_free_single (struct tag_t *tag) { if (!tag) return; if (tag->tag) g_free (tag->tag); if (tag->foreground) g_free (tag->foreground); if (tag->background) g_free (tag->background); g_free (tag); } static gchar * preferences_highlighting_add_tag (GtkWindow * parent) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *label; GtkWidget *entry; GtkWidget *button; gchar s[1024]; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("New Tag...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, TRUE, TRUE, 0); label = gtk_label_new (_("New Tag")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_NO); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (dialog); while (1) { if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { gchar *what = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!what || !*what) { dialog_msg (_("The tag cann't be empty!")); continue; } what = g_strdup (what); gtk_widget_destroy (dialog); return what; } else { gtk_widget_destroy (dialog); return NULL; } } } static void preferences_highlighting_add (GtkWidget * button, GtkWidget * treeview) { GtkTreeIter iter; gchar *tag; GtkListStore *store; if (! (tag = preferences_highlighting_add_tag (GTK_WINDOW (gtk_widget_get_toplevel (button))))) return; store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, tag, 1, PANGO_STYLE_NORMAL, 2, PANGO_VARIANT_NORMAL, 3, PANGO_WEIGHT_NORMAL, 4, PANGO_STRETCH_NORMAL, 5, PANGO_SCALE_MEDIUM, 6, NULL, 7, NULL, 8, PANGO_UNDERLINE_NONE, -1); g_free (tag); } static void preferences_highlighting_rename (GtkWidget * button, GtkWidget * treeview) { gchar *tag; GtkTreeIter iter; GtkListStore *store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { dialog_msg (_("Select a tag!")); return; } if (! (tag = preferences_highlighting_add_tag (GTK_WINDOW (gtk_widget_get_toplevel (button))))) return; gtk_list_store_set (store, &iter, 0, tag, 1, PANGO_STYLE_NORMAL, 2, PANGO_VARIANT_NORMAL, 3, PANGO_WEIGHT_NORMAL, 4, PANGO_STRETCH_NORMAL, 5, PANGO_SCALE_MEDIUM, 6, NULL, 7, NULL, 8, PANGO_UNDERLINE_NONE, -1); g_free (tag); } static void preferences_highlighting_remove (GtkWidget * button, GtkWidget * treeview) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { dialog_msg (_("Select a tag!")); return; } if (dialog_ask (_("Sure to remove this tag?")) == GTK_RESPONSE_OK) gtk_list_store_remove (GTK_LIST_STORE (model), &iter); } static void preferences_highlighting_selection (GtkTreeSelection * selection, GtkWidget * box) { GtkTreeIter iter; GList *l, *list = gtk_container_get_children (GTK_CONTAINER (box)); if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { for (l = list; l; l = l->next) if (!GTK_IS_BUTTON (l->data)) gtk_widget_set_sensitive (l->data, FALSE); } else { for (l = list; l; l = l->next) if (!GTK_IS_BUTTON (l->data)) gtk_widget_set_sensitive (l->data, TRUE); preferences_highlighting_refresh ((GtkWidget *) gtk_tree_selection_get_tree_view (selection)); } g_list_free (list); } static void preferences_highlighting_refresh (GtkWidget * treeview) { GtkWidget *widget; GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); struct tag_t tag; GdkColor color; if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) return; gtk_tree_model_get (model, &iter, 0, &tag.tag, 1, &tag.style, 2, &tag.variant, 3, &tag.weight, 4, &tag.stretch, 5, &tag.scale, 6, &tag.foreground, 7, &tag.background, 8, &tag.underline, -1); widget = g_object_get_data (G_OBJECT (treeview), "style"); switch (tag.style) { case PANGO_STYLE_OBLIQUE: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); break; case PANGO_STYLE_ITALIC: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); break; } widget = g_object_get_data (G_OBJECT (treeview), "variant"); switch (tag.variant) { case PANGO_VARIANT_SMALL_CAPS: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); break; } widget = g_object_get_data (G_OBJECT (treeview), "weight"); switch (tag.weight) { case PANGO_WEIGHT_ULTRALIGHT: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); break; case PANGO_WEIGHT_LIGHT: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); break; case PANGO_WEIGHT_SEMIBOLD: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 3); break; case PANGO_WEIGHT_BOLD: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 4); break; case PANGO_WEIGHT_ULTRABOLD: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 5); break; case PANGO_WEIGHT_HEAVY: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 6); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); break; } widget = g_object_get_data (G_OBJECT (treeview), "stretch"); switch (tag.stretch) { case PANGO_STRETCH_ULTRA_CONDENSED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); break; case PANGO_STRETCH_EXTRA_CONDENSED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); break; case PANGO_STRETCH_CONDENSED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); break; case PANGO_STRETCH_SEMI_CONDENSED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 3); break; case PANGO_STRETCH_SEMI_EXPANDED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 5); break; case PANGO_STRETCH_EXPANDED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 6); break; case PANGO_STRETCH_EXTRA_EXPANDED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 7); break; case PANGO_STRETCH_ULTRA_EXPANDED: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 8); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 4); break; } widget = g_object_get_data (G_OBJECT (treeview), "scale"); if (tag.scale == PANGO_SCALE_XX_SMALL) gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); else if (tag.scale == PANGO_SCALE_X_SMALL) gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); else if (tag.scale == PANGO_SCALE_SMALL) gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); else if (tag.scale == PANGO_SCALE_LARGE) gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 4); else if (tag.scale == PANGO_SCALE_X_LARGE) gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 5); else if (tag.scale == PANGO_SCALE_XX_LARGE) gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 6); else gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 3); widget = g_object_get_data (G_OBJECT (treeview), "foreground"); gdk_color_parse (tag.foreground ? tag.foreground : "#000000", &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (widget), &color); widget = g_object_get_data (G_OBJECT (treeview), "background"); gdk_color_parse (tag.background ? tag.background : "#FFFFFF", &color); gtk_color_button_set_color (GTK_COLOR_BUTTON (widget), &color); widget = g_object_get_data (G_OBJECT (treeview), "underline"); switch (tag.underline) { case PANGO_UNDERLINE_SINGLE: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1); break; case PANGO_UNDERLINE_DOUBLE: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2); break; default: gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); break; } preferences_highlighting_demo (treeview, &tag); g_free (tag.tag); g_free (tag.background); g_free (tag.foreground); } static void preferences_highlighting_save (GtkWidget * button, GtkTreeView * treeview) { GtkWidget *widget; GtkTreeIter iter; GtkListStore *store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); GdkColor c; gchar str[1024]; struct tag_t tag; if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) return; widget = g_object_get_data (G_OBJECT (treeview), "style"); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) { case 1: gtk_list_store_set (store, &iter, 1, PANGO_STYLE_OBLIQUE, -1); break; case 2: gtk_list_store_set (store, &iter, 1, PANGO_STYLE_ITALIC, -1); break; default: gtk_list_store_set (store, &iter, 1, PANGO_STYLE_NORMAL, -1); break; } widget = g_object_get_data (G_OBJECT (treeview), "variant"); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) { case 1: gtk_list_store_set (store, &iter, 2, PANGO_VARIANT_SMALL_CAPS, -1); break; default: gtk_list_store_set (store, &iter, 2, PANGO_VARIANT_NORMAL, -1); break; } widget = g_object_get_data (G_OBJECT (treeview), "weight"); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) { case 0: gtk_list_store_set (store, &iter, 3, PANGO_WEIGHT_ULTRALIGHT, -1); break; case 1: gtk_list_store_set (store, &iter, 3, PANGO_WEIGHT_LIGHT, -1); break; case 3: gtk_list_store_set (store, &iter, 3, PANGO_WEIGHT_SEMIBOLD, -1); break; case 4: gtk_list_store_set (store, &iter, 3, PANGO_WEIGHT_BOLD, -1); break; case 5: gtk_list_store_set (store, &iter, 3, PANGO_WEIGHT_ULTRABOLD, -1); break; case 6: gtk_list_store_set (store, &iter, 3, PANGO_WEIGHT_HEAVY, -1); break; default: gtk_list_store_set (store, &iter, 3, PANGO_WEIGHT_NORMAL, -1); break; } widget = g_object_get_data (G_OBJECT (treeview), "stretch"); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) { case 0: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_ULTRA_CONDENSED, -1); break; case 1: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_EXTRA_CONDENSED, -1); break; case 2: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_CONDENSED, -1); break; case 3: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_SEMI_CONDENSED, -1); break; case 5: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_SEMI_EXPANDED, -1); break; case 6: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_EXPANDED, -1); break; case 7: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_EXTRA_EXPANDED, -1); break; case 8: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_ULTRA_EXPANDED, -1); break; default: gtk_list_store_set (store, &iter, 4, PANGO_STRETCH_NORMAL, -1); break; } widget = g_object_get_data (G_OBJECT (treeview), "scale"); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) { case 0: gtk_list_store_set (store, &iter, 5, PANGO_SCALE_XX_SMALL, -1); break; case 1: gtk_list_store_set (store, &iter, 5, PANGO_SCALE_X_SMALL, -1); break; case 2: gtk_list_store_set (store, &iter, 5, PANGO_SCALE_SMALL, -1); break; case 4: gtk_list_store_set (store, &iter, 5, PANGO_SCALE_LARGE, -1); break; case 5: gtk_list_store_set (store, &iter, 5, PANGO_SCALE_X_LARGE, -1); break; case 6: gtk_list_store_set (store, &iter, 5, PANGO_SCALE_XX_LARGE, -1); break; default: gtk_list_store_set (store, &iter, 5, PANGO_SCALE_MEDIUM, -1); break; } widget = g_object_get_data (G_OBJECT (treeview), "foreground"); gtk_color_button_get_color (GTK_COLOR_BUTTON (widget), &c); snprintf (str, sizeof (str), "#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); gtk_list_store_set (store, &iter, 6, str, -1); widget = g_object_get_data (G_OBJECT (treeview), "background"); gtk_color_button_get_color (GTK_COLOR_BUTTON (widget), &c); snprintf (str, sizeof (str), "#%.2X%.2X%.2X", (c.red >> 8), (c.green >> 8), (c.blue >> 8)); gtk_list_store_set (store, &iter, 7, str, -1); widget = g_object_get_data (G_OBJECT (treeview), "underline"); switch (gtk_combo_box_get_active (GTK_COMBO_BOX (widget))) { case 1: gtk_list_store_set (store, &iter, 8, PANGO_UNDERLINE_SINGLE, -1); break; case 2: gtk_list_store_set (store, &iter, 8, PANGO_UNDERLINE_DOUBLE, -1); break; default: gtk_list_store_set (store, &iter, 8, PANGO_UNDERLINE_NONE, -1); break; } gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &tag.tag, 1, &tag.style, 2, &tag.variant, 3, &tag.weight, 4, &tag.stretch, 5, &tag.scale, 6, &tag.foreground, 7, &tag.background, 8, &tag.underline, -1); preferences_highlighting_demo (GTK_WIDGET (treeview), &tag); g_free (tag.tag); g_free (tag.background); g_free (tag.foreground); } static void preferences_highlighting_demo (GtkWidget * treeview, struct tag_t *tag) { GtkWidget *demo = g_object_get_data (G_OBJECT (treeview), "demo"); GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (demo)); GtkTextIter start, end; textview_clean_tags (demo); textview_add_tag (demo, tag->tag, tag->style, tag->variant, tag->weight, tag->stretch, tag->scale, tag->foreground, tag->background, tag->underline); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); gtk_text_buffer_delete (buffer, &start, &end); gtk_text_buffer_get_start_iter (buffer, &start); textview_insert (demo, &start, tag->tag, -1); } static void preferences_highlighting_reset (GtkWidget * w, GtkWidget * treeview) { GtkTreeIter iter; GtkListStore *store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GList *def = init_highlighting (); GList *list; while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, NULL, 0)) gtk_list_store_remove (store, &iter); for (list = def; list; list = list->next) { GtkTreeIter iter; struct tag_t *tag = list->data; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, tag->tag, 1, tag->style, 2, tag->variant, 3, tag->weight, 4, tag->stretch, 5, tag->scale, 6, tag->foreground, 7, tag->background, 8, tag->underline, -1); } g_list_foreach (def, (GFunc) preferences_highlighting_free_single, NULL); g_list_free (def); } #ifdef USE_GCONF static void preferences_proxy (GtkWidget * w, GtkWidget * box) { GtkWidget *gconf = g_object_get_data (G_OBJECT (w), "gconf"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)) == TRUE) { gtk_widget_set_sensitive (box, TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gconf), FALSE); } else gtk_widget_set_sensitive (box, FALSE); } static void preferences_proxy_gconf (GtkWidget * w, GtkWidget * proxy) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (proxy), FALSE); } #endif /* EOF */ morla-0.16.1/src/query.c000066400000000000000000001151501156343060400150160ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #define SPARQL_EXAMPLE \ "SELECT ?x ?y ?z\n" \ "WHERE { ?x ?y ?z . }\n" #define RDQL_EXAMPLE \ "SELECT ?x, ?y, ?z\n" \ "WHERE (?x ?y ?z)\n" gboolean highlighting_active = TRUE; GList *highlighting_tags = NULL; static gchar *query_sparql_last = NULL; static gchar *query_rdql_last = NULL; static GtkWidget *query_frame = NULL; static GString *rasqal_errors = NULL; /* Struttura per il thread di parsing: */ struct data_t { gboolean flag; gboolean ret; gchar *buf; librdf_world *world; librdf_query_results *results; librdf_query *query; librdf_model *model; librdf_storage *storage; struct editor_data_t *data; gchar *name; }; static void query (gchar * format); static void query_open (GtkWidget * w, GtkWidget * textivew); static void query_save (GtkWidget * w, GtkTextBuffer * buffer); static void query_save_as (GtkWidget * w, GtkTextBuffer * buffer); static void query_results_open (GtkWidget * w, GtkWidget * scrolledwindow); static void query_results_save_as (GtkWidget * w, GtkWidget * scrolledwindow); static void query_destroy (GtkTextBuffer * buffer); static gboolean query_get_change (GtkTextBuffer * buffer); static void query_set_change (GtkTextBuffer * buffer, gboolean); static void query_changed (GtkWidget * textview, gpointer dummy); static void query_quit (GtkWidget * w, GtkWidget * dialog); static void query_cut (GtkWidget * w, GtkTextBuffer * buffer); static void query_copy (GtkWidget * w, GtkTextBuffer * buffer); static void query_paste (GtkWidget * w, GtkTextBuffer * buffer); static void query_exec (GtkTextBuffer * buffer, GtkWidget * scrolledwindow, GtkWidget * menuitem, gchar * name, struct editor_data_t *); static gboolean query_exec_real (GtkTextBuffer * buffer, GtkWidget * scrolledwindow, GtkWidget * menuitem, librdf_world * world, gchar * name, struct editor_data_t *); static gpointer query_exec_thread (struct data_t *str); static void query_exec_thread_abort (GtkWidget * widget, struct data_t *data); static void query_exec_thread_free (struct data_t *data); static GtkWidget *query_exec_texttree (GtkWidget * scrolledwindow, gboolean tree, gboolean visible); static void query_exec_show (GtkWidget * scrolledwindow, GtkWidget * menuitem, librdf_query_results * results); static void query_exec_show_bindings (GtkWidget * scrolledwindow, librdf_query_results * results); static void query_exec_show_boolean (GtkWidget * scrolledwindow, librdf_query_results * results); static void query_exec_show_graph (GtkWidget * scrolledwindow, librdf_query_results * results); static gboolean query_results_save (gchar * file, GtkWidget * scrolledwindow); static void query_insert (GtkWidget * w, GtkWidget * textview); static void query_rdfs (GtkWidget * w, GtkWidget * textview); static void query_save_session (gchar * buf, gchar * name); static void query_textview_map (GtkWidget * text); static gboolean query_prepare (GtkTextBuffer * buffer); static void query_show_errors (GtkWidget * widget, gpointer dummy); /* Apertura della quary sparql: */ void query_sparql (void) { query ("SPARQL"); } /* Rsql */ void query_rsql (void) { query ("RDQL"); } /* Apertura finestra di query: */ static void query (gchar * format) { GtkWidget *window; GtkWidget *button; GtkWidget *scrolledwindow; GtkWidget *scrolledresult; GtkWidget *textview; GtkWidget *frame; GtkWidget *box; GtkWidget *paned; GtkWidget *toolbar; GtkWidget *sep; GtkWidget *combo; GtkWidget *cbox; GtkWidget *hbox; GtkTextBuffer *buffer; GtkTextIter iter; GtkWidget *image; GtkWidget *menubar; GtkWidget *menuitem; GtkWidget *menumenu; GtkWidget *menuresult; GtkAccelGroup *accel; gchar s[1024]; GList *list; guint tid; struct editor_data_t *data = editor_get_data (); GList *resources; if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } /* Check della versione di rasqal e messaggio informativo: */ check_rasqal (); /* Setto lo statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Query a RDF file...")); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Query a RDF document")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_widget_set_size_request (window, 640, 480); textview = textview_new (G_CALLBACK (query_changed), NULL); query_textview_map (textview); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); g_object_set_data (G_OBJECT (buffer), "format", format); tid = g_timeout_add (500, (GSourceFunc) query_prepare, buffer); resources = create_resources (data); resources = create_resources_by_rdfs (resources); g_object_set_data (G_OBJECT (buffer), "resources", resources); scrolledresult = gtk_scrolled_window_new (NULL, NULL); accel = gtk_accel_group_new (); gtk_window_add_accel_group (GTK_WINDOW (window), accel); box = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), box, TRUE, TRUE, 0); menubar = gtk_menu_bar_new (); gtk_box_pack_start (GTK_BOX (box), menubar, FALSE, FALSE, 0); menuitem = gtk_menu_item_new_with_mnemonic (_("_File")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_from_stock ("gtk-quit", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_quit), window); menuitem = gtk_menu_item_new_with_mnemonic (_("_Query")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_from_stock ("gtk-open", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_open), textview); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-save", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_save), buffer); menuitem = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_save_as), buffer); menuresult = menuitem = gtk_menu_item_new_with_mnemonic (_("_Results")); gtk_widget_set_sensitive (menuitem, FALSE); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Open with Morla")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_results_open), scrolledresult); image = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_results_save_as), scrolledresult); menuitem = gtk_menu_item_new_with_mnemonic (_("_Edit")); gtk_container_add (GTK_CONTAINER (menubar), menuitem); menumenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menumenu); menuitem = gtk_image_menu_item_new_with_mnemonic (_("_Find resource")); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_insert), textview); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); gtk_widget_set_sensitive (menuitem, FALSE); menuitem = gtk_image_menu_item_new_from_stock ("gtk-cut", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_cut), buffer); menuitem = gtk_image_menu_item_new_from_stock ("gtk-copy", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_copy), buffer); menuitem = gtk_image_menu_item_new_from_stock ("gtk-paste", accel); gtk_container_add (GTK_CONTAINER (menumenu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (query_paste), buffer); /* Toolbar: */ toolbar = gtk_toolbar_new (); gtk_box_pack_start (GTK_BOX (box), toolbar, FALSE, FALSE, 0); gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-open"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_open), textview); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-save"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_save), buffer); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-save-as"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_save_as), buffer); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-cut"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_cut), buffer); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-copy"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_copy), buffer); button = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-paste"); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_paste), buffer); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); button = (GtkWidget *) gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), button); cbox = gtk_vbox_new (0, 0); gtk_container_add (GTK_CONTAINER (button), cbox); gtk_box_pack_start (GTK_BOX (cbox), gtk_event_box_new (), TRUE, TRUE, 0); hbox = gtk_hbox_new (0, 0); gtk_box_pack_start (GTK_BOX (cbox), hbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (cbox), gtk_event_box_new (), TRUE, TRUE, 0); combo = gtk_combo_box_new_text (); for (list = rdfs_list; list; list = list->next) { struct rdfs_t *rdfs = (struct rdfs_t *) list->data; gtk_combo_box_append_text (GTK_COMBO_BOX (combo), rdfs->prefix); } gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0); button = gtk_button_new_with_label (_("Insert RDFS")); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); g_object_set_data (G_OBJECT (button), "combo", combo); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_rdfs), textview); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_LARGE_TOOLBAR); button = (GtkWidget *) gtk_tool_button_new (image, _("Find Resources")); gtk_container_add (GTK_CONTAINER (toolbar), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_insert), textview); sep = (GtkWidget *) gtk_separator_tool_item_new (); gtk_container_add (GTK_CONTAINER (toolbar), sep); /* Body */ paned = gtk_vpaned_new (); gtk_box_pack_start (GTK_BOX (box), paned, TRUE, TRUE, 0); frame = gtk_frame_new (NULL); gtk_paned_pack1 (GTK_PANED (paned), frame, TRUE, TRUE); g_snprintf (s, sizeof (s), "%s %s", format, _("Text")); button = gtk_button_new_with_label (s); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_frame_set_label_widget (GTK_FRAME (frame), button); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (query_show_errors), NULL); if ((list = gtk_container_get_children (GTK_CONTAINER (button)))) { query_frame = list->data; g_list_free (list); } scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); gtk_widget_show (textview); gtk_container_add (GTK_CONTAINER (scrolledwindow), textview); gtk_widget_set_size_request (textview, -1, 200); gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), TRUE); gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0); if (!strcasecmp (format, "sparql")) textview_insert (textview, &iter, query_sparql_last ? query_sparql_last : SPARQL_EXAMPLE, -1); else if (!strcasecmp (format, "rdql")) textview_insert (textview, &iter, query_rdql_last ? query_rdql_last : RDQL_EXAMPLE, -1); frame = gtk_frame_new (_("Results")); gtk_paned_pack2 (GTK_PANED (paned), frame, TRUE, TRUE); gtk_widget_show (scrolledresult); gtk_container_add (GTK_CONTAINER (frame), scrolledresult); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledresult), GTK_SHADOW_IN); gtk_widget_set_sensitive (scrolledresult, FALSE); gtk_widget_set_size_request (scrolledresult, -1, 200); query_exec_texttree (scrolledresult, FALSE, FALSE); button = gtk_button_new_from_stock ("gtk-execute"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-close"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_NO); gtk_widget_set_can_default(button, TRUE); query_set_change (buffer, FALSE); gtk_widget_show_all (window); while (1) { /* Esecuzione: */ if (gtk_dialog_run (GTK_DIALOG (window)) == GTK_RESPONSE_OK) query_exec (buffer, scrolledresult, menuresult, format, data); else if (g_object_get_data (G_OBJECT (buffer), "file") && query_get_change (buffer) == FALSE) continue; else break; } g_source_remove (tid); gtk_widget_destroy (window); query_destroy (buffer); statusbar_set (_("Querying done!")); editor_statusbar_lock = WAIT; } /* Apertura di un file: */ static void query_open (GtkWidget * w, GtkWidget * textview) { gchar *file; gchar *contents; GError *error = NULL; GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); /* Salvare i cambiamenti? */ if (query_get_change (buffer) == FALSE) return; if (! (file = file_chooser (_("Open a QUERY file..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_OPEN, NULL))) return; /* Butto nel text view: */ if (g_file_get_contents (file, &contents, NULL, &error) == TRUE) { GtkTextIter start, end; gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); gtk_text_buffer_delete (buffer, &start, &end); gtk_text_buffer_get_start_iter (buffer, &start); textview_insert (textview, &start, contents, -1); g_free (contents); query_set_change (buffer, FALSE); } else if (error) { dialog_msg (error->message); g_error_free (error); } g_free (file); } /* Salvataggio della query: */ static void query_save (GtkWidget * w, GtkTextBuffer * buffer) { gchar *file; GtkTextIter start, end; gchar *buf; FILE *fl; if (!(file = g_object_get_data (G_OBJECT (buffer), "file"))) { query_save_as (w, buffer); return; } gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); buf = gtk_text_buffer_get_slice (buffer, &start, &end, FALSE); if (!(fl = g_fopen (file, "wb"))) { gchar s[1024]; snprintf (s, sizeof (s), _("Error creating the file '%s'!"), file); dialog_msg (s); if (buf) g_free (buf); return; } fprintf (fl, "%s", buf ? buf : ""); fclose (fl); if (buf) g_free (buf); query_set_change (buffer, FALSE); } /* Salva come: usa la funzione sopra: */ static void query_save_as (GtkWidget * w, GtkTextBuffer * buffer) { gchar *file; gchar *old_file; if (! (file = file_chooser (_("Save a QUERY in a file..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_SAVE, NULL))) return; if (g_file_test (file, G_FILE_TEST_EXISTS) && dialog_ask (_("The file exists. Overwrite?")) != GTK_RESPONSE_OK) { g_free (file); return; } if ((old_file = g_object_get_data (G_OBJECT (buffer), "file"))) g_free (old_file); g_object_set_data (G_OBJECT (buffer), "file", file); query_save (w, buffer); } /* La distruzione della finestra richiede la rimozione del nome del * file e del buffer: */ static void query_destroy (GtkTextBuffer * buffer) { gchar *file; GList *list; if ((file = g_object_get_data (G_OBJECT (buffer), "file"))) g_free (file); if ((list = g_object_get_data (G_OBJECT (buffer), "resources"))) g_list_free (list); g_object_unref (buffer); } /* Funzione per sattare il cambiamento dentro al buffer: */ static void query_set_change (GtkTextBuffer * buffer, gboolean value) { g_object_set_data (G_OBJECT (buffer), "changed", (gpointer) value); } /* Se c'e' cambiamento, chiede il saltaggio, altrimenti ritorna lo * status: */ static gboolean query_get_change (GtkTextBuffer * buffer) { if (g_object_get_data (G_OBJECT (buffer), "changed") == FALSE) return TRUE; if (dialog_ask (_("Close without save?")) == GTK_RESPONSE_OK) return TRUE; return FALSE; } /* Funzione di callback per il cambio di stato: */ static void query_changed (GtkWidget * textview, gpointer dummy) { GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); query_set_change (buffer, TRUE); } /* Chiusura: */ static void query_quit (GtkWidget * w, GtkWidget * dialog) { gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); } /* Funzioni da menu edit: */ static void query_cut (GtkWidget * w, GtkTextBuffer * buffer) { gtk_text_buffer_cut_clipboard (buffer, gtk_clipboard_get (GDK_NONE), TRUE); } static void query_copy (GtkWidget * w, GtkTextBuffer * buffer) { gtk_text_buffer_copy_clipboard (buffer, gtk_clipboard_get (GDK_NONE)); } static void query_paste (GtkWidget * w, GtkTextBuffer * buffer) { gtk_text_buffer_paste_clipboard (buffer, gtk_clipboard_get (GDK_NONE), NULL, TRUE); } /* Esecuzione della query: */ static void query_exec (GtkTextBuffer * buffer, GtkWidget * scrolledwindow, GtkWidget * menuitem, gchar * name, struct editor_data_t *data) { librdf_world *world; GString *error = NULL; /* Prelevo il mondo e setto le funzioni di errore: */ if (!(world = rdf_world ())) { dialog_msg (_("Error creating the enviroment for your query")); return; } librdf_world_set_error (world, &error, rdf_error); librdf_world_set_warning (world, &error, rdf_warning); /* Eseguo e comunico l'errore: */ if (query_exec_real (buffer, scrolledwindow, menuitem, world, name, data) == FALSE) { gchar *str; if (error) { str = g_string_free (error, FALSE); error = NULL; } else str = NULL; dialog_msg_with_error (_("Error executing the query!"), str); if (str) g_free (str); } if (error) g_string_free (error, TRUE); } /* Questa funzione controlla il thread separato per la gestione della * query, infine mostra i risultati: */ static gboolean query_exec_real (GtkTextBuffer * buffer, GtkWidget * scrolledwindow, GtkWidget * menuitem, librdf_world * world, gchar * name, struct editor_data_t *editor_data) { GtkWidget *window; GtkWidget *pb; GThread *th; struct data_t *data; gboolean ret = 0; GtkTextIter start, end; /* Creo la struttura per il thread: */ data = (struct data_t *) g_malloc0 (sizeof (struct data_t)); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); data->buf = gtk_text_buffer_get_slice (buffer, &start, &end, FALSE); data->world = world; data->name = name; data->data = editor_data; query_save_session (data->buf, name); /* Finestra di waiting con gestione dell'abort: */ window = dialog_wait (G_CALLBACK (query_exec_thread_abort), data, &pb); g_object_set_data (G_OBJECT (window), "ret", &ret); /* Nascondo il dialog perche' altrimenti la finestra di wait sta sotto: */ gtk_widget_hide (gtk_widget_get_parent (scrolledwindow)); th = g_thread_create ((GThreadFunc) query_exec_thread, data, FALSE, NULL); while (!data->flag && !ret) { gtk_progress_bar_pulse (GTK_PROGRESS_BAR (pb)); while (gtk_events_pending () && !data->flag && !ret) gtk_main_iteration (); g_usleep (50000); } gtk_widget_destroy (window); gtk_widget_show (gtk_widget_get_parent (scrolledwindow)); if (ret) return FALSE; if (data->buf) g_free (data->buf); /* Mostro i risultati se questi esistono: */ if (data->ret == TRUE && data->results) { query_exec_show (scrolledwindow, menuitem, data->results); /* Rimuovo i dati: */ librdf_free_query_results (data->results); librdf_free_query (data->query); librdf_free_model (data->model); librdf_free_storage (data->storage); } else query_exec_texttree (scrolledwindow, FALSE, FALSE); ret = data->ret; g_free (data); return ret; } /* Esecuzione del thread separato: */ static gpointer query_exec_thread (struct data_t *str) { GList *list; /* Creo un storage e un model. Infine metto tutto dentro al model: */ if (!(str->storage = librdf_new_storage (str->world, "memory", NULL, NULL))) { str->ret = FALSE; str->flag = 1; g_thread_exit (NULL); return NULL; } if (!(str->model = librdf_new_model (str->world, str->storage, NULL))) { librdf_free_storage (str->storage); str->ret = FALSE; str->flag = 1; g_thread_exit (NULL); return NULL; } for (list = str->data->rdf; list; list = list->next) { struct rdf_t *rdf = list->data; librdf_node *node; librdf_statement *statement; statement = librdf_new_statement (str->world); if (rdf_blank (str->data->rdf, rdf->subject) == FALSE) node = librdf_new_node_from_uri_string (str->world, (const unsigned char *) rdf-> subject); else node = librdf_new_node_from_blank_identifier (str->world, (const unsigned char *) rdf-> subject); librdf_statement_set_subject (statement, node); node = librdf_new_node_from_uri_string (str->world, (const unsigned char *) rdf-> predicate); librdf_statement_set_predicate (statement, node); switch (rdf->object_type) { case RDF_OBJECT_LITERAL: if (!rdf->datatype) node = librdf_new_node_from_literal (str->world, (const unsigned char *) rdf-> object, rdf->lang, 0); else { librdf_uri *uri = librdf_new_uri (str->world, (const unsigned char *) rdf-> datatype); node = librdf_new_node_from_typed_literal (str->world, (const unsigned char *) rdf->object, rdf->lang, uri); } break; case RDF_OBJECT_BLANK: node = librdf_new_node_from_blank_identifier (str->world, (const unsigned char *) rdf->object); break; case RDF_OBJECT_RESOURCE: default: node = librdf_new_node_from_uri_string (str->world, (const unsigned char *) rdf-> object); break; } librdf_statement_set_object (statement, node); librdf_model_add_statement (str->model, statement); } /* Parso la query e eseguo: */ if (! (str->query = librdf_new_query (str->world, !strcmp (str->name, "SPARQL") ? "sparql" : "rdql", NULL, (unsigned char *) str->buf, NULL))) { librdf_free_model (str->model); librdf_free_storage (str->storage); str->ret = FALSE; str->flag = 1; g_thread_exit (NULL); return NULL; } if (!(str->results = librdf_model_query_execute (str->model, str->query))) { librdf_free_query (str->query); librdf_free_model (str->model); librdf_free_storage (str->storage); str->ret = FALSE; str->flag = 1; g_thread_exit (NULL); return NULL; } str->ret = TRUE; str->flag = 1; g_thread_exit (NULL); return NULL; } /* Questa funzione imposta la funzione di abort all'interno del gestore del * thread: */ static void query_exec_thread_abort (GtkWidget * widget, struct data_t *data) { struct thread_t *new; gboolean *ret; widget = gtk_widget_get_toplevel (widget); ret = g_object_get_data (G_OBJECT (widget), "ret"); new = (struct thread_t *) g_malloc0 (sizeof (struct thread_t)); new->func = (GFunc) query_exec_thread_free; new->data = data; new->flag = &data->flag; thread_child = g_list_append (thread_child, new); *ret = 1; } /* Questa funzione libera la memoria alla chiusura del thread: */ static void query_exec_thread_free (struct data_t *data) { if (!data) return; if (data->buf) g_free (data->buf); if (data->results) { librdf_free_query_results (data->results); librdf_free_query (data->query); librdf_free_model (data->model); librdf_free_storage (data->storage); } g_free (data); } /* Creazione dell'oggetto giusto per mostrare i dati (tree o text view): */ static GtkWidget * query_exec_texttree (GtkWidget * scrolledwindow, gboolean tree, gboolean visible) { GtkWidget *widget; gtk_widget_set_sensitive (scrolledwindow, visible); gtk_container_foreach (GTK_CONTAINER (scrolledwindow), (GtkCallback) gtk_widget_destroy, NULL); if (tree == FALSE) { widget = gtk_text_view_new (); gtk_text_view_set_editable (GTK_TEXT_VIEW (widget), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (widget), FALSE); } else widget = gtk_tree_view_new (); gtk_widget_show (widget); gtk_container_add (GTK_CONTAINER (scrolledwindow), widget); return widget; } /* Mostrare i risultati lo si fa con funzioni diverse a seconda della * tipologia di risultato: */ static void query_exec_show (GtkWidget * scrolledwindow, GtkWidget * menuitem, librdf_query_results * results) { if (librdf_query_results_is_bindings (results)) { query_exec_show_bindings (scrolledwindow, results); gtk_widget_set_sensitive (menuitem, FALSE); } else if (librdf_query_results_is_boolean (results)) { query_exec_show_boolean (scrolledwindow, results); gtk_widget_set_sensitive (menuitem, FALSE); } else if (librdf_query_results_is_graph (results)) { query_exec_show_graph (scrolledwindow, results); gtk_widget_set_sensitive (menuitem, TRUE); } else { query_exec_texttree (scrolledwindow, FALSE, TRUE); gtk_widget_set_sensitive (menuitem, FALSE); } } /* Tipologia bindings: */ static void query_exec_show_bindings (GtkWidget * scrolledwindow, librdf_query_results * results) { GtkWidget *w; GtkListStore *store = NULL; GtkTreeIter iter; gboolean init = FALSE; w = query_exec_texttree (scrolledwindow, TRUE, TRUE); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (w), TRUE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (w), TRUE); while (!librdf_query_results_finished (results)) { gint len = librdf_query_results_get_bindings_count (results); gint i; /* Inizializzo lo store per il tree view: */ if (init == FALSE) { GType types[len]; init = TRUE; for (i = 0; i < len; i++) types[i] = G_TYPE_STRING; store = gtk_list_store_newv (len, types); gtk_tree_view_set_model (GTK_TREE_VIEW (w), GTK_TREE_MODEL (store)); /* Creazione delle colonne: */ for (i = 0; i < len; i++) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ((gchar *) librdf_query_results_get_binding_name (results, i), renderer, "text", i, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (w), column); gtk_tree_view_column_set_resizable (column, TRUE); } } gtk_list_store_append (store, &iter); /* Inserimento dei risultati: */ for (i = 0; i < len; i++) { librdf_node *value; gchar *str; if ((value = librdf_query_results_get_binding_value (results, i))) str = ntriples (value); else str = NULL; gtk_list_store_set (store, &iter, i, str, -1); free (str); if (value) librdf_free_node (value); } librdf_query_results_next (results); } if (store) g_object_unref (store); } /* Tipologia boolean: */ static void query_exec_show_boolean (GtkWidget * scrolledwindow, librdf_query_results * results) { GtkTextIter start; GtkTextBuffer *buffer; GtkWidget *w = query_exec_texttree (scrolledwindow, FALSE, TRUE); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w)); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_insert (buffer, &start, librdf_query_results_get_boolean (results) ? _("true") : _("false"), -1); } /* Graph usa il parsing normale dei risultati: */ static void query_exec_show_graph (GtkWidget * scrolledwindow, librdf_query_results * results) { GList *list; GList *namespace = NULL; gchar *tmp; gchar *contents; GtkWidget *w; librdf_stream *stream; if (!(stream = librdf_query_results_as_stream (results))) { query_exec_texttree (scrolledwindow, FALSE, TRUE); return; } tmp = editor_tmp_file (); list = rdf_parse_stream (stream); namespace_parse (list, &namespace); /* File temporaneo per il salvataggio: */ if (rdf_save_file (tmp, list, &namespace, RDF_FORMAT_XML) == FALSE) { dialog_msg (_("Error saving the temporary file.")); librdf_free_stream (stream); g_free (tmp); return; } w = query_exec_texttree (scrolledwindow, FALSE, TRUE); if (g_file_get_contents (tmp, &contents, NULL, NULL) == TRUE) { GtkTextIter start, end; GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w)); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); gtk_text_buffer_delete (buffer, &start, &end); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_insert (buffer, &start, contents, -1); g_free (contents); } librdf_free_stream (stream); g_remove (tmp); g_free (tmp); } static void query_results_open (GtkWidget * w, GtkWidget * scrolledwindow) { gchar *file; gchar *uri; GList *list = NULL, *nslist = NULL; GString *error = NULL; struct editor_data_t *data; file = editor_tmp_file (); if (query_results_save (file, scrolledwindow) == FALSE) { g_free (file); return; } /* Creo da file ad uri e attivo le librdf: */ uri = g_filename_to_uri (file, NULL, NULL); g_free (file); /* Parso con librdf: */ if (rdf_parse_thread (uri, NULL, &list, &nslist, TRUE, RDF_FORMAT_XML, &error) == FALSE) { gchar *str; if (error) str = g_string_free (error, FALSE); else str = NULL; dialog_msg_with_error (_("Error opening the RDF results"), str); if (str) g_free (str); g_free (uri); return; } g_free (uri); /* Alloco memoria per questo nuovo elemento: */ data = g_malloc0 (sizeof (struct editor_data_t)); data->format = RDF_FORMAT_XML; data->rdf = list; data->namespace = nslist; /* Creo l'interfaccia: */ editor_new_maker (data); } static void query_results_save_as (GtkWidget * w, GtkWidget * scrolledwindow) { gchar *file; if (! (file = file_chooser (_("Save a QUERY in a file..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_SAVE, NULL))) return; if (g_file_test (file, G_FILE_TEST_EXISTS) && dialog_ask (_("The file exists. Overwrite?")) != GTK_RESPONSE_OK) { g_free (file); return; } query_results_save (file, scrolledwindow); g_free (file); } static gboolean query_results_save (gchar * file, GtkWidget * scrolledwindow) { GtkWidget *w; GtkTextBuffer *buffer; GList *list; GtkTextIter start, end; gchar *buf; FILE *fl; list = gtk_container_get_children (GTK_CONTAINER (scrolledwindow)); w = list->data; g_list_free (list); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w)); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); buf = gtk_text_buffer_get_slice (buffer, &start, &end, FALSE); if (!(fl = g_fopen (file, "wb"))) { gchar s[1024]; snprintf (s, sizeof (s), _("Error creating the file '%s'!"), file); dialog_msg (s); if (buf) g_free (buf); return FALSE; } fprintf (fl, "%s", buf ? buf : ""); fclose (fl); if (buf) g_free (buf); return TRUE; } static void query_insert (GtkWidget * w, GtkWidget * textview) { gchar *text; GList *resources; GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); resources = g_object_get_data (G_OBJECT (buffer), "resources"); if ((text = search_list (resources, GTK_WINDOW (gtk_widget_get_toplevel (w))))) { textview_insert_at_cursor (textview, text, -1); g_free (text); } } static void query_save_session (gchar * buf, gchar * name) { if (!strcmp (name, "SPARQL")) { if (query_sparql_last) g_free (query_sparql_last); query_sparql_last = g_strdup (buf); } else { if (query_rdql_last) g_free (query_rdql_last); query_rdql_last = g_strdup (buf); } } static void query_rdfs (GtkWidget * w, GtkWidget * textview) { GtkWidget *combo; gint id; struct rdfs_t *rdfs; gchar *text; combo = g_object_get_data (G_OBJECT (w), "combo"); if ((id = gtk_combo_box_get_active (GTK_COMBO_BOX (combo))) < 0) return; if (!(rdfs = g_list_nth_data (rdfs_list, id))) return; text = g_strdup_printf ("PREFIX %s: <%s>\n", rdfs->prefix, rdfs->resource); textview_insert_at_cursor (textview, text, -1); g_free (text); } static void query_textview_map (GtkWidget * text) { GList *list; struct tag_t *tag; if (highlighting_active == FALSE) return; for (list = highlighting_tags; list; list = list->next) { tag = list->data; textview_add_tag (text, tag->tag, tag->style, tag->variant, tag->weight, tag->stretch, tag->scale, tag->foreground, tag->background, tag->underline); } } static void query_rasqal_error (void *data, raptor_locator * locator, const char *message) { gchar *buf = g_strdup (message); rdf_log (&rasqal_errors, buf, PARSER_CHAR_ERROR); g_free (buf); } static void query_rasqal_warning (void *data, raptor_locator * locator, const char *message) { gchar *buf = g_strdup (message); rdf_log (&rasqal_errors, buf, PARSER_CHAR_WARNING); g_free (buf); } static gboolean query_prepare (GtkTextBuffer * buffer) { static raptor_uri *base_uri = NULL; static gchar *previous = NULL; #ifndef USE_RASQAL_OLD static rasqal_world *rasqal = NULL; #endif GtkTextIter start, end; gchar *buf; if (query_frame) { GtkStyle *style = gtk_style_copy (gtk_widget_get_default_style ()); rasqal_query *query; gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); buf = gtk_text_buffer_get_slice (buffer, &start, &end, FALSE); if (previous && !strcmp (buf, previous)) { g_free (buf); return TRUE; } if (previous) g_free (previous); previous = buf; if (rasqal_errors) { g_string_free (rasqal_errors, TRUE); rasqal_errors = NULL; } if (!base_uri) { unsigned char *uri_string; #ifdef USE_RASQAL_OLD rasqal_init (); #else rasqal = rasqal_new_world (); #endif uri_string = raptor_uri_filename_to_uri_string (""); base_uri = raptor_new_uri (uri_string); raptor_free_memory (uri_string); } if (!strcmp (g_object_get_data (G_OBJECT (buffer), "format"), "SPARQL")) #ifdef USE_RASQAL_OLD query = rasqal_new_query ("sparql", NULL); #else query = rasqal_new_query (rasqal, "sparql", NULL); #endif else #ifdef USE_RASQAL_OLD query = rasqal_new_query ("rdql", NULL); #else query = rasqal_new_query (rasqal, "rdql", NULL); #endif if (query) { rasqal_query_set_fatal_error_handler (query, NULL, query_rasqal_error); rasqal_query_set_error_handler (query, NULL, query_rasqal_error); rasqal_query_set_warning_handler (query, NULL, query_rasqal_warning); if (rasqal_query_prepare (query, (const unsigned char *) buf, base_uri)) gdk_color_parse ("red", &style->fg[GTK_STATE_NORMAL]); gtk_widget_set_style (query_frame, style); g_object_unref (style); rasqal_free_query (query); } } return TRUE; } static void query_show_errors (GtkWidget * widget, gpointer dummy) { if (rasqal_errors) { gchar *buf = g_strdup (rasqal_errors->str); dialog_msg_with_error (_("Error in your query!"), buf); g_free (buf); return; } dialog_msg (_("No errors in your query.")); } /* EOF */ morla-0.16.1/src/rdf.c000066400000000000000000000723221156343060400144270ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static gchar *rdf_trim (gchar * tmp); static void rdf_parse_this (struct rdf_t *data, gchar * uri); static gboolean rdf_save_buffer_xml (GList * rdf, GList ** namespace, gchar ** buffer); static gboolean rdf_save_buffer_ntriples (GList * rdf, GList ** namespace, gchar ** buffer); static gboolean rdf_save_buffer_turtle (GList * rdf, GList ** namespace, gchar ** buffer); static gchar *markup_ntriples (gchar * str); static gchar *markup_ntriples_blank (gchar * ptr); /* Questa funzione serve per ordinare liste di rdf con g_list_sort */ static gint rdf_compare (struct rdf_t *a, struct rdf_t *b) { return strcmp (a->subject, b->subject); } /* Questa funzione server per memorizzare dati di un nodo */ static void rdf_node (gchar ** where, gint * type, gchar ** lang, gchar ** datatype, librdf_node * node, GList ** id) { librdf_uri *uri; /* Che tipologia e'? */ switch (librdf_node_get_type (node)) { case LIBRDF_NODE_TYPE_RESOURCE: uri = librdf_node_get_uri (node); if ((*where = (gchar *) librdf_uri_as_string (uri))) *where = g_strdup (*where); *type = RDF_OBJECT_RESOURCE; break; case LIBRDF_NODE_TYPE_LITERAL: if ((*where = (gchar *) librdf_node_get_literal_value (node))) *where = g_strdup (*where); if ((*lang = (gchar *) librdf_node_get_literal_value_language (node))) *lang = g_strdup (*lang); if ((uri = librdf_node_get_literal_value_datatype_uri (node))) { if ((*datatype = (gchar *) librdf_uri_as_string (uri))) *datatype = g_strdup (*datatype); } *type = RDF_OBJECT_LITERAL; break; case LIBRDF_NODE_TYPE_BLANK: { gint ok = 0; GList *t; if ((*where = (gchar *) librdf_node_get_blank_identifier (node))) { *where = g_strdup (*where); t = *id; ok = 0; while (t) { if (!strcmp ((gchar *) t->data, *where)) { ok = 1; break; } t = t->next; } if (!ok) *id = g_list_append (*id, g_strdup (*where)); } *type = RDF_OBJECT_BLANK; } break; default: break; } } /* Parsa un documento RDF e ritorna una lista di triplette: */ gboolean rdf_parse (gchar * rdf, struct download_t *download, gboolean this_document, GList ** ret, enum rdf_format_t *format, GString ** error) { GString *str; gchar *buffer; gchar *err; gboolean should_empty = FALSE; str = NULL; if (download_uri (rdf, &buffer, download, error ? &err : NULL) == FALSE) { if (error) { if (!*error) *error = g_string_new (NULL); if (err) { g_string_append_printf (*error, "%c%s\n", PARSER_CHAR_ERROR, err); g_free (err); } } return FALSE; } /* Parso in formato XML passando una stringa interna per la gestione * degli errori: */ if (rdf_parse_format (rdf, buffer, this_document, ret, RDF_FORMAT_XML, error ? &str : NULL) == TRUE) { if (format) *format = RDF_FORMAT_XML; /* Successo, quindi rimuovo eventuali messaggi di errore: */ if (*ret) { if (str) { g_string_free (str, TRUE); *error = NULL; } g_free (buffer); return TRUE; } else should_empty = TRUE; } /* Se mi sono ritornati dei messaggi di errore, metto una informazione * iniziale e metto tutto in error: */ if (str) { gchar *t; if (!*error) *error = g_string_new (NULL); g_string_append_printf (*error, "%c%s\n", PARSER_CHAR_INIT, _("RDF/XML parser:")); t = g_string_free (str, FALSE); g_string_append (*error, t); g_free (t); } str = NULL; /* Procedo con lo studio in formato ntrples: */ if (rdf_parse_format (rdf, buffer, this_document, ret, RDF_FORMAT_NTRIPLES, error ? &str : NULL) == TRUE) { if (format) *format = RDF_FORMAT_NTRIPLES; /* Successo, quindi rimuovo eventuale stringa error: */ if (*ret) { if (error && *error) { g_string_free (*error, TRUE); *error = NULL; } /* Rimuovo una eventuale stringa di errore: */ if (str) g_string_free (str, TRUE); g_free (buffer); return TRUE; } else should_empty = TRUE; } /* Se mi sono ritornati dei messaggi di errore, metto una informazione * iniziale: */ if (str) { gchar *t; if (!*error) *error = g_string_new (NULL); g_string_append_printf (*error, "%c%s\n", PARSER_CHAR_INIT, _("RDF/N-TRIPLES parser:")); t = g_string_free (str, FALSE); g_string_append (*error, t); g_free (t); } str = NULL; /* Procedo con lo studio in formato Turtle: */ if (rdf_parse_format (rdf, buffer, this_document, ret, RDF_FORMAT_TURTLE, error ? &str : NULL) == TRUE) { if (format) *format = RDF_FORMAT_TURTLE; /* Successo, quindi rimuovo eventuale stringa error: */ if (*ret) { if (error && *error) { g_string_free (*error, TRUE); *error = NULL; } /* Rimuovo una eventuale stringa di errore: */ if (str) g_string_free (str, TRUE); g_free (buffer); return TRUE; } else should_empty = TRUE; } /* Se mi sono ritornati dei messaggi di errore, metto una informazione * iniziale: */ if (str) { gchar *t; if (!*error) *error = g_string_new (NULL); g_string_append_printf (*error, "%c%s\n", PARSER_CHAR_INIT, _("RDF/TURTLE parser:")); t = g_string_free (str, FALSE); g_string_append (*error, t); g_free (t); } g_free (buffer); if (should_empty == TRUE) { if (error && *error) { g_string_free (*error, TRUE); *error = NULL; } } return should_empty; } gint rdf_log (GString ** error, gchar * str, enum parser_char_t c) { gint i, len, j; if (!error) return 1; if (!*error) *error = g_string_new (NULL); /*Splitto tutte le righe in modo da mettere il carattere di log * ad ogni inizio riga: */ for (i = j = 0, len = strlen (str); i < len; i++) { if (str[i] == '\n') { str[i] = 0; g_string_append_printf (*error, "%c%s\n", c, str + j); j = i + 1; } } g_string_append_printf (*error, "%c%s\n", c, str + j); return 1; } gint rdf_error (void *dummy, const char *msg, va_list va) { int ret; gchar *buf = g_strdup_vprintf (msg, va); ret = rdf_log ((GString **) dummy, buf, PARSER_CHAR_ERROR); g_free (buf); return ret; } gint rdf_warning (void *dummy, const char *msg, va_list va) { int ret; gchar *buf = g_strdup_vprintf (msg, va); ret = rdf_log ((GString **) dummy, buf, PARSER_CHAR_WARNING); g_free (buf); return ret; } /* Questa funzione ritorna il world: */ librdf_world * rdf_world (void) { static librdf_world *world = NULL; static GStaticMutex mutex = G_STATIC_MUTEX_INIT; g_static_mutex_lock (&mutex); if (!world) { if (!(world = librdf_new_world ())) { g_static_mutex_unlock (&mutex); return NULL; } librdf_world_open (world); } librdf_world_set_error (world, NULL, NULL); librdf_world_set_warning (world, NULL, NULL); g_static_mutex_unlock (&mutex); return world; } /* Questa funzione parsa un documento in standard RDF/XML: */ gboolean rdf_parse_format (gchar * rdf, gchar * buffer, gboolean this_document, GList ** ret, enum rdf_format_t format, GString ** error) { static librdf_world *world = NULL; librdf_storage *storage; librdf_parser *parser; librdf_model *model; librdf_stream *stream; librdf_uri *uri; GList *list; world = rdf_world (); librdf_world_set_error (world, error, rdf_error); librdf_world_set_warning (world, error, rdf_warning); if (!(uri = librdf_new_uri (world, (const unsigned char *) rdf))) return FALSE; if (!(storage = librdf_new_storage (world, "memory", NULL, NULL))) { librdf_free_uri (uri); return FALSE; } if (!(model = librdf_new_model (world, storage, NULL))) { librdf_free_storage (storage); librdf_free_uri (uri); return FALSE; } switch (format) { case RDF_FORMAT_NTRIPLES: parser = librdf_new_parser (world, "ntriples", NULL, NULL); break; case RDF_FORMAT_TURTLE: parser = librdf_new_parser (world, "turtle", NULL, NULL); break; default: parser = librdf_new_parser (world, "raptor", NULL, NULL); break; } if (!parser) { librdf_free_model (model); librdf_free_storage (storage); librdf_free_uri (uri); return FALSE; } if (librdf_parser_parse_string_into_model (parser, (unsigned char *) buffer, uri, model)) { librdf_free_parser (parser); librdf_free_model (model); librdf_free_storage (storage); librdf_free_uri (uri); return FALSE; } if (!(stream = librdf_model_as_stream (model))) { librdf_free_parser (parser); librdf_free_model (model); librdf_free_storage (storage); librdf_free_uri (uri); return FALSE; } list = rdf_parse_stream (stream); if (this_document == TRUE) g_list_foreach (list, (GFunc) rdf_parse_this, rdf); /* Libero memoria: */ librdf_free_stream (stream); librdf_free_parser (parser); librdf_free_model (model); librdf_free_storage (storage); librdf_free_uri (uri); /* Ordino e ritorno: */ *ret = g_list_sort (list, (GCompareFunc) rdf_compare); return TRUE; } GList * rdf_parse_stream (librdf_stream * stream) { GList *list = NULL; GList *blank = NULL; while (!librdf_stream_end (stream)) { librdf_node *node; gint fake; gchar *tmp; librdf_statement *statement; struct rdf_t *new; if (!(statement = librdf_stream_get_object (stream))) break; new = (struct rdf_t *) g_malloc0 (sizeof (struct rdf_t)); node = librdf_statement_get_subject (statement); rdf_node (&new->subject, &fake, &new->lang, &new->datatype, node, &blank); if (!new->subject) { rdf_free (new); continue; } node = librdf_statement_get_predicate (statement); rdf_node (&new->predicate, &fake, &new->lang, &new->datatype, node, &blank); if (!new->predicate) { rdf_free (new); continue; } node = librdf_statement_get_object (statement); rdf_node (&new->object, &fake, &new->lang, &new->datatype, node, &blank); if (!new->object) { rdf_free (new); continue; } new->object_type = fake; tmp = new->subject; new->subject = rdf_trim (tmp); g_free (tmp); tmp = new->predicate; new->predicate = rdf_trim (tmp); g_free (tmp); tmp = new->object; new->object = rdf_trim (tmp); g_free (tmp); if (new->lang) { tmp = new->lang; new->lang = rdf_trim (tmp); g_free (tmp); } if (new->datatype) { tmp = new->datatype; new->datatype = rdf_trim (tmp); g_free (tmp); } list = g_list_append (list, new); librdf_stream_next (stream); } /* Qui sostituisco i blank con qualcosa di piu' bellino a vedersi: */ if (blank) { struct rdf_t *rdf_t; GList *tmp, *t; gint id = 0; tmp = blank; while (tmp) { t = list; while (t) { rdf_t = (struct rdf_t *) t->data; if (!strcmp (rdf_t->subject, (gchar *) tmp->data)) { g_free (rdf_t->subject); rdf_t->subject = blanknode_create (id); } if (rdf_t->object_type == RDF_OBJECT_BLANK && !strcmp (rdf_t->object, (gchar *) tmp->data)) { g_free (rdf_t->object); rdf_t->object = blanknode_create (id); } t = t->next; } id++; g_free (tmp->data); tmp = tmp->next; } g_list_free (blank); } return list; } /* Questa funzione sostituisce tutti i soggetti uguali all'URI del documento * con this:document: */ static void rdf_parse_this (struct rdf_t *data, gchar * uri) { if (!strcmp (data->subject, uri)) { g_free (data->subject); data->subject = g_strdup (THIS_DOCUMENT); } } /* Questo documento RDF e' salvato? */ gboolean rdf_is_no_saved (struct editor_data_t *data) { return data->changed; } /* Funzione di trim: */ static gchar * rdf_trim (gchar * tmp) { gchar *ret; gint i, j, q; gint size; i = 0; while (tmp[i] == ' ' || tmp[i] == '\t' || tmp[i] == '\r' || tmp[i] == '\n') tmp++; i = strlen (tmp); i--; while (tmp[i] == ' ' || tmp[i] == '\t' || tmp[i] == '\r' || tmp[i] == '\n') i--; tmp[i + 1] = 0; size = strlen (tmp); ret = g_malloc (sizeof (gchar) * (size + 1)); for (q = i = j = 0; i < size; i++) { if (*(tmp + i) == 0xD) continue; if (*(tmp + i) == 0xA || *(tmp + i) == 0x9 || *(tmp + i) == 0x20) { if (!q) { q = 1; ret[j++] = *(tmp + i); } } else { q = 0; ret[j++] = *(tmp + i); } } ret[j] = 0; tmp = g_strdup (ret); g_free (ret); return tmp; } /* Libero memoria: */ void rdf_free (struct rdf_t *rdf) { if (!rdf) return; if (rdf->subject) g_free (rdf->subject); if (rdf->predicate) g_free (rdf->predicate); if (rdf->object) g_free (rdf->object); if (rdf->lang) g_free (rdf->lang); if (rdf->datatype) g_free (rdf->datatype); g_free (rdf); } /* Questa funzione crea un dump di una tripletta: */ struct rdf_t * rdf_copy (struct rdf_t *rdf) { struct rdf_t *new; if (!rdf) return NULL; new = (struct rdf_t *) g_malloc0 (sizeof (struct rdf_t)); if (rdf->subject) new->subject = g_strdup (rdf->subject); if (rdf->predicate) new->predicate = g_strdup (rdf->predicate); if (rdf->object) new->object = g_strdup (rdf->object); if (rdf->lang) new->lang = g_strdup (rdf->lang); if (rdf->datatype) new->datatype = g_strdup (rdf->datatype); new->object_type = rdf->object_type; return new; } /* Questa funzione salva in un file una serie di triplette: */ gboolean rdf_save_file (gchar * file, GList * rdf, GList ** namespace, enum rdf_format_t format) { FILE *fl; gchar *buffer; if (rdf_save_buffer (rdf, namespace, format, &buffer) == FALSE) return FALSE; if (!(fl = g_fopen (file, "wb"))) { g_free (buffer); return FALSE; } fprintf (fl, "%s", buffer); fclose (fl); g_free (buffer); return TRUE; } gboolean rdf_save_buffer (GList * rdf, GList ** namespace, enum rdf_format_t format, gchar ** buffer) { switch (format) { case RDF_FORMAT_NTRIPLES: return rdf_save_buffer_ntriples (rdf, namespace, buffer); case RDF_FORMAT_TURTLE: return rdf_save_buffer_turtle (rdf, namespace, buffer); default: return rdf_save_buffer_xml (rdf, namespace, buffer); } } /* Questa funzione salva un RDF in formato XML: */ static gboolean rdf_save_buffer_xml (GList * rdf, GList ** namespace, gchar ** buffer) { gchar *str; gchar *prefix, *prev = NULL, *tmp; GString *ret; GList *l; ret = g_string_new ("\n"); prefix = markup (namespace_prefix (namespace, "http://www.w3.org/1999/02/22-rdf-syntax-ns#")); g_string_append_printf (ret, "<%s:RDF\n", prefix); l = *namespace; while (l) { str = markup (((struct namespace_t *) l->data)->prefix); g_string_append_printf (ret, " xmlns:%s=\"", str); g_free (str); str = markup (((struct namespace_t *) l->data)->namespace); g_string_append_printf (ret, "%s\"\n", str); g_free (str); l = l->next; } g_string_append_printf (ret, ">\n\n"); if (rdf) { rdf = g_list_copy (rdf); rdf = g_list_sort (rdf, (GCompareFunc) rdf_compare); l = rdf; while (l) { struct rdf_t *r = l->data; if (!prev || strcmp (prev, r->subject)) { if (prev) g_string_append_printf (ret, " \n\n", prefix); prev = r->subject; str = markup (prev); if (!rdf_blank (rdf, prev)) g_string_append_printf (ret, " <%s:Description %s:about=\"", prefix, prefix); else g_string_append_printf (ret, " <%s:Description %s:nodeID=\"", prefix, prefix); if (strcmp (str, THIS_DOCUMENT)) g_string_append_printf (ret, "%s", str); g_string_append_printf (ret, "\">\n"); g_free (str); } tmp = namespace_create (*namespace, r->predicate); switch (r->object_type) { case RDF_OBJECT_LITERAL: str = markup (tmp); g_string_append_printf (ret, " <%s", str); g_free (str); if (r->lang) { str = markup (r->lang); g_string_append_printf (ret, " xml:lang=\"%s\"", str); g_free (str); } if (r->datatype) { str = markup (r->datatype); g_string_append_printf (ret, " %s:datatype=\"%s\"", prefix, str); g_free (str); } g_string_append_printf (ret, ">"); str = markup (r->object); g_string_append_printf (ret, "%s", str); g_free (str); str = markup (tmp); g_string_append_printf (ret, "\n", str); g_free (str); break; case RDF_OBJECT_RESOURCE: str = markup (tmp); g_string_append_printf (ret, " <%s ", str); g_free (str); str = markup (r->object); g_string_append_printf (ret, "%s:resource=\"%s\" />\n", prefix, str); g_free (str); break; case RDF_OBJECT_BLANK: str = markup (tmp); g_string_append_printf (ret, " <%s ", str); g_free (str); str = markup (r->object); g_string_append_printf (ret, "%s:nodeID=\"%s\" />\n", prefix, str); g_free (str); break; } g_free (tmp); l = l->next; } g_list_free (rdf); } if (prev) g_string_append_printf (ret, " \n\n", prefix); g_string_append_printf (ret, "\n\n", prefix); g_free (prefix); *buffer = g_string_free (ret, FALSE); return TRUE; } /* Questa funzione salva un RDF in formato NTRIPLES: */ static gboolean rdf_save_buffer_ntriples (GList * rdf, GList ** namespace, gchar ** buffer) { gchar *str; GList *l; GString *ret; ret = g_string_new (NULL); l = rdf; /* Per ogni tripletta: */ while (l) { struct rdf_t *r = l->data; /* Se e' questo documento: */ if (!strcmp (r->subject, THIS_DOCUMENT)) g_string_append_printf (ret, "<>"); /* Se non e' un blank node: */ else if (!rdf_blank (rdf, r->subject)) { str = markup_ntriples (r->subject); g_string_append_printf (ret, "<%s>", str); g_free (str); } /* Se e' un blank node: */ else { str = markup_ntriples_blank (r->subject); g_string_append_printf (ret, "_:%s", str); g_free (str); } /* Proprieta': */ str = markup_ntriples (r->predicate); g_string_append_printf (ret, " <%s>", str); g_free (str); switch (r->object_type) { case RDF_OBJECT_LITERAL: str = markup_ntriples (r->object); g_string_append_printf (ret, " \"%s\"", str); g_free (str); if (r->lang) { str = markup_ntriples (r->lang); g_string_append_printf (ret, "@%s", str); g_free (str); } if (r->datatype) { str = markup_ntriples (r->datatype); g_string_append_printf (ret, "^^<%s>", str); g_free (str); } break; case RDF_OBJECT_RESOURCE: str = markup_ntriples (r->object); g_string_append_printf (ret, " <%s>", str); g_free (str); break; case RDF_OBJECT_BLANK: str = markup_ntriples_blank (r->object); g_string_append_printf (ret, " _:%s", str); g_free (str); break; } g_string_append_printf (ret, " .\n"); l = l->next; } *buffer = g_string_free (ret, FALSE); return TRUE; } /* Questa funzione salva un RDF in formato TURTLE: */ static gboolean rdf_save_buffer_turtle (GList * rdf, GList ** namespace, gchar ** buffer) { gchar *str, *tmp; GList *l; GString *ret; namespace_prefix (namespace, "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); ret = g_string_new (NULL); l = *namespace; while (l) { str = markup_ntriples (((struct namespace_t *) l->data)->prefix); g_string_append_printf (ret, "@prefix %c%s: ", *str == '_' ? 'p' : *str, str + 1); g_free (str); str = markup_ntriples (((struct namespace_t *) l->data)->namespace); g_string_append_printf (ret, "<%s> .\n", str); g_free (str); l = l->next; } g_string_append_printf (ret, "\n"); if (rdf) { gchar *subject = NULL; rdf = g_list_copy (rdf); rdf = g_list_sort (rdf, (GCompareFunc) rdf_compare); l = rdf; /* Per ogni tripletta: */ while (l) { struct rdf_t *r = l->data; if (!subject || strcmp (subject, r->subject)) { if (subject) g_string_append_printf (ret, " .\n\n"); subject = r->subject; /* Se e' questo documento: */ if (!strcmp (r->subject, THIS_DOCUMENT)) g_string_append_printf (ret, "<>"); /* Se non e' un blank node: */ else if (!rdf_blank (rdf, r->subject)) { str = markup_ntriples (r->subject); g_string_append_printf (ret, "<%s>", str); g_free (str); } /* Se e' un blank node: */ else { str = markup_ntriples_blank (r->subject); g_string_append_printf (ret, "_:%s", str); g_free (str); } } else g_string_append_printf (ret, " ;"); /* Proprieta': */ tmp = namespace_create (*namespace, r->predicate); str = markup_ntriples (tmp); g_string_append_printf (ret, "\n\t%c%s", *str == '_' ? 'p' : *str, str + 1); g_free (str); g_free (tmp); switch (r->object_type) { case RDF_OBJECT_LITERAL: str = markup_ntriples (r->object); g_string_append_printf (ret, " \"%s\"", str); g_free (str); if (r->lang) { str = markup_ntriples (r->lang); g_string_append_printf (ret, "@%s", str); g_free (str); } if (r->datatype) { str = markup_ntriples (r->datatype); g_string_append_printf (ret, "^^<%s>", str); g_free (str); } break; case RDF_OBJECT_RESOURCE: str = markup_ntriples (r->object); g_string_append_printf (ret, " <%s>", str); g_free (str); break; case RDF_OBJECT_BLANK: str = markup_ntriples_blank (r->object); g_string_append_printf (ret, " _:%s", str); g_free (str); break; } l = l->next; } if (subject) g_string_append_printf (ret, " .\n\n"); g_list_free (rdf); } *buffer = g_string_free (ret, FALSE); return TRUE; } /* Questa funzione comunica se un nodo e' blank o no */ gboolean rdf_blank (GList * rdf, gchar * t) { struct rdf_t *r; while (rdf) { r = (struct rdf_t *) rdf->data; if (r->object_type == RDF_OBJECT_BLANK && !strcmp (r->object, t)) return TRUE; rdf = rdf->next; } return FALSE; } /* Questa funzione comunica se un nodo e' una risorsa o no */ gboolean rdf_resource (GList * rdf, gchar * t) { struct rdf_t *r; while (rdf) { r = (struct rdf_t *) rdf->data; if (r->object_type == RDF_OBJECT_RESOURCE && !strcmp (r->object, t)) return TRUE; rdf = rdf->next; } return FALSE; } struct data_t { gchar *resource; struct download_t *download; GList *list; GList *nslist; enum rdf_format_t format; GString *error; gboolean this_document; gboolean ret; gint flag; }; /* Questa funzione fa il lavoro sporco di parsing */ static void * thread (void *what) { GList *l, *ns; struct data_t *data = (struct data_t *) what; /* usa rdf_parse: */ if (rdf_parse (data->resource, data->download, data->this_document, &l, &data->format, &data->error) == FALSE) { data->flag = 1; data->ret = FALSE; g_thread_exit (NULL); return NULL; } if (namespace_parse (l, &ns) == FALSE) { g_list_foreach (l, (GFunc) rdf_free, NULL); g_list_free (l); data->flag = 1; data->ret = FALSE; g_thread_exit (NULL); return NULL; } data->list = l; data->nslist = ns; data->flag = 1; data->ret = TRUE; g_thread_exit (NULL); return NULL; } /* Questa funzione viene lanciata quando il thread ha finito di compiere * le sue operazioni ma si e' premuto cancel. Libera la memoria: */ static void rdf_thread_free (struct data_t *data) { if (data->list) { g_list_foreach (data->list, (GFunc) rdf_free, NULL); g_list_free (data->list); } if (data->nslist) { g_list_foreach (data->nslist, (GFunc) namespace_free, NULL); g_list_free (data->nslist); } if (data->resource) g_free (data->resource); if (data->error) g_string_free (data->error, TRUE); if (data->download) download_free (data->download); g_free (data); } /* Se si preme cancel si aggiunge un elemento alla lista dei thread da * gestire: */ static void rdf_parse_thread_abort (GtkWidget * widget, struct data_t *data) { struct thread_t *new; gboolean *ret; widget = gtk_widget_get_toplevel (widget); ret = g_object_get_data (G_OBJECT (widget), "ret"); new = (struct thread_t *) g_malloc0 (sizeof (struct thread_t)); new->func = (GFunc) rdf_thread_free; new->data = data; new->flag = &data->flag; thread_child = g_list_append (thread_child, new); *ret = FALSE; } /* Quando si chiede di parse qualcosa si usa questa perche' e' multi threading * e non fa bloccar e l'interfaccia: */ gboolean rdf_parse_thread (gchar * resource, struct download_t *download, GList ** list, GList ** nslist, gboolean this_document, enum rdf_format_t *format, GString ** error) { GtkWidget *window; GtkWidget *pb; GThread *th; struct data_t *data; gboolean ret = TRUE; data = (struct data_t *) g_malloc0 (sizeof (struct data_t)); data->resource = g_strdup (resource); data->download = download ? download_copy (download) : NULL; data->this_document = this_document; data->list = NULL; data->nslist = NULL; data->flag = 0; data->format = RDF_FORMAT_XML; /* Se e' richiesto una stringa di errore, ne setto una interna perche' * cosi' e' possibile abortire il thread impedendo al resto del programma * di liberare la stringa sotto al culo del thread di parsing: */ data->error = error ? g_string_new (NULL) : NULL; window = dialog_wait (G_CALLBACK (rdf_parse_thread_abort), data, &pb); g_object_set_data (G_OBJECT (window), "ret", &ret); /* Attivo un processo separato ed apsetto: */ th = g_thread_create ((GThreadFunc) thread, data, FALSE, NULL); while (!data->flag && ret) { gtk_progress_bar_pulse (GTK_PROGRESS_BAR (pb)); while (gtk_events_pending () && !data->flag && ret) gtk_main_iteration (); g_usleep (50000); } gtk_widget_destroy (window); /* Questo succede se si e' cliccato sul pulsante abort: */ if (ret == FALSE) return FALSE; ret = data->ret; (*list) = data->list; (*nslist) = data->nslist; if (format) *format = data->format; if (error) { if (data->error->len > 0) *error = data->error; else g_string_free (data->error, TRUE); } if (data->download) download_free (data->download); g_free (data->resource); g_free (data); return ret; } /* Conversione dei caratteri particolari in una stringa compatibile ntriples: */ static gchar * markup_ntriples (gchar * ptr) { gunichar unichr; GString *ret; ret = g_string_new (NULL); while ((unichr = g_utf8_get_char (ptr))) { ptr = g_utf8_next_char (ptr); if (unichr >= 0x20 && unichr <= 0x7E) { switch (unichr) { case '\\': g_string_append_printf (ret, "\\\\"); break; case '\"': g_string_append_printf (ret, "\\\""); break; case '\n': g_string_append_printf (ret, "\\\n"); break; case '\r': g_string_append_printf (ret, "\\\r"); break; case '\t': g_string_append_printf (ret, "\\\t"); break; default: g_string_append_printf (ret, "%c", unichr); break; } } else if (unichr < 0x10000) g_string_append_printf (ret, "\\u%.4X", unichr); else g_string_append_printf (ret, "\\U%.8X", unichr); } return g_string_free (ret, FALSE); } /* Conversione di una stringa in un qualcosa di compatibile NodeID in ntriples: */ static gchar * markup_ntriples_blank (gchar * ptr) { gunichar unichr; gboolean first = TRUE; gchar *ret; gint j = 0; ret = g_malloc (strlen (ptr) + 1); /* Conversione dei caratteri particolari: */ while ((unichr = g_utf8_get_char (ptr))) { ptr = g_utf8_next_char (ptr); if ((unichr >= 'A' && unichr <= 'Z') || (unichr >= 'a' && unichr <= 'z') || (first == FALSE ? (unichr >= '0' && unichr <= '9') : 0)) ret[j++] = unichr; first = FALSE; } ret[j] = 0; return ret; } /* EOF */ morla-0.16.1/src/rdfs.c000066400000000000000000000351371156343060400146150ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" static void rdfs_refresh (GtkWidget * treeview); static void cell_edited (GtkCellRendererText * cell, const gchar * path_string, const gchar * new_text, gpointer data); static void rdfs_open (GtkWidget * treeview); static gint rdfs_remove (GtkWidget * treeview); static void rdfs_free (struct rdfs_t *rdfs); /* Questa funzione crea l'interfaccia grafica che mostra tutti gli rdfs * importanti e permette operazioni su questo elenco: */ void rdfs (GtkWidget * w, gpointer dummy) { GtkWidget *window, *hbox, *scrolledwindow, *treeview, *button, *frame; GtkListStore *model; GtkCellRenderer *renderer; GtkTreeSelection *selection; GtkTreeViewColumn *column; gchar s[1024]; gint ret; g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("RDFSs import")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_widget_set_size_request (window, 400, 200); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), hbox, TRUE, TRUE, 0); frame = gtk_frame_new (_("RDFSs import")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); g_object_set (renderer, "editable", TRUE, NULL); g_signal_connect (renderer, "edited", G_CALLBACK (cell_edited), model); g_object_set_data (G_OBJECT (renderer), "column", (gpointer) 0); column = gtk_tree_view_column_new_with_attributes (_("RDFS"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); g_object_set (renderer, "editable", TRUE, NULL); g_signal_connect (renderer, "edited", G_CALLBACK (cell_edited), model); g_object_set_data (G_OBJECT (renderer), "column", (gpointer) 1); column = gtk_tree_view_column_new_with_attributes (_("Default prefix"), renderer, "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); button = gtk_button_new_from_stock ("gtk-open"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_YES); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-add"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-remove"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-close"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_NO); gtk_widget_set_can_default(button, TRUE); rdfs_refresh (treeview); g_object_unref (model); gtk_widget_show_all (window); while (1) { ret = gtk_dialog_run (GTK_DIALOG (window)); /* Aprire: */ if (ret == GTK_RESPONSE_YES) rdfs_open (treeview); /* Aggiunta: */ else if (ret == GTK_RESPONSE_OK) { if (rdfs_add (NULL, NULL)) rdfs_refresh (treeview); } /* rimozione: */ else if (ret == GTK_RESPONSE_CANCEL) { if (dialog_ask (_("Sure to remove this RDFS ?")) == GTK_RESPONSE_OK && rdfs_remove (treeview)) { init_save (); rdfs_refresh (treeview); } } else break; } gtk_widget_destroy (window); } /* La procedura di refresh aggiorna l'elenco dell'interfaccia: */ static void rdfs_refresh (GtkWidget * treeview) { GtkListStore *store; GtkTreeIter iter; GList *list; struct rdfs_t *rdfs; /* Rimuovo prima tutto: */ store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, NULL, 0)) gtk_list_store_remove (store, &iter); /* Poi inserisco: */ list = rdfs_list; while (list) { rdfs = (struct rdfs_t *) list->data; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, rdfs->resource, 1, rdfs->prefix, -1); list = list->next; } } /* Questa funzione serve per editare un elemento della lista: */ static void cell_edited (GtkCellRendererText * cell, const gchar * path_string, const gchar * new_text, gpointer data) { GtkTreeModel *model = (GtkTreeModel *) data; GtkTreePath *path = gtk_tree_path_new_from_string (path_string); GtkTreeIter iter; GList *list = rdfs_list; gint i; gint column = (gint) (g_object_get_data (G_OBJECT (cell), "column")); gtk_tree_model_get_iter (model, &iter, path); i = gtk_tree_path_get_indices (path)[0]; switch (column) { /* RDFS: */ case 0: /* Trovo l'elemento della lista: */ if ((list = g_list_nth (list, i))) { struct rdfs_t *rdfs = (struct rdfs_t *) list->data; /* Libero memoria e aggiorno: */ if (rdfs->resource) g_free (rdfs->resource); rdfs->resource = g_strdup (new_text); gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, new_text, -1); init_save (); } break; /* PREFIX: */ case 1: if ((list = g_list_nth (list, i))) { struct rdfs_t *rdfs = (struct rdfs_t *) list->data; if (rdfs->prefix) g_free (rdfs->prefix); rdfs->prefix = g_strdup (new_text); gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, new_text, -1); init_save (); } break; } gtk_tree_path_free (path); } /* Questa funzione serve per aprire un documento RDFS dentro l'editor: */ static void rdfs_open (GtkWidget * treeview) { struct rdfs_t *rdfs; GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); /* Becco cio' che e' selezionato: */ if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { gint i; GtkTreePath *path; GList *list = rdfs_list; path = gtk_tree_model_get_path (model, &iter); i = gtk_tree_path_get_indices (path)[0]; /* Cerco l'elemento: */ if ((list = g_list_nth (list, i))) { rdfs = list->data; /* Apro quello salvato... non l'originale */ if (editor_open_file (rdfs->path, rdfs->resource) == TRUE) { struct editor_data_t *t; /* Poi vado a rimuovere il nome in modo che quando si * chieda di salvarlo, esso venga salvato in un nuovo file */ t = editor_data; while (t) { if (t->file && !strcmp (rdfs->path, t->file)) { g_free (t->file); t->file = NULL; break; } t = t->next; } } } gtk_tree_path_free (path); } return; } /* Rimozione di un RDFS: */ static gint rdfs_remove (GtkWidget * treeview) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); /* Quelli selezionati: */ if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { gint i; GtkTreePath *path; GList *list = rdfs_list; path = gtk_tree_model_get_path (model, &iter); i = gtk_tree_path_get_indices (path)[0]; gtk_list_store_remove (GTK_LIST_STORE (model), &iter); /* Rimuovo e libero memoria: */ if ((list = g_list_nth (list, i))) { struct rdfs_t *rdfs = (struct rdfs_t *) list->data; g_remove (rdfs->path); rdfs_list = g_list_remove (rdfs_list, rdfs); rdfs_free (rdfs); } gtk_tree_path_free (path); return 1; } return 0; } /* Questa funzione serve per aggiungere un nuovo elemento RDFS con prefix: */ gint rdfs_add (gchar * resource, gchar * p) { GtkWidget *dialog; GtkWidget *table; GtkWidget *label; GtkWidget *ns; GtkWidget *prefix; GtkWidget *button; gint ret = 0; gchar s[1024]; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("New RDFS...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); table = gtk_table_new (2, 2, FALSE); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0); label = gtk_label_new (_("RDFS: ")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); ns = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), ns, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); if (resource) gtk_entry_set_text (GTK_ENTRY (ns), resource); label = gtk_label_new (_("Prefix: ")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); prefix = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), prefix, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0); if (p) gtk_entry_set_text (GTK_ENTRY (prefix), p); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { gchar *ns_text, *prefix_text; GList *list, *nslist; struct rdfs_t *rdfs; gchar *file; gint must_continue; GString *error = NULL; /* Faccio alcuni controlli: */ ns_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (ns)); prefix_text = (gchar *) gtk_entry_get_text (GTK_ENTRY (prefix)); if (!ns_text || !*ns_text) { dialog_msg (_("Incompatible RDFS!")); continue; } if (!prefix_text || !*prefix_text) { dialog_msg (_("Incompatible Prefix!")); continue; } must_continue = 0; /* Cerco se c'e' gia' nell'elenco l'RDFS o il prefix: */ list = rdfs_list; while (list) { rdfs = (struct rdfs_t *) list->data; if (!strcmp (rdfs->resource, ns_text)) { dialog_msg (_("RDFS already present in the list!")); must_continue = 1; break; } if (!strcmp (rdfs->prefix, prefix_text)) { gchar s[1024]; g_snprintf (s, sizeof (s), _("Prefix already used for namespace '%s'"), rdfs->resource); dialog_msg (s); must_continue = 1; break; } list = list->next; } if (must_continue) continue; gtk_widget_hide (dialog); /* Parso elemento richiesto: */ if (rdf_parse_thread (ns_text, NULL, &list, &nslist, FALSE, NULL, &error) == FALSE) { gchar *str; if (error) str = g_string_free (error, FALSE); else str = NULL; dialog_msg_with_error (_("Error opening the RDFS!"), str); gtk_widget_show (dialog); if (str) g_free (str); continue; } /* Salvo in un file locale: */ file = rdfs_file (); if (rdf_save_file (file, list, &nslist, RDF_FORMAT_XML) == FALSE) { g_list_foreach (list, (GFunc) rdf_free, NULL); g_list_free (list); g_list_foreach (nslist, (GFunc) namespace_free, NULL); g_list_free (nslist); g_free (file); dialog_msg (_("Error importing the RDFS document!")); gtk_widget_show (dialog); continue; } /* Alloco ed inserisco nella lista: */ rdfs = (struct rdfs_t *) g_malloc0 (sizeof (struct rdfs_t)); rdfs->resource = g_strdup (ns_text); rdfs->prefix = g_strdup (prefix_text); rdfs->data = list; rdfs->nsdata = nslist; rdfs->path = file; rdfs_list = g_list_append (rdfs_list, rdfs); /* Salvo la configurazione: */ init_save (); ret = 1; break; } gtk_widget_destroy (dialog); return ret; } /* Libero memoria: */ static void rdfs_free (struct rdfs_t *rdfs) { if (!rdfs) return; if (rdfs->resource) g_free (rdfs->resource); if (rdfs->prefix) g_free (rdfs->prefix); if (rdfs->path) g_free (rdfs->path); if (rdfs->data) { g_list_foreach (rdfs->data, (GFunc) rdf_free, NULL); g_list_free (rdfs->data); } if (rdfs->nsdata) { g_list_foreach (rdfs->nsdata, (GFunc) namespace_free, NULL); g_list_free (rdfs->nsdata); } g_free (rdfs); } /* Questa funzione ritorna il nome del prossimo RDFS in base al last_Id * della configurazione: */ gchar * rdfs_file (void) { gchar s[1024]; g_snprintf (s, sizeof (s), "%d", ++last_id); return g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "rdfs", s, NULL); } /* EOF */ morla-0.16.1/src/search.c000066400000000000000000000322221156343060400151140ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" struct data_t { gchar *uri; gchar *error; gint flag; GList *meta; GList *other; }; static void search_activate (GtkWidget * widget, GtkTreePath * path, GtkTreeViewColumn * column, void (*func) (gchar *, gpointer)); /* Questa funzione cerca se l'elemento s dentro la lista list e poi dentro * other. Se non lo trova, inserisce dentro list */ static void check_lists (GList ** list, GList ** other, gchar * s) { GList *l; l = *list; while (l) { if (!strcmp (s, (gchar *) l->data)) return; l = l->next; } if (other) { l = *other; while (l) { if (!strcmp (s, (gchar *) l->data)) return; l = l->next; } } (*list) = g_list_append (*list, g_strdup (s)); } /* Questa funzione fa il controllo di un tag preciso degli head: */ static void check_meta_node (nxml_data_t * node, gchar * uri, GList ** meta) { nxml_attr_t *attr = node->attributes; gboolean rel = FALSE; gchar *href = NULL; while (attr) { if (!strcmp (attr->name, "rel") && !strcmp (attr->value, "meta")) rel = TRUE; else if (!strcmp (attr->name, "href")) href = attr->value; attr = attr->next; } if (rel == TRUE && href) { gchar s[1024]; if (!g_str_has_prefix (href, "http://") && !g_str_has_prefix (href, "https://") && !g_str_has_prefix (href, "ftp://") && !g_str_has_prefix (href, "ftps://")) { g_snprintf (s, sizeof (s), "%s%s%s", uri, g_str_has_suffix (uri, "/") ? "" : "/", href); check_lists (meta, NULL, s); } else check_lists (meta, NULL, href); } } /* Cerca la sezione head di un documento html e poi per ogni elemento * usa la funzione di sopra */ static void check_meta (nxml_data_t * node, gchar * uri, GList ** meta) { node = node->children; while (node) { if (node->type == NXML_TYPE_ELEMENT && !strcmp (node->value, "head")) { node = node->children; while (node) { if (node->type == NXML_TYPE_ELEMENT && !strcmp (node->value, "link")) { check_meta_node (node, uri, meta); } node = node->next; } return; } node = node->next; } } /* Per tutto il resto del documento faccio un check sulle estensioni: */ static void check_string (gchar * str, gchar * uri, GList ** list, GList ** meta) { if (!str) return; if (g_str_has_suffix (str, ".rdf") == TRUE) { gchar s[1024]; if (!g_str_has_prefix (str, "http://") && !g_str_has_prefix (str, "https://") && !g_str_has_prefix (str, "ftp://") && !g_str_has_prefix (str, "ftps://")) { g_snprintf (s, sizeof (s), "%s%s%s", uri, g_str_has_suffix (uri, "/") ? "" : "/", str); check_lists (list, meta, s); } else check_lists (list, meta, str); } } /* Controlla un nodo e per tutti i suoi attributi lancia la funzione di * sopra: */ static void check_node (nxml_data_t * node, gchar * uri, GList ** list, GList ** meta) { nxml_attr_t *attr = node->attributes; while (attr) { check_string (attr->value, uri, list, meta); attr = attr->next; } node = node->children; while (node) { if (node->type == NXML_TYPE_ELEMENT) check_node (node, uri, list, meta); node = node->next; } } /* Thread per il lavoro sporco. Usa libnxml per parsare una pagina html: */ static void * thread (void *what) { nxml_t *nxml; struct data_t *data = (struct data_t *) what; nxml_data_t *e; if (nxml_new (&nxml) != NXML_OK) { data->flag = 1; data->meta = NULL; data->other = NULL; data->error = g_strdup (_("Memory error ?!?")); g_thread_exit (NULL); return NULL; } if (nxml_set_user_agent (nxml, user_agent ()) != NXML_OK) { data->flag = 1; data->meta = NULL; data->other = NULL; data->error = g_strdup (_("Memory error ?!?")); nxml_free (nxml); g_thread_exit (NULL); return NULL; } /* non e' un documento XML! */ if (nxml_set_timeout (nxml, 10) != NXML_OK || nxml_parse_url (nxml, data->uri) != NXML_OK || nxml_root_element (nxml, &e) != NXML_OK || !e) { data->flag = 1; data->meta = NULL; data->other = NULL; data->error = g_strdup (_("This document has not a XML syntax!")); nxml_free (nxml); g_thread_exit (NULL); return NULL; } /* Se e' html faccio il check dei meta: */ if (!strcmp (e->value, "html")) check_meta (e, data->uri, &data->meta); /* Per tutto il resto: */ while (e) { if (e->type == NXML_TYPE_ELEMENT) check_node (e, data->uri, &data->other, &data->meta); e = e->next; } /* Fine: */ data->flag = 1; nxml_free (nxml); g_thread_exit (NULL); return NULL; } /* Questa funzione viene lanciata quando il thread ha finito di compiere * le sue operazioni ma si e' premuto cancel. Libera la memoria: */ static void search_thread_free (struct data_t *data) { if (data->uri) g_free (data->uri); if (data->error) g_free (data->error); if (data->meta) { g_list_foreach (data->meta, (GFunc) g_free, NULL); g_list_free (data->meta); } if (data->other) { g_list_foreach (data->other, (GFunc) g_free, NULL); g_list_free (data->other); } g_free (data); } /* Se si preme cancel si aggiunge un elemento alla lista dei thread da * gestire: */ static void search_thread_abort (GtkWidget * widget, struct data_t *data) { struct thread_t *new; gboolean *ret = g_object_get_data (G_OBJECT (widget), "ret"); new = (struct thread_t *) g_malloc0 (sizeof (struct thread_t)); new->func = (GFunc) search_thread_free; new->data = data; new->flag = &data->flag; thread_child = g_list_append (thread_child, new); *ret = 1; } /* Questa funzione fai la finestra di attesa attendo il processo thread: */ gboolean search (gchar * uri, GList ** meta, GList ** other, gchar ** error) { GtkWidget *window; GtkWidget *pb; GThread *th; struct data_t *data; gboolean ret = 0; data = (struct data_t *) g_malloc (sizeof (struct data_t)); data->uri = g_strdup (uri); data->flag = 0; data->meta = NULL; data->other = NULL; data->error = NULL; window = dialog_wait (G_CALLBACK (search_thread_abort), data, &pb); g_object_set_data (G_OBJECT (window), "ret", &ret); th = g_thread_create ((GThreadFunc) thread, data, FALSE, NULL); while (!data->flag && !ret) { gtk_progress_bar_pulse (GTK_PROGRESS_BAR (pb)); while (gtk_events_pending () && !data->flag && !ret) gtk_main_iteration (); g_usleep (50000); } gtk_widget_destroy (window); if (ret) { *error = NULL; return FALSE; } *error = data->error; *meta = data->meta; *other = data->other; g_free (data->uri); g_free (data); return (*other || *meta) ? TRUE : FALSE; } /* Questa funzione attiva il sistema di ricerca e mostra i risultati: */ void search_open (gchar * text, void (*func) (gchar *, gpointer), gpointer data) { GList *l, *meta, *other; gchar *error; GtkWidget *window, *scrolledwindow, *treeview, *button, *frame; GtkListStore *model; GtkTreeIter iter; GtkCellRenderer *renderer; GtkTreeSelection *selection; GtkTreeViewColumn *column; gchar s[1024]; /* Qui la funzione di ricerca: */ if (search (text, &meta, &other, &error) == FALSE) { if (error) { g_snprintf (s, sizeof (s), _("No RDF Document found! %s"), error); g_free (error); } else g_snprintf (s, sizeof (s), _("No RDF Document found!")); dialog_msg (s); return; } /* Interfaccia: */ g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("RDF founder")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_widget_set_size_request (window, 400, 300); frame = gtk_frame_new (_("Meta RDFs")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (1, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); g_object_set_data (G_OBJECT (treeview), "data", data); g_signal_connect ((gpointer) treeview, "row_activated", G_CALLBACK (search_activate), func); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("RDF"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); /* Riempo i dati trovati in meta: */ l = meta; while (l) { gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, 0, l->data, -1); l = l->next; } g_object_unref (model); frame = gtk_frame_new (_("Other RDFs")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (1, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); g_object_set_data (G_OBJECT (treeview), "data", data); g_signal_connect ((gpointer) treeview, "row_activated", G_CALLBACK (search_activate), func); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("RDF"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); button = gtk_button_new_from_stock ("gtk-close"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_NO); gtk_widget_set_can_default(button, TRUE); /* Gli altri: */ l = other; while (l) { gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, 0, l->data, -1); l = l->next; } g_object_unref (model); gtk_widget_show_all (window); gtk_dialog_run (GTK_DIALOG (window)); /* Libero memoria: */ if (meta) { g_list_foreach (meta, (GFunc) g_free, NULL); g_list_free (meta); } if (other) { g_list_foreach (other, (GFunc) g_free, NULL); g_list_free (other); } gtk_widget_destroy (window); } /* Questa funzione viene lanciata quando si attiva una riga della funzione * di sopra */ static void search_activate (GtkWidget * widget, GtkTreePath * path, GtkTreeViewColumn * column, void (*func) (gchar *, gpointer)) { GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)); GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); gpointer other_data = g_object_get_data (G_OBJECT (widget), "data"); GtkTreeIter iter; gchar *text; /* Se non c'e' selezionato niente, comunico ed esco */ if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { dialog_msg (_("Select some URIs!")); return; } /* Prendo il testo selezionato */ gtk_tree_model_get (model, &iter, 0, &text, -1); func (text, other_data); } /* EOF */ morla-0.16.1/src/splash.c000066400000000000000000000373571156343060400151570ustar00rootroot00000000000000/* The GIMP -- an image manipulation program * Copyright (C) 1995 Spencer Kimball and Peter Mattis * * 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. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" typedef struct { GtkWidget *splash; gboolean close_on_click; GtkWidget *logo_area; GdkPixmap *logo_pixmap; GdkRectangle pixmaparea; GdkBitmap *shape_bitmap; GdkGC *trans_gc; GdkGC *opaque_gc; GdkRectangle textarea; PangoLayout *layout; gint timer; gint index; gint animstep; gboolean visible; } SplashScreen; static PangoColor color_start = { 5000, 5000, 5000 }; static PangoColor color_end = { 51914, 51914, 51914 }; static SplashScreen splash_data = { 0, FALSE, }; static gboolean splash_load_logo (GtkWidget * window); static void splash_destroy (GtkObject * object, gpointer data); static void splash_unmap (GtkWidget * widget, gpointer data); static void splash_center (GtkWindow * window); static gboolean splash_logo_expose (GtkWidget * widget, GdkEventExpose * event, gpointer data); static gboolean splash_button_press (GtkWidget * widget, GdkEventButton * event, gpointer data); static gboolean splash_timer (gpointer data); static const gchar *splash_path_image (void); void splash_show (void) { GtkWidget *widget; GdkGCValues shape_gcv; gint w, h; if (splash_showed ()) { g_message ("Showed?!?"); return; } splash_data.visible = FALSE; splash_data.animstep = -1; splash_data.timer = -1; widget = g_object_new (GTK_TYPE_WINDOW, "type", GTK_WINDOW_POPUP, "title", _("Morla BootSplash"), "window_position", GTK_WIN_POS_CENTER, "resizable", FALSE, NULL); splash_data.splash = widget; gtk_window_set_role (GTK_WINDOW (widget), "splash-dialog"); g_signal_connect (widget, "destroy", G_CALLBACK (splash_destroy), NULL); g_signal_connect (widget, "unmap", G_CALLBACK (splash_unmap), NULL); if (!splash_load_logo (widget)) { gtk_widget_destroy (widget); return; } splash_center (GTK_WINDOW (widget)); widget = gtk_drawing_area_new (); splash_data.logo_area = widget; gtk_widget_set_size_request (widget, splash_data.pixmaparea.width, splash_data.pixmaparea.height); gtk_widget_set_events (widget, GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK); gtk_container_add (GTK_CONTAINER (splash_data.splash), widget); gtk_widget_show (widget); g_signal_connect (widget, "expose_event", G_CALLBACK (splash_logo_expose), NULL); g_signal_connect (widget, "button_press_event", G_CALLBACK (splash_button_press), NULL); gtk_widget_realize (widget); gdk_window_set_background (widget->window, &(widget->style)->black); splash_data.shape_bitmap = gdk_pixmap_new (widget->window, splash_data.pixmaparea.width, splash_data.pixmaparea.height, 1); splash_data.trans_gc = gdk_gc_new (splash_data.shape_bitmap); splash_data.opaque_gc = gdk_gc_new (splash_data.shape_bitmap); gdk_gc_get_values (splash_data.opaque_gc, &shape_gcv); gdk_gc_set_foreground (splash_data.opaque_gc, &shape_gcv.background); gdk_draw_rectangle (splash_data.shape_bitmap, splash_data.trans_gc, TRUE, 0, 0, splash_data.pixmaparea.width, splash_data.pixmaparea.height); gdk_draw_line (splash_data.shape_bitmap, splash_data.opaque_gc, 0, 0, splash_data.pixmaparea.width, 0); gtk_widget_shape_combine_mask (splash_data.splash, splash_data.shape_bitmap, 0, 0); splash_data.layout = gtk_widget_create_pango_layout (splash_data.logo_area, NULL); g_object_weak_ref (G_OBJECT (splash_data.logo_area), (GWeakNotify) g_object_unref, splash_data.layout); pango_layout_set_justify (splash_data.layout, PANGO_ALIGN_CENTER); pango_layout_get_pixel_size (splash_data.layout, &w, &h); splash_data.textarea.width = splash_data.pixmaparea.width; splash_data.textarea.height = h + 10; splash_data.textarea.x = 0; splash_data.textarea.y = (splash_data.pixmaparea.height - splash_data.textarea.height); if (!gtk_widget_get_visible (splash_data.splash)) { splash_data.index = 0; pango_layout_set_text (splash_data.layout, "", -1); } gtk_window_present (GTK_WINDOW (splash_data.splash)); gtk_widget_show (splash_data.splash); while (splash_data.timer) { while (gtk_events_pending ()) gtk_main_iteration (); g_usleep (500); } } void splash_hide (void) { if (splash_showed ()) gtk_widget_destroy (splash_data.splash); } gboolean splash_showed (void) { return splash_data.splash ? TRUE : FALSE; } static void splash_destroy (GtkObject * object, gpointer data) { splash_data.splash = NULL; splash_unmap (NULL, NULL); } static void splash_unmap (GtkWidget * widget, gpointer data) { if (splash_data.timer > 0) { g_source_remove (splash_data.timer); splash_data.timer = 0; } if (splash_data.splash) { gdk_draw_rectangle (splash_data.shape_bitmap, splash_data.trans_gc, TRUE, 0, 0, splash_data.pixmaparea.width, splash_data.pixmaparea.height); gdk_draw_line (splash_data.shape_bitmap, splash_data.opaque_gc, 0, 0, splash_data.pixmaparea.width, 0); gtk_widget_shape_combine_mask (splash_data.splash, splash_data.shape_bitmap, 0, 0); } } static void splash_center (GtkWindow * window) { GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (window)); GdkScreen *screen; GdkRectangle rect; gint monitor; gint x, y; gdk_display_get_pointer (display, &screen, &x, &y, NULL); monitor = gdk_screen_get_monitor_at_point (screen, x, y); gdk_screen_get_monitor_geometry (screen, monitor, &rect); gtk_window_set_screen (window, screen); gtk_window_move (window, rect.x + (rect.width - splash_data.pixmaparea.width) / 2, rect.y + (rect.height - splash_data.pixmaparea.height) / 2); } static gboolean splash_button_press (GtkWidget * widget, GdkEventButton * event, gpointer data) { if (splash_data.close_on_click) gtk_widget_destroy (splash_data.splash); return FALSE; } static gboolean splash_logo_expose (GtkWidget * widget, GdkEventExpose * event, gpointer data) { gint width, height; if (splash_data.timer < 0) { splash_data.index = 1; splash_data.animstep = -1; splash_data.visible = FALSE; gdk_draw_rectangle (splash_data.shape_bitmap, splash_data.trans_gc, TRUE, 0, 0, splash_data.pixmaparea.width, splash_data.pixmaparea.height); gdk_draw_line (splash_data.shape_bitmap, splash_data.opaque_gc, 0, 0, splash_data.pixmaparea.width, 0); gtk_widget_shape_combine_mask (splash_data.splash, splash_data.shape_bitmap, 0, 0); splash_data.timer = g_timeout_add (30, splash_timer, NULL); } /* only operate on the region covered by the pixmap */ if (!gdk_rectangle_intersect (&(splash_data.pixmaparea), &(event->area), &(event->area))) return FALSE; gdk_gc_set_clip_rectangle (widget->style->black_gc, &(event->area)); gdk_draw_drawable (widget->window, widget->style->white_gc, splash_data.logo_pixmap, event->area.x, event->area.y, event->area.x, event->area.y, event->area.width, event->area.height); if (splash_data.visible == TRUE) { gint layout_x, layout_y; pango_layout_get_pixel_size (splash_data.layout, &width, &height); layout_x = splash_data.textarea.x + (splash_data.textarea.width - width) / 2; layout_y = splash_data.textarea.y + 5; gdk_draw_layout (widget->window, widget->style->text_gc[GTK_STATE_NORMAL], layout_x, layout_y, splash_data.layout); } gdk_gc_set_clip_rectangle (widget->style->black_gc, NULL); return FALSE; } static gchar * insert_spacers (const gchar * string) { gchar *normalized, *ptr; gunichar unichr; GString *str; str = g_string_new (NULL); normalized = g_utf8_normalize (string, -1, G_NORMALIZE_DEFAULT_COMPOSE); ptr = normalized; while ((unichr = g_utf8_get_char (ptr))) { g_string_append_unichar (str, unichr); g_string_append_unichar (str, 0x200b); /* ZERO WIDTH SPACE */ ptr = g_utf8_next_char (ptr); } g_free (normalized); return g_string_free (str, FALSE); } static void mix_colors (PangoColor * start, PangoColor * end, PangoColor * target, gdouble pos) { g_return_if_fail (start != NULL); g_return_if_fail (end != NULL); g_return_if_fail (target != NULL); g_return_if_fail (pos >= 0.0 && pos <= 1.0); target->red = start->red + (end->red - start->red) * pos; target->green = start->green + (end->green - start->green) * pos; target->blue = start->blue + (end->blue - start->blue) * pos; } static void decorate_text (PangoLayout * layout, gdouble time) { gint text_length = 0; gint text_bytelen = 0; gint cluster_start, cluster_end; const gchar *text; const gchar *ptr; gunichar unichr; PangoAttrList *attrlist = NULL; PangoAttribute *attr; PangoRectangle irect = { 0, 0, 0, 0 }; PangoRectangle lrect = { 0, 0, 0, 0 }; PangoColor mix = { 0, 0, 0 }; mix_colors (&color_start, &color_end, &mix, time); text = pango_layout_get_text (layout); text_length = g_utf8_strlen (text, -1); text_bytelen = strlen (text); attrlist = pango_attr_list_new (); attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue); attr->start_index = 0; attr->end_index = text_bytelen; pango_attr_list_insert (attrlist, attr); attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); attr->start_index = 0; attr->end_index = text_bytelen; pango_attr_list_insert (attrlist, attr); ptr = text; cluster_start = 0; while ((unichr = g_utf8_get_char (ptr))) { ptr = g_utf8_next_char (ptr); cluster_end = (ptr - text); if (unichr == 0x200b) { lrect.width = (1.0 - time) * 15.0 * PANGO_SCALE + 0.5; attr = pango_attr_shape_new (&irect, &lrect); attr->start_index = cluster_start; attr->end_index = cluster_end; pango_attr_list_change (attrlist, attr); } cluster_start = cluster_end; } pango_layout_set_attributes (layout, attrlist); pango_attr_list_unref (attrlist); } static gboolean splash_timer (gpointer data) { gint height; splash_data.visible = TRUE; if (splash_data.index > (splash_data.pixmaparea.height / 16) + 16) { splash_data.index = 0; splash_data.timer = 0; return FALSE; } height = splash_data.index * 16; if (height < splash_data.pixmaparea.height) gdk_draw_line (splash_data.shape_bitmap, splash_data.opaque_gc, 0, height, splash_data.pixmaparea.width, height); height -= 15; while (height > 0) { if (height < splash_data.pixmaparea.height) gdk_draw_line (splash_data.shape_bitmap, splash_data.opaque_gc, 0, height, splash_data.pixmaparea.width, height); height -= 15; } gtk_widget_shape_combine_mask (splash_data.splash, splash_data.shape_bitmap, 0, 0); splash_data.index++; splash_data.visible = FALSE; gtk_widget_queue_draw_area (splash_data.logo_area, 0, 0, splash_data.pixmaparea.width, splash_data.pixmaparea.height); return TRUE; } static gboolean splash_timer_effect (gpointer data) { gboolean return_val = TRUE; splash_data.animstep++; if (splash_data.animstep < 20) decorate_text (splash_data.layout, ((float) splash_data.animstep) / 20.0); else { return_val = FALSE; splash_data.timer = 0; } gtk_widget_queue_draw_area (splash_data.logo_area, splash_data.textarea.x, splash_data.textarea.y, splash_data.textarea.width, splash_data.textarea.height); return return_val; } /* some handy shortcuts */ static gboolean splash_load_logo (GtkWidget * window) { GdkPixbuf *pixbuf; GdkGC *gc; if (splash_data.logo_pixmap) return TRUE; if (!(pixbuf = gdk_pixbuf_new_from_file (splash_path_image (), NULL))) return FALSE; splash_data.pixmaparea.x = 0; splash_data.pixmaparea.y = 0; splash_data.pixmaparea.width = gdk_pixbuf_get_width (pixbuf); splash_data.pixmaparea.height = gdk_pixbuf_get_height (pixbuf); gtk_widget_realize (window); splash_data.logo_pixmap = gdk_pixmap_new (window->window, splash_data.pixmaparea.width, splash_data.pixmaparea.height * 2, gtk_widget_get_visual (window)-> depth); gc = gdk_gc_new (splash_data.logo_pixmap); /* draw a defined content to the Pixmap */ gdk_draw_rectangle (GDK_DRAWABLE (splash_data.logo_pixmap), gc, TRUE, 0, 0, splash_data.pixmaparea.width, splash_data.pixmaparea.height * 2); gdk_draw_pixbuf (GDK_DRAWABLE (splash_data.logo_pixmap), gc, pixbuf, 0, 0, 0, 0, splash_data.pixmaparea.width, splash_data.pixmaparea.height, GDK_RGB_DITHER_NORMAL, 0, 0); g_object_unref (pixbuf); g_object_unref (gc); return TRUE; } void splash_set_text (char *str, ...) { char buf[1024]; va_list va; PangoAttrList *attrlist = NULL; PangoAttribute *attr; if (!splash_showed ()) return; va_start (va, str); g_vsnprintf (buf, sizeof (buf), str, va); va_end (va); pango_layout_set_text (splash_data.layout, buf, -1); attrlist = pango_attr_list_new (); attr = pango_attr_foreground_new (color_end.red, color_end.green, color_end.blue); attr->start_index = 0; attr->end_index = strlen (buf); pango_attr_list_insert (attrlist, attr); attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); attr->start_index = 0; attr->end_index = strlen (buf); pango_attr_list_insert (attrlist, attr); pango_layout_set_attributes (splash_data.layout, attrlist); pango_attr_list_unref (attrlist); gtk_widget_queue_draw_area (splash_data.logo_area, splash_data.textarea.x, splash_data.textarea.y, splash_data.textarea.width, splash_data.textarea.height); while (gtk_events_pending ()) gtk_main_iteration (); } void splash_set_text_with_effect (char *str, ...) { char buf[1024]; va_list va; gchar *text; if (!splash_showed ()) return; va_start (va, str); g_vsnprintf (buf, sizeof (buf), str, va); va_end (va); text = insert_spacers (buf); pango_layout_set_text (splash_data.layout, text, -1); g_free (text); pango_layout_set_attributes (splash_data.layout, NULL); splash_data.animstep = 0; splash_data.timer = g_timeout_add (30, splash_timer_effect, NULL); while (splash_data.timer) { while (gtk_events_pending ()) gtk_main_iteration (); g_usleep (500); } } void splash_sleep (gint timer) { time_t t; if (!splash_showed ()) return; t = time (NULL); while ((time (NULL) - t) <= timer) { while (gtk_events_pending ()) gtk_main_iteration (); g_usleep (500); } } void splash_close_on_click (gboolean value) { splash_data.close_on_click = value; } static const gchar * splash_path_image (void) { static const gchar *path; static gboolean done = FALSE; #ifndef ENABLE_MACOSX return PATH_IMAGE; #endif if (done == FALSE) { path = g_getenv ("MORLA_PATH_IMAGE"); done = TRUE; } if (!path) return PATH_IMAGE; return path; } /* EOF */ morla-0.16.1/src/template.c000066400000000000000000005136571156343060400155020ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" struct invisible_t { struct template_input_t *input; struct rdf_t *rdf; }; enum template_widget_t { TEMPLATE_WIDGET_LITERAL, TEMPLATE_WIDGET_RESOURCE, TEMPLATE_WIDGET_ALT_LITERAL, TEMPLATE_WIDGET_ALT_RESOURCE, TEMPLATE_WIDGET_CARDINALITY, TEMPLATE_WIDGET_OTHER, TEMPLATE_WIDGET_DEFAULT }; struct template_func_t { gchar *(*name) (GtkWidget *, gchar *); gboolean (*low_check) (GtkWidget *, gchar *, gint min_cardinality); gboolean (*high_check) (GtkWidget *, gchar *, gint min_cardinality); void (*destroy) (GtkWidget *); void (*save) (GtkWidget *, struct editor_data_t *, gchar * subject, gchar * predicate, struct unredo_t * unredo, struct rdf_t * rdf_prev); gboolean (*is_your) (GtkWidget *, struct rdf_t *, GList **); void (*get) (GtkWidget *, struct template_value_t * value); void (*set) (GtkWidget *, struct template_value_t * value); enum template_widget_t type; }; GList *template_menus = NULL; GList *template_list = NULL; static void template_import_new (gchar * template, GList ** list, GList * rdf); static void template_parse_input (gchar * input, GList ** list, GList * rdf); static gchar *template_parse_input_typevalue (gchar * node, GList * rdf, GList ** alt); static void template_input_free (struct template_input_t *i); static void template_free (struct template_t *t); static void template_refresh (GtkWidget * treeview); static gint template_remove (GtkWidget * treeview); static void template_open_dialog (GtkWidget * treeview); static void template_activate (GtkWidget * w, GtkTreePath * p, GtkTreeViewColumn * c, GtkWidget * dialog); static GtkWidget *template_widget_create (GList * resources, GList * blanks, struct template_input_t *, gboolean cardinality #ifdef USE_JS , struct js_t *js #endif ); static gboolean template_widget_check (GtkWidget * widget); static void template_widget_save_on (GtkWidget * widget); static gboolean template_widget_is_your (GtkWidget *, struct rdf_t *, GList **); static void template_widget_save_off (GtkWidget * widget); static void template_widget_save_reset (GtkWidget * widget); static void template_widget_save (GtkWidget * widget, struct editor_data_t *, gchar *, struct unredo_t *unredo); static void template_widget_set (GtkWidget * widget, struct template_value_t *); static void template_widget_destroy (GtkWidget * wiget); static gchar *template_widget_name (GtkWidget * wiget); static gchar *template_widget_blank (struct editor_data_t *data); static void template_invisible_save (gchar * subject, struct template_input_t *i, struct editor_data_t *data, struct unredo_t *unredo, struct rdf_t *); static void template_update_real (GtkWidget * menu); static gboolean template_run (GtkWidget * widget, struct template_t *); static GtkWidget *template_run_create (GtkWidget * widget_inputs, struct template_t *t, GList * resources, GList * blanks, GtkWidget ** type_resource, GtkWidget ** type_blanknode, GtkWidget ** object, GtkWidget ** toggle); static void template_edit_set (GList ** wi, GList ** rdf, gchar * subject); static GList *template_edit_set_sort (GList * widgets); static void template_edit_invisible (GList ** invisible, GList ** rdf, gchar * subject, struct template_t *t); static void template_set_size (GtkWidget * dialog, GtkWidget * sw, GtkWidget *); #ifdef USE_JS static gboolean template_destroy (GtkWidget * widget, GdkEvent * event, gpointer user_data); static gboolean template_js_evaluate (struct js_t *js, GtkWidget * widget, gchar * func); #endif /* UPDATE DEI MENU **********************************************************/ /* Questa funzione aggiorna i menu con i template importati: */ void template_update (void) { g_list_foreach (template_menus, (GFunc) template_update_real, NULL); } /* Check fra le categorie di due template (utile per l'ordinamento) : */ static gint template_strcmp (struct template_t *a, struct template_t *b) { if (!a->category && !b->category) return 0; if (!a->category && b->category) return 1; if (a->category && !b->category) return -1; return strcmp (a->category, b->category); } /* Estrapolare un nome sensato da una categoria sotto forma di URI: */ static gchar * template_parse_category (gchar * str) { gint len = strlen (str); while (--len) { if (*(str + len) == '#' || *(str + len) == '/') return str + len + 1; } return str; } /* Questa funzione aggiorna un menu con la lista dei template: */ static void template_update_real (GtkWidget * menu) { GList *list; GtkWidget *menuitem; GtkWidget *label; struct template_t *t; gchar *category; gchar *str; gpointer func; /* Prelevo la funzione da eseguire al click: */ func = g_object_get_data (G_OBJECT (menu), "func"); /* Cancello tutto cio' che c'e': */ gtk_container_foreach (GTK_CONTAINER (menu), (GtkCallback) gtk_widget_destroy, NULL); if (!template_list) return; /* Ordino la lista: */ template_list = g_list_sort (template_list, (GCompareFunc) template_strcmp); /* Creo il menu: */ menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menu), menuitem); /* Setto il primo nome della categoria: */ category = ((struct template_t *) template_list->data)->category; if (category) { gchar *s = markup (template_parse_category (category)); str = g_strdup_printf ("%s", s); g_free (s); } else str = g_strdup_printf (_("Generic")); label = gtk_label_new (str); g_free (str); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); gtk_container_add (GTK_CONTAINER (menuitem), label); /* Per ogni item della lista aggiungo una voce: */ list = template_list; while (list) { t = list->data; /* Se cambia categoria: */ if (category && ((!t->category && category) || strcmp (t->category, category))) { category = t->category; menuitem = gtk_menu_item_new (); gtk_widget_set_sensitive (menuitem, FALSE); gtk_container_add (GTK_CONTAINER (menu), menuitem); menuitem = gtk_menu_item_new (); gtk_container_add (GTK_CONTAINER (menu), menuitem); if (category) { gchar *s = markup (template_parse_category (category)); str = g_strdup_printf ("%s", s); g_free (s); } else str = g_strdup_printf (_("Generic")); label = gtk_label_new (str); g_free (str); gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_container_add (GTK_CONTAINER (menuitem), label); } /* Inserisco il template e lo rendo cliccabile: */ menuitem = gtk_menu_item_new_with_label (t->name); gtk_container_add (GTK_CONTAINER (menu), menuitem); g_signal_connect ((gpointer) menuitem, "activate", G_CALLBACK (func), t); list = list->next; } gtk_widget_show_all (menu); } /* IMPORT DEI TEMPLATE ******************************************************/ /* Questa funzione importa templates da file: */ void template_import_file (GtkWidget * w, gpointer dummy) { gchar *file; gchar *uri; gchar s[1024]; /* Statusbar: */ editor_statusbar_lock = LOCK; statusbar_set (_("Import a new template...")); /* Richiedo un file: */ if (! (file = file_chooser (_("Open a template file..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_OPEN, NULL))) { statusbar_set (_("Open a template file: aborted")); editor_statusbar_lock = WAIT; return; } /* Creo un uri compatibile: */ uri = g_filename_to_uri (file, NULL, NULL); /* Provo ad importarlo: */ if (uri && template_import (uri, NULL, TRUE, TRUE) == TRUE) { template_update (); template_save (); g_snprintf (s, sizeof (s), _("Template %s imported"), file); statusbar_set (s); g_free (uri); } else { statusbar_set (_("Open a template file: error!")); if (uri) g_free (uri); } /* Libero la statusbar e la memoria: */ editor_statusbar_lock = WAIT; g_free (file); } /* Come sopra ma per gli uri: */ void template_import_uri (GtkWidget * w, gpointer dummy) { gchar *uri; gchar s[1024]; struct download_t *download; editor_statusbar_lock = LOCK; statusbar_set (_("Import a new template...")); if (!(uri = uri_chooser (_("Import a new template..."), &download))) { statusbar_set (_("Import a new template: about")); editor_statusbar_lock = WAIT; return; } /* Importo: */ if (template_import (uri, download, TRUE, TRUE) == TRUE) { template_update (); template_save (); g_snprintf (s, sizeof (s), _("Template %s imported"), uri); statusbar_set (s); } if (download) download_free (download); /* Statusbar e memory */ editor_statusbar_lock = WAIT; g_free (uri); } /* Funzione utile per ordinare: */ static gint template_list_sort (struct template_t *t1, struct template_t *t2) { return strcmp (t1->name, t2->name); } /* Questa funzione importa un uri: */ gboolean template_import (gchar * uri, struct download_t * download, gboolean msg, gboolean thread) { GList *list, *nslist; GList *l; GList *t = NULL, *templates = NULL; struct rdf_t *rdf; gchar s[1024]; gboolean ok = TRUE; /* Se devo usare i thread parso l'RDF con rdf_parse_thread: */ if (thread == TRUE) { if (rdf_parse_thread (uri, download, &list, &nslist, FALSE, NULL, NULL) == FALSE) ok = FALSE; } /* Altrimenti faccio senza thread: */ else { if (rdf_parse (uri, download, FALSE, &list, NULL, NULL) == FALSE) ok = FALSE; else if (namespace_parse (list, &nslist) == FALSE) ok = FALSE; } /* Se ci sono problemi comunico solo se devo: */ if (ok == FALSE) { if (msg) { g_snprintf (s, sizeof (s), _("Error opening resource '%s'"), uri); dialog_msg (s); } return FALSE; } /* Libero memoria: */ g_list_foreach (nslist, (GFunc) namespace_free, NULL); g_list_free (nslist); /* Cerco delle valide triplette di possibili template e li salvo dentro * ad una lista: */ l = list; while (l) { rdf = l->data; if (!strcmp (rdf->predicate, RDF_TYPE) && rdf->object_type == RDF_OBJECT_RESOURCE && !strcmp (rdf->object, MORLA_NS MORLA_TEMPLATE)) t = g_list_append (t, rdf->subject); l = l->next; } /* Se ho una lista per ognuni elemento provo ad importare il template: */ if (t) { l = t; while (l) { template_import_new (l->data, &templates, list); l = l->next; } g_list_free (t); } /* Libero altra memoria: */ g_list_foreach (list, (GFunc) rdf_free, NULL); g_list_free (list); /* Se non ho template importati, comuinico: */ if (!templates) { if (msg) dialog_msg (_("No template in this RDF Document!")); return FALSE; } /* Per ogni template controllo se ce l'ho gia: */ l = templates; while (l) { ok = TRUE; /* Cerco duplicati: */ list = template_list; while (list) { /* Se coincidono: */ if (!strcmp (((struct template_t *) l->data)->uri, ((struct template_t *) list->data)->uri)) { /* e le versioni sono uguali... */ if (!strcmp (((struct template_t *) l->data)->version, ((struct template_t *) list->data)->version)) ok = FALSE; /* altrimenti rimuovo quello vecchio: */ else { template_free (list->data); template_list = g_list_remove (template_list, list->data); } break; } list = list->next; } /* Se non ci sono problemi aggiungo: */ if (ok == TRUE) { template_list = g_list_append (template_list, l->data); template_list = g_list_sort (template_list, (GCompareFunc) template_list_sort); } /* altrimenti comunico e libero la memoria: */ else { if (msg) { g_snprintf (s, sizeof (s), _("Duplicated template '%s'!"), ((struct template_t *) l->data)->name); dialog_msg (s); } template_free (l->data); } l = l->next; } /* Libero memoria finale: */ g_list_free (templates); return TRUE; } /* Questa funzione cerca di importare un template preciso dato una lista * di triplette e un nome: */ static void template_import_new (gchar * template, GList ** list, GList * rdf) { GList *l, *input = NULL; struct rdf_t *r; gchar *uri = NULL; gchar *name = NULL; gchar *version = NULL; gchar *category = NULL; struct template_t *ret; GList *input_ret = NULL; l = rdf; while (l) { r = l->data; if (!strcmp (r->subject, template)) { /* Cerco le triplette che hanno alcune caratteriche proprieta': */ if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, RDFS_LABEL)) { name = r->object; uri = r->subject; } else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_HASVERSION)) version = r->object; else if (r->object_type == RDF_OBJECT_RESOURCE && !strcmp (r->predicate, MORLA_NS MORLA_CATEGORY)) category = r->object; else if (r->object_type != RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_HASINPUT)) input = g_list_append (input, r->object); } l = l->next; } /* Ultimi controlli: */ if (!input) { g_message (_("No input for template '%s'"), template); return; } if (!uri || !name || !version) { g_message (_("No URI, name or version for template '%s'"), template); g_list_free (input); return; } /* Per ogni input provo ad importarlo: */ l = input; while (l) { template_parse_input (l->data, &input_ret, rdf); l = l->next; } /* Libero memoria: */ g_list_free (input); /* se non ho importato nessun input: */ if (!input_ret) { g_message (_("No input for template '%s'"), template); return; } /* Alloco memoria ed inserisco nella lista: */ ret = (struct template_t *) g_malloc0 (sizeof (struct template_t)); ret->name = g_strdup (name); ret->uri = g_strdup (uri); ret->version = g_strdup (version); ret->category = category ? g_strdup (category) : NULL; ret->input = input_ret; (*list) = g_list_append (*list, ret); } /* Funzione per l'import di input di template: */ static void template_parse_input (gchar * input, GList ** list, GList * rdf) { GList *l; struct rdf_t *r; GList *labels = NULL; GList *comments = NULL; gint min_cardinality = 0; gint max_cardinality = 1; gchar *typevalue = NULL; GList *alt_typevalue = NULL; gchar *default_value = NULL; gchar *default_language = NULL; gchar *default_datatype = NULL; gchar *function_init = NULL; gchar *function_check = NULL; gchar *function_destroy = NULL; gchar *function_save = NULL; gboolean visible = 1; gboolean lang = 1; gboolean datatype = 1; gboolean longtext = 0; gchar *rdfs = NULL; struct template_input_t *ret; struct info_box_t *lang_input; gboolean ok = 0; l = rdf; /* Per ogni tripletta cerco alcune property particolari: */ while (l) { r = l->data; if (!strcmp (r->subject, input)) { if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, RDFS_LABEL)) { lang_input = g_malloc (sizeof (struct info_box_t)); lang_input->value = g_strdup (r->object); lang_input->lang = r->lang ? g_strdup (r->lang) : NULL; labels = g_list_append (labels, lang_input); } else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, RDFS_COMMENT)) { lang_input = g_malloc (sizeof (struct info_box_t)); lang_input->value = g_strdup (r->object); lang_input->lang = r->lang ? g_strdup (r->lang) : NULL; comments = g_list_append (comments, lang_input); } else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_MINCARD)) min_cardinality = atoi (r->object); else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_MAXCARD)) max_cardinality = atoi (r->object); else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_VISIBLE)) visible = !g_ascii_strcasecmp (r->object, "yes"); else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_LANGUAGE)) lang = !g_ascii_strcasecmp (r->object, "yes"); else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_DATATYPE)) datatype = !g_ascii_strcasecmp (r->object, "yes"); else if (!strcmp (r->predicate, MORLA_NS MORLA_TYPEVALUE)) { switch (r->object_type) { case RDF_OBJECT_RESOURCE: typevalue = r->object; break; case RDF_OBJECT_BLANK: typevalue = template_parse_input_typevalue (r->object, rdf, &alt_typevalue); break; default: break; } } else if (!strcmp (r->predicate, MORLA_NS MORLA_DEFAULTVALUE)) default_value = r->object; else if (r->object_type == RDF_OBJECT_RESOURCE && !strcmp (r->predicate, MORLA_NS MORLA_DEFAULTDATATYPE)) default_datatype = r->object; else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_DEFAULTLANGUAGE)) default_language = r->object; else if (r->object_type == RDF_OBJECT_RESOURCE && !strcmp (r->predicate, MORLA_NS MORLA_HASRDFS)) rdfs = r->object; else if (r->object_type == RDF_OBJECT_RESOURCE && !strcmp (r->predicate, RDF_TYPE) && !strcmp (r->object, MORLA_NS MORLA_INPUT)) ok = 1; else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_FUNCTIONINIT)) function_init = r->object; else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_FUNCTIONCHECK)) function_check = r->object; else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_FUNCTIONDESTROY)) function_destroy = r->object; else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_FUNCTIONSAVE)) function_save = r->object; else if (r->object_type == RDF_OBJECT_LITERAL && !strcmp (r->predicate, MORLA_NS MORLA_LONGTEXT)) longtext = !g_ascii_strcasecmp (r->object, "yes"); } l = l->next; } /* Ultimi check: */ if (!ok || !rdfs || !labels) { if (labels) { g_list_foreach (labels, (GFunc) info_box_free, NULL); g_list_free (labels); } if (comments) { g_list_foreach (comments, (GFunc) info_box_free, NULL); g_list_free (comments); } g_message (_("Input '%s' has no rdfs, label or istance of input!"), input); return; } /* Controllo se ci sono problemi nella visibilita': */ if (!visible && (!default_value || (strcmp (typevalue, RDFS_LITERAL) && strcmp (typevalue, RDFS_RESOURCE)))) { g_list_foreach (labels, (GFunc) info_box_free, NULL); g_list_free (labels); if (comments) { g_list_foreach (comments, (GFunc) info_box_free, NULL); g_list_free (comments); } g_message (_ ("This input '%s' is novisible but has not a defualt value!"), input); return; } /* Controllo se ci sono problemi nella cardinalita' degli invisibili visibilita': */ if (!visible && (!max_cardinality > 0 || min_cardinality != 1)) { g_list_foreach (labels, (GFunc) info_box_free, NULL); g_list_free (labels); if (comments) { g_list_foreach (comments, (GFunc) info_box_free, NULL); g_list_free (comments); } g_message (_ ("This input '%s' is novisible but has max_cardinality or min_cardinality != 1!"), input); return; } /* Alloco e inserisco nella lista: */ ret = (struct template_input_t *) g_malloc0 (sizeof (struct template_input_t)); ret->labels = labels; ret->comments = comments; /* Controllo il typevalue: */ if (typevalue) { if (!strcmp (typevalue, RDFS_LITERAL)) { if (alt_typevalue) { g_message (_ ("This input '%s' has a alternative list of value but it is not a alternative typevalue!"), input); template_input_free (ret); return; } ret->typevalue = TEMPLATE_INPUT_TYPEVALUE_LITERAL; ret->datatype = datatype; ret->lang = lang; } else if (!strcmp (typevalue, RDFS_RESOURCE)) { if (alt_typevalue) { g_message (_ ("This input '%s' has a alternative list of value but it is not a alternative typevalue!"), input); template_input_free (ret); return; } ret->typevalue = TEMPLATE_INPUT_TYPEVALUE_RESOURCE; } else if (!strcmp (typevalue, MORLA_NS MORLA_ALT_LITERAL)) { if (!alt_typevalue) { g_message (_("This input '%s' has no a alternative list of value!"), input); template_input_free (ret); return; } ret->typevalue = TEMPLATE_INPUT_TYPEVALUE_ALT_LITERAL; ret->alt_typevalue = alt_typevalue; } else if (!strcmp (typevalue, MORLA_NS MORLA_ALT_RESOURCE)) { if (!alt_typevalue) { g_message (_("This input '%s' has no a alternative list of value!"), input); template_input_free (ret); return; } ret->typevalue = TEMPLATE_INPUT_TYPEVALUE_ALT_RESOURCE; ret->alt_typevalue = alt_typevalue; } else { if (alt_typevalue) { g_message (_ ("This input '%s' has a alternative list of value but it is not a alternative typevalue!"), input); template_input_free (ret); return; } ret->other_typevalue = g_strdup (typevalue); ret->typevalue = TEMPLATE_INPUT_TYPEVALUE_OTHER; } } else ret->typevalue = TEMPLATE_INPUT_TYPEVALUE_NONE; /* Resto dei valori: */ ret->rdfs = g_strdup (rdfs); if (default_language) ret->default_language = g_strdup (default_language); if (default_datatype) { if (datatype_exists (default_datatype) == TRUE) ret->default_datatype = g_strdup (default_datatype); else { g_message (_ ("The input '%s' tries to use a impossibile datatype '%s'."), input, default_datatype); template_input_free (ret); return; } } if (default_value) ret->default_value = g_strdup (default_value); if (min_cardinality > 0) ret->min_cardinality = min_cardinality; if (max_cardinality > 0 && max_cardinality < min_cardinality) max_cardinality = min_cardinality; if (function_init) ret->function_init = g_strdup (function_init); if (function_check) ret->function_check = g_strdup (function_check); if (function_destroy) ret->function_destroy = g_strdup (function_destroy); if (function_save) ret->function_save = g_strdup (function_save); ret->longtext = longtext; ret->max_cardinality = max_cardinality; ret->visible = visible; (*list) = g_list_append (*list, ret); } /* Questa funzione crea la lista di alternative */ static gchar * template_parse_input_typevalue (gchar * node, GList * rdf, GList ** alt) { struct rdf_t *data; gchar *ret = NULL; GList *list = NULL; while (rdf) { data = rdf->data; if (!strcmp (data->subject, node)) { if (!strcmp (data->predicate, RDF_TYPE) && data->object_type == RDF_OBJECT_RESOURCE) ret = data->object; else if (!strncmp (data->predicate, RDF_ITEM, strlen (RDF_ITEM))) { list = g_list_append (list, g_strdup (data->object)); } } rdf = rdf->next; } *alt = list; return ret; } /* SALVATAGGIO **************************************************************/ static void template_save_init (FILE * fl) { fprintf (fl, "\n"); fprintf (fl, "\n\n"); } static void template_save_one (FILE * fl, struct template_t *template, gint t_id) { struct template_input_t *input; struct info_box_t *lang_input; gchar *str; GList *ll, *list; gint i, id; str = markup (template->uri); fprintf (fl, " \n", str); g_free (str); fprintf (fl, " \n", MORLA_NS MORLA_TEMPLATE); str = markup (template->name); fprintf (fl, " %s\n", str); g_free (str); str = markup (template->version); fprintf (fl, " %s\n", str); g_free (str); if (template->category) { str = markup (template->category); fprintf (fl, " \n", str); g_free (str); } for (i = 0, id = g_list_length (template->input); i < id; i++) fprintf (fl, " \n", t_id, i); fprintf (fl, " \n\n"); i = 0; /* Per ogni input scrivo: */ ll = template->input; while (ll) { input = ll->data; if (input->typevalue == TEMPLATE_INPUT_TYPEVALUE_ALT_RESOURCE) { GList *list; gint id = 0; fprintf (fl, " \n", t_id, i); fprintf (fl, " \n", MORLA_NS MORLA_ALT_RESOURCE); list = input->alt_typevalue; while (list) { fprintf (fl, " \n", ++id, (gchar *) list->data); list = list->next; } fprintf (fl, " \n\n"); } if (input->typevalue == TEMPLATE_INPUT_TYPEVALUE_ALT_LITERAL) { GList *list; gint id = 1; fprintf (fl, " \n", t_id, i); fprintf (fl, " \n", MORLA_NS MORLA_ALT_LITERAL); list = input->alt_typevalue; while (list) { fprintf (fl, " %s\n", id, (gchar *) list->data, id); id++; list = list->next; } fprintf (fl, " \n\n"); } fprintf (fl, " \n", t_id, i); fprintf (fl, " \n", MORLA_NS MORLA_INPUT); list = input->labels; while (list) { lang_input = list->data; fprintf (fl, " lang) { str = markup (lang_input->lang); fprintf (fl, " xml:lang=\"%s\"", str); g_free (str); } str = markup (lang_input->value); fprintf (fl, ">%s\n", str); g_free (str); list = list->next; } str = markup (input->rdfs); fprintf (fl, " \n", str); g_free (str); fprintf (fl, " %d\n", input->min_cardinality); fprintf (fl, " %d\n", input->max_cardinality); fprintf (fl, " %s\n", input->visible ? "yes" : "no"); if (input->function_init) fprintf (fl, " %s\n", input->function_init); if (input->function_check) fprintf (fl, " %s\n", input->function_check); if (input->function_destroy) fprintf (fl, " %s\n", input->function_destroy); if (input->function_save) fprintf (fl, " %s\n", input->function_save); fprintf (fl, " %s\n", input->longtext ? "yes" : "no"); switch (input->typevalue) { case TEMPLATE_INPUT_TYPEVALUE_NONE: break; case TEMPLATE_INPUT_TYPEVALUE_RESOURCE: fprintf (fl, " \n", RDFS_RESOURCE); break; case TEMPLATE_INPUT_TYPEVALUE_LITERAL: fprintf (fl, " \n", RDFS_LITERAL); fprintf (fl, " %s\n", input->lang ? "yes" : "no"); fprintf (fl, " %s\n", input->datatype ? "yes" : "no"); break; case TEMPLATE_INPUT_TYPEVALUE_ALT_RESOURCE: case TEMPLATE_INPUT_TYPEVALUE_ALT_LITERAL: fprintf (fl, " \n", t_id, i); break; case TEMPLATE_INPUT_TYPEVALUE_OTHER: fprintf (fl, " \n", input->other_typevalue); break; } if (input->default_value) { str = markup (input->default_value); fprintf (fl, " %s\n", str); g_free (str); } if (input->default_language) { str = markup (input->default_language); fprintf (fl, " %s\n", str); g_free (str); } if (input->default_datatype) { str = markup (input->default_datatype); fprintf (fl, " \n", str); g_free (str); } list = input->comments; while (list) { lang_input = list->data; fprintf (fl, " lang) { str = markup (lang_input->lang); fprintf (fl, " xml:lang=\"%s\"", str); g_free (str); } str = markup (lang_input->value); fprintf (fl, ">%s\n", str); g_free (str); list = list->next; } fprintf (fl, " \n\n"); i++; ll = ll->next; } } static void template_save_close (FILE * fl) { fprintf (fl, "\n\n"); } /* Questa funzione salva i template dentro ad un file: */ void template_save (void) { gchar *path; FILE *fl; GList *list; gint t_id; path = g_build_path (G_DIR_SEPARATOR_S, g_get_user_config_dir (), PACKAGE, "template.rdf", NULL); if (!template_list) { if (g_file_test (path, G_FILE_TEST_EXISTS) == TRUE && g_remove (path)) dialog_msg (_("Error saving the template file!")); g_free (path); return; } if (!(fl = g_fopen (path, "wb"))) { dialog_msg (_("Error saving the template file!")); g_free (path); return; } g_free (path); t_id = 0; template_save_init (fl); /* Per ogni template scrivo: */ for (list = template_list; list; list = list->next) { template_save_one (fl, list->data, t_id); t_id++; } template_save_close (fl); fclose (fl); } /* Questa funzione salva un template dentro ad un file: */ void template_save_single (GtkWidget * w, struct template_t *template) { gchar *path; FILE *fl; editor_statusbar_lock = LOCK; statusbar_set (_("Export a template...")); /* Richiedo un file: */ if (! (path = file_chooser (_("Export a template..."), GTK_SELECTION_SINGLE, GTK_FILE_CHOOSER_ACTION_SAVE, NULL))) { statusbar_set (_("Export a template: aborted")); editor_statusbar_lock = WAIT; return; } if (!(fl = g_fopen (path, "wb"))) { dialog_msg (_("Error saving the template into a file!")); statusbar_set (_("Export a template: error.")); editor_statusbar_lock = WAIT; g_free (path); return; } g_free (path); template_save_init (fl); template_save_one (fl, template, 0); template_save_close (fl); fclose (fl); statusbar_set (_("Export a template: done.")); editor_statusbar_lock = WAIT; } /* DISTRUZIONE ***************************************************************/ /* Questa funzione libera la memoria di un input */ static void template_input_free (struct template_input_t *i) { if (!i) return; if (i->labels) { g_list_foreach (i->labels, (GFunc) info_box_free, NULL); g_list_free (i->labels); } if (i->rdfs) g_free (i->rdfs); if (i->alt_typevalue) { g_list_foreach (i->alt_typevalue, (GFunc) g_free, NULL); g_list_free (i->alt_typevalue); } if (i->other_typevalue) g_free (i->other_typevalue); if (i->comments) { g_list_foreach (i->comments, (GFunc) info_box_free, NULL); g_list_free (i->comments); } if (i->default_value) g_free (i->default_value); if (i->default_language) g_free (i->default_language); if (i->default_datatype) g_free (i->default_datatype); if (i->function_init) g_free (i->function_init); if (i->function_check) g_free (i->function_check); if (i->function_destroy) g_free (i->function_destroy); if (i->function_save) g_free (i->function_save); g_free (i); } /* Questa funzione libera la memoria di un template: */ static void template_free (struct template_t *t) { if (!t) return; if (t->uri) g_free (t->uri); if (t->name) g_free (t->name); if (t->version) g_free (t->version); if (t->category) g_free (t->category); if (t->input) { g_list_foreach (t->input, (GFunc) template_input_free, NULL); g_list_free (t->input); } g_free (t); } /* FINESTRA DEI TEMPLATE *****************************************************/ /* Questa funzione mostra i template importati in una interfaccia a lista: */ void template (GtkWidget * w, gpointer dummy) { GtkWidget *window, *hbox, *scrolledwindow, *treeview, *button, *frame; GtkListStore *model; GtkTreeViewColumn *column; GtkCellRenderer *renderer; GtkTreeSelection *selection; gchar s[1024]; gint ret; g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Templates import")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_widget_set_size_request (window, 400, 200); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), hbox, TRUE, TRUE, 0); frame = gtk_frame_new (_("Templates import")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); g_signal_connect ((gpointer) treeview, "row_activated", G_CALLBACK (template_activate), window); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Template"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Version"), renderer, "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Category"), renderer, "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("URI"), renderer, "text", 3, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); button = gtk_button_new_from_stock ("gtk-add"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-remove"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-close"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_NO); gtk_widget_set_can_default(button, TRUE); /* Refresh della finestra: */ template_refresh (treeview); gtk_widget_show_all (window); g_object_unref (model); while (1) { ret = gtk_dialog_run (GTK_DIALOG (window)); if (ret == GTK_RESPONSE_OK) { if (!gtk_tree_selection_count_selected_rows (selection)) { dialog_msg (_("Select a template!")); continue; } template_open_dialog (treeview); gtk_widget_hide (window); break; } else if (ret == GTK_RESPONSE_CANCEL) { if (!gtk_tree_selection_count_selected_rows (selection)) { dialog_msg (_("Select a template!")); continue; } if (dialog_ask (_("Sure to remove this template?")) == GTK_RESPONSE_OK && template_remove (treeview)) { template_update (); template_save (); template_refresh (treeview); } } else break; } gtk_widget_destroy (window); } /* Questa funzione refreshia l'intefaccia di sopra: */ static void template_refresh (GtkWidget * treeview) { GtkListStore *store; GtkTreeIter iter; GList *list; struct template_t *template; /* Rimuovo tutto: */ store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, NULL, 0)) gtk_list_store_remove (store, &iter); /* Appendo: */ list = template_list; while (list) { template = (struct template_t *) list->data; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, template->name, 1, template->version, 2, template->category, 3, template->uri, -1); list = list->next; } } /* Questa funzione rimuove gli input selezionati: */ static gint template_remove (GtkWidget * treeview) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { gint i; GtkTreePath *path; GList *list = template_list; path = gtk_tree_model_get_path (model, &iter); i = gtk_tree_path_get_indices (path)[0]; while (list) { if (!i) { template_free (list->data); template_list = g_list_remove (template_list, list->data); break; } i--; list = list->next; } gtk_tree_path_free (path); return 1; } return 0; } /* Questa funzione attiva l'uso di un template selezionato nell'interfaccia: */ static void template_open_dialog (GtkWidget * treeview) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { gint i; GtkTreePath *path; GList *list = template_list; path = gtk_tree_model_get_path (model, &iter); i = gtk_tree_path_get_indices (path)[0]; /* Uso la funzione template_open: */ if ((list = g_list_nth (template_list, i))) template_open (NULL, list->data); gtk_tree_path_free (path); } } /* Questa funzione simula il click del pulsante alla selezione di una riga * dell'interfaccia: */ static void template_activate (GtkWidget * w, GtkTreePath * p, GtkTreeViewColumn * c, GtkWidget * dialog) { gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); } /* REMOTE TEMPLATE ***********************************************************/ static GList *template_remote_list = NULL; /* Questa funzione distrugge la lista dei template remoti gia' richiesti: */ static void template_remote_init (void) { if (template_remote_list) { g_list_free (template_remote_list); template_remote_list = NULL; } } /* Questa funzione controlla se ci sono elementi gia' richiamati: */ static void template_remote_parse (GList ** remote) { GList *l = template_remote_list; while (l) { GList *list = *remote; while (list) { if (!strcmp (list->data, l->data)) { *remote = g_list_remove (*remote, l->data); break; } list = list->next; } l = l->next; } } /* Questa funzione aggiunge tutti quei templete che si e' richiesto di * aggiungere: */ static void template_remote_add (GList * add) { while (add) { template_remote_list = g_list_append (template_remote_list, add->data); add = add->next; } } /* Questa funzione mostra la finestra per richeidere l'import di template remotati */ static gint template_dialog_remote (GList * remote) { GString *str; GList *list; gchar *buf; gint ret; template_remote_add (remote); str = g_string_new (_ ("This template requires other templates. Do you want import them?\n")); for (list = remote; list; list = list->next) g_string_append_printf (str, "%s\n", (gchar *) list->data); buf = g_string_free (str, FALSE); ret = dialog_ask_with_cancel (buf); g_free (buf); return ret; } /* CREATE TEMPLATE ***********************************************************/ /* Questa funzione crea l'interfaccia per l'uso di un template: */ static GtkWidget * template_open_real (GList * resources, GList * blanks, struct template_t *t) { GList *list; GList *remote; GList *real; GtkWidget *box; GtkWidget *widget; gint i; #ifdef USE_JS struct js_t *js; #endif /* Controllo se qualche input richiede template remotati: */ list = t->input; remote = NULL; while (list) { struct template_input_t *input = list->data; if (input->other_typevalue) remote = g_list_append (remote, input->other_typevalue); list = list->next; } if (remote) { GList *l; /* Rimuovo eventuali duplicati: */ remote = create_no_dup (remote); /* Rimuovo quelli che ho gia': */ list = template_list; while (list) { struct template_t *t = list->data; l = remote; while (l) { if (!strcmp (t->uri, l->data)) { remote = g_list_remove (remote, l->data); break; } l = l->next; } list = list->next; } } /* Controllo se li ho gia' chiesti: */ if (remote) template_remote_parse (&remote); if (remote) { /* Rimuovo eventuali duplicati: */ remote = create_no_dup (remote); switch (template_dialog_remote (remote)) { /* Importare i template remotati: */ case GTK_RESPONSE_OK: for (list = remote; list; list = list->next) template_import ((gchar *) list->data, NULL, TRUE, TRUE); template_update (); template_save (); break; /* Continuo: */ case GTK_RESPONSE_NO: break; /* Esco: */ default: g_list_free (remote); return NULL; } g_list_free (remote); } #ifdef USE_JS /* JS Context: */ js = js_new (); #endif box = gtk_table_new (0, 0, FALSE); /* Tolgo tra tutti gli input quelli non visibili: */ list = t->input; real = NULL; while (list) { if (((struct template_input_t *) list->data)->visible) real = g_list_append (real, list->data); list = list->next; } /* Per ogni input visibile creo l'oggetto grafico: */ list = real; i = 0; while (list) { widget = template_widget_create (resources, blanks, (struct template_input_t *) list->data, TRUE #ifdef USE_JS , js #endif ); gtk_table_attach (GTK_TABLE (box), widget, 0, 1, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); /* 2 per riga: */ if (list->next) { list = list->next; widget = template_widget_create (resources, blanks, (struct template_input_t *) list->data, TRUE #ifdef USE_JS , js #endif ); gtk_table_attach (GTK_TABLE (box), widget, 1, 2, i, i + 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND, 3, 3); } i++; list = list->next; } #ifdef USE_JS g_object_set_data (G_OBJECT (box), "js", js); g_signal_connect ((gpointer) box, "destroy", G_CALLBACK (template_destroy), NULL); #endif /* Libero memoria: */ g_list_free (real); return box; } /* Questa funzione crea l'interfaccia per l'uso di un template: */ void template_open (GtkWidget * w, struct template_t *t) { GtkWidget *dialog; GtkWidget *vbox, *hbox, *gbox; GtkWidget *image; GtkWidget *frame; GtkWidget *button; GtkWidget *label; GtkWidget *subject; GtkWidget *sw; GtkWidget *button_subject; GtkWidget *button_subject_this; GtkWidget *widget_inputs; GList *list; GList *resources; GList *blanks; GSList *l; struct editor_data_t *data = editor_get_data (); gchar s[1024]; if (!data) return; /* Annullo i template remotati richiesti precedentemente: */ template_remote_init (); resources = create_resources (data); resources = create_resources_by_rdfs (resources); blanks = create_blank (data); if (!(widget_inputs = template_open_real (resources, blanks, t))) { g_list_free (resources); g_list_free (blanks); return; } dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s: %s %s", PACKAGE, VERSION, _("Template"), t->name, t->version); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); label = gtk_label_new (_("Subject")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, 5); vbox = gtk_vbox_new (FALSE, 3); gtk_container_add (GTK_CONTAINER (frame), vbox); gbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0); l = NULL; button = gtk_radio_button_new_with_label (NULL, _("Resource: ")); button_subject = button; gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); gtk_box_pack_start (GTK_BOX (gbox), button, FALSE, FALSE, 3); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (gbox), hbox, TRUE, TRUE, 5); /* Creazione soggetto con freccia: */ subject = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), subject, TRUE, TRUE, 0); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "list", resources); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), subject); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); gbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0); button = gtk_radio_button_new_with_label (NULL, _("This document")); button_subject_this = button; gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); gtk_box_pack_start (GTK_BOX (gbox), button, TRUE, TRUE, 3); sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), sw, TRUE, TRUE, 5); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), widget_inputs); button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); template_set_size (dialog, sw, widget_inputs); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { GList *old; gchar *text; struct unredo_t *unredo; /* Check del soggetto: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_subject_this)) == TRUE) text = THIS_DOCUMENT; else text = (gchar *) gtk_entry_get_text (GTK_ENTRY (subject)); if (!text || !*text) { dialog_msg (_("Invalid subject!")); continue; } text = g_strdup (text); /* Controllo TUTTI i widget di input: */ list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { if (template_widget_check (list->data)) break; list = list->next; } /* Si lamenta la funzione widget_check, quindi io devo solo * continuare: */ if (list) { g_free (text); g_list_free (old); continue; } /* A questo punto inserisco, quindi undo: */ unredo = unredo_new (data, UNREDO_TYPE_ADD); list = old; while (list) { /* Funzione che fa l'inserimento: */ template_widget_save (list->data, data, text, unredo); list = list->next; } g_list_foreach (old, (GFunc) template_widget_destroy, NULL); g_list_free (old); /* Poi tutti gli oggetti invisibili: */ list = t->input; while (list) { if (!((struct template_input_t *) list->data)->visible) template_invisible_save (text, list->data, data, unredo, NULL); list = list->next; } g_free (text); data->changed = TRUE; /* Refreshio i namespace e li rigenero */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); namespace_parse (data->rdf, &data->namespace); editor_refresh (data); break; } /* Libero memoria: */ g_list_free (resources); g_list_free (blanks); gtk_widget_destroy (dialog); } /* Setto la dimensione della finestra di template */ static void template_set_size (GtkWidget * dialog, GtkWidget * sw, GtkWidget * w) { gint h; /* Chiedo alle gtk di realizzare l'oggetto: */ gtk_widget_show_all (dialog); if (w->allocation.height > 1 && w->allocation.height <= gdk_screen_height () * 2 / 3) h = w->allocation.height + 200; else h = gdk_screen_height () * 2 / 3; gdk_window_move_resize (dialog->window, gdk_screen_width () / 2 - dialog->allocation.width / 2, gdk_screen_height () / 2 - h / 2, dialog->allocation.width, h); } /* Questa funzione rimuove un elemento dalla liste multiple di input: */ static void template_widget_list_remove (GtkWidget * widget, GtkTreeView * treeview) { GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (treeview); GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview); GtkWidget *add = g_object_get_data (G_OBJECT (widget), "add"); /* Se c'e' qualcosa selezionato: */ if (gtk_tree_selection_get_selected (selection, NULL, &iter)) { gint i; GtkWidget *w; struct template_input_t *input; gtk_tree_model_get (model, &iter, 1, &w, -1); if (w) { w = gtk_widget_get_toplevel (w); gtk_widget_destroy (w); } /* Rimuovo l'elemento: */ gtk_list_store_remove (GTK_LIST_STORE (model), &iter); /* Guardo quali pulsanti devo disattivare o attivare: */ i = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (model), NULL); input = g_object_get_data (G_OBJECT (widget), "input"); if (input->max_cardinality > 0 && i < input->max_cardinality) gtk_widget_set_sensitive (add, TRUE); if (!i) gtk_widget_set_sensitive (widget, FALSE); } } /* Questa funzione mostra un elemento gia' presente nella lista a cardinalita': */ static void template_widget_list_select (GtkWidget * widget, GtkTreePath * path, GtkTreeViewColumn * c, gpointer dummy) { GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget)); GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); GtkTreeIter iter; GtkWidget *dialog; GtkWidget *entry; GtkWidget *w; if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { dialog_msg (_("Select a input!")); return; } gtk_tree_model_get (model, &iter, 1, &w, -1); entry = g_object_get_data (G_OBJECT (w), "entry"); /* Se e' un pulsante, simulo il click: */ if (GTK_IS_BUTTON (entry)) { gchar *name; struct template_t *template = g_object_get_data (G_OBJECT (entry), "template"); template_run (entry, template); name = template_widget_name (w); gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, name, -1); g_free (name); return; } template_widget_save_on (w); dialog = gtk_widget_get_toplevel (w); gtk_widget_show_all (dialog); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) template_widget_save_off (w); else template_widget_save_reset (w); gtk_widget_hide (dialog); } /* Funzione per gli oggetti in solitaria: */ static GtkWidget * template_widget_standalone (GtkWidget * w) { GtkWidget *dialog, *button; gchar s[1024]; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Single input...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_toplevel (w))); gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), w, TRUE, TRUE, 5); button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); return dialog; } /* Questa funzione aggiunge un elemento alla lista degli input multiple: */ static void template_widget_list_add (GtkWidget * widget, GtkTreeView * treeview) { struct template_input_t *input; GtkListStore *model; GtkTreeIter iter; GtkWidget *del; GtkWidget *dialog; GtkWidget *entry; GtkWidget *w; GList *resources; GList *blanks; gchar *name; gint ret; input = g_object_get_data (G_OBJECT (widget), "input"); resources = g_object_get_data (G_OBJECT (widget), "resources"); blanks = g_object_get_data (G_OBJECT (widget), "blanks"); w = template_widget_create (resources, blanks, input, FALSE #ifdef USE_JS , g_object_get_data (G_OBJECT (widget), "js") #endif ); /* Se e' un pulsante attivo direttamente la funzione come se * fosse stato cliccato: */ entry = g_object_get_data (G_OBJECT (w), "entry"); if (GTK_IS_BUTTON (entry)) { struct template_t *template = g_object_get_data (G_OBJECT (entry), "template"); /* Se questa funzione ritorna TRUE, inserisco la linea: */ if (template_run (entry, template) == TRUE) { model = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); gtk_list_store_append (model, &iter); name = template_widget_name (w); gtk_list_store_set (model, &iter, 0, name, 1, w, -1); g_free (name); /* Disattivo o attivo i pulsanti: */ if (input->max_cardinality > 0 && gtk_tree_model_iter_n_children (GTK_TREE_MODEL (model), NULL) >= input->max_cardinality) gtk_widget_set_sensitive (widget, FALSE); del = g_object_get_data (G_OBJECT (widget), "del"); gtk_widget_set_sensitive (del, TRUE); } return; } dialog = template_widget_standalone (w); gtk_widget_show_all (dialog); while ((ret = gtk_dialog_run (GTK_DIALOG (dialog))) == GTK_RESPONSE_OK) { /* Controllo il widget: */ if (template_widget_check (w)) continue; gtk_widget_hide (dialog); model = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); gtk_list_store_append (model, &iter); name = template_widget_name (w); gtk_list_store_set (model, &iter, 0, name, 1, w, -1); g_free (name); /* Disattivo o attivo i pulsanti: */ if (input->max_cardinality > 0 && gtk_tree_model_iter_n_children (GTK_TREE_MODEL (model), NULL) >= input->max_cardinality) gtk_widget_set_sensitive (widget, FALSE); del = g_object_get_data (G_OBJECT (widget), "del"); gtk_widget_set_sensitive (del, TRUE); break; } if (ret != GTK_RESPONSE_OK) gtk_widget_destroy (dialog); } /* Questa funzione ritorna il primo blank node libero nella numerazione * blanknode_name %d: */ static gchar * template_widget_blank (struct editor_data_t *data) { GList *list; gint id = -1; gint max = -1; list = data->rdf; while (list) { struct rdf_t *rdf = list->data; if (blanknode_get (rdf->subject, &id) == TRUE && id > max) max = id; if (blanknode_get (rdf->object, &id) == TRUE && id > max) max = id; list = list->next; } return blanknode_create (max + 1); } /* TEMPLATE DESTROY ********************************************************/ #ifdef USE_JS static gboolean template_destroy (GtkWidget * widget, GdkEvent * event, gpointer user_data) { struct js_t *js = g_object_get_data (G_OBJECT (widget), "js"); if (js) { g_object_steal_data (G_OBJECT (widget), "js"); js_destroy (js); } return FALSE; } #endif /* TEMPLATE NAME WIDGETS ****************************************************/ static gchar * template_widget_name_literal (GtkWidget * widget, gchar * name) { GtkWidget *entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) return g_strdup_printf ("%s: %s", name, gtk_entry_get_text (GTK_ENTRY (entry))); else { GtkTextIter start, end; gchar *tmp, *ret; gint i; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (entry), &end); tmp = gtk_text_buffer_get_slice (GTK_TEXT_BUFFER (entry), &start, &end, FALSE); for (i = 0; tmp[i] && i < 15; i++) if (tmp[i] == '\n') break; if (!tmp[i]) ret = g_strdup_printf ("%s: %s", name, tmp); else { tmp[i] = 0; ret = g_strdup_printf ("%s: %s...", name, tmp); } g_free (tmp); return ret; } } static gchar * template_widget_name_resource (GtkWidget * widget, gchar * name) { return template_widget_name_literal (widget, name); } static gchar * template_widget_name_alt_literal (GtkWidget * widget, gchar * name) { GtkWidget *entry = g_object_get_data (G_OBJECT (widget), "entry"); gchar *text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); gchar *ret = g_strdup_printf ("%s: %s", name, text); g_free (text); return ret; } static gchar * template_widget_name_alt_resource (GtkWidget * widget, gchar * name) { GtkWidget *entry = g_object_get_data (G_OBJECT (widget), "entry"); gchar *text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); gchar *ret = g_strdup_printf ("%s: %s", name, text); g_free (text); return ret; } static gchar * template_widget_name_other (GtkWidget * widget, gchar * name) { GtkWidget *entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) return g_strdup_printf ("%s: %s", name, gtk_entry_get_text (GTK_ENTRY (entry))); else { GString *str; GtkWidget *type = g_object_get_data (G_OBJECT (entry), "type_resource_input"); GtkWidget *object = g_object_get_data (G_OBJECT (entry), "subject_input"); GtkWidget *toggle = g_object_get_data (G_OBJECT (entry), "toggle_input"); str = g_string_new (name); g_string_append_printf (str, ": %s", gtk_entry_get_text (GTK_ENTRY (object))); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type))) g_string_append_printf (str, " (%s", _("Resource")); else g_string_append_printf (str, " (%s", _("Blanknode")); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) g_string_append_printf (str, _(" with template)")); else g_string_append_printf (str, _(" without template)")); return g_string_free (str, FALSE); } } static gchar * template_widget_name_default (GtkWidget * widget, gchar * name) { GtkWidget *entry = g_object_get_data (G_OBJECT (widget), "entry"); GtkWidget *type; type = g_object_get_data (G_OBJECT (widget), "type_literal"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) return g_strdup_printf (_("%s: (L) %s"), name, gtk_entry_get_text (GTK_ENTRY (entry))); type = g_object_get_data (G_OBJECT (widget), "type_resource"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) return g_strdup_printf (_("%s: (R) %s"), name, gtk_entry_get_text (GTK_ENTRY (entry))); type = g_object_get_data (G_OBJECT (widget), "type_blanknode"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) return g_strdup_printf (_("%s: (B) %s"), name, gtk_entry_get_text (GTK_ENTRY (entry))); return g_strdup_printf ("%s: %s", name, gtk_entry_get_text (GTK_ENTRY (entry))); } static gchar * template_widget_name (GtkWidget * widget) { struct template_func_t *func; gchar *label; label = (gchar *) g_object_get_data (G_OBJECT (widget), "label"); func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->name) return func->name (widget, label); return g_strdup ("empty"); } /* TEMPLATE LOW CHECK WIDGETS ***********************************************/ static gboolean template_widget_low_check_literal (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar *text; gboolean allocated = FALSE; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!text || !*text) return 0; } else { GtkTextIter start, end; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (entry), &end); text = gtk_text_buffer_get_slice (GTK_TEXT_BUFFER (entry), &start, &end, FALSE); allocated = TRUE; } if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { gchar s[1024]; g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); if (datatype_check (gtk_combo_box_get_active (GTK_COMBO_BOX (entry)), text, s) == FALSE) { if (allocated == TRUE) g_free (text); return 1; } } if (allocated == TRUE) g_free (text); return 0; } static gboolean template_widget_low_check_other (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar *text; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!text || !*text) return 0; } else { GtkWidget *widget_inputs; GtkWidget *button; GList *list, *old; if (! (widget_inputs = g_object_get_data (G_OBJECT (entry), "widget_inputs"))) return 0; button = g_object_get_data (G_OBJECT (entry), "toggle_input"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) { list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { if (template_widget_check (list->data)) { g_list_free (old); return 1; } list = list->next; } g_list_free (old); } } return 0; } static gboolean template_widget_low_check_default (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar *text; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!text || !*text) return 0; if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { gchar s[1024]; g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); if (datatype_check (gtk_combo_box_get_active (GTK_COMBO_BOX (entry)), text, s) == FALSE) return 1; } return 0; } /* TEMPLATE HIGH CHECK WIDGETS **********************************************/ static gboolean template_widget_high_check_literal (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar *text; gchar s[1024]; gboolean allocated = FALSE; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); else { GtkTextIter start, end; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (entry), &end); text = gtk_text_buffer_get_slice (GTK_TEXT_BUFFER (entry), &start, &end, FALSE); allocated = TRUE; } if (!text || !*text) { g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); dialog_msg (s); if (allocated == TRUE) g_free (text); return 1; } if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { gchar s[1024]; g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); if (datatype_check (gtk_combo_box_get_active (GTK_COMBO_BOX (entry)), text, s) == FALSE) { if (allocated == TRUE) g_free (text); return 1; } } if (allocated == TRUE) g_free (text); return 0; } static gboolean template_widget_high_check_resource (GtkWidget * widget, gchar * label, gint min_cardinality) { return template_widget_high_check_literal (widget, label, min_cardinality); } static gboolean template_widget_high_check_alt_resource (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar *text; gchar s[1024]; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!text || !*text) { g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); dialog_msg (s); if (text) g_free (text); return 1; } return 0; } static gboolean template_widget_high_check_alt_literal (GtkWidget * widget, gchar * label, gint min_cardinality) { return template_widget_high_check_alt_resource (widget, label, min_cardinality); } static gboolean template_widget_high_check_other (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar *text; gchar s[1024]; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!text || !*text) { g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); dialog_msg (s); return 1; } } else { GtkWidget *widget_inputs; GtkWidget *button; GList *list, *old; if (! (widget_inputs = g_object_get_data (G_OBJECT (entry), "widget_inputs"))) { g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); dialog_msg (s); return 1; } button = g_object_get_data (G_OBJECT (entry), "toggle_input"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) { list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { if (template_widget_check (list->data)) { g_list_free (old); return 1; } list = list->next; } g_list_free (old); } } return 0; } static gboolean template_widget_high_check_default (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar *text; gchar s[1024]; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); text = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!text || !*text) { g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); dialog_msg (s); return 1; } if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { gchar s[1024]; g_snprintf (s, sizeof (s), _("No compatible value for input %s"), label); if (datatype_check (gtk_combo_box_get_active (GTK_COMBO_BOX (entry)), text, s) == FALSE) return 1; } return 0; } static gboolean template_widget_high_check_cardinality (GtkWidget * widget, gchar * label, gint min_cardinality) { GtkWidget *entry; gchar s[1024]; GtkTreeModel *model; entry = (GtkWidget *) g_object_get_data (G_OBJECT (widget), "entry"); model = gtk_tree_view_get_model (GTK_TREE_VIEW (entry)); if (min_cardinality > gtk_tree_model_iter_n_children (model, NULL)) { g_snprintf (s, sizeof (s), _("Not enough elements for input %s"), label); dialog_msg (s); return 1; } return 0; } /* Questa funzione fa il check se l'oggetto e' stato riempito bene: */ static gboolean template_widget_check (GtkWidget * widget) { struct template_func_t *func; gint min_cardinality = (gboolean) g_object_get_data (G_OBJECT (widget), "min_cardinality"); gchar *label = (gchar *) g_object_get_data (G_OBJECT (widget), "label"); gchar *function_check = (gchar *) g_object_get_data (G_OBJECT (widget), "function_check"); if (function_check) { #ifdef USE_JS struct js_t *js = g_object_get_data (G_OBJECT (widget), "js"); if (template_js_evaluate (js, widget, function_check) == 1) return 1; #else fprintf (stderr, "WARNING: Javascript not supported on this computer\n"); #endif } /* se non e' richiesto uso la low check: */ if (!min_cardinality) { func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->low_check) return func->low_check (widget, label, min_cardinality); return 0; } func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->high_check) return func->high_check (widget, label, min_cardinality); return 0; } /* TEMPLATE DESTROY WIDGETS **************************************************/ static void template_widget_destroy_other (GtkWidget * widget) { GtkWidget *entry; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (!GTK_IS_ENTRY (entry)) { GtkWidget *widget_inputs; GList *list, *old; if ((widget_inputs = g_object_get_data (G_OBJECT (entry), "widget_inputs"))) { list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { template_widget_destroy (list->data); list = list->next; } g_list_free (old); gtk_widget_destroy (gtk_widget_get_toplevel (widget_inputs)); g_object_steal_data (G_OBJECT (entry), "widget_inputs"); } if ((list = g_object_get_data (G_OBJECT (entry), "invisible_inputs"))) { g_list_foreach (list, (GFunc) g_free, NULL); g_list_free (list); } } } static void template_widget_destroy_cardinality (GtkWidget * widget) { GtkWidget *entry; GtkTreeModel *model; GtkTreeIter iter; entry = g_object_get_data (G_OBJECT (widget), "entry"); model = gtk_tree_view_get_model (GTK_TREE_VIEW (entry)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { GtkWidget *w; gtk_tree_model_get (model, &iter, 1, &w, -1); template_widget_destroy (w); gtk_widget_destroy (gtk_widget_get_toplevel (w)); } while (gtk_tree_model_iter_next (model, &iter)); } } /* Questa funzione salva il valore di un widget input: */ static void template_widget_destroy (GtkWidget * widget) { struct template_func_t *func; gchar *function_destroy = (gchar *) g_object_get_data (G_OBJECT (widget), "function_destroy"); if (function_destroy) { #ifdef USE_JS struct js_t *js = g_object_get_data (G_OBJECT (widget), "js"); template_js_evaluate (js, widget, function_destroy); #else fprintf (stderr, "WARNING: Javascript not supported on this computer\n"); #endif } func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->destroy) func->destroy (widget); if (func) { g_object_steal_data (G_OBJECT (widget), "func"); g_free (func); } } /* TEMPLATE SAVE WIDGETS ****************************************************/ static void template_widget_save_real (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, gchar * object, gchar * lang, gchar * datatype, enum rdf_object_t object_type, struct unredo_t *unredo, struct rdf_t *rdf_prev) { #ifdef USE_JS struct js_t *js = g_object_get_data (G_OBJECT (widget), "js"); gchar *function_save = (gchar *) g_object_get_data (G_OBJECT (widget), "function_save"); if (function_save) template_js_evaluate (js, widget, function_save); #endif /* Se devo salvare su una tripletta esistente: */ if (rdf_prev) { unredo_add (unredo, rdf_prev, rdf_copy (rdf_prev)); g_free (rdf_prev->subject); rdf_prev->subject = g_strdup (subject); g_free (rdf_prev->predicate); rdf_prev->predicate = g_strdup (predicate); g_free (rdf_prev->object); rdf_prev->object = g_strdup (object); if (rdf_prev->lang) g_free (rdf_prev->lang); rdf_prev->lang = lang ? g_strdup (lang) : NULL; if (rdf_prev->datatype) g_free (rdf_prev->datatype); rdf_prev->datatype = datatype ? g_strdup (datatype) : NULL; rdf_prev->object_type = object_type; } /* Altrimenti creo una tripletta nuova: */ else { struct rdf_t *rdf; /* Alloco e inserisco in lista: */ rdf = (struct rdf_t *) g_malloc0 (sizeof (struct rdf_t)); rdf->subject = g_strdup (subject); rdf->predicate = g_strdup (predicate); rdf->object = g_strdup (object); rdf->lang = lang ? g_strdup (lang) : NULL; rdf->datatype = datatype ? g_strdup (datatype) : NULL; rdf->object_type = object_type; data->rdf = g_list_append (data->rdf, rdf); unredo_add (unredo, rdf, NULL); } } static void template_widget_save_literal (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, struct unredo_t *unredo, struct rdf_t *rdf_prev) { GtkWidget *entry; gchar *object; gchar *lang = NULL; gchar *datatype = NULL; gboolean allocated = FALSE; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { object = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!object || !*object) return; } else { GtkTextIter start, end; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (entry), &end); object = gtk_text_buffer_get_slice (GTK_TEXT_BUFFER (entry), &start, &end, FALSE); allocated = TRUE; } if ((entry = g_object_get_data (G_OBJECT (widget), "lang"))) { lang = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!lang || !*lang) lang = NULL; } if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { datatype = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!*datatype) { g_free (datatype); datatype = NULL; } } template_widget_save_real (widget, data, subject, predicate, object, lang, datatype, RDF_OBJECT_LITERAL, unredo, rdf_prev); if (allocated == TRUE) g_free (object); if (datatype) g_free (datatype); } static void template_widget_save_resource (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, struct unredo_t *unredo, struct rdf_t *rdf_prev) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); object = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!object || !*object) return; template_widget_save_real (widget, data, subject, predicate, object, NULL, NULL, RDF_OBJECT_RESOURCE, unredo, rdf_prev); } static void template_widget_save_alt_literal (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, struct unredo_t *unredo, struct rdf_t *rdf_prev) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); object = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!object) return; if (!*object) { g_free (object); return; } template_widget_save_real (widget, data, subject, predicate, object, NULL, NULL, RDF_OBJECT_LITERAL, unredo, rdf_prev); g_free (object); } static void template_widget_save_alt_resource (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, struct unredo_t *unredo, struct rdf_t *rdf_prev) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); object = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!object) return; if (!*object) { g_free (object); return; } template_widget_save_real (widget, data, subject, predicate, object, NULL, NULL, RDF_OBJECT_RESOURCE, unredo, rdf_prev); g_free (object); } static void template_widget_save_other (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, struct unredo_t *unredo, struct rdf_t *rdf_prev) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { object = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!object || !*object) return; template_widget_save_real (widget, data, subject, predicate, object, NULL, NULL, RDF_OBJECT_RESOURCE, unredo, rdf_prev); } else { GtkWidget *widget_inputs; GtkWidget *type_resource; GtkWidget *button; GtkWidget *value; if (! (widget_inputs = g_object_get_data (G_OBJECT (entry), "widget_inputs"))) return; type_resource = g_object_get_data (G_OBJECT (entry), "type_resource_input"); value = g_object_get_data (G_OBJECT (entry), "subject_input"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_resource))) { object = (gchar *) gtk_entry_get_text (GTK_ENTRY (value)); if (!object || !*object) return; object = g_strdup (object); template_widget_save_real (widget, data, subject, predicate, object, NULL, NULL, RDF_OBJECT_RESOURCE, unredo, rdf_prev); } else { object = (gchar *) gtk_entry_get_text (GTK_ENTRY (value)); if (!object || !*object) object = template_widget_blank (data); else object = g_strdup (object); template_widget_save_real (widget, data, subject, predicate, object, NULL, NULL, RDF_OBJECT_BLANK, unredo, rdf_prev); } button = g_object_get_data (G_OBJECT (entry), "toggle_input"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) { GList *list, *old; list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { template_widget_save (list->data, data, object, unredo); list = list->next; } g_list_free (old); if ((list = g_object_get_data (G_OBJECT (entry), "invisible_inputs"))) { struct invisible_t *inv; while (list) { inv = list->data; template_invisible_save (object, inv->input, data, unredo, inv->rdf); list = list->next; } } } g_free (object); } } static void template_widget_save_default (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, struct unredo_t *unredo, struct rdf_t *rdf_prev) { GtkWidget *entry; GtkWidget *type; gchar *object; gchar *lang = NULL; gchar *datatype = NULL; enum rdf_object_t object_type = RDF_OBJECT_LITERAL; entry = g_object_get_data (G_OBJECT (widget), "entry"); type = g_object_get_data (G_OBJECT (widget), "type_literal"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) object_type = RDF_OBJECT_LITERAL; type = g_object_get_data (G_OBJECT (widget), "type_resource"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) object_type = RDF_OBJECT_RESOURCE; type = g_object_get_data (G_OBJECT (widget), "type_blanknode"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) object_type = RDF_OBJECT_BLANK; object = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!object || !*object) return; if ((entry = g_object_get_data (G_OBJECT (widget), "lang"))) { lang = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (!lang || !*lang) lang = NULL; } if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { datatype = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!*datatype) { g_free (datatype); datatype = NULL; } } template_widget_save_real (widget, data, subject, predicate, object, lang, datatype, object_type, unredo, rdf_prev); if (datatype) free (datatype); } static void template_widget_save_cardinality (GtkWidget * widget, struct editor_data_t *data, gchar * subject, gchar * predicate, struct unredo_t *unredo, struct rdf_t *rdf_prev) { GtkWidget *entry; GtkTreeModel *model; GtkTreeIter iter; entry = g_object_get_data (G_OBJECT (widget), "entry"); model = gtk_tree_view_get_model (GTK_TREE_VIEW (entry)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { GtkWidget *w; gtk_tree_model_get (model, &iter, 1, &w, -1); template_widget_save (w, data, subject, unredo); } while (gtk_tree_model_iter_next (model, &iter)); } } /* Questa funzione salva il valore di un widget input: */ static void template_widget_save (GtkWidget * widget, struct editor_data_t *data, gchar * subject, struct unredo_t *unredo) { gchar *property; struct template_func_t *func; struct rdf_t *rdf_prev; property = g_object_get_data (G_OBJECT (widget), "rdfs"); func = g_object_get_data (G_OBJECT (widget), "func"); rdf_prev = g_object_get_data (G_OBJECT (widget), "rdf_prev"); if (func && func->save) func->save (widget, data, subject, property, unredo, rdf_prev); } /* Gli oggetti invisibili sono semplici semplici: */ static void template_invisible_save (gchar * subject, struct template_input_t *i, struct editor_data_t *data, struct unredo_t *unredo, struct rdf_t *rdf_prev) { enum template_input_typevalue_t typevalue; switch (i->typevalue) { case TEMPLATE_INPUT_TYPEVALUE_LITERAL: typevalue = RDF_OBJECT_LITERAL; break; case TEMPLATE_INPUT_TYPEVALUE_RESOURCE: default: typevalue = RDF_OBJECT_RESOURCE; break; } template_widget_save_real (NULL, data, subject, i->rdfs, i->default_value, i->default_language, i->default_datatype, typevalue, unredo, rdf_prev); } /* TEMPLATE SAVE ON WIDGETS *************************************************/ static void template_widget_get_literal (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; gchar *str; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { str = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (str && *str) value->value = g_strdup (str); } else { GtkTextIter start, end; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (entry), &end); value->value = gtk_text_buffer_get_slice (GTK_TEXT_BUFFER (entry), &start, &end, FALSE); } if ((entry = g_object_get_data (G_OBJECT (widget), "lang"))) { str = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (str && *str) value->lang = g_strdup (str); } if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { str = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (str && *str) value->datatype = g_strdup (str); if (str) g_free (str); } value->type = RDF_OBJECT_LITERAL; } static void template_widget_get_resource (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); object = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (object && *object) value->value = g_strdup (object); value->type = RDF_OBJECT_RESOURCE; } static void template_widget_get_alt_literal (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); object = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!object) return; if (!*object) { g_free (object); return; } value->value = object; value->type = RDF_OBJECT_LITERAL; } static void template_widget_get_alt_resource (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); object = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (!object) return; if (!*object) { g_free (object); return; } value->value = object; value->type = RDF_OBJECT_RESOURCE; } static void template_widget_get_other (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; gchar *object; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { object = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (object && *object) value->value = g_strdup (object); value->type = RDF_OBJECT_RESOURCE; } else { GtkWidget *type_resource; type_resource = g_object_get_data (G_OBJECT (entry), "type_resource_input"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_resource))) value->type = RDF_OBJECT_RESOURCE; else value->type = RDF_OBJECT_BLANK; } } static void template_widget_get_default (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; GtkWidget *type; gchar *str; entry = g_object_get_data (G_OBJECT (widget), "entry"); str = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (str && *str) value->value = g_strdup (str); type = g_object_get_data (G_OBJECT (widget), "type_literal"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) value->type = RDF_OBJECT_LITERAL; type = g_object_get_data (G_OBJECT (widget), "type_resource"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) value->type = RDF_OBJECT_RESOURCE; type = g_object_get_data (G_OBJECT (widget), "type_blanknode"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type)) == TRUE) value->type = RDF_OBJECT_BLANK; if ((entry = g_object_get_data (G_OBJECT (widget), "lang"))) { str = (gchar *) gtk_entry_get_text (GTK_ENTRY (entry)); if (str && *str) value->lang = g_strdup (str); } if ((entry = g_object_get_data (G_OBJECT (widget), "datatype"))) { str = gtk_combo_box_get_active_text (GTK_COMBO_BOX (entry)); if (str && *str) value->datatype = g_strdup (str); if (str) g_free (str); } } static void template_widget_save_on (GtkWidget * widget) { struct template_func_t *func; struct template_value_t *value; if ((value = g_object_get_data (G_OBJECT (widget), "saved"))) { g_object_steal_data (G_OBJECT (widget), "saved"); template_value_free (value); } value = g_malloc0 (sizeof (struct template_value_t)); func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->get) func->get (widget, value); g_object_set_data (G_OBJECT (widget), "saved", value); } /* TEMPLATE SAVE OFF WIDGETS ***********************************************/ static void template_widget_save_off (GtkWidget * widget) { struct template_value_t *value; if ((value = g_object_get_data (G_OBJECT (widget), "saved"))) { g_object_steal_data (G_OBJECT (widget), "saved"); template_value_free (value); } } /* TEMPLATE SET WIDGETS ***********************************************/ static void template_widget_set_literal (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; if (value->value && (entry = g_object_get_data (G_OBJECT (widget), "entry"))) { if (GTK_IS_ENTRY (entry)) gtk_entry_set_text (GTK_ENTRY (entry), value->value); else { GtkTextIter start, end; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (entry), &end); gtk_text_buffer_delete (GTK_TEXT_BUFFER (entry), &start, &end); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_insert (GTK_TEXT_BUFFER (entry), &start, value->value, -1); } } if (value->lang && ((entry = g_object_get_data (G_OBJECT (widget), "lang")))) gtk_entry_set_text (GTK_ENTRY (entry), value->lang); if (value->datatype && (entry = g_object_get_data (G_OBJECT (widget), "datatype"))) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), datatype_id (value->datatype)); } static void template_widget_set_resource (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; if (value->value && (entry = g_object_get_data (G_OBJECT (widget), "entry"))) gtk_entry_set_text (GTK_ENTRY (entry), value->value); } static void template_widget_set_alt_literal (GtkWidget * widget, struct template_value_t *value) { GtkTreeModel *model; GtkTreeIter iter; gint ok = 0; gint id = 0; GtkWidget *entry; entry = g_object_get_data (G_OBJECT (widget), "entry"); model = gtk_combo_box_get_model (GTK_COMBO_BOX (entry)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { gchar *what; gtk_tree_model_get (model, &iter, 0, &what, -1); if (!strcmp (what, value->value)) { ok = 1; g_free (what); break; } g_free (what); id++; } while (gtk_tree_model_iter_next (model, &iter)); } if (ok) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id); else { gtk_combo_box_append_text (GTK_COMBO_BOX (entry), value->value); gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id + 1); } } static void template_widget_set_alt_resource (GtkWidget * widget, struct template_value_t *value) { GtkTreeModel *model; GtkTreeIter iter; gint ok = 0; gint id = 0; GtkWidget *entry; entry = g_object_get_data (G_OBJECT (widget), "entry"); model = gtk_combo_box_get_model (GTK_COMBO_BOX (entry)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { gchar *what; gtk_tree_model_get (model, &iter, 0, &what, -1); if (!strcmp (what, value->value)) { ok = 1; g_free (what); break; } g_free (what); id++; } while (gtk_tree_model_iter_next (model, &iter)); } if (ok) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id); else { gtk_combo_box_append_text (GTK_COMBO_BOX (entry), value->value); gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id + 1); } } static void template_widget_set_other (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry) && value->value) gtk_entry_set_text (GTK_ENTRY (entry), value->value); } static void template_widget_set_default (GtkWidget * widget, struct template_value_t *value) { GtkWidget *entry; GtkWidget *type; switch (value->type) { case RDF_OBJECT_LITERAL: type = g_object_get_data (G_OBJECT (widget), "type_literal"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type), TRUE); break; case RDF_OBJECT_RESOURCE: type = g_object_get_data (G_OBJECT (widget), "type_resource"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type), TRUE); break; case RDF_OBJECT_BLANK: type = g_object_get_data (G_OBJECT (widget), "type_blanknode"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type), TRUE); break; } if (value->value) { entry = g_object_get_data (G_OBJECT (widget), "entry"); gtk_entry_set_text (GTK_ENTRY (entry), value->value); } if (value->lang) { entry = g_object_get_data (G_OBJECT (widget), "lang"); gtk_entry_set_text (GTK_ENTRY (entry), value->lang); } if (value->datatype) { entry = g_object_get_data (G_OBJECT (widget), "datatype"); gtk_combo_box_set_active (GTK_COMBO_BOX (entry), datatype_id (value->datatype)); } } static void template_widget_set (GtkWidget * widget, struct template_value_t *value) { struct template_func_t *func; func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->set) func->set (widget, value); } static void template_widget_save_reset (GtkWidget * widget) { struct template_value_t *value; if (!(value = g_object_get_data (G_OBJECT (widget), "saved"))) return; template_widget_set (widget, value); template_value_free (value); g_object_steal_data (G_OBJECT (widget), "saved"); } /* TEMPLATE IS YOUR WIDGETS ***********************************************/ static gboolean template_widget_is_your_literal (GtkWidget * widget, struct rdf_t *rdf, GList ** dummy) { gchar *predicate; GtkWidget *entry; if (rdf->object_type != RDF_OBJECT_LITERAL) return FALSE; predicate = g_object_get_data (G_OBJECT (widget), "rdfs"); if (!predicate || strcmp (predicate, rdf->predicate)) return FALSE; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) gtk_entry_set_text (GTK_ENTRY (entry), rdf->object); else { GtkTextIter start, end; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (entry), &end); gtk_text_buffer_delete (GTK_TEXT_BUFFER (entry), &start, &end); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_insert (GTK_TEXT_BUFFER (entry), &start, rdf->object, -1); } if (rdf->lang && (entry = g_object_get_data (G_OBJECT (widget), "lang"))) gtk_entry_set_text (GTK_ENTRY (entry), rdf->lang); if (rdf->datatype && (entry = g_object_get_data (G_OBJECT (widget), "datatype"))) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), datatype_id (rdf->datatype)); return TRUE; } static gboolean template_widget_is_your_resource (GtkWidget * widget, struct rdf_t *rdf, GList ** dummy) { gchar *predicate; GtkWidget *entry; if (rdf->object_type != RDF_OBJECT_RESOURCE) return FALSE; predicate = g_object_get_data (G_OBJECT (widget), "rdfs"); if (!predicate || strcmp (predicate, rdf->predicate)) return FALSE; entry = g_object_get_data (G_OBJECT (widget), "entry"); gtk_entry_set_text (GTK_ENTRY (entry), rdf->object); return TRUE; } static gboolean template_widget_is_your_alt_literal (GtkWidget * widget, struct rdf_t *rdf, GList ** dummy) { GtkTreeModel *model; GtkTreeIter iter; gint ok = 0; gint id = 0; GtkWidget *entry; gchar *predicate; if (rdf->object_type != RDF_OBJECT_LITERAL) return FALSE; predicate = g_object_get_data (G_OBJECT (widget), "rdfs"); if (!predicate || strcmp (predicate, rdf->predicate)) return FALSE; entry = g_object_get_data (G_OBJECT (widget), "entry"); model = gtk_combo_box_get_model (GTK_COMBO_BOX (entry)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { gchar *what; gtk_tree_model_get (model, &iter, 0, &what, -1); if (!strcmp (what, rdf->object)) { ok = 1; g_free (what); break; } g_free (what); id++; } while (gtk_tree_model_iter_next (model, &iter)); } if (ok) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id); else { gtk_combo_box_append_text (GTK_COMBO_BOX (entry), rdf->object); gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id + 1); } return TRUE; } static gboolean template_widget_is_your_alt_resource (GtkWidget * widget, struct rdf_t *rdf, GList ** dummy) { GtkTreeModel *model; GtkTreeIter iter; gint ok = 0; gint id = 0; GtkWidget *entry; gchar *predicate; if (rdf->object_type != RDF_OBJECT_RESOURCE) return FALSE; predicate = g_object_get_data (G_OBJECT (widget), "rdfs"); if (!predicate || strcmp (predicate, rdf->predicate)) return FALSE; entry = g_object_get_data (G_OBJECT (widget), "entry"); model = gtk_combo_box_get_model (GTK_COMBO_BOX (entry)); if (gtk_tree_model_get_iter_first (model, &iter)) { do { gchar *what; gtk_tree_model_get (model, &iter, 0, &what, -1); if (!strcmp (what, rdf->object)) { ok = 1; g_free (what); break; } g_free (what); id++; } while (gtk_tree_model_iter_next (model, &iter)); } if (ok) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id); else { gtk_combo_box_append_text (GTK_COMBO_BOX (entry), rdf->object); gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id + 1); } return TRUE; } static gboolean template_widget_is_your_default (GtkWidget * widget, struct rdf_t *rdf, GList ** dummy) { GtkWidget *entry; GtkWidget *type; gchar *predicate; predicate = g_object_get_data (G_OBJECT (widget), "rdfs"); if (!predicate || strcmp (predicate, rdf->predicate)) return FALSE; switch (rdf->object_type) { case RDF_OBJECT_LITERAL: type = g_object_get_data (G_OBJECT (widget), "type_literal"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type), TRUE); break; case RDF_OBJECT_RESOURCE: type = g_object_get_data (G_OBJECT (widget), "type_resource"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type), TRUE); break; case RDF_OBJECT_BLANK: type = g_object_get_data (G_OBJECT (widget), "type_blanknode"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type), TRUE); break; } entry = g_object_get_data (G_OBJECT (widget), "entry"); gtk_entry_set_text (GTK_ENTRY (entry), rdf->object); if (rdf->lang && (entry = g_object_get_data (G_OBJECT (widget), "lang"))) gtk_entry_set_text (GTK_ENTRY (entry), rdf->lang); if (rdf->datatype && (entry = g_object_get_data (G_OBJECT (widget), "datatype"))) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), datatype_id (rdf->datatype)); return TRUE; } static gboolean template_widget_is_your_other (GtkWidget * widget, struct rdf_t *rdf, GList ** other) { GtkWidget *entry; GtkWidget *widget_inputs; GtkWidget *dialog; GtkWidget *type_resource; GtkWidget *type_blanknode; GtkWidget *object; GtkWidget *toggle; gchar *predicate; GList *resources; GList *blanks; GList *invisible; GList *list; struct template_t *template; gint len; if (rdf->object_type != RDF_OBJECT_RESOURCE && rdf->object_type != RDF_OBJECT_BLANK) return FALSE; predicate = g_object_get_data (G_OBJECT (widget), "rdfs"); if (!predicate || strcmp (predicate, rdf->predicate)) return FALSE; entry = g_object_get_data (G_OBJECT (widget), "entry"); if (GTK_IS_ENTRY (entry)) { gtk_entry_set_text (GTK_ENTRY (entry), rdf->object); return TRUE; } resources = g_object_get_data (G_OBJECT (entry), "resources"); blanks = g_object_get_data (G_OBJECT (entry), "blanks"); template = g_object_get_data (G_OBJECT (entry), "template"); if (!(widget_inputs = template_open_real (resources, blanks, template))) return FALSE; dialog = template_run_create (widget_inputs, template, resources, blanks, &type_resource, &type_blanknode, &object, &toggle); gtk_widget_hide (dialog); gtk_entry_set_text (GTK_ENTRY (object), rdf->object); if (rdf->object_type == RDF_OBJECT_RESOURCE) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type_resource), TRUE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type_blanknode), TRUE); gtk_entry_set_text (GTK_ENTRY (object), rdf->object); len = g_list_length (*other); if ((list = gtk_container_get_children (GTK_CONTAINER (widget_inputs)))) { GList *sorted = template_edit_set_sort (list); g_list_free (list); template_edit_set (&sorted, other, rdf->object); if (sorted) g_list_free (sorted); } if (len == g_list_length (*other)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), FALSE); else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), TRUE); g_object_set_data (G_OBJECT (entry), "widget_inputs", widget_inputs); g_object_set_data (G_OBJECT (entry), "subject_input", object); g_object_set_data (G_OBJECT (entry), "type_resource_input", type_resource); g_object_set_data (G_OBJECT (entry), "type_blanknode_input", type_blanknode); g_object_set_data (G_OBJECT (entry), "type_blanknode_a_input", 0); g_object_set_data (G_OBJECT (entry), "toggle_input", toggle); invisible = NULL; template_edit_invisible (&invisible, other, rdf->object, template); g_object_set_data (G_OBJECT (entry), "invisible_inputs", invisible); return TRUE; } static gboolean template_widget_is_your_cardinality (GtkWidget * widget, struct rdf_t *rdf, GList ** other) { GtkWidget *entry; GtkListStore *model; GtkTreeIter iter; GtkWidget *w; GtkWidget *del; GList *resources; GList *blanks; struct template_input_t *input; gchar *predicate; gchar *name; predicate = g_object_get_data (G_OBJECT (widget), "rdfs"); if (!predicate || strcmp (predicate, rdf->predicate)) return FALSE; entry = g_object_get_data (G_OBJECT (widget), "entry"); input = g_object_get_data (G_OBJECT (entry), "input"); switch (input->typevalue) { case TEMPLATE_INPUT_TYPEVALUE_RESOURCE: case TEMPLATE_INPUT_TYPEVALUE_ALT_RESOURCE: if (rdf->object_type != RDF_OBJECT_RESOURCE) return FALSE; break; case TEMPLATE_INPUT_TYPEVALUE_LITERAL: case TEMPLATE_INPUT_TYPEVALUE_ALT_LITERAL: if (rdf->object_type != RDF_OBJECT_LITERAL) return FALSE; break; default: break; } resources = g_object_get_data (G_OBJECT (entry), "resources"); blanks = g_object_get_data (G_OBJECT (entry), "blanks"); w = template_widget_create (resources, blanks, input, FALSE #ifdef USE_JS , g_object_get_data (G_OBJECT (widget), "js") #endif ); template_widget_is_your (w, rdf, other); model = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (entry)); gtk_list_store_append (model, &iter); name = template_widget_name (w); gtk_list_store_set (model, &iter, 0, name, 1, w, -1); g_free (name); if (!GTK_IS_BUTTON (w)) template_widget_standalone (w); /* Disattivo o attivo i pulsanti: */ input = g_object_get_data (G_OBJECT (entry), "input"); if (input->max_cardinality > 0 && gtk_tree_model_iter_n_children (GTK_TREE_MODEL (model), NULL) >= input->max_cardinality) gtk_widget_set_sensitive (widget, FALSE); del = g_object_get_data (G_OBJECT (entry), "del"); gtk_widget_set_sensitive (del, TRUE); return TRUE; } static gboolean template_widget_is_your (GtkWidget * widget, struct rdf_t *rdf, GList ** other) { struct template_func_t *func; func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->is_your && func->is_your (widget, rdf, other) == TRUE) { g_object_set_data (G_OBJECT (widget), "rdf_prev", rdf); return TRUE; } return FALSE; } /* TEMPLATE CREATE WIDGETS ***************************************************/ static void template_widget_create_literal (struct template_input_t *input, GList * resources, GList * blanks, GtkWidget * table, gint * line, GtkWidget * top) { struct template_func_t *func; GtkWidget *label; GtkWidget *entry; GtkWidget *lang; GtkWidget *datatype; label = gtk_label_new (_("String:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); if (input->longtext == FALSE) { entry = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), entry, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); if (input->default_value) gtk_entry_set_text (GTK_ENTRY (entry), input->default_value); } else { GtkWidget *text; GtkWidget *scrolledwindow; scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_table_attach (GTK_TABLE (table), scrolledwindow, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); entry = (GtkWidget *) gtk_text_buffer_new (NULL); text = gtk_text_view_new_with_buffer (GTK_TEXT_BUFFER (entry)); gtk_text_view_set_editable (GTK_TEXT_VIEW (text), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), text); if (input->default_value) { GtkTextIter start; gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (entry), &start); gtk_text_buffer_insert (GTK_TEXT_BUFFER (entry), &start, input->default_value, -1); } } g_object_set_data (G_OBJECT (top), "entry", entry); if (input->lang) { (*line)++; label = gtk_label_new (_("Language:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); lang = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), lang, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); if (input->default_language) gtk_entry_set_text (GTK_ENTRY (lang), input->default_language); g_object_set_data (G_OBJECT (top), "lang", lang); } if (input->datatype) { gint id; GtkWidget *frame, *box, *hbox; struct datatype_t *datatypes = datatype_list (); (*line)++; frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (table), frame, 0, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); box = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), box); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("Datatype:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); datatype = gtk_combo_box_entry_new_text (); gtk_box_pack_start (GTK_BOX (hbox), datatype, TRUE, TRUE, 5); (*line)++; label = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER); gtk_combo_box_append_text (GTK_COMBO_BOX (datatype), datatypes[0].uri); gtk_combo_box_set_active (GTK_COMBO_BOX (datatype), 0); for (id = 1; datatypes[id].uri; id++) { gtk_combo_box_append_text (GTK_COMBO_BOX (datatype), datatypes[id].uri); if (input->default_datatype && !strcmp (input->default_datatype, datatypes[id].uri)) gtk_combo_box_set_active (GTK_COMBO_BOX (datatype), id); } datatype_change (datatype, label); g_signal_connect_after ((gpointer) datatype, "changed", G_CALLBACK (datatype_change), label); g_object_set_data (G_OBJECT (top), "datatype", datatype); } func = g_malloc0 (sizeof (struct template_func_t)); func->type = TEMPLATE_WIDGET_LITERAL; func->low_check = template_widget_low_check_literal; func->high_check = template_widget_high_check_literal; func->save = template_widget_save_literal; func->get = template_widget_get_literal; func->set = template_widget_set_literal; func->is_your = template_widget_is_your_literal; func->name = template_widget_name_literal; g_object_set_data (G_OBJECT (top), "func", func); } static void template_widget_create_resource (struct template_input_t *input, GList * resources, GList * blanks, GtkWidget * table, gint * line, GtkWidget * top) { GtkWidget *label; GtkWidget *entry; GtkWidget *hbox; GtkWidget *button; GtkWidget *image; struct template_func_t *func; label = gtk_label_new (_("Resource:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); hbox = gtk_hbox_new (FALSE, 0); entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); if (input->default_value) gtk_entry_set_text (GTK_ENTRY (entry), input->default_value); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "list", resources); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), entry); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); func = g_malloc0 (sizeof (struct template_func_t)); func->type = TEMPLATE_WIDGET_RESOURCE; func->high_check = template_widget_high_check_resource; func->save = template_widget_save_resource; func->get = template_widget_get_resource; func->set = template_widget_set_resource; func->is_your = template_widget_is_your_resource; func->name = template_widget_name_resource; g_object_set_data (G_OBJECT (top), "func", func); g_object_set_data (G_OBJECT (top), "entry", entry); } static void template_widget_create_alt_literal (struct template_input_t *input, GList * resources, GList * blanks, GtkWidget * table, gint * line, GtkWidget * top) { GtkWidget *label; GtkWidget *entry; GList *list; gint id = 0; struct template_func_t *func; label = gtk_label_new (_("Literal:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); entry = gtk_combo_box_entry_new_text (); list = input->alt_typevalue; id = 0; while (list) { gtk_combo_box_append_text (GTK_COMBO_BOX (entry), list->data); if (input->default_value && !strcmp ((gchar *) list->data, input->default_value)) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id); id++; list = list->next; } gtk_combo_box_set_active (GTK_COMBO_BOX (entry), 0); gtk_table_attach (GTK_TABLE (table), entry, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); func = g_malloc0 (sizeof (struct template_func_t)); func->type = TEMPLATE_WIDGET_ALT_LITERAL; func->high_check = template_widget_high_check_alt_literal; func->save = template_widget_save_alt_literal; func->get = template_widget_get_alt_literal; func->set = template_widget_set_alt_literal; func->is_your = template_widget_is_your_alt_literal; func->name = template_widget_name_alt_literal; g_object_set_data (G_OBJECT (top), "entry", entry); g_object_set_data (G_OBJECT (top), "func", func); } static void template_widget_create_alt_resource (struct template_input_t *input, GList * resources, GList * blanks, GtkWidget * table, gint * line, GtkWidget * top) { GtkWidget *label; GtkWidget *entry; GList *list; gint id = 0; struct template_func_t *func; label = gtk_label_new (_("Resource:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); entry = gtk_combo_box_entry_new_text (); list = input->alt_typevalue; id = 0; while (list) { gtk_combo_box_append_text (GTK_COMBO_BOX (entry), list->data); if (input->default_value && !strcmp ((gchar *) list->data, input->default_value)) gtk_combo_box_set_active (GTK_COMBO_BOX (entry), id); id++; list = list->next; } gtk_combo_box_set_active (GTK_COMBO_BOX (entry), 0); gtk_table_attach (GTK_TABLE (table), entry, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); func = g_malloc0 (sizeof (struct template_func_t)); func->type = TEMPLATE_WIDGET_ALT_RESOURCE; func->high_check = template_widget_high_check_alt_resource; func->save = template_widget_save_alt_resource; func->get = template_widget_get_alt_resource; func->set = template_widget_set_alt_resource; func->is_your = template_widget_is_your_alt_resource; func->name = template_widget_name_alt_resource; g_object_set_data (G_OBJECT (top), "entry", entry); g_object_set_data (G_OBJECT (top), "func", func); g_object_set_data (G_OBJECT (top), "entry", entry); } static void template_widget_create_other (struct template_input_t *input, GList * resources, GList * blanks, GtkWidget * table, gint * line, GtkWidget * top) { GtkWidget *label; GtkWidget *hbox; GtkWidget *entry; GtkWidget *button; GtkWidget *image; GList *list; struct template_t *template; struct template_func_t *func; list = template_list; while (list) { template = list->data; if (!strcmp (template->uri, input->other_typevalue)) break; list = list->next; } if (!list) { label = gtk_label_new (_("Template:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); hbox = gtk_hbox_new (FALSE, 0); entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "list", resources); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), entry); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); } else { entry = gtk_button_new_with_label (template->name); g_object_set_data (G_OBJECT (entry), "resources", resources); g_object_set_data (G_OBJECT (entry), "blanks", blanks); g_object_set_data (G_OBJECT (entry), "template", template); g_signal_connect ((gpointer) entry, "clicked", G_CALLBACK (template_run), template); gtk_table_attach (GTK_TABLE (table), entry, 0, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); } func = g_malloc0 (sizeof (struct template_func_t)); func->type = TEMPLATE_WIDGET_OTHER; func->low_check = template_widget_low_check_other; func->high_check = template_widget_high_check_other; func->save = template_widget_save_other; func->get = template_widget_get_other; func->set = template_widget_set_other; func->is_your = template_widget_is_your_other; func->name = template_widget_name_other; func->destroy = template_widget_destroy_other; g_object_set_data (G_OBJECT (top), "entry", entry); g_object_set_data (G_OBJECT (top), "func", func); } /* Questa funzione viene azionata dai radiobutton della tipologia coggetto */ static void template_widget_create_default_toggled (GtkWidget * w, gpointer dummy) { GtkWidget *t_literal; GtkWidget *t_resource; GtkWidget *t_blanknode; GtkWidget *object; GtkWidget *lang; GtkWidget *datatype; GList *resources; GList *blanks; /* Una serie di valori che mi servono: */ t_literal = (GtkWidget *) g_object_get_data (G_OBJECT (w), "literal"); t_resource = (GtkWidget *) g_object_get_data (G_OBJECT (w), "resource"); t_blanknode = (GtkWidget *) g_object_get_data (G_OBJECT (w), "blanknode"); blanks = (GList *) g_object_get_data (G_OBJECT (w), "blank_list"); resources = (GList *) g_object_get_data (G_OBJECT (w), "resources_list"); object = (GtkWidget *) g_object_get_data (G_OBJECT (w), "object"); lang = (GtkWidget *) g_object_get_data (G_OBJECT (w), "lang"); datatype = (GtkWidget *) g_object_get_data (G_OBJECT (w), "datatype"); /* Se e' stato selezionato un letterale non ci devono essere suggerimenti * e la lungua e' sensibile:*/ if (w == t_literal) { g_object_steal_data (G_OBJECT (object), "list"); gtk_widget_set_sensitive (lang, TRUE); gtk_widget_set_sensitive (datatype, TRUE); } /* Negli altri casi cambia la tipologia di suggerimento: */ else if (w == t_resource) { g_object_set_data (G_OBJECT (object), "list", resources); gtk_widget_set_sensitive (lang, FALSE); gtk_widget_set_sensitive (datatype, FALSE); } else { g_object_set_data (G_OBJECT (object), "list", blanks); gtk_widget_set_sensitive (lang, FALSE); gtk_widget_set_sensitive (datatype, FALSE); } } static void template_widget_create_default (struct template_input_t *input, GList * resources, GList * blanks, GtkWidget * table, gint * line, GtkWidget * top) { GtkWidget *label; GtkWidget *hbox; GtkWidget *entry; GtkWidget *lang; GtkWidget *datatype; GtkWidget *type_literal; GtkWidget *type_resource; GtkWidget *type_blanknode; GtkWidget *button; GtkWidget *image; GtkWidget *frame; GtkWidget *box; gint id; GSList *l = NULL; struct template_func_t *func; struct datatype_t *datatypes = datatype_list (); label = gtk_label_new (_("Type:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); type_literal = gtk_radio_button_new_with_label (NULL, _("Literal")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (type_literal), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (type_literal)); gtk_table_attach (GTK_TABLE (table), type_literal, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); type_resource = gtk_radio_button_new_with_label (NULL, _("Resource")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (type_resource), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (type_resource)); (*line)++; gtk_table_attach (GTK_TABLE (table), type_resource, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); type_blanknode = gtk_radio_button_new_with_label (NULL, _("Blank node")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (type_blanknode), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (type_blanknode)); (*line)++; gtk_table_attach (GTK_TABLE (table), type_blanknode, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); (*line)++; label = gtk_label_new (_("Language:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); lang = gtk_entry_new (); gtk_table_attach (GTK_TABLE (table), lang, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); g_object_set_data (G_OBJECT (top), "lang", lang); if (input->default_language) gtk_entry_set_text (GTK_ENTRY (lang), input->default_language); (*line)++; frame = gtk_frame_new (NULL); gtk_table_attach (GTK_TABLE (table), frame, 0, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); box = gtk_vbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (frame), box); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 5); label = gtk_label_new (_("Datatype:")); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 5); datatype = gtk_combo_box_entry_new_text (); gtk_box_pack_start (GTK_BOX (hbox), datatype, TRUE, TRUE, 5); label = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER); gtk_combo_box_append_text (GTK_COMBO_BOX (datatype), datatypes[0].uri); gtk_combo_box_set_active (GTK_COMBO_BOX (datatype), 0); for (id = 1; datatypes[id].uri; id++) { gtk_combo_box_append_text (GTK_COMBO_BOX (datatype), datatypes[id].uri); if (input->default_datatype && !strcmp (input->default_datatype, datatypes[id].uri)) gtk_combo_box_set_active (GTK_COMBO_BOX (datatype), id); } datatype_change (datatype, label); g_signal_connect_after ((gpointer) datatype, "changed", G_CALLBACK (datatype_change), label); g_object_set_data (G_OBJECT (top), "datatype", datatype); (*line)++; label = gtk_label_new (_("Value:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); hbox = gtk_hbox_new (FALSE, 0); entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); if (input->default_value) gtk_entry_set_text (GTK_ENTRY (entry), input->default_value); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "list", resources); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), entry); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); g_object_set_data (G_OBJECT (top), "entry", entry); g_object_set_data (G_OBJECT (top), "type_literal", type_literal); g_object_set_data (G_OBJECT (top), "type_resource", type_resource); g_object_set_data (G_OBJECT (top), "type_blanknode", type_blanknode); func = g_malloc0 (sizeof (struct template_func_t)); func->type = TEMPLATE_WIDGET_DEFAULT; func->low_check = template_widget_low_check_default; func->high_check = template_widget_high_check_default; func->save = template_widget_save_default; func->get = template_widget_get_default; func->set = template_widget_set_default; func->is_your = template_widget_is_your_default; func->name = template_widget_name_default; g_object_set_data (G_OBJECT (top), "entry", entry); g_object_set_data (G_OBJECT (top), "func", func); /* Variabili per le funzioni di callback: */ g_object_set_data (G_OBJECT (type_literal), "literal", type_literal); g_object_set_data (G_OBJECT (type_literal), "resource", type_resource); g_object_set_data (G_OBJECT (type_literal), "blanknode", type_blanknode); g_object_set_data (G_OBJECT (type_literal), "blank_list", blanks); g_object_set_data (G_OBJECT (type_literal), "resources_list", resources); g_object_set_data (G_OBJECT (type_literal), "object", button); g_object_set_data (G_OBJECT (type_literal), "lang", lang); g_object_set_data (G_OBJECT (type_literal), "datatype", datatype); g_object_set_data (G_OBJECT (type_resource), "literal", type_literal); g_object_set_data (G_OBJECT (type_resource), "resource", type_resource); g_object_set_data (G_OBJECT (type_resource), "blanknode", type_blanknode); g_object_set_data (G_OBJECT (type_resource), "blank_list", blanks); g_object_set_data (G_OBJECT (type_resource), "resources_list", resources); g_object_set_data (G_OBJECT (type_resource), "object", button); g_object_set_data (G_OBJECT (type_resource), "lang", lang); g_object_set_data (G_OBJECT (type_resource), "datatype", datatype); g_object_set_data (G_OBJECT (type_blanknode), "literal", type_literal); g_object_set_data (G_OBJECT (type_blanknode), "resource", type_resource); g_object_set_data (G_OBJECT (type_blanknode), "blanknode", type_blanknode); g_object_set_data (G_OBJECT (type_blanknode), "blank_list", blanks); g_object_set_data (G_OBJECT (type_blanknode), "resources_list", resources); g_object_set_data (G_OBJECT (type_blanknode), "object", button); g_object_set_data (G_OBJECT (type_blanknode), "lang", lang); g_object_set_data (G_OBJECT (type_blanknode), "datatype", datatype); g_signal_connect_after ((gpointer) type_literal, "toggled", G_CALLBACK (template_widget_create_default_toggled), NULL); g_signal_connect_after ((gpointer) type_blanknode, "toggled", G_CALLBACK (template_widget_create_default_toggled), NULL); g_signal_connect_after ((gpointer) type_resource, "toggled", G_CALLBACK (template_widget_create_default_toggled), NULL); } static void template_widget_create_cardinality (struct template_input_t *input, GList * resources, GList * blanks, GtkWidget * table, gint * line, GtkWidget * top) { GtkWidget *label; GtkWidget *entry; gchar buf[1024]; GtkWidget *scrolledwindow; GtkListStore *model; GtkWidget *b_add, *b_del; GtkTreeSelection *selection; GtkCellRenderer *renderer; GtkTreeViewColumn *column; struct template_func_t *func; scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_table_attach (GTK_TABLE (table), scrolledwindow, 0, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); entry = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (entry), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), entry); g_signal_connect ((gpointer) entry, "row_activated", G_CALLBACK (template_widget_list_select), NULL); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (entry)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (entry), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("List"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (entry), column); gtk_tree_view_column_set_resizable (column, TRUE); (*line)++; /* Pulsanti per l'aggiunta e la rimozione di elementi: */ b_del = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_set_sensitive (b_del, FALSE); g_object_set_data (G_OBJECT (b_del), "input", input); gtk_table_attach (GTK_TABLE (table), b_del, 0, 1, *line, *line + 1, (GTK_EXPAND | GTK_FILL), 0, 5, 0); g_signal_connect (G_OBJECT (b_del), "clicked", G_CALLBACK (template_widget_list_remove), entry); b_add = gtk_button_new_from_stock ("gtk-add"); g_object_set_data (G_OBJECT (b_add), "del", b_del); g_object_set_data (G_OBJECT (b_add), "input", input); g_object_set_data (G_OBJECT (b_add), "resources", resources); g_object_set_data (G_OBJECT (b_add), "blanks", blanks); #ifdef USE_JS g_object_set_data (G_OBJECT (b_add), "js", g_object_get_data (G_OBJECT (top), "js")); #endif g_object_set_data (G_OBJECT (b_del), "add", b_add); gtk_table_attach (GTK_TABLE (table), b_add, 1, 2, *line, *line + 1, (GTK_EXPAND | GTK_FILL), 0, 5, 0); g_signal_connect (G_OBJECT (b_add), "clicked", G_CALLBACK (template_widget_list_add), entry); /* Informazioni sulla cardinalita': */ (*line)++; g_snprintf (buf, sizeof (buf), _("Min Card.: %d"), input->min_cardinality); label = gtk_label_new (buf); gtk_table_attach (GTK_TABLE (table), label, 0, 1, *line, *line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); if (input->max_cardinality <= 0) g_snprintf (buf, sizeof (buf), _("Max Card.: infinite")); else g_snprintf (buf, sizeof (buf), _("Max Card.: %d"), input->max_cardinality); label = gtk_label_new (buf); gtk_table_attach (GTK_TABLE (table), label, 1, 2, *line, *line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); g_object_set_data (G_OBJECT (top), "entry", entry); g_object_set_data (G_OBJECT (entry), "input", input); g_object_set_data (G_OBJECT (entry), "resources", resources); g_object_set_data (G_OBJECT (entry), "blanks", blanks); g_object_set_data (G_OBJECT (entry), "del", b_del); func = g_malloc0 (sizeof (struct template_func_t)); func->type = TEMPLATE_WIDGET_CARDINALITY; func->high_check = template_widget_high_check_cardinality; func->save = template_widget_save_cardinality; func->is_your = template_widget_is_your_cardinality; func->destroy = template_widget_destroy_cardinality; g_object_set_data (G_OBJECT (top), "func", func); } /* Questa funzione crea l'oggetto di un input per template: */ static GtkWidget * template_widget_create (GList * resources, GList * blanks, struct template_input_t *input, gboolean cardinality #ifdef USE_JS , struct js_t *js #endif ) { GtkWidget *frame; GtkWidget *table; GtkWidget *event; GtkWidget *label; gint line = 0; struct info_box_t *label_value = NULL; struct info_box_t *comment_value = NULL; GList *list; frame = gtk_frame_new (NULL); #ifdef USE_JS g_object_set_data (G_OBJECT (frame), "js", js); #endif /* Cerco il label piu' appropriato: */ list = input->labels; while (list) { label_value = list->data; if (!label_value->lang) break; list = list->next; } if (!list) label_value = input->labels->data; event = gtk_event_box_new (); gtk_widget_set_events (event, GDK_BUTTON_PRESS_MASK); g_signal_connect (G_OBJECT (event), "enter-notify-event", G_CALLBACK (info_box_enter), NULL); g_signal_connect (G_OBJECT (event), "leave-notify-event", G_CALLBACK (info_box_leave), NULL); g_signal_connect (G_OBJECT (event), "button_press_event", G_CALLBACK (info_box_popup_show), input->labels); g_signal_connect (G_OBJECT (event), "button_release_event", G_CALLBACK (info_box_popup_hide), NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), event); /* Grassetto se la cardinalita' minima e' > di 0: */ if (cardinality == TRUE && input->min_cardinality > 0) { gchar *s; gchar *str; str = markup (label_value->value); s = g_strdup_printf ("%s", str); g_free (str); label = gtk_label_new (s); g_free (s); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); g_object_set_data (G_OBJECT (event), "bold", (gpointer) TRUE); } else { gchar *str; str = markup (label_value->value); label = gtk_label_new (str); g_free (str); } gtk_container_add (GTK_CONTAINER (event), label); table = gtk_table_new (0, 0, FALSE); gtk_container_add (GTK_CONTAINER (frame), table); /* Se la cardinalita' mi impone 1 elemento come massimo allora: */ if (cardinality == FALSE || (input->min_cardinality <= 1 && input->max_cardinality == 1)) { switch (input->typevalue) { /* Se e' un letterale, valore e lingua: */ case TEMPLATE_INPUT_TYPEVALUE_LITERAL: template_widget_create_literal (input, resources, blanks, table, &line, frame); break; /* Se e' una risorsa un combobox con suggerimenti: */ case TEMPLATE_INPUT_TYPEVALUE_RESOURCE: template_widget_create_resource (input, resources, blanks, table, &line, frame); break; /* Se e' un'alternativa genero una combobox: */ case TEMPLATE_INPUT_TYPEVALUE_ALT_RESOURCE: template_widget_create_alt_resource (input, resources, blanks, table, &line, frame); break; case TEMPLATE_INPUT_TYPEVALUE_ALT_LITERAL: template_widget_create_alt_literal (input, resources, blanks, table, &line, frame); break; /* Se devo richiamare un altro template: */ case TEMPLATE_INPUT_TYPEVALUE_OTHER: template_widget_create_other (input, resources, blanks, table, &line, frame); break; /* Altrimenti scelta multipla: */ default: template_widget_create_default (input, resources, blanks, table, &line, frame); break; } } /* Cardinalita' maggiore di 1: */ else template_widget_create_cardinality (input, resources, blanks, table, &line, frame); /* Se ho un commento da mostrare lo mostro: */ if (input->comments) { gchar *str; line++; /* Cerco il commento piu' appropriato: */ list = input->comments; while (list) { comment_value = list->data; if (!comment_value->lang) break; list = list->next; } if (!list) comment_value = input->comments->data; label = gtk_label_new (_("Comment:")); gtk_table_attach (GTK_TABLE (table), label, 0, 1, line, line + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 5, 0); event = gtk_event_box_new (); gtk_widget_set_events (event, GDK_BUTTON_PRESS_MASK); g_signal_connect (G_OBJECT (event), "enter-notify-event", G_CALLBACK (info_box_enter), NULL); g_signal_connect (G_OBJECT (event), "leave-notify-event", G_CALLBACK (info_box_leave), NULL); g_signal_connect (G_OBJECT (event), "button_press_event", G_CALLBACK (info_box_popup_show), input->comments); g_signal_connect (G_OBJECT (event), "button_release_event", G_CALLBACK (info_box_popup_hide), NULL); gtk_table_attach (GTK_TABLE (table), event, 1, 2, line, line + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 5, 0); str = markup (comment_value->value); label = gtk_label_new (str); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); g_free (str); gtk_container_add (GTK_CONTAINER (event), label); } g_object_set_data (G_OBJECT (frame), "label", label_value->value); g_object_set_data (G_OBJECT (frame), "min_cardinality", (gpointer) input->min_cardinality); g_object_set_data (G_OBJECT (frame), "rdfs", input->rdfs); g_object_set_data (G_OBJECT (frame), "typevalue", (gpointer) input->typevalue); if (input->function_check) g_object_set_data (G_OBJECT (frame), "function_check", (gpointer) input->function_check); if (input->function_destroy) g_object_set_data (G_OBJECT (frame), "function_destroy", (gpointer) input->function_destroy); if (input->function_save) g_object_set_data (G_OBJECT (frame), "function_save", (gpointer) input->function_save); if (input->function_init) { #ifdef USE_JS template_js_evaluate (js, frame, input->function_init); #else fprintf (stderr, "WARNING: Javascript not supported on this computer\n"); #endif } return frame; } /* RUN OTHER TEMPLATE *******************************************************/ static void template_run_toggled (GtkWidget * w, GtkWidget * sw) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)) == TRUE) gtk_widget_set_sensitive (sw, TRUE); else gtk_widget_set_sensitive (sw, FALSE); } static GtkWidget * template_run_create (GtkWidget * widget_inputs, struct template_t *t, GList * resources, GList * blanks, GtkWidget ** type_resource, GtkWidget ** type_blanknode, GtkWidget ** object, GtkWidget ** toggle) { GtkWidget *button; GtkWidget *sw; GtkWidget *label; GtkWidget *frame; GtkWidget *image; GtkWidget *vbox, *box, *hbox; GtkWidget *dialog; gchar s[1024]; GSList *l; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s: %s %s", PACKAGE, VERSION, _("Template"), t->name, t->version); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); label = gtk_label_new (_("Type")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, 5); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (frame), vbox); box = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 5); label = gtk_label_new ("Type: "); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); /* Possibilita' delle tipologie per l'input: */ l = NULL; *type_resource = gtk_radio_button_new_with_label (NULL, _("Resource")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (*type_resource), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (*type_resource)); gtk_box_pack_start (GTK_BOX (box), *type_resource, TRUE, TRUE, 3); *type_blanknode = gtk_radio_button_new_with_label (NULL, _("Blank node")); gtk_radio_button_set_group (GTK_RADIO_BUTTON (*type_blanknode), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (*type_blanknode)); gtk_box_pack_start (GTK_BOX (box), *type_blanknode, TRUE, TRUE, 3); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (*type_resource), TRUE); box = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), box, FALSE, FALSE, 5); label = gtk_label_new (_("Value: ")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 5); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 5); *object = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), *object, TRUE, TRUE, 0); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "list", resources); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), object); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); label = gtk_label_new (_("Template")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); *toggle = gtk_check_button_new (); gtk_container_add (GTK_CONTAINER (*toggle), label); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (*toggle), TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), *toggle); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 5); sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); g_signal_connect_after ((gpointer) * toggle, "toggled", G_CALLBACK (template_run_toggled), sw); gtk_container_add (GTK_CONTAINER (frame), sw); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), widget_inputs); button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); template_set_size (dialog, sw, widget_inputs); return dialog; } static gboolean template_run (GtkWidget * widget, struct template_t *t) { GtkWidget *dialog; GtkWidget *object; GtkWidget *widget_inputs; GtkWidget *type_resource; GtkWidget *type_blanknode; GtkWidget *toggle; GList *resources; GList *blanks; gint ret; gint automatic; if ((widget_inputs = g_object_get_data (G_OBJECT (widget), "widget_inputs"))) { gchar *object_saved; gboolean toggle_saved; gboolean type_resource_saved; object = g_object_get_data (G_OBJECT (widget), "subject_input"); type_resource = g_object_get_data (G_OBJECT (widget), "type_resource_input"); type_blanknode = g_object_get_data (G_OBJECT (widget), "type_blanknode_input"); automatic = (gint) g_object_get_data (G_OBJECT (widget), "type_blanknode_a_input"); toggle = g_object_get_data (G_OBJECT (widget), "toggle_input"); /* Salvo i dati precedenti: */ object_saved = (gchar *) gtk_entry_get_text (GTK_ENTRY (object)); if (object_saved) object_saved = g_strdup (object_saved); toggle_saved = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)); type_resource_saved = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_resource)); gtk_container_foreach (GTK_CONTAINER (widget_inputs), (GtkCallback) template_widget_save_on, NULL); dialog = gtk_widget_get_toplevel (widget_inputs); gtk_widget_show_all (dialog); while ((ret = gtk_dialog_run (GTK_DIALOG (dialog))) == GTK_RESPONSE_OK) { /* Se e' attiva la tipologia risorsa: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_resource))) { gchar *text; text = (gchar *) gtk_entry_get_text (GTK_ENTRY (object)); if (!text || !*text) { dialog_msg (_("No a compatible resource!")); continue; } } /* Se e' invece e' attivo il blank node: */ else if (!automatic && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_blanknode))) { gchar *text; text = (gchar *) gtk_entry_get_text (GTK_ENTRY (object)); if (!text || !*text) { if (dialog_ask (_ ("No a compatible blank node. Do you want create a automatic name?")) != GTK_RESPONSE_OK) continue; else automatic = 1; } } /* Controllo TUTTI i widget di input: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) { GList *old, *list; list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { if (template_widget_check (list->data)) break; list = list->next; } /* Si lamenta la funzione widget_check, quindi io devo solo * continuare: */ if (list) { g_list_free (old); continue; } g_list_free (old); } break; } /* Analizzo la risposta: */ switch (ret) { /* Se e' OK: */ case GTK_RESPONSE_OK: gtk_container_foreach (GTK_CONTAINER (widget_inputs), (GtkCallback) template_widget_save_off, NULL); if (object_saved) g_free (object_saved); gtk_widget_hide (dialog); break; default: /* Rimetto i dati com'erano prima se non si vuole salvarli: */ gtk_container_foreach (GTK_CONTAINER (widget_inputs), (GtkCallback) template_widget_save_reset, NULL); gtk_entry_set_text (GTK_ENTRY (object), object_saved ? object_saved : ""); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), toggle_saved); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (type_resource), type_resource_saved); if (object_saved) g_free (object_saved); gtk_widget_hide (dialog); break; } return TRUE; } resources = g_object_get_data (G_OBJECT (widget), "resources"); blanks = g_object_get_data (G_OBJECT (widget), "blanks"); if (!(widget_inputs = template_open_real (resources, blanks, t))) return FALSE; dialog = template_run_create (widget_inputs, t, resources, blanks, &type_resource, &type_blanknode, &object, &toggle); gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_toplevel (widget))); gtk_widget_show_all (dialog); automatic = 0; while ((ret = gtk_dialog_run (GTK_DIALOG (dialog))) == GTK_RESPONSE_OK) { GList *list, *old; GList *invisible; /* Se e' attiva la tipologia risorsa: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_resource))) { gchar *text; text = (gchar *) gtk_entry_get_text (GTK_ENTRY (object)); if (!text || !*text) { dialog_msg (_("No a compatible resource!")); continue; } } /* Se e' invece e' attivo il blank node: */ else if (!automatic && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (type_blanknode))) { gchar *text; text = (gchar *) gtk_entry_get_text (GTK_ENTRY (object)); if (!text || !*text) { if (dialog_ask (_ ("No a compatible blank node. Do you want create a automatic name?")) != GTK_RESPONSE_OK) continue; else automatic = 1; } } /* Controllo TUTTI i widget di input: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) { list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { if (template_widget_check (list->data)) break; list = list->next; } /* Si lamenta la funzione widget_check, quindi io devo solo * continuare: */ if (list) { g_list_free (old); continue; } g_list_free (old); } g_object_set_data (G_OBJECT (widget), "widget_inputs", widget_inputs); gtk_widget_hide (dialog); invisible = NULL; list = t->input; while (list) { struct template_input_t *input = list->data; if (!input->visible) { struct invisible_t *inv = g_malloc0 (sizeof (struct invisible_t)); inv->input = input; invisible = g_list_append (invisible, inv); } list = list->next; } g_object_set_data (G_OBJECT (widget), "invisible_inputs", invisible); g_object_set_data (G_OBJECT (widget), "subject_input", object); g_object_set_data (G_OBJECT (widget), "type_resource_input", type_resource); g_object_set_data (G_OBJECT (widget), "type_blanknode_input", type_blanknode); g_object_set_data (G_OBJECT (widget), "type_blanknode_a_input", (gpointer) automatic); g_object_set_data (G_OBJECT (widget), "toggle_input", toggle); break; } if (ret != GTK_RESPONSE_OK) { gtk_widget_destroy (dialog); return FALSE; } return TRUE; } /* TEMPLATE EDIT ************************************************************/ static void template_edit_set (GList ** widget_inputs, GList ** rdf, gchar * subject) { GList *list; GList *widget; /* TODO: per ogni widget, fare tripletta... */ widget = *widget_inputs; while (widget) { /* Per ogni singola tripletta: */ list = *rdf; while (list) { struct rdf_t *r = list->data; /* Se ha lo stesso soggetto richiesto: */ if (!strcmp (r->subject, subject)) { /* Rimuovo per eventuali problemi di ricorsione: */ list = list->next; *rdf = g_list_remove (*rdf, r); /* Se coincide e viene assegnato: */ if (template_widget_is_your (widget->data, r, rdf) == TRUE) { struct template_func_t *func; if ((func = g_object_get_data (G_OBJECT (widget->data), "func"))) { /* Se e' una tipologia diversa da cardinality, rimuovo: */ if (func->type != TEMPLATE_WIDGET_CARDINALITY) *widget_inputs = g_list_remove (*widget_inputs, widget->data); } template_edit_set (widget_inputs, rdf, subject); return; } *rdf = g_list_prepend (*rdf, r); continue; } list = list->next; } widget = widget->next; } } static gint template_edit_set_sort_func (GtkWidget * a, GtkWidget * b) { gint mca = (gboolean) g_object_get_data (G_OBJECT (a), "min_cardinality"); gint mcb = (gboolean) g_object_get_data (G_OBJECT (b), "min_cardinality"); if (mca >= mcb) return 0; return 1; } static GList * template_edit_set_sort (GList * widgets) { GList *copy = g_list_copy (widgets); return g_list_sort (copy, (GCompareFunc) template_edit_set_sort_func); } static void template_edit_subject_activated (GtkWidget * w, GtkTreePath * p, GtkTreeViewColumn * c, GtkWidget * dialog) { gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); } static gchar * template_edit_subject (GList * list) { GtkWidget *window, *hbox, *scrolledwindow, *treeview, *button, *frame; GtkListStore *model; GtkTreeIter iter; GtkCellRenderer *renderer; GtkTreeSelection *selection; GtkTreeViewColumn *column; gchar s[1024]; gchar *ret = NULL; GList *subjects = NULL, *tmp; while (list) { struct rdf_t *rdf = list->data; for (tmp = subjects; tmp; tmp = tmp->next) if (!strcmp (rdf->subject, tmp->data)) break; if (!tmp) subjects = g_list_append (subjects, rdf->subject); list = list->next; } if (g_list_length (subjects) == 1) { ret = g_strdup (subjects->data); g_list_free (subjects); return ret; } g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Template edit...")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_widget_set_size_request (window, 400, 200); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), hbox, TRUE, TRUE, 0); frame = gtk_frame_new (_("Select the Subject")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); g_signal_connect ((gpointer) treeview, "row_activated", G_CALLBACK (template_edit_subject_activated), window); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Subject"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); button = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_CANCEL); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); tmp = subjects; while (tmp) { gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, 0, strcmp (tmp->data, THIS_DOCUMENT) ? tmp-> data : _("This Document"), 1, tmp->data, -1); tmp = tmp->next; } g_list_free (subjects); gtk_widget_show_all (window); while ((gtk_dialog_run (GTK_DIALOG (window))) == GTK_RESPONSE_OK) { if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) { dialog_msg (_("Select a Subject!")); continue; } gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 1, &ret, -1); break; } g_object_unref (model); gtk_widget_destroy (window); return ret; } /* Questa funzione controlla l'esistenza delle triplette invisibli: */ static void template_edit_invisible (GList ** invisible, GList ** rdf, gchar * subject, struct template_t *t) { GList *list = t->input; struct invisible_t *inv; /* Per ogni input: */ while (list) { struct template_input_t *input = list->data; /* Se e' un invisibile: */ if (!input->visible) { /* Controllo se esiste all'interno dell'elenco: */ GList *tmp = *rdf; while (tmp) { struct rdf_t *r = tmp->data; /* Se lo trovo creo un input invisibile con la tripletta * e la rimuovo dall'elenco: */ if (!strcmp (r->subject, subject) && !strcmp (r->predicate, input->rdfs) && !strcmp (r->object, input->default_value)) { inv = g_malloc0 (sizeof (struct invisible_t)); inv->input = input; inv->rdf = r; *invisible = g_list_append (*invisible, inv); *rdf = g_list_remove (*rdf, r); break; } tmp = tmp->next; } /* Se non lo trovo, lo metto come nuovo da mettere: */ if (!tmp) { inv = g_malloc0 (sizeof (struct invisible_t)); inv->input = input; inv->rdf = NULL; *invisible = g_list_append (*invisible, inv); } } list = list->next; } } static void template_edit_dialog (GList * rdf, gint len) { GtkWidget *dialog; GtkWidget *hbox; GtkWidget *image; GtkWidget *label; GtkWidget *button; GtkWidget *scrolledwindow; GtkWidget *treeview; GtkTreeSelection *selection; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *frame; GtkListStore *model; GtkTreeIter iter; gchar s[1024]; gint i; dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Information...")); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_widget_set_size_request (dialog, 400, 200); hbox = gtk_hbox_new (FALSE, 8); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); i = g_list_length (rdf); g_snprintf (s, sizeof (s), _("Set %d of %d RDF triples"), len - i, len); label = gtk_label_new (s); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); frame = gtk_frame_new (_("RDF triples ignored")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_NONE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Subject"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Predicate"), renderer, "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Object"), renderer, "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); while (rdf) { struct rdf_t *r = rdf->data; gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, 0, r->subject, 1, r->predicate, 2, r->object, -1); rdf = rdf->next; } button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); gtk_widget_show_all (dialog); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } void template_edit (GtkWidget * w, struct template_t *t) { struct editor_data_t *data = editor_get_data (); GtkWidget *dialog; GtkWidget *vbox, *hbox, *gbox; GtkWidget *image; GtkWidget *frame; GtkWidget *button; GtkWidget *label; GtkWidget *subject; GtkWidget *sw; GtkWidget *button_subject; GtkWidget *button_subject_this; GtkWidget *widget_inputs; GList *list, *tmp, *invisible; GSList *l; GList *resources; GList *blanks; gchar s[1024]; gchar *s_str; gint len; if (!data || !data->rdf) { dialog_msg (_("This document is empty!")); return; } /* Rimuovo i template remoti chiesti precedentemente: */ template_remote_init (); if (!(s_str = template_edit_subject (data->rdf))) return; resources = create_resources (data); resources = create_resources_by_rdfs (resources); blanks = create_blank (data); if (!(widget_inputs = template_open_real (resources, blanks, t))) { g_list_free (resources); g_list_free (blanks); g_free (s_str); return; } /* Creo una copia della lista perche' queste vado pezzo per pezzo a * rimuoverle: */ for (tmp = NULL, list = data->rdf; list; list = list->next) tmp = g_list_append (tmp, list->data); len = g_list_length (tmp); /* Questa funzione imposta i valori delle varie triplette all'interno * dei widget */ if ((list = gtk_container_get_children (GTK_CONTAINER (widget_inputs)))) { GList *sorted = template_edit_set_sort (list); g_list_free (list); template_edit_set (&sorted, &tmp, s_str); if (sorted) g_list_free (sorted); } /* Rimuovo gli elementi invisibili: */ invisible = NULL; template_edit_invisible (&invisible, &tmp, s_str, t); template_edit_dialog (tmp, len); g_list_free (tmp); dialog = gtk_dialog_new (); g_snprintf (s, sizeof (s), "%s %s - %s: %s %s", PACKAGE, VERSION, _("Template"), t->name, t->version); gtk_window_set_title (GTK_WINDOW (dialog), s); gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dialog), main_window ()); gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE); label = gtk_label_new (_("Subject")); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); frame = gtk_frame_new (NULL); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, FALSE, FALSE, 5); vbox = gtk_vbox_new (FALSE, 3); gtk_container_add (GTK_CONTAINER (frame), vbox); gbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0); l = NULL; button = gtk_radio_button_new_with_label (NULL, _("Resource: ")); button_subject = button; gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); gtk_box_pack_start (GTK_BOX (gbox), button, FALSE, FALSE, 3); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (gbox), hbox, TRUE, TRUE, 5); /* Creazione soggetto con freccia: */ subject = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (hbox), subject, TRUE, TRUE, 0); button = gtk_button_new (); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_object_set_data (G_OBJECT (button), "list", resources); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (search_resources), subject); image = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); gtk_container_add (GTK_CONTAINER (button), image); gbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0); button = gtk_radio_button_new_with_label (NULL, _("This document")); button_subject_this = button; gtk_radio_button_set_group (GTK_RADIO_BUTTON (button), l); l = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); gtk_box_pack_start (GTK_BOX (gbox), button, TRUE, TRUE, 3); if (!strcmp (s_str, THIS_DOCUMENT)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); else gtk_entry_set_text (GTK_ENTRY (subject), s_str); sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), sw, TRUE, TRUE, 5); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), widget_inputs); button = gtk_button_new_from_stock ("gtk-no"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-ok"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); template_set_size (dialog, sw, widget_inputs); gtk_widget_show_all (dialog); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { GList *old; gchar *text; struct unredo_t *unredo; /* Check del soggetto: */ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_subject_this)) == TRUE) text = THIS_DOCUMENT; else text = (gchar *) gtk_entry_get_text (GTK_ENTRY (subject)); if (!text || !*text) { dialog_msg (_("Invalid subject!")); continue; } text = g_strdup (text); /* Controllo TUTTI i widget di input: */ list = old = gtk_container_get_children (GTK_CONTAINER (widget_inputs)); while (list) { if (template_widget_check (list->data)) break; list = list->next; } /* Si lamenta la funzione widget_check, quindi io devo solo * continuare: */ if (list) { g_free (text); g_list_free (old); continue; } /* A questo punto inserisco, quindi undo: */ unredo = unredo_new (data, UNREDO_TYPE_CHANGE); list = old; while (list) { /* Funzione che fa l'inserimento: */ template_widget_save (list->data, data, text, unredo); list = list->next; } /* Tutto quello che riguarda le triplette invisibili: */ if (invisible) { struct invisible_t *inv; /* Per ogni input invisible: */ list = invisible; while (list) { inv = list->data; template_invisible_save (text, inv->input, data, unredo, inv->rdf); /* Libero memoria: */ g_free (inv); list = list->next; } /* Distruggo la lista degli invisibli: */ g_list_free (invisible); } g_list_foreach (old, (GFunc) template_widget_destroy, NULL); g_list_free (old); g_free (text); data->changed = TRUE; /* Refreshio i namespace e li rigenero */ g_list_foreach (data->namespace, (GFunc) namespace_free, NULL); g_list_free (data->namespace); namespace_parse (data->rdf, &data->namespace); editor_refresh (data); break; } /* Libero memoria: */ g_list_free (resources); g_list_free (blanks); g_free (s_str); gtk_widget_destroy (dialog); } /* JAVASCRIPT ****************************************************************/ #ifdef USE_JS static gboolean template_js_evaluate (struct js_t *js, GtkWidget * widget, gchar * func) { js_current_widget (js, widget); return js_evaluate (js, func); } #endif /* VALUE FUNCTIONS ***********************************************************/ struct template_value_t * template_value_new (GtkWidget * widget) { struct template_func_t *func; struct template_value_t *value; value = g_malloc0 (sizeof (struct template_value_t)); func = g_object_get_data (G_OBJECT (widget), "func"); if (func && func->get) func->get (widget, value); return value; } void template_value_set (GtkWidget * w, struct template_value_t *value) { template_widget_save_off (w); template_widget_set (w, value); } void template_value_free (struct template_value_t *saved) { if (!saved) return; if (saved->value) g_free (saved->value); if (saved->lang) g_free (saved->lang); if (saved->datatype) g_free (saved->datatype); g_free (saved); } /* EOF ?!? */ /* * Il lonfo - Fosco Maraini * * Il lonfo non vaterca né gluisce * e molto raramente barigatta, * ma quando soffia il bego a bisce bisce * sdilenca un poco, e gnagio s'archipatta. * * E' frusco il lonfo! E' pieno di lupigna * arrafferia malversa e sofolenta! * * Se cionfi ti sbiduglia e t'arrupigna * se lugri ti botalla e ti criventa. * * Eppure il vecchio lonfo ammargelluto * che bete e zugghia e fonca nei trombazzi * fa lègica busìa, fa gisbuto; * e quasi quasi in segno di sberdazzi * gli affarferesti un gniffo. Ma lui zuto * t'alloppa, ti sbernecchia; e tu l'accazzi. * */ /* EOF */ morla-0.16.1/src/textview.c000066400000000000000000000426741156343060400155420ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" #define MORLA_POPUP_HEIGHT 150 #define MORLA_POPUP_WIDTH 300 #define MORLA_POPUP_SPAN 5 struct textview_tag_t { gchar *tag; gchar *cmp; PangoStyle style; PangoVariant variant; PangoWeight weight; PangoStretch stretch; gdouble scale; gchar *foreground; gchar *background; PangoUnderline underline; }; static void textview_popup_hide (GtkTextBuffer * buffer); static void textview_destroy (GtkWidget * widget, GtkTextBuffer * buffer); static gchar * textview_word (GtkTextBuffer * buffer, GtkTextIter ** ret_start, GtkTextIter ** ret_end) { GtkTextIter end; GtkTextMark *cursor; GString *word; gunichar c; gchar *utf8; gchar *str; /* Current iter: */ cursor = gtk_text_buffer_get_mark (buffer, "insert"); gtk_text_buffer_get_iter_at_mark (buffer, &end, cursor); *ret_end = gtk_text_iter_copy (&end); /* Until it is not inside a word, go back: */ while (gtk_text_iter_inside_word (*ret_end) == TRUE && gtk_text_iter_forward_char (*ret_end) == TRUE); /* If it is the last one, it is always empty: */ if (gtk_text_iter_ends_word (&end) == TRUE && gtk_text_iter_backward_char (&end) == FALSE) { gtk_text_iter_free (*ret_end); return NULL; } /* If it is not inside a word: */ if (gtk_text_iter_inside_word (&end) == FALSE) { gtk_text_iter_free (*ret_end); return NULL; } /* Until it is not inside a word, go back: */ while (gtk_text_iter_inside_word (&end) == TRUE && gtk_text_iter_backward_char (&end) == TRUE); word = g_string_new (NULL); /* If it is not the first char of the word, go to next one: */ if (gtk_text_iter_inside_word (&end) == FALSE) gtk_text_iter_forward_char (&end); *ret_start = gtk_text_iter_copy (&end); /* Get the word: */ do { c = gtk_text_iter_get_char (&end); gtk_text_iter_forward_char (&end); word = g_string_append_unichar (word, c); } while (gtk_text_iter_inside_word (&end) == TRUE); str = g_string_free (word, FALSE); utf8 = g_utf8_casefold (str, -1); g_free (str); return utf8; } static gboolean textview_key_press (GtkWidget * widget, GdkEventKey * event, GtkTextBuffer * buffer) { GtkWidget *tree; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; tree = g_object_get_data (G_OBJECT (buffer), "treeview"); model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree)); switch (event->keyval) { /* The next element in the list: */ case GDK_Down: if (gtk_tree_selection_get_selected (selection, NULL, &iter) == TRUE && gtk_tree_model_iter_next (model, &iter) == TRUE) gtk_tree_selection_select_iter (selection, &iter); else textview_popup_hide (buffer); return TRUE; /* The previous element in the list: */ case GDK_Up: if (gtk_tree_selection_get_selected (selection, NULL, &iter) == TRUE) { GtkTreePath *path; path = gtk_tree_model_get_path (model, &iter); if (gtk_tree_path_prev (path) == TRUE) gtk_tree_selection_select_path (selection, path); else textview_popup_hide (buffer); gtk_tree_path_free (path); } return TRUE; /* Insert this one: */ case GDK_Return: if (gtk_tree_selection_get_selected (selection, NULL, &iter) == TRUE) { gchar *str, *word; GtkTextIter *start, *end; gtk_tree_model_get (model, &iter, 0, &str, -1); if ((word = textview_word (buffer, &start, &end))) { gtk_text_buffer_delete (buffer, start, end); gtk_text_buffer_insert (buffer, start, str, -1); gtk_text_iter_free (start); gtk_text_iter_free (end); g_free (word); textview_popup_hide (buffer); } g_free (str); } return TRUE; /* Close the popup: */ case GDK_Escape: textview_popup_hide (buffer); return TRUE; default: return FALSE; } } static void textview_popup_show (GtkTextBuffer * buffer, GList * list, GtkTextIter * iter) { GtkWidget *text; GtkWidget *window; GtkWidget *treeview; GdkRectangle location; GtkTreeSelection *selection; GtkListStore *store; GtkTreeIter first; gint x, y, gx, gy; gulong id, *idp; /* If no window was created, I create it: */ if (!(window = g_object_get_data (G_OBJECT (buffer), "textview_popup"))) { GtkWidget *scrolledwindow; GtkCellRenderer *renderer; GtkTreeViewColumn *column; window = gtk_window_new (GTK_WINDOW_POPUP); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_decorated (GTK_WINDOW (window), FALSE); gtk_widget_set_size_request (window, MORLA_POPUP_WIDTH, MORLA_POPUP_HEIGHT); g_object_set_data (G_OBJECT (buffer), "textview_popup", window); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (window), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); store = gtk_list_store_new (1, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Completion", renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); g_object_set_data (G_OBJECT (buffer), "treeview", treeview); } /* Else I get the treeview widget: */ else treeview = g_object_get_data (G_OBJECT (buffer), "treeview"); /* Get the current position and set the window there: */ text = g_object_get_data (G_OBJECT (buffer), "widget"); gtk_text_view_get_iter_location (GTK_TEXT_VIEW (text), iter, &location); gdk_window_get_origin (text->window, &gx, &gy); x = gx + location.x + MORLA_POPUP_SPAN; y = gy + location.y + location.height + MORLA_POPUP_SPAN; if (gdk_screen_width () <= x + MORLA_POPUP_WIDTH) x -= x + MORLA_POPUP_WIDTH - gdk_screen_width (); if (gdk_screen_height () <= y + MORLA_POPUP_HEIGHT) y = gy + location.y - MORLA_POPUP_SPAN - MORLA_POPUP_HEIGHT; gtk_window_move (GTK_WINDOW (window), x, y); /* Remove the previous element and insert the next ones: */ store = (GtkListStore *) gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &first, NULL, 0)) gtk_list_store_remove (store, &first); for (; list; list = list->next) { gtk_list_store_append (store, &first); gtk_list_store_set (store, &first, 0, list->data, -1); } if (!g_object_get_data (G_OBJECT (buffer), "handler")) { id = g_signal_connect (text, "key-press-event", G_CALLBACK (textview_key_press), buffer); idp = g_malloc0 (sizeof (gulong)); *idp = id; g_object_set_data (G_OBJECT (buffer), "handler", idp); } selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &first) == TRUE) gtk_tree_selection_select_iter (selection, &first); /* Show it: */ gtk_widget_show_all (window); } static void textview_popup_hide (GtkTextBuffer * buffer) { GtkWidget *window; GtkWidget *text; gulong *idp; if ((window = g_object_get_data (G_OBJECT (buffer), "textview_popup"))) { gtk_widget_destroy (window); g_object_steal_data (G_OBJECT (buffer), "textview_popup"); } if ((idp = g_object_get_data (G_OBJECT (buffer), "handler")) && (text = g_object_get_data (G_OBJECT (buffer), "widget"))) { g_object_steal_data (G_OBJECT (buffer), "handler"); g_signal_handler_disconnect (text, *idp); g_free (idp); } } static void textview_color (GtkTextBuffer * buffer, gchar * word, GtkTextIter * start, GtkTextIter * end) { struct textview_tag_t *tag; GList *list; GSList *tags; if (!(list = g_object_get_data (G_OBJECT (buffer), "tags"))) return; for (; list; list = list->next) { tag = list->data; if (!g_utf8_collate (tag->cmp, word)) break; } /* Founded: */ if (list) { if (!(tags = gtk_text_iter_get_tags (start))) { GtkTextTag *t; if (tag->style != PANGO_STYLE_NORMAL && (t = gtk_text_buffer_create_tag (buffer, NULL, "style", tag->style, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); if (tag->variant != PANGO_VARIANT_NORMAL && (t = gtk_text_buffer_create_tag (buffer, NULL, "variant", tag->variant, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); if (tag->weight != PANGO_WEIGHT_NORMAL && (t = gtk_text_buffer_create_tag (buffer, NULL, "weight", tag->weight, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); if (tag->stretch != PANGO_STRETCH_NORMAL && (t = gtk_text_buffer_create_tag (buffer, NULL, "stretch", tag->stretch, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); if (tag->scale != PANGO_SCALE_MEDIUM && (t = gtk_text_buffer_create_tag (buffer, NULL, "scale", tag->scale, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); if (tag->foreground && (t = gtk_text_buffer_create_tag (buffer, NULL, "foreground", tag->foreground, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); if (tag->background && (t = gtk_text_buffer_create_tag (buffer, NULL, "background", tag->background, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); if (tag->underline && (t = gtk_text_buffer_create_tag (buffer, NULL, "underline", tag->underline, NULL))) gtk_text_buffer_apply_tag (buffer, t, start, end); } } /* Not founded: */ else { if ((tags = gtk_text_iter_get_tags (start))) for (; tags; tags = tags->next) gtk_text_buffer_remove_tag (buffer, tags->data, start, end); } } static void textview_propage (GtkTextBuffer * buffer) { void (*changed) (GtkWidget *, gpointer) = g_object_get_data (G_OBJECT (buffer), "changed_func"); if (changed) { gpointer data = g_object_get_data (G_OBJECT (buffer), "changed_data"); GtkWidget *widget = g_object_get_data (G_OBJECT (buffer), "widget"); changed (widget, data); } } static void textview_textview_changed (GtkTextBuffer * buffer, GCompletion * completion) { GList *list; gchar *word; GtkTextIter *start, *end; if (!(word = textview_word (buffer, &start, &end))) { textview_popup_hide (buffer); textview_propage (buffer); return; } /* Color the word: */ textview_color (buffer, word, start, end); /* Search it: */ if (!g_object_get_data (G_OBJECT (buffer), "popup_off") && (list = g_completion_complete (completion, word, NULL))) textview_popup_show (buffer, list, end); else textview_popup_hide (buffer); g_free (word); gtk_text_iter_free (start); gtk_text_iter_free (end); textview_propage (buffer); } void textview_add_tag (GtkWidget * text, gchar * tag, PangoStyle style, PangoVariant variant, PangoWeight weight, PangoStretch stretch, gdouble scale, gchar * foreground, gchar * background, PangoUnderline underline) { GList *list; struct textview_tag_t *data; GCompletion *completion; GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text)); list = g_object_get_data (G_OBJECT (buffer), "tags"); data = g_malloc0 (sizeof (struct textview_tag_t)); data->tag = g_strdup (tag); data->cmp = g_utf8_casefold (tag, -1); data->style = style; data->variant = variant; data->weight = weight; data->stretch = stretch; data->scale = scale; data->foreground = g_strdup (foreground); data->background = g_strdup (background); data->underline = underline; list = g_list_append (list, data); g_object_set_data (G_OBJECT (buffer), "tags", list); list = g_list_append (NULL, tag); completion = g_object_get_data (G_OBJECT (buffer), "completion"); g_completion_add_items (completion, list); } static gint textview_compare (gchar * s1, gchar * s2, gsize n) { gint ret; s1 = g_utf8_casefold (s1, g_utf8_strlen (s1, n)); s2 = g_utf8_casefold (s2, g_utf8_strlen (s2, n)); ret = g_utf8_collate (s1, s2); g_free (s1); g_free (s2); return ret; } static gboolean textview_focus_out (GtkTextView * text, GdkEventFocus * event, GtkTextBuffer * buffer) { textview_popup_hide (buffer); return FALSE; } GtkWidget * textview_new (GCallback change, gpointer data) { GtkWidget *text; GtkTextBuffer *buffer; GCompletion *completion; completion = g_completion_new (NULL); g_completion_set_compare (completion, (GCompletionStrncmpFunc) textview_compare); buffer = gtk_text_buffer_new (NULL); g_signal_connect ((gpointer) buffer, "changed", G_CALLBACK (textview_textview_changed), completion); text = gtk_text_view_new_with_buffer (buffer); gtk_text_view_set_editable (GTK_TEXT_VIEW (text), TRUE); g_object_set_data (G_OBJECT (buffer), "widget", text); g_object_set_data (G_OBJECT (buffer), "completion", completion); if (change) { g_object_set_data (G_OBJECT (buffer), "changed_func", change); if (data) g_object_set_data (G_OBJECT (buffer), "changed_data", data); } g_signal_connect ((gpointer) text, "focus-out-event", G_CALLBACK (textview_focus_out), buffer); g_signal_connect ((gpointer) text, "destroy", G_CALLBACK (textview_destroy), buffer); return text; } static void textview_color_all (GtkTextBuffer * buffer) { GtkTextIter start, end, wend; gchar *word, *utf8; gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); while (gtk_text_iter_compare (&start, &end) < 0) { wend = start; gtk_text_iter_forward_word_end (&wend); word = gtk_text_buffer_get_text (buffer, &start, &wend, FALSE); utf8 = g_utf8_casefold (word, -1); g_free (word); textview_color (buffer, utf8, &start, &wend); g_free (utf8); /* now move wend to the beginning of the next word, */ gtk_text_iter_forward_word_end (&wend); gtk_text_iter_backward_word_start (&wend); /* make sure we've actually advanced * (we don't advance in some corner cases), */ if (gtk_text_iter_equal (&start, &wend)) break; start = wend; } } void textview_insert (GtkWidget * textview, GtkTextIter * iter, gchar * text, gint len) { GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); g_object_set_data (G_OBJECT (buffer), "popup_off", buffer); gtk_text_buffer_insert (buffer, iter, text, len); textview_color_all (buffer); g_object_steal_data (G_OBJECT (buffer), "popup_off"); } void textview_insert_at_cursor (GtkWidget * textview, gchar * text, gint len) { GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); g_object_set_data (G_OBJECT (buffer), "popup_off", buffer); gtk_text_buffer_insert_at_cursor (buffer, text, len); textview_color_all (buffer); g_object_steal_data (G_OBJECT (buffer), "popup_off"); } static void textview_tags_free (struct textview_tag_t *tag) { if (!tag) return; if (tag->tag) g_free (tag->tag); if (tag->cmp) g_free (tag->cmp); if (tag->foreground) g_free (tag->foreground); if (tag->background) g_free (tag->background); g_free (tag); } void textview_clean_tags (GtkWidget * widget) { GtkTextBuffer *buffer; GList *list; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)); if ((list = g_object_get_data (G_OBJECT (buffer), "tags"))) { g_list_foreach (list, (GFunc) textview_tags_free, NULL); g_list_free (list); g_object_steal_data (G_OBJECT (buffer), "tags"); } } static void textview_destroy (GtkWidget * widget, GtkTextBuffer * buffer) { gulong *idp; textview_popup_hide (buffer); if ((idp = g_object_get_data (G_OBJECT (buffer), "handler"))) { g_object_steal_data (G_OBJECT (buffer), "handler"); g_signal_handler_disconnect (widget, *idp); g_free (idp); } textview_clean_tags (widget); } /* EOF */ morla-0.16.1/src/unredo.c000066400000000000000000000216101156343060400151420ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" gint undo_max_value; static void unredo_refresh (struct editor_data_t *data); static void change_free (struct unredo_change_t *change); static struct unredo_t *unredo_run (struct editor_data_t *, struct unredo_t *, void *f); /* Questa funzione e' come unredo_new ma e' studiata per gli redo. Gli * redo sono gestiti SOLO in questo file. Gli altri gestiscono gli undo: */ static struct unredo_t * unredo_new_redo (struct editor_data_t *data, enum unredo_type_t type) { struct unredo_t *ret; ret = (struct unredo_t *) g_malloc0 (sizeof (struct unredo_t)); ret->type = type; data->redo = g_list_prepend (data->redo, ret); /* Attivo la sensibilita' degli redo: */ gtk_widget_set_sensitive (redo_widget[0], TRUE); gtk_widget_set_sensitive (redo_widget[1], TRUE); return ret; } /* Dato un documento e una tipologia di undo, questo viene allocato, * inserito in una lista e restituito: */ struct unredo_t * unredo_new (struct editor_data_t *data, enum unredo_type_t type) { struct unredo_t *ret; ret = (struct unredo_t *) g_malloc0 (sizeof (struct unredo_t)); ret->type = type; data->undo = g_list_prepend (data->undo, ret); if (g_list_length (data->undo) > undo_max_value) { GList *tmp = g_list_last (data->undo); unredo_destroy (data, tmp->data); } /* Attivo la sensibilita' degli undo: */ gtk_widget_set_sensitive (undo_widget[0], TRUE); gtk_widget_set_sensitive (undo_widget[1], TRUE); return ret; } /* Aggiunge un elemento ad un redo o un undo: */ void unredo_add (struct unredo_t *unredo, struct rdf_t *rdf, struct rdf_t *other) { struct unredo_change_t *change; /* A seconda della tipologia inserisco in una lista direttamente il * puntatore oppure creo una struttura dati change apposta: */ switch (unredo->type) { case UNREDO_TYPE_ADD: unredo->list = g_list_append (unredo->list, rdf); break; case UNREDO_TYPE_DEL: unredo->list = g_list_append (unredo->list, rdf); break; case UNREDO_TYPE_CHANGE: change = (struct unredo_change_t *) g_malloc0 (sizeof (struct unredo_change_t)); change->now = rdf; change->prev = other; unredo->list = g_list_append (unredo->list, change); break; } } /* Distrugge un undo o un redo: */ void unredo_destroy (struct editor_data_t *data, struct unredo_t *del) { data->undo = g_list_remove (data->undo, del); /* Rimuovo l'ultimo elemento oppure rimuovo anche della memoria: */ switch (del->type) { case UNREDO_TYPE_ADD: g_list_free (del->list); break; case UNREDO_TYPE_DEL: g_list_foreach (del->list, (GFunc) rdf_free, NULL); g_list_free (del->list); break; case UNREDO_TYPE_CHANGE: g_list_foreach (del->list, (GFunc) change_free, NULL); g_list_free (del->list); break; } g_free (del); } /* Questa funzione aziona un undo: */ void unredo_undo (void) { struct editor_data_t *data = editor_get_data (); struct unredo_t *unredo, *new; if (!data || !data->undo) return; /* Prendo il primo unredo, eseguo, rimuovo e refreshio: */ unredo = (struct unredo_t *) data->undo->data; /* Qui dico che l'operazione inversa sara' un unredo_new_redo */ new = unredo_run (data, unredo, unredo_new_redo); data->undo = g_list_remove (data->undo, unredo); g_free (unredo); unredo_refresh (data); data->changed = TRUE; editor_refresh (data); } /* Come sopra ma per gli redo: */ void unredo_redo (void) { struct editor_data_t *data = editor_get_data (); struct unredo_t *unredo, *new; if (!data || !data->redo) return; unredo = (struct unredo_t *) data->redo->data; /* Qui dico che l'operazione inversa sara' un unredo_new */ new = unredo_run (data, unredo, unredo_new); data->redo = g_list_remove (data->redo, unredo); g_free (unredo); unredo_refresh (data); data->changed = TRUE; editor_refresh (data); } /* Aziona un undo o redo: */ static struct unredo_t * unredo_run (struct editor_data_t *data, struct unredo_t *unredo, void *f) { struct unredo_t *new = NULL; struct unredo_change_t *change; struct rdf_t *rdf; GList *l; struct unredo_t *(*func) (struct editor_data_t *, enum unredo_type_t) = f; /* A seconda della tipologia, creo una operazione inversa passatami come * argomento: */ switch (unredo->type) { case UNREDO_TYPE_ADD: new = func (data, UNREDO_TYPE_DEL); /* Ricerco l'elemento e se lo trovo, rimuovo e metto dentro al redo */ l = unredo->list; while (l) { if (g_list_find (data->rdf, l->data)) { unredo_add (new, l->data, NULL); data->rdf = g_list_remove (data->rdf, l->data); } l = l->next; } g_list_free (unredo->list); break; case UNREDO_TYPE_DEL: new = func (data, UNREDO_TYPE_ADD); /* Inserisco semplicemente: */ l = unredo->list; while (l) { unredo_add (new, l->data, NULL); data->rdf = g_list_append (data->rdf, l->data); l = l->next; } g_list_free (unredo->list); break; case UNREDO_TYPE_CHANGE: new = func (data, UNREDO_TYPE_CHANGE); /* Per i cambiamenti: */ l = unredo->list; while (l) { change = l->data; /* Se e' presente nella lista... */ if (g_list_find (data->rdf, change->now)) { rdf = change->now; /* Se esiste una versione precedente della stessa tripletta * sostituisco: */ if (change->prev) { unredo_add (new, change->now, rdf_copy (rdf)); g_free (rdf->subject); rdf->subject = g_strdup (change->prev->subject); g_free (rdf->predicate); rdf->predicate = g_strdup (change->prev->predicate); g_free (rdf->object); rdf->object = g_strdup (change->prev->object); if (rdf->lang) g_free (rdf->lang); rdf->lang = change->prev->lang ? g_strdup (change->prev->lang) : NULL; if (rdf->datatype) g_free (rdf->datatype); rdf->datatype = change->prev->datatype ? g_strdup (change->prev-> datatype) : NULL; rdf->object_type = change->prev->object_type; } /* Se non esiste vuol dire che e' un cambiamento misto * ad inserimento e quindi procedo con la rimozione: */ else { unredo_add (new, rdf_copy (rdf), NULL); data->rdf = g_list_remove (data->rdf, rdf); } } /* Se non e' presente nell'elenco vuol dire che e' un cambiamento * misto ad un inserimento e devo rimettere la tripletta: */ else { unredo_add (new, change->now, NULL); data->rdf = g_list_append (data->rdf, change->now); } change_free (change); l = l->next; } g_list_free (unredo->list); break; } return new; } /* Questa funzione fa il refresh della sensibilita' dei widget */ static void unredo_refresh (struct editor_data_t *data) { gtk_widget_set_sensitive (undo_widget[0], data->undo ? TRUE : FALSE); gtk_widget_set_sensitive (undo_widget[1], data->undo ? TRUE : FALSE); gtk_widget_set_sensitive (redo_widget[0], data->redo ? TRUE : FALSE); gtk_widget_set_sensitive (redo_widget[1], data->redo ? TRUE : FALSE); } /* Questa funzione libera la memoria di un change */ static void change_free (struct unredo_change_t *change) { if (!change) return; /* Se esiste un precedente, lo rimuovo: */ if (change->prev) rdf_free (change->prev); /* Altrimenti e' un cambiamento misto e devo rimuovere se non e' presente * nel file: */ else { struct editor_data_t *data = editor_get_data (); if (!g_list_find (data->rdf, change->now)) rdf_free (change->now); } g_free (change); } /* Quando si cambia il livello di undo/redo dalle preferences devo * rimuovere gli eccessi: */ void unredo_change_value (void) { struct editor_data_t *data = editor_data; while (data) { gint len = g_list_length (data->undo); if (len > undo_max_value) { len -= undo_max_value; while (len) { GList *tmp = g_list_last (data->undo); unredo_destroy (data, tmp->data); len--; } } data = data->next; } } /* EOF */ morla-0.16.1/src/update.c000066400000000000000000000255351156343060400151420ustar00rootroot00000000000000/* morla - Copyright (C) 2005-2007 bakunin - Andrea Marchesini * * * This source code is free software; you can redistribute it and/or * modify it under the terms of the GNU Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * This source code 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. * Please refer to the GNU Public License for more details. * * You should have received a copy of the GNU Public License along with * this source code; if not, write to: * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H #include #else # error Use configure; make; make install #endif #include "editor.h" gchar *update_url = NULL; gint update_show; static struct update_t *update_data = NULL; static GMutex *update_mutex = NULL; static gint status = 0; /* Libero un template dalla memoria: */ static void update_template_free (struct update_template_t *t) { if (!t) return; if (t->uri) g_free (t->uri); if (t->name) g_free (t->name); if (t->description) g_free (t->description); if (t->author) g_free (t->author); if (t->version) g_free (t->version); g_free (t); } /* Libero un intero update: */ static void update_free (struct update_t *up) { if (!up) return; if (up->last_version) g_free (up->last_version); if (up->templates) { g_list_foreach (up->templates, (GFunc) update_template_free, NULL); g_list_free (up->templates); } g_free (up); } /* Funzione per parsare un template dentro al file XML scaricato dal sito */ static void thread_template (nxml_data_t * data, struct update_t *ret) { struct update_template_t *t; t = (struct update_template_t *) g_malloc0 (sizeof (struct update_template_t)); while (data) { if (data->type == NXML_TYPE_ELEMENT) { if (!strcmp (data->value, "uri")) nxml_get_string (data, &t->uri); else if (!strcmp (data->value, "name")) nxml_get_string (data, &t->name); else if (!strcmp (data->value, "description")) nxml_get_string (data, &t->description); else if (!strcmp (data->value, "author")) nxml_get_string (data, &t->author); else if (!strcmp (data->value, "version")) nxml_get_string (data, &t->version); } data = data->next; } if (!t->uri || !t->name) update_template_free (t); else ret->templates = g_list_append (ret->templates, t); } /* Per ogni sezione template del file di configurazione lancia la funzione * di sopra: */ static void thread_templates (nxml_data_t * data, struct update_t *ret) { while (data) { if (data->type == NXML_TYPE_ELEMENT && !strcmp (data->value, "template")) thread_template (data->children, ret); data = data->next; } } /* Questa funzione lanciata in un thread separato fa il check di eventuali * aggiornamenti riempiendo una struttura dati in memoria: */ static void * thread (void *dummy) { nxml_t *nxml; nxml_data_t *data; struct update_t *ret; if (nxml_new (&nxml) != NXML_OK) { status = 0; g_thread_exit (NULL); return NULL; } if (nxml_set_user_agent (nxml, user_agent ()) != NXML_OK) { status = 0; g_thread_exit (NULL); return NULL; } if (nxml_parse_url (nxml, update_url) != NXML_OK) { nxml_free (nxml); status = 0; g_thread_exit (NULL); return NULL; } if (nxml_root_element (nxml, &data) != NXML_OK || !data || strcmp (data->value, "morla")) { nxml_free (nxml); status = 0; g_thread_exit (NULL); return NULL; } ret = (struct update_t *) g_malloc0 (sizeof (struct update_t)); data = data->children; while (data) { if (data->type == NXML_TYPE_ELEMENT) { if (!strcmp (data->value, "last_version")) nxml_get_string (data, &ret->last_version); else if (!strcmp (data->value, "templates")) thread_templates (data->children, ret); } data = data->next; } nxml_free (nxml); /* Quando devo aggiornare, locko la struttura dati e scrivo: */ g_mutex_lock (update_mutex); if (update_data) update_free (update_data); update_data = ret; g_mutex_unlock (update_mutex); status = 0; g_thread_exit (NULL); return NULL; } /* Questa funzione lanciata ogni 20 minuti, lancia il thread se quello di * prima ha finito: */ gint update_timer (void) { GThread *th; if (status) return 1; status = 1; update_mutex = g_mutex_new (); th = g_thread_create ((GThreadFunc) thread, NULL, FALSE, NULL); return 1; } /* Ci sono aggiornamenti ? */ int update_check (void) { gchar *version = NULL; /* Se il thread non sta salvando dentro la zona di memoria: */ if (g_mutex_trylock (update_mutex) == FALSE) return 0; if (status || !update_data) { g_mutex_unlock (update_mutex); return 0; } /* Controllo la versione: */ if (strcmp (update_data->last_version, VERSION)) version = g_strdup (update_data->last_version); g_mutex_unlock (update_mutex); /* Se la versione non coincide faccio il popup: */ if (version) { gchar *s; s = g_strdup_printf (_("A new release of %s is out!\nTry %s %s!"), PACKAGE, PACKAGE, version); g_free (version); dialog_msg (s); g_free (s); } return version ? 1 : 0; } static void update_search_refresh (GtkListStore * model) { GtkTreeIter iter; GList *list, *l; struct update_template_t *t; gint ret; /* Rimuovo tutto: */ while (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (model), &iter, NULL, 0)) gtk_list_store_remove (model, &iter); /* Per ogni template presente in elenco inserisco una riga: */ list = update_data->templates; while (list) { t = list->data; ret = 1; l = template_list; while (l) { /* inserisco solo se e' una versione diversa da quella * gia' importata: */ if (!strcmp (((struct template_t *) l->data)->uri, t->uri) && !strcmp (((struct template_t *) l->data)->version, t->version)) { ret = 0; break; } l = l->next; } if (ret) { gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, 0, t->name, 1, t->description, 2, t->author, 3, t->version, 4, t->uri, -1); } list = list->next; } } /* Funzione per la ricerca di aggiornamenti. Questa funzione e' bloccante * grazie al mutex. */ void update_search (void) { GtkWidget *window, *hbox, *scrolledwindow, *treeview, *button, *frame; GtkListStore *model; GtkCellRenderer *renderer; GtkTreeSelection *selection; GtkTreeViewColumn *column; GtkTreeIter iter; gchar s[1024]; gint ret; g_mutex_lock (update_mutex); if (!update_data) { g_mutex_unlock (update_mutex); dialog_msg (_("No updates found!")); return; } g_snprintf (s, sizeof (s), "%s %s - %s", PACKAGE, VERSION, _("Remote templates")); window = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (window), s); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_modal (GTK_WINDOW (window), TRUE); gtk_window_set_transient_for (GTK_WINDOW (window), main_window ()); gtk_widget_set_size_request (window, 400, 200); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), hbox, TRUE, TRUE, 0); frame = gtk_frame_new (_("Remote templates")); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (frame), scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_SHADOW_IN); model = gtk_list_store_new (5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); gtk_container_add (GTK_CONTAINER (scrolledwindow), treeview); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Name"), renderer, "text", 0, NULL); gtk_tree_view_column_set_sort_column_id (column, 0); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Description"), renderer, "text", 1, NULL); gtk_tree_view_column_set_sort_column_id (column, 1); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Author"), renderer, "text", 2, NULL); gtk_tree_view_column_set_sort_column_id (column, 2); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); gtk_tree_view_column_set_resizable (column, TRUE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Version"), renderer, "text", 3, NULL); gtk_tree_view_column_set_sort_column_id (column, 3); gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); button = gtk_button_new_from_stock ("gtk-add"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_OK); gtk_widget_set_can_default(button, TRUE); button = gtk_button_new_from_stock ("gtk-close"); gtk_dialog_add_action_widget (GTK_DIALOG (window), button, GTK_RESPONSE_NO); gtk_widget_set_can_default(button, TRUE); update_search_refresh (model); gtk_widget_show_all (window); while (1) { ret = gtk_dialog_run (GTK_DIALOG (window)); /* se devo importare: */ if (ret == GTK_RESPONSE_OK) { gchar *uri; /* Prelevo quallo selezionato: */ if (gtk_tree_selection_get_selected (selection, NULL, &iter) == FALSE) { dialog_msg (_("Select some templates!")); continue; } gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 4, &uri, -1); /* importo: */ if (template_import (uri, NULL, TRUE, TRUE) == TRUE) { template_update (); template_save (); update_search_refresh (model); } g_free (uri); continue; } else break; } g_object_unref (model); gtk_widget_destroy (window); g_mutex_unlock (update_mutex); } /* EOF */